pax_global_header00006660000000000000000000000064126567664400014532gustar00rootroot0000000000000052 comment=dfcaa90b4ed005716de29d64b36d3abea0df715f yard-master/000077500000000000000000000000001265676644000133265ustar00rootroot00000000000000yard-master/.gitignore000066400000000000000000000001311265676644000153110ustar00rootroot00000000000000_Yardoc .DS_Store *.rbc *.pdf .yardoc *.gem Gemfile.lock /pkg /doc /doc_guide /coverage yard-master/.rspec000066400000000000000000000000101265676644000144320ustar00rootroot00000000000000--color yard-master/.travis.yml000066400000000000000000000027111265676644000154400ustar00rootroot00000000000000# Enables Travis to use their new container-based infrastructure sudo: false # Build for Ruby language: ruby # Enables caching for bundler cache: bundler # Passes arguments to bundle install (http://gembundler.com/man/bundle-install.1.html) # bundler_args: # Specify which ruby versions you wish to run your tests on, each version will be used rvm: - 1.8.7 - 1.9.3 - 2.0 - 2.1 # - 2.2 - re-enable after https://bugs.ruby-lang.org/issues/10693 is fixed - jruby # - ruby-head # RedCloth does not compile on head # - 1.8.6 # Does not work on travis-ci # - 1.9.1 # Does not work on travis-ci # - 1.9.2 # Does not work on travis-ci ..really? # - ree # Does not work on travis-ci ..really? # Define how to run your tests (defaults to `bundle exec rake` or `rake` depending on whether you have a `Gemfile`) script: "bundle exec rake travis_ci" # Define tasks to be completed before and after tests run . Will allow folding of content on frontend #before_script: # - command_1 # - command_2 # #after_script: # - command_1 # - command_2 # Specify an ENV variable to run before: 'bundle install' and 'rake' (or your defined 'script') env: "CI=1 SUITE=1 " # Specify the recipients for email notification #notifications: # recipients: # - email-address-1 # - email-address-2 # Disable email notifications #notifications: # disabled: true notifications: webhooks: urls: - https://webhooks.gitter.im/e/c6dbb9323007dfcf81df yard-master/.yardopts000066400000000000000000000010501265676644000151700ustar00rootroot00000000000000--protected --no-private --embed-mixin ClassMethods --exclude /server/templates/ --exclude /yard/rubygems/ --asset docs/images:images --tag yard.signature:"YARD Tag Signature" --type-name-tag yard.tag:"YARD Tag" --type-name-tag yard.directive:"YARD Directive" --hide-tag yard.tag --hide-tag yard.directive --hide-tag yard.signature --load ./docs/templates/plugin.rb - CHANGELOG.md docs/WhatsNew.md docs/GettingStarted.md docs/Tags.md docs/Overview.md docs/CodeObjects.md docs/Parser.md docs/Handlers.md docs/TagsArch.md docs/Templates.md LICENSE LEGAL yard-master/.yardopts_guide000066400000000000000000000004571265676644000163570ustar00rootroot00000000000000-t guide --title YARD -o doc_guide --exclude /server/templates/ --exclude /yard/rubygems/ --asset docs/images:images - CHANGELOG.md docs/WhatsNew.md docs/GettingStarted.md docs/Tags.md docs/Overview.md docs/CodeObjects.md docs/Parser.md docs/Handlers.md docs/TagsArch.md docs/Templates.md LICENSE LEGAL yard-master/.yardopts_i18n000066400000000000000000000007771265676644000160460ustar00rootroot00000000000000--protected --no-private --exclude /server/templates/ --exclude /yard/rubygems/ --asset docs/images:images --tag yard.signature:"YARD Tag Signature" --type-name-tag yard.tag:"YARD Tag" --type-name-tag yard.directive:"YARD Directive" --hide-tag yard.tag --hide-tag yard.directive --hide-tag yard.signature --load ./docs/templates/plugin.rb - CHANGELOG.md docs/WhatsNew.md docs/GettingStarted.md docs/Tags.md docs/Overview.md docs/CodeObjects.md docs/Parser.md docs/Handlers.md docs/TagsArch.md docs/Templates.md yard-master/CHANGELOG.md000066400000000000000000000407201265676644000151420ustar00rootroot00000000000000# 0.8.7.6 - October 26, 2014 - Support using `@option` tag on keyword arg splat parameter. (#729) - Add `.stats_options` for `YardocTask`. (#800, #801) # 0.8.7.5 - October 26, 2014 - Fix linking of methods in top level namespace in method listing. (#776) - Support using C macros in function declarations. (#810) - YARD will no longer group comment blocks starting on the same column if they are preceded by code. (#798) - Handle anonymous lambda calls in toplevel scope. (#774) - Support I18n in `@overload` tags. (#794) - Support `yard stats` for objects with no file property. (#792) - Support for named arguments in Ruby >= 2.1. (#785) - Exclude README backup files from YARD generation. (#790) - Turned on the lax spacing option in Redcarpet to comply with the Markdown standard. - Escape HTML in YARD server search placeholder template. - Fix issue with `private_class_method` support. (#760, #767) - Enable tables support by default in Redcarpet Markdown provider. (#765) # 0.8.7.4 - March 22, 2014 - Mark C methods as explicit but also remove explicit check in stats. (#727) - Report unresolved parent namespaces as undocumentable errors instead. (#753) - No longer ignore overridden methods from documentation check in stats (#719) - Fix JRuby throwing exception when remove_method called on non-existent method. (#732) - Add basic support for `private_class_method` (#747) - Ensure namespace is always set when parent module is not found. (#753) - Set overflow as auto on table of contents. - Report 100% documented if nothing is undocumented. (#754) - Added support for RubyGems 2.0.0+. (#742) - Allow users to enter their own YARD RakeTask name. (#705) - Fixed a typo that was causing Windows detection to always fail. (#715) - Add debug information when loading a plugin fails. (#711) # 0.8.7.3 - November 1, 2013 - Handle Unicode method/class/file names in server URL encoding (lsegal/rubydoc.info#69). - Style keyword style hashes with same symbol color in code highlighting (#707). - Fix broken JS when visiting docs in file:// scheme (#706). - Add support for new AsciiDoc file extensions (#704). - Fix issues where non-Ruby code blocks would not display in Ruby 2 (#702). - Add support for extra Ruby 2 symbol types in Ripper (#701). - Ensure config directory exists before saving config file (#700). # 0.8.7.2 - September 18, 2013 - Disallow absolute URLs when using frame anchor support. - Support casted functions in CRuby method declarations (#697) # 0.8.7.1 - September 11, 2013 - Fix potential XSS issue with frame anchor support. - Add support for gettext 3.x gem. # 0.8.7 - July 26, 2013 - Added `--hide-api API` option to hide objects with a given `@api` tag (#685). - Added "Returns ...." prefix to summary when a lone @return tag is used. - Fixed issue that caused ref tags to be added to a docstring twice (#678). - Fixed formatting issue in docstring summaries (#686) # 0.8.6.2 - June 27, 2013 - Fixed issue where `yard graph` was not displaying methods # 0.8.6.1 - April 14, 2013 - Fixed broken links in File menu on default HTML template - Added --layout switch to `yard display` to wrap output in layout template. - See {file:docs/WhatsNew.md} for more information on added features. # 0.8.6 - April 13, 2013 - Various fixes and improved Ruby 2.x compatibility support - Added support for `asciidoc` markup type - Added `yard markups` command to list available markup types - Added `yard display` command to display and format an individual object - See {file:docs/WhatsNew.md} for more information on added features. # 0.8.5.2 - February 26, 2013 - Support new keyword argument syntax in method signatures (Ruby 2.x) # 0.8.5.1 - February 25, 2013 - Fix `yard diff` of gem files with RubyGems 2.x # 0.8.5 - February 24, 2013 - Basic support for Ruby 2.0 (fix compat issues in RDoc 4.0, RubyGems 2.0) - Add CSS styling for tables in default HTML template # 0.8.4.1 - February 5, 2013 - Fix regression that broke loading of existing yardoc dbs (#648) # 0.8.4 - February 4, 2013 - Add `-B/--bind` switch to yard server (#593, #608) - Add CodeObjects::Base#title for plugins to customize how object links display (#646) - Disable linking objects filtered out by verifiers (#645) - Allow macro expansion on class methods (#632) - Expand newly attached macro on first DSL method call (#631) - Disable RubyGems plugin in Ruby 2.0 (#627) - Fix line range for class/module node bodies (#626) - Search extended modules for attached DSL macros (#553) # 0.8.3 - October 14, 2012 - Add `--non-transitive-tag` to disable tag transitivity (#571) - Support --db inside .yardopts for graph/server commands (#583, #586) - Fix handling for =begin/=end docstrings (#577, #578) - Parser only sorts file lists when a glob is provided (#572) - Fix formatting in `{include:Object#method}` syntax (#569) - Fix @option tag inside of module functions (#563) - Fix to `--api` and `--no-api` support (#559) - Fix class nesting issues when path starts with "::" (#552) # 0.8.2.1 - June 9, 2012 - Fix a set of regressions in yard server search and dynamic generation # 0.8.2 - June 7, 2012 - Added progress style output in tty terminals - Embedded mixins should ignore methods defined on module (#539) - Fixed permalinks for embedded mixins in `yard server` (#540) - Improve parsing in CRuby code (#543) - Ensure Registry.resolve picks module when parsing mixins (#545) - Fixed regression that caused various commands to not show output (#548) - Respect current visibility when parsing class conditions (#551) # 0.8.1 - May 2, 2012 - Added `--[no-]api` switch to generate docs for API sets (see {file:docs/WhatsNew.md} for details) (#532) - The `yard list` command now uses cache by default (#533) - Fix `yardoc` generating incorrectly named method list file (#528) - Fix HTML output occasionally showing trailing mdash on options list (#522) # 0.8.0 - April 30, 2012 - See {file:docs/WhatsNew.md} for a list of added features - Over 20 bug fixes: - Properly filter hidden setter/getter attributes (#394) - Fix test failures in Linux environments (#397, #472, #473, #512, #513) - Fix attribute inheritance and @private (#432) - Fix attribute parsing (#435) - Allow aliases for attributes (#436) - Fix namespace fetching in `handle_alias()` (#437) - Fix overwritten attributes marked as inherited (#442) - Fix documenting constants defined from C code with `rb_define_const()` (#443) - Do not escape snippets twice (#445) - Ajax method/class search should not fire when a non-printable character is pressed (#446) - Fix yard server crashing when RDoc is not installed (#456) - Fix tags ignored when `(see #foo)` is used (#457) - Fix three "Returns" for two `@overload` tags (#458) - Do not auto-detect DSL methods as method objects if parameter name is not a valid method name (#464) - Fix attaching of macros to Object (#465) - Fix handling of `%w()` source in `[]/[]=` parsed context. (#461, pull in #468) - Don't add default `@return` if `@overload` has `@return`. (#458, pull in #469) - Don't discard tags by (see ...). (#457, pull in #470) - Fix constants listed as inherited when overwritten (#474) - Fix `yardoc --asset` behaving differently on first and subsequent calls. (#477) - `!!!lang` code blocks should set the lang in `
`'s class. (#478, #479)
  - Fix "File List" search tab error. (#502)
  - Fix search bar not redirecting to method page. (#509)
  - Fix server returning exception message bodies as String (#518)

# 0.7.5 - January 31, 2012

- Various minor bug fixes

# 0.7.4 - December 2, 2011

- Redcarpet is now the default Markdown formatting library. GFM now works out-of-box (#404)
- Fix server side searching for elements that are marked private (#420)
- Add 'textile_strict' and 'pre' markup types, reorganize text and none (#416)
- Improve encoding line detection (#415)
- Add support for `rb_define_alias` in CRuby code (#413)
- Fix rendering of some keywords in source view (#410)
- Add support for RDoc 3.10+ (#406, #407)
- Fix typewriter text being processed in code blocks (#403)
- Improve support for has_rdoc in RubyGems 1.8.x (#401)
- See the {file:docs/WhatsNew.md} document for details on added features

# 0.7.3 - October 15, 2011

- Improve support for parsing under Ruby 1.9.2p290 and 1.9.3 (#365, #370)
- Add support for SWIG generated CRuby code (#369)
- Add support for `rb_define_attr` calls in CRuby code (#362)
- Handle file pointers in CRuby code (#358)

# 0.7.2 - June 14, 2011

- Fix `yard --help` not showing proper output
- YARD now expands path to `.yardoc` file in daemon mode for server (#328)
- Fix `@overload` tag linking to wrong method (#330)
- Fix incorrect return type when using `@macro` (#334)
- YARD now requires 'thread' to support RubyGems 1.7+ (#338)
- Fix bug in constant documentation when using `%w()` (#348)
- Fix YARD style URL links when using autolinking markdown (#353)

# 0.7.1 - May 18, 2011

- Fixes a bug in `yard server` not displaying class list properly.

# 0.7.0 - May 17, 2011

- See the {file:docs/WhatsNew.md} document for details on added features
- Make sure that Docstring#line_range is filled when possible (#243)
- Set #verifier in YardocTask (#282)
- Parse BOM in UTF-8 files (#288)
- Fix instance attributes not showing up in method list (#302)
- Fix rendering of %w() literals in constants (#306)
- Ignore keyboard shortcuts when an input is active (#312)
- And more...

# 0.6.8 - April 14, 2011

- Fix regression in RDoc 1.x markup loading
- Fix regression in loading of markup libraries for `yard server`

# 0.6.7 - April 6, 2011

- Fix has_rdoc gem specification issue with new RubyGems plugin API (oops!)

# 0.6.6 - April 6, 2011

- Fix error message when RDoc is not present (#270)
- Add markup type 'none' to perform basic HTML translation (fallback when RDoc is not present)
- Add support for RubyGems 1.7.x (#272)
- Fix rendering of `{url description}` syntax when description contains newline

# 0.6.5 - March 13, 2011

- Support `ripper` gem in Ruby 1.8.7
- Upgrade jQuery to 1.5.1
- Fix handling of alias statements with quoted symbols (#262)
- Add CSS styles (#260)
- Unhandled exception in YARD::Handlers::Ruby::MixinHandler indexing documentation for eventmachine (#248)
- Splice any alias references on method re-definitions into separate methods (#247)
- Fix "yard graph" (#245)
- Don't process ++ typewriter text inside of HTML attributes (#244)
- Prioritize loading of Kramdown before Maruku (#241)
- Skip shebang encoding in docstrings (#238)
- Fix truncation of references in @deprecated (#232)
- Show @api private note when no other tags are present (#231)
- Detect docstrings starting with "##" as `Docstring#hash_flag` (#230)
- Remove trailing whitespace from freeform tags (#229)
- Fix line through for deprecated methods (#225)
- Mistake in Tags.md (#223)
- Improve database storage by being more efficient with filesystem usage (#222)
- Make Registry thread local (#221)
- Support `private_constant` class method for 1.9.3 (#219)
- Do not assume RDoc is installed (#214)

# 0.6.4 - December 21, 2010

- Fix yri tool crashing with new Config class (gh-217)
- Fix support for ::TopLevelConstants (gh-216)
- YARD's test suite is now RSpec2 compatible (gh-215)
- Improved documentation for YARD::Server features (gh-207)
- Fix displaying of collaped method summary lists (gh-204)
- Fix automatic loading of markup providers (gh-206)
- Fix keyboard shortcuts for Chrome (gh-203)
- Disallow `extend self` inside of a class (gh-202)
- Constants now recognized in C extensions (gh-201)

# 0.6.3 - November 21, 2010

- Fixed regression that caused `yardoc --markup` to silently exit

# 0.6.2 - November 15, 2010

- **Plugins no longer automatically load, use `--plugin` to load a plugin**
- Added YARD::Config and ~/.yard/config YAML configuration file
- Added `yard config` command to view/edit YARD configuration file
- Fixes for YARD in 1.8.6 (gh-178)
- Various HTML template adjustments and fixes (gh-198,199,200)
- Improved `yard server -m` multi-project stability (gh-193)
- Fixed handling of `yardoc --no-private` with missing class definitions (gh-197)
- Added support for constants defined in C extensions (gh-177)
- Added support for Structs defined as "Klass = Struct.new(...)" (gh-187)
- Improved parsing support for third-party gems (gh-174,180)
- Improved support for JRuby 1.6.4+. YARD now passes all specs in JRuby (gh-185)
- Improved YARD documentation (gh-172,191,196)

# 0.6.1 - September 06, 2010

- Fixed TOC showing on top of class/method list in no-frames view
- A message now displays when running `yard server` with Rack/Mongrel installed
- Improved performance of JS inline search for large class/method lists
- Improved link titles for relative object links
- Removed `String#camelcase` and `String#underscore` for better Rails compat.
- Fixed support for loading .yardoc files under Windows
- Fixed inheritance tree arrows not displaying in certain environments

# 0.6.0 - August 29, 2010

- Added dynamic local documentation server
- Added @group/@endgroup declarations to organize methods into groups
- Added `yard` executable to serve as main CLI tool with pluggable commands
- Added `--asset` switch to `yardoc` to copy files/dirs to output dir
- Added ability to register/manipulate tags via CLI (`--tag`, etc.)
- Added `yard diff` command
- Added statistics to `yardoc` output (and `yard stats` command)
- Added Javascript generated Table of Contents to file pages
- Updated various APIs
- Removed `yard-graph` executable
- See more changes in the {file:docs/WhatsNew.md what's new document}

# 0.5.8 - June 22, 2010

- Merge fix from 0.6 branch for --no-private visibility checking

# 0.5.7 - June 21, 2010

- Fixed visibility flag parsing in `yardoc`
- Updated Parser Architecture documentation with new SourceParser API
- Improved Registry documentation for new load commands
- Fix loading of .yardoc file as cache (and preserving aliases)
- Fix "lib" directory missing when running YARD on installed gems

# 0.5.6 - June 12, 2010

- Bug fixes for RubyGems plugin, `has_rdoc=false` should now work
- New API for registering custom parsers. See {file:docs/WhatsNew.md}

# 0.5.5 - May 22, 2010

- Various bug fixes

# 0.5.4 - March 22, 2010

- See {file:docs/WhatsNew.md what's new document} for changes

# 0.5.3 - January 11, 2010

- See {file:docs/WhatsNew.md what's new document} for changes

# 0.5.2 - December 16, 2009

- See {file:docs/WhatsNew.md what's new document} for changes

# 0.5.1 - December 15, 2009

- See {file:docs/WhatsNew.md what's new document} for changes

# 0.5.0 - December 13, 2009

- See {file:docs/WhatsNew.md what's new document} for changes

# 0.4.0 - November 15, 2009

- Added new templating engine based on [tadpole](http://github.com/lsegal/tadpole)
- Added YARD queries (`--query` CLI argument to yardoc)
- Greatly expanded YARD documentation
- Added plugin support
- New `@abstract` and `@private` tags
- Changed default rake task to `rake yard`
- Read about changes in {file:docs/WhatsNew.md}

# 0.2.3.5 - August 13, 2009

- Minor bug fixes.

# 0.2.3.4 - August 07, 2009

- Minor bug fixes.

# 0.2.3.3 - July 26, 2009

- Minor bug fixes.

# 0.2.3.2 - July 06, 2009

- Fix Textile hard-break issues
- Add description for @see tag to use as link title in HTML docs.
- Add --title CLI option to specify a title for HTML doc files.
- Add custom.css file that can be overridden with various custom
  styelsheet declarations. To use this, simply add `default/fulldoc/html/custom.css`
  inside your code directory and use the `-t` template directory yardoc CLI
  option to point to that template directory (the dir holding 'default').
- Add support in `yardoc` CLI to specify extra files (formerly --files)
  by appending "- extra files here" after regular source files. Example:

        yardoc --private lib/**/*.rb - FAQ LICENSE

# 0.2.3.1 - June 13, 2009

- Add a RubyGems 1.3.2+ plugin to generate YARD documentation instead of
  RDoc. To take advantage of this plugin, set `has_rdoc = 'yard'` in your
  .gemspec file.

# 0.2.3 - June 07, 2009

- See the {file:docs/WhatsNew.md} file for a list of important new features.

# 0.2.2 - Jun 16, 2008

- This is the largest changset since yard's conception and involves a complete
  overhaul of the parser and API to make it more robust and far easier to
  extend and use for the developer.

# 0.2.1 - February 20, 2008

- See the {file:docs/WhatsNew.md} file for a list of important new features.

# 0.1a - February 24, 2007

- Released 0.1a experimental version for testing. The goal here is
  to get people testing YARD on their code because there are too many possible
  code styles to fit into a sane amount of test cases. It also demonstrates the
  power of YARD and what to expect from the syntax (Yardoc style meta tags).
yard-master/Gemfile000066400000000000000000000010101265676644000146110ustar00rootroot00000000000000source 'https://rubygems.org'

group :development do
  gem 'rspec', '~> 3.3'
  gem 'rake'
  gem 'rvm-tester'
  gem 'simplecov'
  gem 'samus'
end

group :asciidoc do
  gem 'asciidoctor'
end

group :markdown do
  gem 'redcarpet', '= 2.3.0', :platforms => :mri
  gem 'kramdown', :platforms => :jruby
end

group :textile do
  gem 'RedCloth'
end

group :server do
  gem 'rack'
end

group :i18n do
  gem 'gettext', '>= 2.2.1'
end

# No way to specify 1.8.7 only
# group :parser do
#  gem 'ripper', :platforms => :mri_18
# end
yard-master/LEGAL000066400000000000000000000056431265676644000141050ustar00rootroot00000000000000LEGAL NOTICE INFORMATION
------------------------

All the files in this distribution are covered under either the MIT
license (see the file LICENSE) except some files mentioned below.

lib/parser/ruby/legacy/ruby_lex.rb:

  This file is under the Ruby license. YARD uses a modified version of it.

    Ruby is copyrighted free software by Yukihiro Matsumoto .
    You can redistribute it and/or modify it under either the terms of the GPL
    version 2 (see the file GPL), or the conditions below:

      1. You may make and give away verbatim copies of the source form of the
         software without restriction, provided that you duplicate all of the
         original copyright notices and associated disclaimers.

      2. You may modify your copy of the software in any way, provided that
         you do at least ONE of the following:

           a) place your modifications in the Public Domain or otherwise
              make them Freely Available, such as by posting said
          modifications to Usenet or an equivalent medium, or by allowing
          the author to include your modifications in the software.

           b) use the modified software only within your corporation or
              organization.

           c) give non-standard binaries non-standard names, with
              instructions on where to get the original software distribution.

           d) make other distribution arrangements with the author.

      3. You may distribute the software in object code or binary form,
         provided that you do at least ONE of the following:

           a) distribute the binaries and library files of the software,
          together with instructions (in the manual page or equivalent)
          on where to get the original distribution.

           b) accompany the distribution with the machine-readable source of
          the software.

           c) give non-standard binaries non-standard names, with
              instructions on where to get the original software distribution.

           d) make other distribution arrangements with the author.

      4. You may modify and include the part of the software into any other
         software (possibly commercial).  But some files in the distribution
         are not written by the author, so that they are not under these terms.

         For the list of those files and their copying conditions, see the
         file LEGAL.

      5. The scripts and library files supplied as input to or produced as
         output from the software do not automatically fall under the
         copyright of the software, but belong to whomever generated them,
         and may be sold commercially, and may be aggregated with this
         software.

      6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
         IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
         WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
         PURPOSE.
yard-master/LICENSE000066400000000000000000000020441265676644000143330ustar00rootroot00000000000000Copyright (c) 2007-2015 Loren Segal

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
yard-master/README.md000066400000000000000000000313521265676644000146110ustar00rootroot00000000000000# YARD: Yay! A Ruby Documentation Tool

[![Homepage](http://img.shields.io/badge/home-yardoc.org-blue.svg)](http://yardoc.org)
[![GitHub](http://img.shields.io/badge/github-lsegal/yard-blue.svg)](http://github.com/lsegal/yard)
[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://rubydoc.org/gems/yard/frames)
[![Gitter Chat](http://img.shields.io/badge/chat-gitter.im-orange.svg)](https://gitter.im/lsegal/yard)

[![Gem Version](https://badge.fury.io/rb/yard.svg)](http://github.com/lsegal/yard/releases)
[![Build Status](https://travis-ci.org/lsegal/yard.svg?branch=master)](https://travis-ci.org/lsegal/yard)
[![License](http://img.shields.io/badge/license-MIT-yellowgreen.svg)](#license)

## Synopsis

YARD is a documentation generation tool for the Ruby programming language.
It enables the user to generate consistent, usable documentation that can be
exported to a number of formats very easily, and also supports extending for
custom Ruby constructs such as custom class level definitions. Below is a
summary of some of YARD's notable features.


## Feature List

**1. RDoc/SimpleMarkup Formatting Compatibility**: YARD is made to be compatible
with RDoc formatting. In fact, YARD does no processing on RDoc documentation
strings, and leaves this up to the output generation tool to decide how to
render the documentation.

**2. Yardoc Meta-tag Formatting Like Python, Java, Objective-C and other languages**:
YARD uses a '@tag' style definition syntax for meta tags alongside  regular code
documentation. These tags should be able to happily sit side by side RDoc formatted
documentation, but provide a much more consistent and usable way to describe
important information about objects, such as what parameters they take and what types
they are expected to be, what type a method should return, what exceptions it can
raise, if it is deprecated, etc.. It also allows information to be better (and more
consistently) organized during the output generation phase. You can find a list
of tags in the {file:docs/Tags.md#taglist Tags.md} file.

YARD also supports an optional "types" declarations for certain tags.
This allows the developer to document type signatures for ruby methods and
parameters in a non intrusive but helpful and consistent manner. Instead of
describing this data in the body of the description, a developer may formally
declare the parameter or return type(s) in a single line. Consider the
following method documented with YARD formatting:

     # Reverses the contents of a String or IO object.
     #
     # @param [String, #read] contents the contents to reverse
     # @return [String] the contents reversed lexically
     def reverse(contents)
       contents = contents.read if contents.respond_to? :read
       contents.reverse
     end

With the above @param tag, we learn that the contents parameter can either be
a String or any object that responds to the 'read' method, which is more
powerful than the textual description, which says it should be an IO object.
This also informs the developer that they should expect to receive a String
object returned by the method, and although this may be obvious for a
'reverse' method, it becomes very useful when the method name may not be as
descriptive.

**3. Custom Constructs and Extensibility of YARD**: YARD is designed to be
extended and customized by plugins. Take for instance the scenario where you
need to document the following code:

    class List
      # Sets the publisher name for the list.
      cattr_accessor :publisher
    end

This custom declaration provides dynamically generated code that is hard for a
documentation tool to properly document without help from the developer. To
ease the pains of manually documenting the procedure, YARD can be extended by
the developer to handle the `cattr_accessor` construct and automatically create
an attribute on the class with the associated documentation. This makes
documenting external API's, especially dynamic ones, a lot more consistent for
consumption by the users.

YARD is also designed for extensibility everywhere else, allowing you to add
support for new programming languages, new data structures and even where/how
data is stored.

**4. Raw Data Output**: YARD also outputs documented objects as raw data (the
dumped Namespace) which can be reloaded to do generation at a later date, or
even auditing on code. This means that any developer can use the raw data to
perform output generation for any custom format, such as YAML, for instance.
While YARD plans to support XHTML style documentation output as well as
command line (text based) and possibly XML, this may still be useful for those
who would like to reap the benefits of YARD's processing in other forms, such
as throwing all the documentation into a database. Another useful way of
exploiting this raw data format would be to write tools that can auto generate
test cases, for example, or show possible unhandled exceptions in code.

**5. Local Documentation Server**: YARD can serve documentation for projects
or installed gems (similar to `gem server`) with the added benefit of dynamic
searching, as well as live reloading. Using the live reload feature, you can
document your code and immediately preview the results by refreshing the page;
YARD will do all the work in re-generating the HTML. This makes writing
documentation a much faster process.


## Installing

To install YARD, use the following command:

    $ gem install yard

(Add `sudo` if you're installing under a POSIX system as root)

Alternatively, if you've checked the source out directly, you can call
`rake install` from the root project directory.

**Important Note for Debian/Ubuntu users:** there's a possible chance your Ruby
install lacks RDoc, which is occasionally used by YARD to convert markup to HTML.
If running `which rdoc` turns up empty, install RDoc by issuing:

    $ sudo apt-get install rdoc


## Usage

There are a couple of ways to use YARD. The first is via command-line, and the
second is the Rake task.

**1. yard Command-line Tool**

YARD comes packaged with a executable named `yard` which can control the many
functions of YARD, including generating documentation, graphs running the
YARD server, and so on. To view a list of available YARD commands, type:

    $ yard --help

Plugins can also add commands to the `yard` executable to provide extra
functionality.

### Generating Documentation

The `yardoc` executable is a shortcut for `yard doc`.

The most common command you will probably use is `yard doc`, or `yardoc`. You
can type `yardoc --help` to see the options that YARD provides, but the
easiest way to generate docs for your code is to simply type `yardoc` in your
project root. This will assume your files are
located in the `lib/` directory. If they are located elsewhere, you can specify
paths and globs from the commandline via:

    $ yardoc 'lib/**/*.rb' 'app/**/*.rb' ...etc...

The tool will generate a `.yardoc` file which will store the cached database
of your source code and documentation. If you want to re-generate your docs
with another template you can simply use the `--use-cache` (or -c)
option to speed up the generation process by skipping source parsing.

YARD will by default only document code in your public visibility. You can
document your protected and private code by adding `--protected` or
`--private` to the option switches. In addition, you can add `--no-private`
to also ignore any object that has the `@private` meta-tag. This is similar
to RDoc's ":nodoc:" behaviour, though the distinction is important. RDoc
implies that the object with :nodoc: would not be documented, whereas
YARD still recommends documenting private objects for the private API (for
maintainer/developer consumption).

You can also add extra informative files (README, LICENSE) by separating
the globs and the filenames with '-'.

    $ yardoc 'app/**/*.rb' - README LICENSE FAQ

If no globs precede the '-' argument, the default glob (`lib/**/*.rb`) is
used:

    $ yardoc - README LICENSE FAQ

Note that the README file can be specified with its own `--readme` switch.

You can also add a `.yardopts` file to your project directory which lists
the switches separated by whitespace (newlines or space) to pass to yardoc
whenever it is run. A full overview of the `.yardopts` file can be found in
{YARD::CLI::Yardoc}.

### Queries

The `yardoc` tool also supports a `--query` argument to only include objects
that match a certain data or meta-data query. The query syntax is Ruby, though
a few shortcuts are available. For instance, to document only objects that have
an "@api" tag with the value "public", all of the following syntaxes would give
the same result:

    --query '@api.text == "public"'
    --query 'object.has_tag?(:api) && object.tag(:api).text == "public"'
    --query 'has_tag?(:api) && tag(:api).text == "public"'

Note that the "@tag" syntax returns the first tag named "tag" on the object.
To return the array of all tags named "tag", use "@@tag".

Multiple `--query` arguments are allowed in the command line parameters. The
following two lines both check for the existence of a return and param tag:

    --query '@return' --query '@param'
    --query '@return && @param'

For more information about the query syntax, see the {YARD::Verifier} class.

**2. Rake Task**

The second most obvious is to generate docs via a Rake task. You can do this by
adding the following to your `Rakefile`:

    YARD::Rake::YardocTask.new do |t|
      t.files   = ['lib/**/*.rb', OTHER_PATHS]   # optional
      t.options = ['--any', '--extra', '--opts'] # optional
      t.stats_options = ['--list-undoc']         # optional
    end

All the settings: `files`, `options` and `stats_options` are optional. `files` will default to
`lib/**/*.rb`, `options` will represents any options you might want
to add and `stats_options` will pass extra options to the stats command.
Again, a full list of options is available by typing `yardoc --help`
in a shell. You can also override the options at the Rake command-line with the
OPTS environment variable:

    $ rake yard OPTS='--any --extra --opts'

**3. `yri` RI Implementation**

The yri binary will use the cached .yardoc database to give you quick ri-style
access to your documentation. It's way faster than ri but currently does not
work with the stdlib or core Ruby libraries, only the active project. Example:

    $ yri YARD::Handlers::Base#register
    $ yri File.relative_path

Note that class methods must not be referred to with the "::" namespace
separator. Only modules, classes and constants should use "::".

You can also do lookups on any installed gems. Just make sure to build the
.yardoc databases for installed gems with:

    $ sudo yard gems

If you don't have sudo access, it will write these files to your `~/.yard`
directory. `yri` will also cache lookups there.

**4. `yard server` Documentation Server**

The `yard server` command serves documentation for a local project or all installed
RubyGems. To serve documentation for a project you are working on, simply run:

    $ yard server

And the project inside the current directory will be parsed (if the source has
not yet been scanned by YARD) and served at [http://localhost:8808](http://localhost:8808).

### Live Reloading

If you want to serve documentation on a project while you document it so that
you can preview the results, simply pass `--reload` (`-r`) to the above command
and YARD will reload any changed files on each request. This will allow you to
change any documentation in the source and refresh to see the new contents.

### Serving Gems

To serve documentation for all installed gems, call:

    $ yard server --gems

This will also automatically build documentation for any gems that have not
been previously scanned. Note that in this case there will be a slight delay
between the first request of a newly parsed gem.


**5. `yard graph` Graphviz Generator**

You can use `yard graph` to generate dot graphs of your code. This, of course,
requires [Graphviz](http://www.graphviz.org) and the `dot` binary. By default
this will generate a graph of the classes and modules in the best UML2 notation
that Graphviz can support, but without any methods listed. With the `--full`
option, methods and attributes will be listed. There is also a `--dependencies`
option to show mixin inclusions. You can output to stdout or a file, or pipe directly
to `dot`. The same public, protected and private visibility rules apply to `yard graph`.
More options can be seen by typing `yard graph --help`, but here is an example:

    $ yard graph --protected --full --dependencies


## Changelog

See {file:CHANGELOG.md} for a list of changes.

## License

YARD © 2007-2014 by [Loren Segal](mailto:lsegal@soen.ca). YARD is
licensed under the MIT license except for some files which come from the
RDoc/Ruby distributions. Please see the {file:LICENSE} and {file:LEGAL}
documents for more information.
yard-master/Rakefile000066400000000000000000000027121265676644000147750ustar00rootroot00000000000000require File.dirname(__FILE__) + '/lib/yard'
require File.dirname(__FILE__) + '/lib/yard/rubygems/specification'
require 'rbconfig'

YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']

task :default => :specs

desc "Builds the gem"
task :gem do
  sh "gem build yard.gemspec"
end

desc "Installs the gem"
task :install => :gem do
  sh "gem install yard-#{YARD::VERSION}.gem --no-document"
end

begin
require 'rvm-tester'
RVM::Tester::TesterTask.new do |t|
  t.rubies = %w(1.8.6 ree jruby 1.8.7 1.9.2 1.9.3)
  t.bundle_install = false # don't need to do this all the time
  t.verbose = true
end
rescue LoadError
end

task :travis_ci do
  ENV['SUITE'] = '1'
  ENV['CI'] = '1'
  ENV['LEGACY'] = nil
  Rake::Task['specs'].execute
  if RUBY_VERSION >= '1.9' && RUBY_PLATFORM != 'java'
    puts ""
    puts "Running specs with in legacy mode"
    ENV['LEGACY'] = '1'
    Rake::Task['specs'].execute
  end
end

desc "Run all specs"
task :specs do
  opts = ['rspec', '-c']
  opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
  opts += ['-I', YARD::ROOT]
  if ENV['DEBUG']
    $DEBUG = true
    opts += ['-d']
  end
  opts += FileList["spec/**/*_spec.rb"].sort
  cmd = opts.join(' ')
  puts cmd if Rake.application.options.trace
  system(cmd)
  raise "Command failed with status (#{$?.to_i}): #{cmd}" if $?.to_i != 0
end
task :spec => :specs

YARD::Rake::YardocTask.new do |t|
  t.options += ['--title', "YARD #{YARD::VERSION} Documentation"]
end
yard-master/benchmarks/000077500000000000000000000000001265676644000154435ustar00rootroot00000000000000yard-master/benchmarks/builtins_vs_eval.rb000066400000000000000000000016641265676644000213470ustar00rootroot00000000000000require 'benchmark'
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

TIMES = (ARGV[0] || 10_000).to_i

def bench_builtins(name)
  YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH.has_key? name
end

def bench_eval(name)
  eval(name).is_a?(Class)
rescue
  false
end

Benchmark.bmbm do |b|
  b.report("builtins PASS") { TIMES.times {YARD::CodeObjects::BUILTIN_EXCEPTIONS.each {|y| bench_builtins(y) } } }
  b.report("eval PASS") { TIMES.times {YARD::CodeObjects::BUILTIN_EXCEPTIONS.each {|y| bench_eval(y) }} }
  b.report("builtins FAIL") { TIMES.times {YARD::CodeObjects::BUILTIN_MODULES.each {|y| bench_builtins(y) } } }
  b.report("eval FAIL") { TIMES.times {YARD::CodeObjects::BUILTIN_MODULES.each {|y| bench_eval(y) }} }
  b.report("builtins ANY") { TIMES.times {YARD::CodeObjects::BUILTIN_CLASSES.each {|y| bench_builtins(y) } } }
  b.report("eval ANY") { TIMES.times {YARD::CodeObjects::BUILTIN_CLASSES.each {|y| bench_eval(y) }} }
endyard-master/benchmarks/concat_vs_join.rb000066400000000000000000000005221265676644000207650ustar00rootroot00000000000000require "benchmark"

STR1 = "Hello"
JOIN = "::"
STR2 = "World"

TESTS = 100_000
Benchmark.bmbm do |results|
  results.report("concat") { TESTS.times { "".concat(STR1).concat(JOIN).concat(STR2) } }
  results.report("add   ") { TESTS.times { STR1 + JOIN + STR2 } }
  results.report("join  ") { TESTS.times { [STR1, STR2].join(JOIN) } }
end
yard-master/benchmarks/erb_vs_erubis.rb000066400000000000000000000021611265676644000206210ustar00rootroot00000000000000require 'rubygems'
require 'erubis'
require 'erubis/tiny'
require 'erb'
require "benchmark"
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

def rungen
  YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc'))
  YARD::Registry.at("YARD::CodeObjects::Base").format(:format => :html)
end

Benchmark.bmbm do |x|
  x.report("erubis") do
    eval <<-eof
      module YARD; module Templates; module Template
        def erb_with(str, x) Erubis::Eruby.new(str) end
      end end end
    eof

    rungen
  end

  x.report("fast-erubis") do
    eval <<-eof
      module YARD; module Templates; module Template
        def erb_with(str, x) Erubis::FastEruby.new(str) end
      end end end
    eof

    rungen
  end

  x.report("tiny-erubis") do
    eval <<-eof
      module YARD; module Templates; module Template
        def erb_with(str, x) Erubis::TinyEruby.new(str) end
      end end end
    eof

    rungen
  end

  x.report("erb")  do
    eval <<-eof
       module YARD; module Templates; module Template
        def erb_with(str, x) ERB.new(str, nil) end
      end end end
    eof

    rungen
  end
endyard-master/benchmarks/format_args.rb000066400000000000000000000023411265676644000202740ustar00rootroot00000000000000require "benchmark"
require 'lib/yard'

def format_args_regex(object)
  if object.signature
    object.signature[/#{Regexp.quote object.name.to_s}\s*(.*)/, 1]
  else
    ""
  end
end

def format_args_parameters(object)
  if !object.parameters.empty?
    args = object.parameters.map {|n, v| v ? "#{n} = #{v}" : n.to_s }.join(", ")
    "(#{args})"
  else
    ""
  end
end

YARD::Registry.load
$object = YARD::Registry.at('YARD::Generators::Base#G')

log.puts "regex:  " + format_args_regex($object)
log.puts "params: " + format_args_parameters($object)
log.puts

TIMES = 100_000
Benchmark.bmbm do |x|
  x.report("regex")      { TIMES.times { format_args_regex($object) } }
  x.report("parameters") { TIMES.times { format_args_parameters($object) } }
end

=begin LAST RUN Jun 23 2008
regex:  (generator, opts = {})
params: (generator, opts = {})

Rehearsal ----------------------------------------------
regex        1.270000   0.020000   1.290000 (  1.294558)
parameters   0.690000   0.000000   0.690000 (  0.693324)
------------------------------------- total: 1.980000sec

                 user     system      total        real
regex        1.260000   0.010000   1.270000 (  1.268214)
parameters   0.670000   0.000000   0.670000 (  0.679114)
=end
yard-master/benchmarks/generation.rb000066400000000000000000000021601265676644000201220ustar00rootroot00000000000000require "benchmark"
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

unless YARD::CodeObjects::Proxy.private_instance_methods.include?('to_obj')
  raise "This benchmark is dependent on YARD::CodeObjects::Proxy#to_obj"
end

def rungen
  YARD::Registry.clear
  YARD::CLI::Yardoc.run('--quiet', '--use-cache')
end

def redef(lock = false)
  eval <<-eof
    class YARD::CodeObjects::Proxy;
      def to_obj
        @obj #{lock ? '||' : ''}= YARD::Registry.resolve(@namespace, @name)
      end
    end
  eof
end

Benchmark.bmbm do |x|
  x.report("gen-w/o-locking")  { redef;       rungen }
  x.report("gen-with-locking") { redef(true); rungen }
end

=begin Results from 2008-06-07
Rehearsal ----------------------------------------------------
gen-w/o-locking    9.650000   0.450000  10.100000 ( 10.150556)
gen-with-locking   7.790000   0.400000   8.190000 (  8.373811)
------------------------------------------ total: 18.290000sec

                       user     system      total        real
gen-w/o-locking    9.820000   0.430000  10.250000 ( 10.293283)
gen-with-locking   7.820000   0.380000   8.200000 (  8.243326)
=endyard-master/benchmarks/marshal_vs_dbm.rb000066400000000000000000000035201265676644000207510ustar00rootroot00000000000000require 'benchmark'
require 'dbm'

MARSHAL_FILE = "marshal_test.db"
DBM_FILE = "dbm_test"
WRITE_TIMES = 1
READ_TIMES = 100
NUM_INDICES = 10000
INDICES = ['33', '857', '5022', '8555']

def generate_index
  '0' * (rand * 4096).floor
end

def write_dbm
  File.unlink(DBM_FILE + ".db") if File.exist?(DBM_FILE + ".db")
  handle = DBM.new(DBM_FILE)
  NUM_INDICES.times {|t| handle[t.to_s] = Marshal.dump(generate_index) }
  handle.close
end

def read_dbm
  db = DBM.open(DBM_FILE)
  INDICES.each {|index| Marshal.load(db[index]) }
  db.close
end

def write_marshal
  File.unlink(MARSHAL_FILE) if File.exist?(MARSHAL_FILE)
  handle = {}
  NUM_INDICES.times {|t| handle[t.to_s] = generate_index }
  File.open(MARSHAL_FILE, "wb") {|f| f.write(Marshal.dump(handle)) }
end

def read_marshal
  db = Marshal.load(File.read(MARSHAL_FILE))
  INDICES.each {|index| db[index] }
end

Benchmark.bmbm do |x|
  x.report("marshal-write") { WRITE_TIMES.times { write_marshal } }
  x.report("dbm-write") { WRITE_TIMES.times { write_dbm } }
  x.report("marshal-read ") { READ_TIMES.times { read_marshal } }
  x.report("dbm-read ") { READ_TIMES.times { read_dbm } }
end

File.unlink(MARSHAL_FILE)
File.unlink(DBM_FILE + ".db")

__END__

Rehearsal -------------------------------------------------
marshal-write   0.090000   0.070000   0.160000 (  0.465820)
dbm-write       0.560000   0.570000   1.130000 (  3.045556)
marshal-read    4.640000   3.180000   7.820000 (  7.821978)
dbm-read        0.020000   0.020000   0.040000 (  0.070920)
---------------------------------------- total: 9.150000sec

                    user     system      total        real
marshal-write   0.080000   0.050000   0.130000 (  0.436561)
dbm-write       0.560000   0.550000   1.110000 (  2.030530)
marshal-read    4.670000   3.180000   7.850000 (  7.842232)
dbm-read        0.010000   0.020000   0.030000 (  0.053928)
yard-master/benchmarks/parsing.rb000066400000000000000000000030111265676644000174260ustar00rootroot00000000000000require "benchmark"
require 'yard'
require 'logger'

PATH_ORDER = [
  'lib/yard/autoload.rb',
  'lib/yard/code_objects/base.rb',
  'lib/yard/code_objects/namespace_object.rb',
  'lib/yard/handlers/base.rb',
  'lib/yard/generators/helpers/*.rb',
  'lib/yard/generators/base.rb',
  'lib/yard/generators/method_listing_generator.rb',
  'lib/yard/serializers/base.rb',
  'lib/**/*.rb'
]

Benchmark.bmbm do |x|
  x.report("parse in order") { YARD::Registry.clear; YARD.parse PATH_ORDER, [], Logger::ERROR }
  x.report("parse") { YARD::Registry.clear; YARD.parse 'lib/**/*.rb', [], Logger::ERROR }
end

=begin
load_order branch (2008-06-07):

Rehearsal --------------------------------------------------
parse in order   6.510000   0.050000   6.560000 (  6.563223)
parse            6.300000   0.040000   6.340000 (  6.362272)
---------------------------------------- total: 12.900000sec

                     user     system      total        real
parse in order   6.310000   0.060000   6.370000 (  6.390945)
parse            6.300000   0.050000   6.350000 (  6.366709)


api_changes branch before merge (2008-06-07)

Rehearsal --------------------------------------------------
parse in order   6.330000   0.050000   6.380000 (  6.397552)
parse            6.380000   0.050000   6.430000 (  6.446954)
---------------------------------------- total: 12.810000sec

                     user     system      total        real
parse in order   6.320000   0.040000   6.360000 (  6.394460)
parse            6.040000   0.040000   6.080000 (  6.099738)
=end

yard-master/benchmarks/pathname_vs_string.rb000066400000000000000000000035371265676644000216730ustar00rootroot00000000000000require 'pathname'
require "benchmark"
require File.dirname(__FILE__) + '/../lib/yard'

pathobj = Pathname.new("a/b/c")
strobj  = "a/b/c"

TIMES = 1_000

log.puts "join:"
Benchmark.bmbm do |x|
  x.report("pathname") { TIMES.times { Pathname.new("a/b/c").join("d", "e", "f") } }
  x.report("string  ") { TIMES.times { File.join("a/b/c", "d", "e", "f") } }
  x.report("pathname-sameobject") { TIMES.times { pathobj.join("d", "e", "f") } }
  x.report("string-sameobject  ") { TIMES.times { File.join(strobj, "d", "e", "f") } }
end

log.puts
log.puts
log.puts "cleanpath:"
Benchmark.bmbm do |x|
  x.report("pathname") { TIMES.times { Pathname.new("a/b//.././c").cleanpath } }
  x.report("string  ") { TIMES.times { File.cleanpath("a/b//.././c") } }
end

__END__
join:
Rehearsal -------------------------------------------------------
pathname              0.330000   0.020000   0.350000 (  0.353481)
string                0.010000   0.000000   0.010000 (  0.001390)
pathname-sameobject   0.360000   0.020000   0.380000 (  0.384473)
string-sameobject     0.000000   0.000000   0.000000 (  0.001187)
---------------------------------------------- total: 0.740000sec

                          user     system      total        real
pathname              0.330000   0.020000   0.350000 (  0.350820)
string                0.000000   0.000000   0.000000 (  0.001055)
pathname-sameobject   0.330000   0.010000   0.340000 (  0.346949)
string-sameobject     0.000000   0.000000   0.000000 (  0.001141)


cleanpath:
Rehearsal --------------------------------------------
pathname   0.060000   0.000000   0.060000 (  0.059767)
string     0.010000   0.000000   0.010000 (  0.013775)
----------------------------------- total: 0.070000sec

               user     system      total        real
pathname   0.060000   0.000000   0.060000 (  0.059697)
string     0.020000   0.000000   0.020000 (  0.013624)yard-master/benchmarks/rdoc_vs_yardoc.rb000066400000000000000000000011411265676644000207650ustar00rootroot00000000000000require "benchmark"

files = Dir.glob(File.dirname(__FILE__) + '/../lib/**/*.rb').join(" ")
Benchmark.bmbm do |x|
  x.report("rdoc") { `rm -rf rdoc && rdoc -q -o rdoc #{files} && rm -rf rdoc` }
  x.report("yardoc") { `rm -rf yard && ./bin/yardoc -q -o yard #{files} && rm -rf yard` }
  x.report("yardoc-cached") { `rm -rf yard && ./bin/yardoc -c -q -o yard #{files} && rm -rf yard` }
  x.report("yardoc-legacy") { `rm -rf yard && ./bin/yardoc --legacy -q -o yard #{files} && rm -rf yard` }
  x.report("yardoc-legacy-cached") { `rm -rf yard && ./bin/yardoc --legacy -c -q -o yard #{files} && rm -rf yard` }
endyard-master/benchmarks/registry_store_types.rb000066400000000000000000000027561265676644000223120ustar00rootroot00000000000000require 'benchmark'
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

def parse_and_select_objects
  YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc'))
  YARD::Registry.load_all
  $paths = []
  4.times { $paths << YARD::Registry.paths[rand(YARD::Registry.paths.size)] }

  $regular_registry = {}
  $types_registry = {}
  YARD::Registry.all.each do |object|
    $regular_registry[object.path] = object
    ($types_registry[object.type] ||= {})[object.path] = object
  end
end

def run_lookup
  $paths.select {|path| $regular_registry[path] }
end

def run_lookup_with_types
  $paths.select {|path| $types_registry.values.find {|list| list[path] } }
end

TIMES = 100_000

parse_and_select_objects
p $paths
Benchmark.bmbm do |x|
  x.report("normal") { TIMES.times { run_lookup } }
  x.report("types")  { TIMES.times { run_lookup_with_types } }
end

__END__
# Run on March 22 2012
["YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar#initialize",
  "YARD::Parser::C::CParser#enumerator",
  "YARD::CodeObjects::ClassObject#inherited_meths",
  "YARD::Parser::C::Statement#source="]
Rehearsal ----------------------------------------------
normal       0.180000   0.000000   0.180000 (  0.182640)
types        1.150000   0.010000   1.160000 (  1.160219)
------------------------------------- total: 1.340000sec

                 user     system      total        real
normal       0.170000   0.000000   0.170000 (  0.165621)
types        1.140000   0.000000   1.140000 (  1.142269)
yard-master/benchmarks/ri_vs_yri.rb000066400000000000000000000010541265676644000177750ustar00rootroot00000000000000require "benchmark"

TIMES = 10
Benchmark.bmbm do |x|
  x.report("ri") { TIMES.times { `ri -T YARD::Tags::Library` } }
  x.report("yri") { TIMES.times { `./bin/yri -T YARD::Tags::Library` } }
end

__END__

Rehearsal ---------------------------------------
ri    0.000000   0.020000   6.880000 (  6.929591)
yri   0.000000   0.000000   1.060000 (  1.074840)
------------------------------ total: 7.940000sec

          user     system      total        real
ri    0.000000   0.020000   6.850000 (  6.871660)
yri   0.000000   0.010000   1.060000 (  1.067585)
yard-master/benchmarks/ripper_parser.rb000066400000000000000000000010071265676644000206430ustar00rootroot00000000000000# encoding: utf-8
require 'benchmark'
require File.dirname(__FILE__) + '/../lib/yard'

$files = Dir[File.dirname(__FILE__) + '/../lib/**/*.rb'].map {|f| File.read(f) }
$files_rip = Dir[File.dirname(__FILE__) + '/../lib/**/*.rb'].map {|f| [File.read(f), f] }

TIMES = 2
Benchmark.bmbm do |x|
  x.report("rip-parser") { TIMES.times { $files_rip.each {|f| YARD::Parser::Ruby::RubyParser.parse(*f) } } }
  x.report("yard-parser  ") { TIMES.times { $files.each {|f| YARD::Parser::Ruby::Legacy::StatementList.new(f) } } }
endyard-master/benchmarks/splat_vs_flatten.rb000066400000000000000000000005461265676644000213450ustar00rootroot00000000000000require "benchmark"

# To prove that flattening a small list is not significantly slower than
# calling *list (used to get around create_tag list issue)
$a = "FOO BAR BAZ"
def foo(*args) args.last.inspect end

TESTS = 10_000
Benchmark.bmbm do |x|
  x.report("splat") { TESTS.times { foo *$a } }
  x.report("flatten") { TESTS.times { foo *[$a].flatten } }
endyard-master/benchmarks/template_erb.rb000066400000000000000000000012211265676644000204270ustar00rootroot00000000000000require "benchmark"
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc'))
obj = YARD::Registry.at("YARD::CodeObjects::Base")

TIMES = 3
Benchmark.bm do |x|
  x.report("trim-line") { TIMES.times { obj.format(:format => :html) } }
  module YARD
    module Templates
      module Template
        def erb(section, &block)
          erb = ERB.new(cache(section), nil)
          erb.filename = cache_filename(section).to_s
          erb.result(binding, &block)
        end
      end
    end
  end
  x.report("no-trim  ") { TIMES.times { obj.format(:format => :html) } }
endyard-master/benchmarks/template_format.rb000066400000000000000000000004221265676644000211510ustar00rootroot00000000000000require "benchmark"
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc'))
obj = YARD::Registry.at("YARD::CodeObjects::Base")
log.puts Benchmark.measure { obj.format(:format => :html) }
yard-master/benchmarks/template_profile.rb000066400000000000000000000007301265676644000213230ustar00rootroot00000000000000require 'rubygems'
require 'ruby-prof'
#require 'benchmark'
require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')

YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc'))
obj = YARD::Registry.at("YARD::CodeObjects::Base")

#PerfTools::CpuProfiler.start("template_profile") do
#end

result = RubyProf.profile do
  obj.format(:format => :html, :no_highlight => true)
end

printer = RubyProf::CallTreePrinter.new(result)
printer.print(STDOUT)
yard-master/benchmarks/yri_cache.rb000066400000000000000000000006231265676644000177170ustar00rootroot00000000000000require File.dirname(__FILE__) + "/../lib/yard"
require "benchmark"
include YARD::CLI

class YARD::CLI::YRI
  def print_object(object) end
end

def remove_cache
  File.unlink(YRI::CACHE_FILE)
end

TIMES = 10
NAME = 'YARD'
remove_cache; YRI.run(NAME)
Benchmark.bmbm do |x|
  x.report("cache   ") { TIMES.times { YRI.run(NAME) } }
  x.report("no-cache") { TIMES.times { remove_cache; YRI.run(NAME) } }
endyard-master/bin/000077500000000000000000000000001265676644000140765ustar00rootroot00000000000000yard-master/bin/yard000077500000000000000000000004741265676644000147700ustar00rootroot00000000000000#!/usr/bin/env ruby

# We do all this work just to find the proper load path
path = __FILE__
while File.symlink?(path)
  path = File.expand_path(File.readlink(path), File.dirname(path))
end
$:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))

require 'yard'

YARD::CLI::CommandParser.run(*ARGV)
yard-master/bin/yardoc000077500000000000000000000004651265676644000153120ustar00rootroot00000000000000#!/usr/bin/env ruby

# We do all this work just to find the proper load path
path = __FILE__
while File.symlink?(path)
  path = File.expand_path(File.readlink(path), File.dirname(path))
end
$:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))

require 'yard'

YARD::CLI::Yardoc.run(*ARGV)
yard-master/bin/yri000077500000000000000000000004621265676644000146310ustar00rootroot00000000000000#!/usr/bin/env ruby

# We do all this work just to find the proper load path
path = __FILE__
while File.symlink?(path)
  path = File.expand_path(File.readlink(path), File.dirname(path))
end
$:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))

require 'yard'

YARD::CLI::YRI.run(*ARGV)
yard-master/docs/000077500000000000000000000000001265676644000142565ustar00rootroot00000000000000yard-master/docs/CodeObjects.md000066400000000000000000000131001265676644000167570ustar00rootroot00000000000000# @title CodeObjects Architecture

# CodeObjects Architecture

Code objects are Ruby objects that describe the code being documented. For instance,
all classes, modules, methods, etc. are all extracted from the Ruby source as code
objects. All of these code objects extend from the {YARD::CodeObjects::Base} class, which
provides basic attributes like source location, source code, name and path.

## CodeObjects Organization

Code objects are divided into two basic types. {YARD::CodeObjects::NamespaceObject NamespaceObjects}
and non-namespace objects. A namespace object refers to any object in Ruby that can have
other objects defined inside of it. In the context of Ruby, this specifically means
modules and classes (both of which are subclasses of `NamespaceObject`). These objects
act like tree structures, maintaining a list of all of their direct children. All non
namespace objects are simply subclasses of the Base class. The {YARD::CodeObjects::RootObject RootObject}
is a special kind of `NamespaceObject` which refers to the top level namespace in Ruby.
Methods that accept a namespace object as a parameter should also accept the symbol
`:root` as a shortcut for the root object.

The following is an overview of the classes within the `CodeObjects` namespace:

![CodeObjects Class Diagram](images/code-objects-class-diagram.png)

## Unique Path Representation

All CodeObjects are uniquely defined by their implementation of {YARD::CodeObjects::Base#path}.
This path is used to locate or store a code object in the {YARD::Registry}. It is therefore
essential that any Base subclass return a unique String value for #path so that the
object may co-exist with other objects in the Registry.

In practice, a path is simply the conventional Ruby representation of a class,
module, constant, class variable or method. For example, the following objects
would have the following respective paths:

* Class `Klass` inside module `Mod`: `Mod::Klass`
* Instance method `bar` inside class `Foo`: `Foo#bar`
* Class method `bar` inside class `Foo`: `Foo.bar`
* Constant `VERSION` inside class `YARD`: `YARD::VERSION`
* Class variable `@@abc` inside class `A`: `A::@@abc`

## Registry

CodeObjects classes are coupled with the {YARD::Registry} class which keeps track of
all instantiated code objects. This is an explicit design choice to allow objects
to be fetched, cached, imported and exported from a centralized location. As mentioned
above, this coupling is a result of the fact that each object is uniquely identified by
its path, which is used to implement lookups. You can read more about the registry
in the {YARD::Registry} class.

## Identity Map

Code objects are instantiated using an identity-map like implementation that guarantees
only one unique Ruby object exists for an object described by a specific path. This
allows developers to create a code object without checking if it already exists in
the {YARD::Registry}. The following example will only create one object:

    id = ClassObject.new(:root, "MyClass").object_id #=> 13352
    ClassObject.new(:root, "MyClass").object_id #=> 13352

## Proxy Objects

In addition to providing access to existing objects, a {YARD::CodeObjects::Proxy}
class exists which can represent an object at a path that may or may not have been
created. This is necessary to represent a reference to an object in code that is
never defined in the same body of source code, or perhaps defined later. If any
attributes of a proxy are accessed, it will immediately be resolved to the object
at its declared path. In the case where such an object exists, it will act as
a delegate to the object. However, if the object does not exist, a warning will
be raised. Whenever arbitrary code objects are used, care should be taken in
order to make sure attributes are not accessed on unresolvable proxies. An
unresolvable proxy will return a class name of `Proxy` and #type of `:proxy`,
for example:

    P(:InvalidObject).type == :proxy  #=> true
    P(:InvalidObject).is_a?(Proxy)    #=> true

## Adding Data to Code Objects

Code objects act as hash-like structures that allow any arbitrary value to be set.
This allows easy extending of existing objects without creating custom subclasses.
For instance, to add a timestamp to a method object (when it was modified, maybe),
it is possible to simply do:

    object = MethodObject.new(:root, "my_method")
    object[:modified_at] = Time.now

This value can now be retrieved on this object both by the hash `[]` syntax as
well as like any other method:

    object.modified_at #=> 2009-06-03 20:08:46 -0400

## Creating a Custom CodeObject

It should first be mentioned that creating a custom code object should not be
necessary in most cases, except when functionality that cannot be represented
by classical Ruby objects is added. A good example *might* be a test class,
which although is technically a Ruby class, has a significantly different purpose
in documentation and needs a different set of metadata, as well as its own
representation in documentation.

The {YARD::CodeObjects::Base#path} implementation is the most important part of the
code object architecture. The first thing any custom code object must guarantee is
that its path value is unique among all other objects. The recommended way to do this
with custom objects is to add a descriptive prefix to the path. For example, the
following is an implementation of the path for a hypothetical `FooObject`:

    def path
      "__FooPrefix" + sep + super
    end

Note that if our FooObject is a `NamespaceObject`, meaning if it can have child
FooObjects defined inside of it, you may need to verify that the prefix is only
applied once.
yard-master/docs/GettingStarted.md000066400000000000000000000577241265676644000175470ustar00rootroot00000000000000# @title Getting Started Guide

# Getting Started with YARD

There are a few ways which YARD can be of use to you or your project. This
document will cover the most common ways to use YARD:

* [Documenting Code with YARD](#docing)
* [Using YARD to Generate Documentation](#using)
* [Configuring YARD](#config)
* [Extending YARD](#extending)
* [Templating YARD](#templating)
* [Plugin Support](#plugins)



## Documenting Code with YARD

By default, YARD is compatible with the same RDoc syntax most Ruby developers
are already familiar with. However, one of the biggest advantages of YARD is
the extended meta-data syntax, commonly known as "tags", that you can use
to express small bits of information in a structured and formal manner. While
RDoc syntax expects you to describe your method in a completely free-form
manner, YARD recommends declaring your parameters, return types, etc. with
the `@tag` syntax, which makes outputting the documentation more consistent
and easier to read. Consider the RDoc documentation for a method to_format:

    # Converts the object into textual markup given a specific `format`
    # (defaults to `:html`)
    #
    # == Parameters:
    # format::
    #   A Symbol declaring the format to convert the object to. This
    #   can be `:text` or `:html`.
    #
    # == Returns:
    # A string representing the object in a specified
    # format.
    #
    def to_format(format = :html)
      # format the object
    end

While this may seem easy enough to read and understand, it's hard for a machine
to properly pull this data back out of our documentation. Also we've tied our
markup to our content, and now our documentation becomes hard to maintain if
we decide later to change our markup style (maybe we don't want the ":" suffix
on our headers anymore).

In YARD, we would simply define our method as:

    # Converts the object into textual markup given a specific format.
    #
    # @param format [Symbol] the format type, `:text` or `:html`
    # @return [String] the object converted into the expected format.
    def to_format(format = :html)
      # format the object
    end

Using tags we can add semantic metadata to our code without worrying about
presentation. YARD will handle presentation for us when we decide to generate
documentation later.

## Which Markup Format?

YARD does not impose a specific markup. The above example uses standard RDoc
markup formatting, but YARD also supports textile and markdown via the
command-line switch or `.yardopts` file (see below). This means that you are
free to use whatever formatting you like. This guide is actually written
using markdown. YARD, however, does add a few important syntaxes that are
processed no matter which markup formatting you use, such as tag support
and inter-document linking. These syntaxes are discussed below.

## Adding Tags to Documentation

The tag syntax that YARD uses is the same @tag-style syntax you may have seen
if you've ever coded in Java, Python, PHP, Objective-C or a myriad of other
languages. The following tag adds an author tag to your class:

    # @author Loren Segal
    class MyClass
    end

To allow for large amounts of text, the @tag syntax will recognize any indented
lines following a tag as part of the tag data. For example:

    # @deprecated Use {#my_new_method} instead of this method because
    #   it uses a library that is no longer supported in Ruby 1.9.
    #   The new method accepts the same parameters.
    def mymethod
    end

### List of Tags

A list of tags can be found in {file:docs/Tags.md#taglist}

### Reference Tags

To reduce the amount of duplication in writing documentation for repetitive
code, YARD introduces "reference tags", which are not quite tags, but not
quite docstrings either. In a sense, they are tag (and docstring) modifiers.
Basically, any docstring (or tag) that begins with "(see OTHEROBJECT)" will
implicitly link the docstring or tag to the "OTHEROBJECT", copying any data
from that docstring/tag into your current object. Consider the example:

    class MyWebServer
      # Handles a request
      # @param request [Request] the request object
      # @return [String] the resulting webpage
      def get(request) "hello" end

      # (see #get)
      def post(request) "hello" end
    end

The above `#post` method takes the docstring and all tags (`param` and `return`)
of the `#get` method. When you generate HTML documentation, you will see this
duplication automatically, so you don't have to manually type it out. We can
also add our own custom docstring information below the "see" reference, and
whatever we write will be appended to the docstring:

    # (see #get)
    # @note This method may modify our application state!
    def post(request) self.state += 1; "hello" end

Here we added another tag, but we could have also added plain text. The
text must be appended *after* the `(see ...)` statement, preferably on
a separate line.

Note that we don't have to "refer" the whole docstring. We can also link
individual tags instead. Since "get" and "post" actually have different
descriptions, a more accurate example would be to only refer our parameter
and return tags:

    class MyWebServer
      # Handles a GET request
      # @param request [Request] the request object
      # @return [String] the resulting webpage
      def get(request) "hello" end

      # Handles a POST request
      # @note This method may modify our application state!
      # @param (see #get)
      # @return (see #get)
      def post(request) self.state += 1; "hello" end
    end

The above copies all of the param and return tags from `#get`. Note that you
cannot copy individual tags of a specific type with this syntax.

## Declaring Types

Some tags also have an optional "types" field which let us declare a list of
types associated with the tag. For instance, a return tag can be declared
with or without a types field.

    # @return [String, nil] the contents of our object or nil
    #   if the object has not been filled with data.
    def validate; end

    # We don't care about the "type" here:
    # @return the object
    def to_obj; end

The list of types is in the form `[type1, type2, ...]` and is mostly free-form,
so we can also specify duck-types or constant values. For example:

    # @param argname [#to_s] any object that responds to `#to_s`
    # @param argname [true, false] only true or false

Note the latter example can be replaced by the meta-type "Boolean".
Another meta-type is "void", which stands for "no meaningful value"
and is used for return values. These meta-types are by convention
only, but are recommended.

List types can be specified in the form `CollectionClass`.
For instance, consider the following Array that holds a set of Strings and
Symbols:

    # @param list [Array] the list of strings and symbols.

We mentioned that these type fields are "mostly" free-form. In truth, they
are defined "by convention". To view samples of common type specifications
and recommended conventions for writing type specifications, see
[http://yardoc.org/types.html](http://yardoc.org/types.html). Note that these
conventions may change every now and then, although we are working on a more
"formal" type specification proposal.

## Documenting Attributes

To document a Ruby attribute, add documentation text above the attribute
definition.

    # Controls the amplitude of the waveform.
    # @return [Numeric] the amplitude of the waveform
    attr_accessor :amplitude

As a short-hand syntax for declaring reader and writer attribute pairs,
YARD will automatically wire up the correct method types and information
by simply defining documentation in the `@return` tag. For example,
the following declaration will show the correct information for the
`waveform` attribute, both for the getter's return type and the
setter's value parameter type: 

    # @return [Numeric] the amplitude of the waveform
    attr_accessor :amplitude

In this case, the most important details for the attribute are the
object type declaration and its descriptive text.

### Documentation for a Separate Attribute Writer

Usually an attribute will get and set a value using the same syntax,
so there is no reason to have separate documentation for an attribute
writer. In the above `amplitude` case, the `Numeric` type is both used
for the getter and setter types.

Sometimes, however, you might want to have separate documentation
for the getter and setter. In this case, you would still add
the documentation text to the getter declaration (or `attr_accessor`)
and use `@overload` tags to declare the separate docstrings. For example:

    # @overload amplitude
    #   Gets the current waveform amplitude.
    #   @return [Numeric] the amplitude of the waveform
    # @overload amplitude=(value)
    #   Sets the new amplitude.
    #   @param value [Numeric] the new amplitude value
    #   @note The new amplitude will only take effect if {#restart}
    #     is called on the stream.

Note that by default, YARD exposes the reader portion of the attribute
in HTML output. If you have separate `attr_reader` and `attr_writer`
declarations, make sure to put your documentation (for both reader
and writer methods) on the reader declaration using `@overload`
tags as described above. For example:

    # @overload ...documentation here...
    attr_reader :amplitude

    # This documentation will be ignored by YARD.
    attr_writer :amplitude

## Documenting Custom DSL Methods

Application code in Ruby often makes use of DSL style metaprogrammed methods.
The most common is the `attr_accessor` method, which of course has built-in
support in YARD. However, frameworks and libraries often expose custom
methods that perform similar metaprogramming tasks, and it is often useful
to document their functionality in your application. Consider the `property`
method in a project like [DataMapper](http://datamapper.org), which creates
a typed attribute for a database model. The code might look like:

    class Post
      include DataMapper::Resource

      property :title, String
    end

As of version 0.7.0, YARD will automatically pick up on these basic methods if
you document them with a docstring. Therefore, simply adding some comments to
the code will cause it to generate documentation:

    class Post
      include DataMapper::Resource

      # @return [String] the title property of the post
      property :title, String
    end

Note that YARD uses the first argument in the method call to determine the
method name. In some cases, this would not be the method name, and you would
need to declare it manually. You can do so with the `@!method` directive:

    # @!method foo
    create_a_foo_method

The @!method directive can also accept a full method signature with parameters:

    # @!method foo(name, opts = {})
    create_a_foo_method

You can also set visibility and scope, or modify the method signature with
extra tags. The following adds documentation for a private class method:

    # @!method foo(opts = {})
    # The foo method!
    # @!scope class
    # @!visibility private
    create_a_private_foo_class_method

Finally, you can tag a method as an attribute by replacing the @!method
tag with @!attribute. The @!attribute directive allows for the flags [r], [w],
or [rw] to declare a readonly, writeonly, or readwrite attribute, respectively.

    # @!attribute [w]
    # The writeonly foo attribute!
    a_writeonly_attribute :foo

(Note that if the name can be automatically detected, you do not need to
specify it in the @!method or @!attribute directives)

However, you will notice a few drawbacks with this basic support:

1. There is a fair bit of duplication in such documentation. Specifically, we
   repeat the term String and title twice in the property example.
2. We must write a code comment for this property to show up in the documentation.
   If we do not write a comment, it is ignored.

### Macros

Fortunately YARD 0.7.0 also adds macros, a powerful way to add support for
these DSL methods on the fly without writing extra plugins. Macros allow
you to interpolate arguments from the method call inside the docstring,
reducing duplication. If we re-wrote the `property` example from above
using a macro, it might look like:

    class Post
      include DataMapper::Resource

      # @!macro dm.property
      # @return [$2] the $1 $0 of the post
      property :title, String
    end

(Note that $0 represents the method call, in this case `property`. The rest
are arguments in the method call.)

The above example is equivalent to the first version shown in the previous
section. There is also some extra benefit to using this macro, in that we
can re-apply it to any other property in our class by simply calling on
the macro. The following:

    # @!macro dm.property
    property :view_count, Integer

Would be equivalent to:

    # @return [Integer] the view_count property of the post
    property :view_count, Integer

Finally, macros can be "attached" to method calls, allowing them to be implicitly
activated every time the method call is seen in the source code of the class,
or an inheriting class. By simply adding the `[attach]` flag, the macro
becomes implicit on future calls. All of the properties below get documented
by using this snippet:

    class Post
      include DataMapper::Resource

      # @!macro [attach] dm.property
      # @return [$2] the $1 $0 of the post
      property :title, String
      property :view_count, Integer
      property :email, String
    end

You can read more about macros in the {file:docs/Tags.md Tags Overview} document.

## Customized YARD Markup

YARD supports a special syntax to link to other code objects, URLs, files,
or embed docstrings between documents. This syntax has the general form
of `{Name OptionalTitle}` (where `OptionalTitle` can have spaces, but `Name`
cannot).

### Linking Objects `{...}`

To link another "object" (class, method, module, etc.), use the format:

    {ObjectName#method OPTIONAL_TITLE}
    {Class::CONSTANT My constant's title}
    {#method_inside_current_namespace}

Without an explicit title, YARD will use the relative path to the object as
the link name. Note that you can also use relative paths inside the object
path to refer to an object inside the same namespace as your current docstring.

Note that the `@see` tag automatically links its data. You should not use
the link syntax in this tag:

    # @see #methodname   <- Correct.
    # @see {#methodname} <- Incorrect.

If you want to use a Hash, prefix the first { with "!":

   # !{ :some_key => 'value' }

### Linking URLs `{http://...}`

URLs are also linked using this `{...}` syntax:

    {http://example.com Optional Title}
    {mailto:email@example.com}

### Linking Files `{file:...}`

Files can also be linked using this same syntax but by adding the `file:`
prefix to the object name. Files refer to extra readme files you added
via the command-line. Consider the following examples:

    {file:docs/GettingStarted.md Getting Started}
    {file:mypage.html Name#anchor}

As shown, you can also add an optional `#anchor` if the page is an HTML link.

### Embedding Docstrings `{include:...}`

We saw the `(see ...)` syntax above, which allowed us to link an entire docstring
with another. Sometimes, however, we just want to copy docstring text without
tags. Using the same `{...}` syntax, but using the `include:` prefix, we can
embed a docstring (minus tags) at a specific point in the text.

    # This class is cool
    # @abstract
    class Foo; end

    # This is another class. {include:Foo} too!
    class Bar; end

The docstring for Bar becomes:

    "This is another class. This class is cool too!"

### Embedding Files `{include:file:...}`

You can embed the contents of files using `{include:file:path/to/file}`,
similar to the `{include:OBJECT}` tag above. If the file uses a specific markup
type, it will be applied and embedded as marked up text. The following
shows how the tag can be used inside of comments:

    # Here is an example of a highlighted Ruby file:
    #
    # {include:file:examples/test.rb}

### Rendering Objects `{render:...}`

Entire objects can also be rendered in place in documentation. This can be
used for guide-style documentation which does not document the entire source
tree, but instead selectively renders important classes or methods. Consider
the following documentation inside of a README file:

    !!!plain
    = igLatinPay!

    This library adds pig latin methods to the string class, allowing you
    to transform sentences into pig latin.

    {render:String#pig_latin}

    You can also un-pig-latin-ify a word or sentence:

    {render:String#de_pig_latin}

The above would render the methods in place inside the README document,
allowing you to summarize a small library in a single file.



## Using YARD to Generate Documentation

### `yard` Executable

YARD ships with a single executable aptly named `yard`. In addition to
generating standard documentation for your project, you would use this tool
if you wanted to:

* Document all installed gems
* Run a local documentation server
* Generate UML diagrams using [Graphviz][graphviz]
* View `ri`-style documentation
* Diff your documentation
* Analyze documentation statistics.

The following commands are available in YARD 0.6.x (see `yard help` for a
full list):

    Usage: yard  [options]

    Commands:
    config   Views or edits current global configuration
    diff     Returns the object diff of two gems or .yardoc files
    doc      Generates documentation
    gems     Builds YARD index for gems
    graph    Graphs class diagram using Graphviz
    help     Retrieves help for a command
    ri       A tool to view documentation in the console like `ri`
    server   Runs a local documentation server
    stats    Prints documentation statistics on a set of files

Note that `yardoc` is an alias for `yard doc`, and `yri` is an alias for
`yard ri`. These commands are maintained for backwards compatibility.

### `.yardopts` Options File

Unless your documentation is very small, you'll end up needing to run `yardoc`
with many options.  The `yardoc` tool will use the options found in this file.
It is recommended to check this in to your repository and distribute it with
your source. This file is placed at the root of your project (in the directory
you run `yardoc` from) and contains all of arguments you would otherwise pass
to the command-line tool. For instance, if you often type:

    yardoc --no-private --protected app/**/*.rb - README LEGAL COPYING

You can place the following into your `.yardopts`:

    --no-private --protected app/**/*.rb - README LEGAL COPYING

This way, you only need to type:

    yardoc

Any extra switches passed to the command-line now will be appended to your
`.yardopts` options.

Note that options for `yardoc` are discussed in the {file:README.md README},
and a full overview of the `.yardopts` file can be found in {YARD::CLI::Yardoc}.

### Documenting Extra Files

"Extra files" are extra guide style documents that help to give a brief overview
of how to use your library/framework, as well as any extra information that
might be vital for your users. The most common "extra file" is the README,
which is automatically detected by YARD if found in the root of your project
(any file starting with `README*`). You can specify extra files on the command
line (or in the `.yardopts` file) by listing them after the '-' separator:

    yardoc lib/**/*.rb ext/**/*.c - LICENSE.txt

Note that the README will automatically be picked up, so you do not need to
specify it. If you don't want to modify the default file globs, you can ignore
the first set of arguments:

    yardoc - LICENSE.txt

Below you can read about how to customize the look of these extra files, both
with markup and pretty titles.

#### Adding Meta-Data to Extra Files

You can add YARD-style `@tag` metadata to the top of any extra file if prefixed
by a `#` hash comment. YARD allows for arbitrary meta-data, but pays special
attention to the tags `@markup`, `@encoding`, and `@title`. Note that there
cannot be any whitespace before the tags. Here is an example of some tag data
in a README:

    # @markup markdown
    # @title The Best Library in the World!
    # @author The Author Name

    This is the best library you will ever meet. Lipsum ...

The `@markup` tag allows you to specify a markup format to use for the file,
including "markdown", "textile", "rdoc", "ruby", "text", "html", or "none"
(no markup). This can be used when the markup cannot be auto-detected using
the extension of the filename, if the file has no extension, or if you want
to override the auto-detection.

By using `@encoding` you can specify a non-standard encoding. Note that
`yardoc --charset` sets the global encoding (for all comments / files),
so if you are using unicode across all your files, you can specify it there.
Using the `@encoding` tag might be used to override the default global
charset, say, if you had a localized `README.jp` file with SJIS data.
Also note that this only affects Ruby 1.9.x, as Ruby 1.8 is not properly
encoding aware.

The `@title` tag allows you to specify a full title name for the document.
By default, YARD uses the filename as the title of the document and lists
it in the file list in the index and file menu. In some cases, the file name
might not be descriptive enough, so YARD allows you to specify a full title:

    contents of TITLE.txt:
    # @title The Title of The Document

Currently all other meta-data is hidden from view, though accessible
programmatically using the {YARD::CodeObjects::ExtraFileObject} class.



## Configuring YARD

YARD (0.6.2+) supports a global configuration file stored in `~/.yard/config`.
This file is stored as a YAML file and can contain arbitrary keys and values
that can be used by YARD at run-time. YARD defines specific keys that are used
to control various features, and they are listed in {YARD::Config::DEFAULT_CONFIG_OPTIONS}.
A sample configuration file might look like:

    :load_plugins: false
    :ignored_plugins:
      - my_plugin
      - my_other_plugin
    :autoload_plugins:
      - my_autoload_plugin
    :safe_mode: false

You can also view and edit these configuration options from the commandline
using the `yard config` command. To list your configuration, use `yard config --list`.
To view a key, use `yard config ITEM`, and to set it, use `yard config ITEM VALUE`.



## Extending YARD

There are many ways to extend YARD to support non-standard Ruby syntax (DSLs),
add new meta-data tags or programmatically access the intermediate metadata
and documentation from code. An overview of YARD's full architecture can be
found in the {file:docs/Overview.md} document.

For information on adding support for Ruby DSLs, see the {file:docs/Handlers.md}
and {file:docs/Parser.md} architecture documents.

For information on adding extra tags, see {file:docs/Tags.md}.

For information on accessing the data YARD stores about your documentation,
look at the {file:docs/CodeObjects.md} architecture document.



## Templating YARD

In many cases you may want to change the style of YARD's templates or add extra
information after extending it. The {file:docs/Templates.md} architecture
document covers the basics of how YARD's templating system works.



## Plugin Support

As of 0.4, YARD will automatically load any gem named with the prefix of
`yard-` or `yard_`. You can use this to load a custom plugin that
[extend](#extending) YARD's functionality. A good example of this
is the [yard-rspec][yard-rspec] plugin, which adds [RSpec][rspec] specifications
to your documentation (`yardoc` and `yri`). You can try it out by installing
the gem or cloning the project and trying the example:

    $ gem install yard-rspec -s http://gemcutter.org
    or
    $ git clone git://github.com/lsegal/yard-spec-plugin

YARD also provides a way to temporarily disable plugins on a per-user basis.
To disable a plugin create the file `~/.yard/ignored_plugins` with a list
of plugin names separated by newlines. Note that the `.yard` directory might
not exist, so you may need to create it.

[graphviz]:http://www.graphviz.org
[yard-rspec]:http://github.com/lsegal/yard-spec-plugin
[rspec]:http://rspec.info
yard-master/docs/Handlers.md000066400000000000000000000152101265676644000163370ustar00rootroot00000000000000# @title Handlers Architecture

# Handlers Architecture

Handlers allow the processing of parsed source code. Handling is done after
parsing to abstract away the implementation details of lexical and semantic
analysis on source and to only deal with the logic regarding recognizing
source statements as {file:docs/CodeObjects.md code objects}.

![Handlers Architecture Class Diagram](images/handlers-class-diagram.png)

## The Pipeline

After the {file:docs/Parser.md parser component} finishes analyzing the
source, it is handed off for post-processing to the {YARD::Handlers::Processor}
class, which is responsible for traversing the set of statements given by
the parser and delegating them to matching handlers. Handlers match when the
{YARD::Handlers::Base.handles?} method returns true for a given statement.
The handler can then perform any action after being invoked by the `process`
method.

## The Processor Class

The main purpose of the processor, as mentioned above, is to traverse through
the list of statements given to it by the parser. The processor also keeps
state about what is being processed. For instance, the processor is what keeps
track of the current namespace (the module or class an object is being defined
in), scope (class or instance), file and owner. The owner refers to the object
that is most directly responsible for the source statement being processed. This
is most often the same as the namespace, except when parsing the body of a method,
where the namespace would be the class/module the method is defined in and the
owner would be the method object itself.

## Implementing a Handler

This section covers the basics of implementing a *new-style* Ruby handler. For
details on implementing a legacy handler, see the "API Differences" section below.

a Ruby handler can be implemented simply by subclassing the {YARD::Handlers::Ruby::Base}
class and declaring what node types or source to process with the {YARD::Handlers::Base.handles handles}
class method. A very simple handler that handles a module definition would be:

    class MyModuleHandler < YARD::Handlers::Ruby::Base
      handles :module

      def process
        puts "Handling a module named #{statement[0].source}"
      end
    end

For details on what nodes are, and what node types are, see the
{file:docs/Parser.md parser architecture document}.

In this case the node type being handled is the `:module` type. More than one
node type or `handles` declarations may describe a single handler, for instance,
a handler that handles class definitions should handle the `:class` and `:sclass`
node types respectively (the latter refers to classes defined as `class << Something`).
The {YARD::Handlers::Base#statement statement} attribute refers to the current
node (or statement) that is being handled by the handler.

### Handling a Method Call

In some cases, a developer might need to handle a method call. The parser can
express a method call in many AST forms, so to simplify this process, a method
call can be handled by declaring the following in a `handles` statement:

    class MyHandler < YARD::Handlers::Ruby::Base
      handles method_call(:describe)

      def process
        # Process the method call
      end
    end

In this case we handle any of the method calls to method name `describe` with
the following syntaxes:

    describe(something)
    describe arg1, arg2, arg3
    describe(something) { perform_a_block }
    describe "Something" do
      a_block
    end

### Creating a new Code Object

Usually (but not always) handling is performed to create new code objects to add
to the registry (for information about code objects, see {file:docs/CodeObjects.md this document}).
Code objects should simply be created and added to the existing `namespace`. This
will be enough to add them to the registry. There is also a convenience
{YARD::Handlers::Base#register register} method which quickly sets standard attributed
on the newly created object, such as the file, line, source and docstring of the
object. This method will be seen in the next example.

### Handling an Inner Block

By default, the parser gives the processor class a list of all the top level
statements and the processor parses only those top level statements. If an inner
block of a module, class, method declaration or even a block passed to a method call
needs to be handled, the {YARD::Handlers::Base#parse_block parse_block} method must be called on the list of statements
to parse. This will send the list to the processor to continue processing on that
statement list. The source tree can be selectively parsed in this manner by parsing
only the inner blocks that are relevant to documentation.

For example, the module handler parses the inner body of a module by performing
the following commands:

    class YARD::Handlers::Ruby::ModuleHandler < YARD::Handlers::Ruby::Base
      handles :module

      def process
        modname = statement[0].source
        mod = register ModuleObject.new(namespace, modname)
        parse_block(statement[1], :namespace => mod)
      end
    end

In this case `statement[1]` refers to a list of extra statements, the block we
wish to parse. Note here that when parsing objects like modules and classes,
we set the namespace for the duration of the block parsing by setting options
on the `parse_block` method.

### API Differences for Legacy Handler

Because the legacy handler uses the legacy parser and therefore a different kind
of AST, there are subtle differences in the handler API. Most importantly, the
`handles` method usually deals with either lexical tokens or source code as a string
or RegExp object. The statement object, similarly, is made up of lexical tokens instead
of semantically parsed nodes (this is described in the {file:docs/Parser.md parser document}).

The module example above can be rewritten as a legacy handler as follows:

    class YARD::Handlers::Ruby::Legacy::ModuleHandler < YARD::Handlers::Ruby::Legacy::Base
      handles TkMODULE

      def process
        modname = statement.tokens.to_s[/^module\s+(#{NAMESPACEMATCH})/, 1]
        mod = register ModuleObject.new(namespace, modname)
        parse_block(:namespace => mod)
      end
    end

A few notes on the differences:

  * We inherit from `Legacy::Base` instead of the standard Ruby Base handler class.
  * We exchange node type `:module` for `TkMODULE`, which represents the
    first token in the statement.
  * We perform direct string manipulation to get the module name.
  * `parse_block` does not take a list of statements. In the old parser API,
    each statement has a `block` attribute which defines the list of
    statements within that statement, if any. Therefore, `parse_block` will
    always parse the `statement.block` if it exists.
yard-master/docs/Overview.md000066400000000000000000000050251265676644000164100ustar00rootroot00000000000000# @title Architecture Overview

# Architecture Overview

YARD is separated in three major components, each of which allows YARD to be
extended for a separate purpose. The split also emphasizes YARD's design choice
to explicitly separate data gathering from HTML document generation, something
that tools like RDoc do not do. These components are:

* [Code Parsing & Processing Component](#parsing)
* [Data Storage Component](#storage)
* [Post Processing & Templating System](#templates)

This separation is a major goal of the project, and means that YARD is not *just*
a tool to generate HTML output. The expectation is that any subset of YARD's
major components may be used, extended or modified independently. YARD may be
used just as a data gathering tool (to parse and audit code), just as a data
source (a webserver containing raw unformatted data about code), or just as a
conventional HTML documentation generation tool (like RDoc).

The important classes and dependencies of these components are shown in the
following class diagram:

![Overview Class Diagram](images/overview-class-diagram.png)



## Code Parsing & Processing Component

This component is made up of four sub-components, each of which have separate
tasks during the data gathering process (*note: the tag architecture is not*
*shown in the class diagram*). These sub-components are:

  * {file:docs/Parser.md}
  * {file:docs/Handlers.md}
  * {file:docs/CodeObjects.md}
  * {file:docs/Tags.md}

The parser component reads source files and converts it into a set of statements
which the handlers then process, creating code objects which in turn create tags
(meta-data) attached to the objects. These objects are all added to the {YARD::Registry},
the data store component.



## Data Storage Component

This component is currently implemented as a simple Ruby marshalled flat namespace
of object. The implementation is found in the single class {YARD::Registry}, which
is the centralized repository for all data being parsed, stored and accessed. There
are future plans to improve this storage mechanism to be backend agnostic and allow
for more robust storage.



## Post Processing & Templating System

This component handles processing of objects from the registry through a templating
engine that allows output to a variety of formats. Practically speaking, this is
where templates can be implemented to change the design, output or structure of
the data. See {file:docs/Templates.md Templates Architecture} for a complete overview.
yard-master/docs/Parser.md000066400000000000000000000212511265676644000160350ustar00rootroot00000000000000# @title Parser Architecture

# Parser Architecture

The parser component of YARD is the first component in the data processing pipeline
that runs before any handling is done on the source. The parser is meant to translate
the source into a set of statements that can be understood by the {file:docs/Handlers.md Handlers}
that run immediately afterwards.

The important classes are described in the class diagram of the entire parser
system below:

![Parser Class Diagram](images/parser-class-diagram.png)

(Note: the RubyToken classes are omitted from the diagram)

## SourceParser

The main class {YARD::Parser::SourceParser} acts as a factory class, instantiating
the correct parser class, an implementation of {YARD::Parser::Base}. The selected parser
is chosen based on either the file extension or by selecting it explicitly (as an argument
to parsing methods). YARD supports Ruby and C source files, but custom parsers can
be implemented and registered for various other languages by subclassing `Parser::Base`
and registering the parser with {YARD::Parser::SourceParser.register_parser_type}.

This factory class should always be used when parsing source files rather than
the individual parser classes since it initiates the pipeline that runs the
handlers on the parsed source. The parser used must also match the handlers,
and this is coordinated by the `SourceParser` class as well.

## Using the SourceParser Class

The `SourceParser` class API is optimized for parsing globs of files. As such,
the main method to use the class is the `parse` class method, which takes an
array of file globs or a single file glob.

    YARD::Parser::SourceParser.parse('spec_*.rb')
    YARD::Parser::SourceParser.parse(['spec_*.rb', '*_helper.rb'])

This is equivalent to the convenience method {YARD.parse}:

    YARD.parse('lib/**/*.rb')

In some cases (ie. for testing), it may be more helpful to parse a string of input
directly. In such a case, the method {YARD::Parser::SourceParser.parse_string} should be
used:

    YARD::Parser::SourceParser.parse_string("def method(a, b) end")

You can also provide the parser type explicitly as the second argument:

    # Parses a string of C
    YARD::Parser::SourceParser.parse_string("int main() { }", :c)

Note that these two methods are aliased as {YARD.parse} and {YARD.parse_string} for
convenience.

## Implementing and Registering a Custom Parser

To implement a custom parser, subclass {YARD::Parser::Base}. Documentation on which
abstract methods should be implemented are documented in that class. After the class
is implemented, it is registered with the {YARD::Parser::SourceParser} factory class
to be called when a file of the right extension needs to be parsed, or when a user
selects that parser type explicitly. To register your new parser class, call the
method {YARD::Parser::SourceParser.register_parser_type}:

    SourceParser.register_parser_type(:my_parser, MyParser, 'my_parser_ext')

The last argument can be a single extension, a list of extensions (Array), a single Regexp, or a
list of Regexps. Do not include the '.' in the extension.


## The Two Ruby Parser Types

When parsing Ruby, the SourceParser can either instantiate the new {YARD::Parser::Ruby::RubyParser}
class or the {YARD::Parser::Ruby::Legacy::StatementList} class. The first of the
two, although faster, more robust and more efficient, is only available for
Ruby 1.9. The legacy parser parser is available in both 1.8.x and 1.9, if
compatibility is required. The choice of parser will affect which handlers
ultimately get used, since new handlers can only use the new parser and the
same requirement applies to the legacy parser & handlers.

## Switching to Legacy Parser

By default, running YARD under Ruby 1.9 will automatically select the new parser
and new handlers by extension. Although YARD supports both handler styles, plugins
may choose to only implement one of the two (though this is not recommended). If
only the legacy handlers are implemented, the `SourceParser` class should force
the use of the legacy parser by setting the `parser_type` attribute as such:

    YARD::Parser::SourceParser.parser_type = :ruby18

The default value is `:ruby`. Note that this cannot be forced the other way around,
a parser type of `:ruby` cannot be set under Ruby 1.8.x as the new parser is not
supported under 1.8.

## RubyParser (the New Parser)

The new Ruby parser uses the Ripper library that is packaged as part of stdlib
in Ruby 1.9. Because of this, it can generate an AST from a string of Ruby input
that is similar to the style of other sexp libraries (such as ParseTree). Each
node generated in the tree is of the base type {YARD::Parser::Ruby::AstNode},
which has some subclasses for common node types.

### AstNode Basics

The `AstNode` class behaves like a standard Array class in which all of its data
make up the list of elements in the array. Unlike other sexp style libraries, however,
the node type is not the first element of the list. Instead, the node type is defined
by the `#type` method. The following examples show some of the basic uses of `AstNode`:

    # The sexp defines the statement `hello if 1`
    node = s(:if_mod, s(:int, "1"), s(:var_ref, s(:ident, "hello")))
    node.type  #=> :if_mod
    node[0]    #=> s(:int, "1")
    node[0][0] #=> "1"

(Note the `s()` syntax is shorthand for `AstNode.new(...)`. `s()` with no type
is shorthand for a node of type `:list`)

As shown, not all of the elements are AstNodes in themselves, some are String
objects containing values. A list of only the AstNodes within a node can be
accessed via the {YARD::Parser::Ruby::AstNode#children #children} method. Using
the sexp declared above, we can do:

    node.children #=> [s(:int, "1"), s(:var_ref, s(:ident, "hello"))]

### AstNode#source and #line

Every node defines the `#source` method which returns the source code that the
node represents. One of the most common things to do with a node is to grab its
source. The following example shows how this can be done:

    source = "if 1 == 1 then\n  raise Exception\n end"
    ast = YARD::Parser::Ruby::RubyParser.parse(source).root
    ast[0].condition.source  #=> "1 == 1"
    ast[0].then_block.source #=> "raise Exception"

Note that this only works on source parsed from the RubyParser, not sexps
declared using the `s()` syntax. This is because no source code is generated
or stored by nodes. Instead, only the character ranges are stored, which are
then looked up in the original full source string object. For example:

    # Following the code snippet above
    ast[0].then_block.source_range #=> 17..31

We can also get the line and line ranges in a similar fashion:

    ast[0].type       #=> :if
    ast[0].line       #=> 1
    ast[0].line_range #=> 1..3 (note the newlines in the source)

### AstNode#jump

Often the AST will be such that the node we care about might be buried arbitrarily
deep in a node's hierarchy. The {YARD::Parser::Ruby::AstNode#jump} method exists
to quickly get at a node of a specific type in such a situation:

    # Get the first identifier in the statement
    ast = s(s(:int, "1"), s(s(:var_ref, s(:ident, "hello"))))
    ast.jump(:ident)[0] #=> "hello"

Multiple types can be searched for at once. If none are found, the original root
node is returned so that it may be chained.

## The Legacy Parser

The goal of the legacy parser is much the same as the new parser, but it is far
more simplistic. Instead of a full-blown AST, the legacy parser simply groups
together lists of "statements" called a {YARD::Parser::Ruby::Legacy::StatementList}.
These statement lists are made up of {YARD::Parser::Ruby::Legacy::Statement} objects.
A statement is any method call condition, loop, or declaration. Each statement
may or may not have a block. In the case of a condition or loop, the block is
the inner list of statements; in the case of a method call, the block is a do
block (if provided). The statements themselves are made up of tokens, so instead
of being semantic in nature like the new parser, statements are tied directly
to the lexical tokens that make them up. To convert a statement into source, you
simply join all the tokens together (this is done through the use of `#to_s`).

Note that because there is little semantic parsing, the legacy parser is less
able to deal with certain Ruby syntaxes. Specifically, the `:if_mod` syntax
seen above ("hello if 1") would be considered two statements with the new parser,
but using the legacy parser it is only one statement:

    stmts = ARD::Parser::Ruby::Legacy::StatementList.new("hello if 1")
    stmts[0].block       #=> nil
    stmts[0].tokens.to_s #=> "hello if 1"

In addition, this means that most handling still needs to be done via string
manipulation and regular expression matching, making it considerably more
difficult to use in edge case scenarios.
yard-master/docs/Tags.md000066400000000000000000000322431265676644000155020ustar00rootroot00000000000000# @title Tags Overview

# Tags Overview

Tags represent meta-data as well as behavioural data that can be added to
documentation through the `@tag` style syntax. As mentioned, there are two
basic types of tags in YARD, "meta-data tags" and "behavioural tags", the
latter is more often known as "directives". These two tag types can be
visually identified by their prefix. Meta-data tags have a `@` prefix,
while directives have a prefix of `@!` to indicate that the directive
performs some potentially mutable action on or with the docstring. The
two tag types would be used in the following way, respectively:

    # @meta_data_tag some data
    # @!directive_tag some data
    class Foo; end

This document describes how tags can be specified, how they affect your
documentation, and how to use specific built-in tags in YARD, as well
as how to define custom tags.

## Meta-Data Tags

Meta-data tags are useful to add arbitrary meta-data about a documented
object. These tags simply add data to objects that can be looked up later,
either programmatically, or displayed in templates. The benefit to describing
objects using meta-data tags is that your documentation can be organized
semantically. Rather than having a huge listing of text with no distinction
of what each paragraph is discussing, tags allow you to focus in on specific
elements of your documentation.

For example, describing parameters of a method can often be important to your
documentation, but should not be mixed up with the documentation that describes
what the method itself does. In this case, separating the parameter documentation
into {tag:param} tags can yield much better organized documentation, both in
source and in your output, without having to manually format the data using
standard markup.

All of this meta-data can be easily parsed by tools and used both in your templates
as well as in code checker tools. An example of how you can leverage tags
programmatically is shown in the {tag:todo} tag, which lists a small snippet of
Ruby code that can list all of your TODO items, if they are properly tagged.

Custom meta-data tags can be added either programmatically or via the YARD
command-line. This is discussed in the "[Adding Custom Tags](#Adding_Custom_Tags)"
section.

A list of built-in meta-data tags are found below in the [Tag List](#Tag_List).

## Directives

Directives are similar to meta-data tags in the way they are specified, but they
do not add meta-data to the object directly. Instead, they affect the parsing
context and objects themselves, allowing a developer to create objects
(like methods) outright, rather than simply add text to an existing object.
Directives have a `@!` prefix to differentiate these tags from meta-data tags,
as well as to indicate that the tag may modify or create new objects when
it is called.

A list of built-in directives are found below in the [Directive List](#Directive_List).

## Tag Syntax

Tags begin with the `@` or `@!` prefix at the start of a comment line, followed
immediately by the tag name, and then optional tag data (if the tag requires it).
Unless otherwise specified by documentation for the tag, all "description" text
is considered free-form data and can include any arbitrary textual data.

### Multi-line Tags

Tags can span multiple lines if the subsequent lines are indented by more than
one space. The typical convention is to indent subsequent lines by 2 spaces.
In the following example, `@tagname` will have the text *"This is indented tag data"*:

    # @tagname This is
    #   indented tag data
    # but this is not

For most tags, newlines and indented data are not significant and do not impact
the result of the tag. In other words, you can decide to span a tag onto multiple
lines at any point by creating an indented block. However, some tags like
{tag:example}, {tag:overload}, {tag:!macro}, {tag:!method}, and {tag:!attribute}
rely on the first line for special information about the tag, and you cannot
split this first line up. For instance, the {tag:example} tag uses the first line
to indicate the example's title.

### Common Tag Syntaxes

Although custom tags can be parsed in any way, the built-in tags follow a few
common syntax structures by convention in order to simplify the syntax. The
following syntaxes are available:

1. **Freeform data** — In this case, any amount of textual data is allowed,
  including no data. In some cases, no data is necessary for the tag.
2. **Freeform data with a types specifier list** — Mostly freeform data
  beginning with an *optional* types specifier list surrounded in `[brackets]`.
  Note that for extensibility, other bracket types are allowed, such as `<>`,
  `()` and `{}`. The contents of the list are discussed in detail below.
3. **Freeform data with a name and types specifier list** — freeform
  data beginning with an *optional* types list, as well as a name key. The
  name key is *required*. Note that for extensibility, the name can be placed
  *before* the types list, like: `name [Types] description`. In this case,
  a separating space is not required between the name and types, and you
  can still use any of the other brackets that the type specifier list allows.
4. **Freeform data with title** — freeform data where the first line cannot
  be split into multiple lines. The first line must also always refer to the
  "title" portion, and therefore, if there is no title, the first line must
  be blank. The "title" might occasionally be listed by another name in tag
  documentation, however, you can identify this syntax by the existence of
  a multi-line signature with "Indented block" on the second line.

In the tag list below, the term "description" implies freeform data, `[Types]`
implies a types specifier list, "name" implies a name key, and "title" implies
the first line is a newline significant field that cannot be split into multiple
lines.

### Types Specifier List

In some cases, a tag will allow for a "types specifier list"; this will be evident
from the use of the `[Types]` syntax in the tag signature. A types specifier list
is a comma separated list of types, most often classes or modules, but occasionally
literals. For example, the following {tag:return} tag lists a set of types returned
by a method:

    # Finds an object or list of objects in the db using a query
    # @return [String, Array, nil] the object or objects to
    #   find in the database. Can be nil.
    def find(query) finder_code_here end

A list of conventions for type names is specified below. Typically, however,
any Ruby literal or class/module is allowed here. Duck-types (method names
prefixed with "#") are also allowed.

Note that the type specifier list is always an optional field and can be omitted
when present in a tag signature. This is the reason why it is surrounded by
brackets. It is also a freeform list, and can contain any list of values, though
a set of conventions for how to list types is described below.

### Type List Conventions

A list of examples of common type listings and what they translate into is available at http://yardoc.org/types.

Typically, a type list contains a list of classes or modules that are associated with the tag. In some cases, however, certain special values are allowed or required to be listed. This section discusses the syntax for specifying Ruby types inside of type specifier lists, as well as the other non-Ruby types that are accepted by convention in these lists. It's important to realize that the conventions listed here may not always adequately describe every type signature, and is not meant to be a complete syntax. This is why the types specifier list is freeform and can contain any set of values. The conventions defined here are only conventions, and if they do not work for your type specifications, you can define your own appropriate conventions. Note that a types specifier list might also be used for non-Type values. In this case, the tag documentation will describe what values are allowed within the type specifier list. #### Class or Module Types Any Ruby type is allowed as a class or module type. Such a type is simply the name of the class or module. Note that one extra type that is accepted by convention is the `Boolean` type, which represents both the `TrueClass` and `FalseClass` types. This type does not exist in Ruby, however. #### Parametrized Types In addition to basic types (like String or Array), YARD conventions allow for a "generics" like syntax to specify container objects or other parametrized types. The syntax is `Type`. For instance, an Array might contain only String objects, in which case the type specification would be `Array`. Multiple parametrized types can be listed, separated by commas. Note that parametrized types are typically not order-dependent, in other words, a list of parametrized types can occur in any order inside of a type. An array specified as `Array` can contain any amount of Strings or Fixnums, in any order. When the order matters, use "order-dependent lists", described below. #### Duck-Types Duck-types are allowed in type specifier lists, and are identified by method names beginning with the "#" prefix. Typically, duck-types are recommended for {tag:param} tags only, though they can be used in other tags if needed. The following example shows a method that takes a parameter of any type that responds to the "read" method: # Reads from any I/O object. # @param [#read] io the input object to read from def read(io) io.read end #### Hashes Hashes can be specified either via the parametrized type discussed above, in the form `Hash`, or using the hash specific syntax: `Hash{KeyTypes=>ValueTypes}`. In the latter case, KeyTypes or ValueTypes can also be a list of types separated by commas. #### Order-Dependent Lists An order dependent list is a set of types surrounded by "()" and separated by commas. This list must contain exactly those types in exactly the order specified. For instance, an Array containing a String, Fixnum and Hash in that order (and having exactly those 3 elements) would be listed as: `Array<(String, Fixnum, Hash)>`. #### Literals Some literals are accepted by virtue of being Ruby literals, but also by YARD conventions. Here is a non-exhaustive list of certain accepted literal values: * `true`, `false`, `nil` — used when a method returns these explicit literal values. Note that if your method returns both `true` or `false`, you should use the `Boolean` conventional type instead. * `self` — has the same meaning as Ruby's "self" keyword in the context of parameters or return types. Recommended mostly for {tag:return} tags that are chainable. * `void` — indicates that the type for this tag is explicitly undefined. Mostly used to specify {tag:return} tags that do not care about their return value. Using a `void` return tag is recommended over no type, because it makes the documentation more explicit about what the user should expect. YARD will also add a note for the user if they have undefined return types, making things clear that they should not use the return value of such a method. ### Reference Tags

Reference tag syntax applies only to meta-data tags, not directives.

If a tag's data begins with `(see OBJECT)` it is considered a "reference tag". A reference tag literally copies the tag data by the given tag name from the specified OBJECT. For instance, a method may copy all {tag:param} tags from a given object using the reference tag syntax: # @param [String] user the username for the operation # @param [String] host the host that this user is associated with # @param [Time] time the time that this operation took place def clean(user, host, time = Time.now) end # @param (see #clean) def activate(user, host, time = Time.now) end ## Adding Custom Tags

If a tag is specific to a given project, consider namespacing it by naming it in the form projectname.tagname, ie., yard.tag_signature.

Custom tags can be added to YARD either via the command-line or programmatically. The programmatic method is not discussed in this document, but rather in the {file:docs/TagsArch.md} document. To add a custom tag via the command-line or .yardopts file, you can use the `--*-tag` options. A few different options are available for the common tag syntaxes described above. For example, to add a basic freeform tag, use: !!!sh $ yard doc --tag rest_url:"REST URL" This will register the `@rest_url` tag for use in your documentation and display this tag in HTML output wherever it is used with the heading "REST URL". Note that the tag title should follow the tag name with a colon (`:`). Other tag syntaxes exist, such as the type specifier list freeform tag (`--type-tag`), or a named key tag with types (`--type-name-tag`). If you want to create a tag but not display it in output (it is only for programmatic use), add `--hide-tag tagname` after the definition: !!!sh $ yard doc --tag complexity:"McCabe Complexity" --hide-tag complexity Note that you might not need a tag title if you are hiding it. The title part can be omitted. {yard:include_tags} yard-master/docs/TagsArch.md000066400000000000000000000111441265676644000162750ustar00rootroot00000000000000# @title Tags Architecture # Tags Architecture ## Programmatic API ### Accessing Tag Information Tag metadata is added when a {YARD::Docstring} is added to a {file:docs/CodeObjects.md code object} using the {YARD::CodeObjects::Base#docstring=} attribute. In addition to adding conventional comments, tags are parsed and associated with the object. The easiest way to access tags on an object is to use the {YARD::CodeObjects::Base#tag} and `#tags` methods, for example: # Using the Foo class object from above obj.tags(:tagname).first.text #=> "some data" Because multiple tags can be stored with the same name, they are stored as a list of tags. The `#tag` method is an alias for the first item in the list of tags. Also note that the `#tag`, `#tags` and `#has_tag?` methods are all convenience methods that delegate to the {YARD::Docstring} object described above. ### Adding Custom Tags The `@tagname` tag used in the above examples is clearly not part of the tags that come with YARD. If such a tag would actually be part of documentation under a default install, YARD would raise a warning that the tag does not exist. It is, however, trivial to add this tag to be recognized by YARD. All tags in YARD are added to the {YARD::Tags::Library tag library} which makes use of a tag factory class to parse the data inside the tags. To simply add a tag that stores simple text like our `@tagname` tag above, use: YARD::Tags::Library.define_tag("A Sample Tag", :tagname) This will now allow YARD to add the metadata from `@tagname` to the docstring. ## Tag Factory Architecture Recognizing a tag is one part of the process. Parsing the tag contents is the second step. YARD has a tag architecture that allows developers to add or completely change the way tags contents can be parsed. The separation of registration and tag creation can be seen in the following class diagram: ![Tags Architecture Class Diagram](images/tags-class-diagram.png) ### DefaultFactory By default, YARD has a few standard syntaxes that can be parsed for tags. These are all implemented by the {YARD::Tags::DefaultFactory} class. These syntaxes are: * Standard text: no parsing is done, but text is stripped of newlines and multiple spaces. * Raw text: does no parsing at all, no stripping of newlines or spaces. This is best used for code snippets. * Raw text with title: does no parsing on the text but extracts the first line of the metadata as the "title", useful for tags such as `@example`: # @example Inspect an element # myobj.inspect #=> # * Text with types: parses a list of types at the beginning of the text. Types are optional. The standard syntax is in the form `[type1, type2, ...]`, for example: # @return [String, Symbol] a description here # @return description here with no types * Text with types and a name: parses a list of types at the beginning of text followed by a name and extra descriptive text. For example: # @param [String] str the string to reverse def reverse(str) '...' end As mentioned above, this syntax is implemented by the `DefaultFactory` which can be swapped out for any factory. In some cases, a developer may want to change the type declaration syntax to be in the form: # @tagname name description This can be done by simply implementing a new factory that parses the data in this form. ### Implementing a Factory Factories should implement the method `parse_tag` as well as any `parse_tag_SUFFIX` method where SUFFIX refers to the suffix added when declaring the tag. For example, a tag can also be declared as follows: YARD::Tags::Library.define_tag "Parameter", :param, :with_types In such a case, the factory will be called with method `parse_tag_with_types`. In all cases, the method should return a new {YARD::Tags::Tag} object. Generally, the `parse_tag` methods take 2 or 3 parameters. A simple tag can be implemented as: def parse_tag(tag_name, text) Tag.new(tag_name, text) end The text parameter contains pre-parsed text with extra spaces and newlines removed. If required, the method could also be declared with a third parameter containing unmodified raw text: def parse_tag_with_raw_text(tag_name, text, raw_text) Tag.new(tag_name, raw_text) end Note that this method would be invoked for a tag declared with the `:with_raw_text` suffix. ### Changing the Factory To change the factory, set the {YARD::Tags::Library.default_factory} attribute: YARD::Tags::Library.default_factory = MyFactory This must be done before any parsing is done, or the factory will not be used. yard-master/docs/Templates.md000066400000000000000000000453731265676644000165520ustar00rootroot00000000000000# @title Templates Architecture # Templates Architecture Templates are the main component in the output rendering process of YARD, which is invoked when conventional HTML/text output needs to be rendered for a set of code objects. ## Design Goals The general design attempts to be as abstracted from actual content and templates as possible. Unlike RDoc which uses one file to describe the entire template, YARD splits up the rendering of code objects into small components, allowing template modification for smaller subsets of a full template without having to duplicate the entire template itself. This is necessary because of YARD's support for plugins. YARD is designed for extensibility by external plugins, and because of this, no one plugin can be responsible for the entire template because no one plugin knows about the other plugins being used. For instance, if an RSpec plugin was added to support and document specifications in class templates, this information would need to be transparently added to the template to work in conjunction with any other plugin that performed similar template modifications. The design goals can be summarized as follows: 1. Output should be able to be rendered for any arbitrary format with little modification to YARD's source code. The addition of extra templates should be sufficient. 2. The output rendered for an object should independently rendered data from arbitrary sources. These independent components are called "sections". 3. Sections should be able to be inserted into any object without affecting any existing sections in the document. This allows for easy modification of templates by plugins. ## Templates Template modules are the objects used to orchestrate the design goals listed above. Specifically, they organize the sections and render the template contents depending on the format. ## Engine The Engine class orchestrates the creation and rendering of Template modules and handles serialization or specific rendering scenarios (like HTML). To create a template, use the {YARD::Templates::Engine.template template} method. The two most common methods used to initiate output are the {YARD::Templates::Engine.render render} and {YARD::Templates::Engine.generate generate} methods which generate and optionally serialize output to a file. The latter, `#generate`, is used specially to generate HTML documentation and copy over assets that may be needed. For instance, an object may be rendered with: YARD::Templates::Engine.render(:object => myobject) A set of objects may be rendered into HTML documentation by using: # all_objects is an array of module and class objects # options includes a :serializer key to copy output to the file system YARD::Templates::Engine.generate(all_objects, options) Note that these methods should not be called directly. The {YARD::CodeObjects::Base} class has a {YARD::CodeObjects::Base#format #format} helper method to render an object. For instance, the above render example is equivalent to the simple call `myobject.format`. The `generate` method is a special kind of render and is called from the {YARD::CLI::Yardoc} command line utility. ## Template Options A template keeps state when it is rendering output. This state is kept in an options hash which is initially passed to it during instantiation. Some default options set the template style (`:template`), the output format (`:format`), and the serializer to use (`:serializer`). This options hash is modifiable from all methods seen above. For example, initializing a template to output as HTML instead of text can be done as follows: myobject.format(:format => :html) ## Serializer This class abstracts the logic involved in deciding how to serialize data to the expected endpoint. For instance, there is both a {YARD::Serializers::StdoutSerializer StdoutSerializer} and {YARD::Serializers::FileSystemSerializer FileSystemSerializer} class for outputting to console or to a file respectively. When endpoints with locations are used (like files or URLs), the serializer implements the {YARD::Serializers::Base#serialized_path #serialized_path} method. This allows the translation from a code object to its path at the endpoint, which enables inter-document linking. Rendered objects are automatically serialized using the object if present, otherwise the rendered object is returned as a string to its parent. Nested Templates automatically set the serializer to nil so that they return as a String to their parent. ## Creating a Template Templates are represented by a directory inside the {YARD::Templates::Engine.template_paths} on disk. A standard template directory looks like the following tree: (Assuming templates/ is a template path) templates `-- default |-- class | |-- dot | | |-- setup.rb | | `-- superklass.erb | |-- html | | |-- constructor_details.erb | | |-- setup.rb | | `-- subclasses.erb | |-- setup.rb | `-- text | |-- setup.rb | `-- subclasses.erb |-- docstring | |-- html | | |-- abstract.erb | | |-- deprecated.erb | | |-- index.erb | | `-- text.erb | |-- setup.rb | `-- text | |-- abstract.erb | |-- deprecated.erb | |-- index.erb | `-- text.erb The path `default` refers to the template style (:template key in options hash) and the directories at the next level (such as `class`) refer to template `:type` (options hash key) for a template. The next directory refers to the output format being used defined by the `:format` template option. As we saw in the above example, the format option can be set to `:html`, which would use the `html/` directory instead of `text/`. Finally, the individual .erb files are the sections that make up the template. Note that the subdirectory `html/` is also its own "template" that inherits from the parent directory. We will see more on this later. ## setup.rb Every template should have at least one `setup.rb` file that defines the {YARD::Templates::Template#init #init} method to set the {YARD::Templates::Template#sections #sections} used by the template. If a setup.rb is not defined in the template itself, there should be a template that is inherited (via parent directory or explicitly) that sets the sections on a newly created template. A standard setup.rb file looks like: def init sections :section1, :section2, :section3 end ## Sections Sections are smaller components that correlate to template fragments. Practically speaking, a section can either be a template fragment (a conventional .erb file or other supported templating language), a method (which returns a String) or another {YARD::Templates::Template} (which in turn has its own list of sections). ## Nested Sections Sections often require the ability to encapsulate a set of sub-sections in markup (HTML, for instance). Rather than use heavier Template subclass objects, a more lightweight solution is to nest a set of sub-sections as a list that follows a section, for example: def init sections :header, [:section_a, :section_b] end The above example nests `section_a` and `section_b` within the `header` section. Practically speaking, these sections can be placed in the result by `yield`ing to them. A sample header.erb template might contain:

Header

<%= yieldall %>
This template code would place the output of `section_a` and `section_b` within the above div element. Using `yieldall`, we can also change the object that is being rendered. For example, we may want to yield the first method of the class. We can do this like so:

First method

<%= yieldall :object => object.meths.first %> This would run the nested sections for the method object instead of the class. Note that `yieldall` yields to all subsections, whereas `yield` will yield to each individually (in order) until there are no more left to yield to. In the vast majority of cases, you'd want to use `yieldall`, since `yield` makes it hard for users to override your template. ## Inheriting Templates Parent directory templates are automatically inherited (or mixed in, to be more accurate) by the current template. This means that the 'default/class/html' template automatically inherits from 'default/class'. This also means that anything defined in 'default/class/setup.rb' can be overridden by 'default/class/html/setup.rb'. Since the Template module is a module, and not a class, they can be mixed in explicitly (via include/extend) from other templates, which allows templates to share erb files or helper logic. The 'default/class' template explicitly mixes in the 'default/module' template, since it uses much of the same sections. This is done with the helper {YARD::Templates::Template::ClassMethods#T T} method, which is simply a shorthand for {YARD::Templates::Engine.template Engine.template}. It can then override (using standard inheritance) the sections from the module template and insert sections pertaining to classes. This is one of the design goals described above. For instance, the first line in `default/class/html/setup.rb` is: include T('default/module/html') This includes the 'default/module/html', which means it also includes 'default/module' by extension. This allows class to make use of any of module's erb files. ## Inserting and Traversing Sections The ability to insert sections was mentioned above. The class template, for instance, will modify the #init method to insert class specific sections: def init super sections.place(:subclasses).before(:children) sections.delete(:children) sections.place([:constructor_details, [T('method_details')]]).before(:methodmissing) end Observe how sections has been modified after the super method was called (the super method would have been defined in `default/module/setup.rb`). The `sections` object is of the {YARD::Templates::Section} class and allows sections to be inserted before or after another section using {Array#place} by it's given name rather than index. This allows the overriding of templates in a way that does not depend on where the section is located (since it may have been overriden by another module). You can also use `sections[:name]` to find the first child section named `:name`. For instance, with the following sections declaration: sections :a, [:b, :c, [:d]] You can get to the :d section with: sections[:a][:c][:d] You can use this to insert a section inside a nested set without using indexed access. The following command would result in `[:a, [:b, :c, [:d, :e]]]`: sections[:a][:c].place(:e).after(:d) There are also two methods, {Insertion#before_any} and {Insertion#after_any}, which allow you to insert sections before or after the first matching section name recursively. The above example could simply be rewritten as: sections.place(:e).after_any(:d) ## Overriding Templates by Registering a Template Path Inheriting templates explicitly is useful when creating a customized template that wants to take advantage of code re-use. However, most users who want to customize YARD templates will want to override existing behaviour without creating a template from scratch. YARD solves this problem by allowing other template paths to be registered. Because template modules are represented by a relative path such as 'default/class', they can be found within any of the registered template paths. A new template path is registered as: YARD::Templates::Engine.register_template_path '/path/to/mytemplates' At this point, any time the 'default/class' template is loaded, the template will first be looked for inside the newly registered template path. If found, it will be used as the template module, with the modules from the other template paths implicitly mixed in. Therefore, by using the same directory structure as a builtin YARD template, a user can customize or override individual templates as if the old ones were inherited. A real world example would further modify the 'default/class' template seen above by creating such a path in our '/path/to/mytemplates' custom template path: /path/to/mytemplates/: |-- class | |-- html | | |-- customsection.erb | |-- setup.rb The `setup.rb` file would look like: def init super sections.push :customsection end Now, when a class object is formatted as HTML, our customsection.erb will be appended to the rendered data. ### Overriding Stylesheets and Javascripts Template authors can override existing stylesheets and javascripts by creating a file with the same name as existing files within the `fulldoc` template. The documentation output will utilize the new replacement file. YARD's `fulldoc` template defines three stylesheets: /yard/templates/default/: |-- fulldoc | |-- html | | |-- css | | | |-- common.css | | | |-- full_list.css | | | |-- style.css The `style.css` is the primary stylesheet for the HTML output. The `full_list.css` is an additional stylesheet loaded specifically for the search field menus (i.e. class list, method list, and file list). The `common.css` is an empty css file that an template author can easily override to provide custom styles for their plugin. However, if a user installs multiple plugins that utilize this same file to deliver styles, it is possible that they will be overridden. YARD's `fulldoc` template defines three javascript files: /yard/templates/default/: |-- fulldoc | |-- html | | |-- js | | | |-- app.js | | | |-- full_list.js | | | |-- jquery.js The `app.js` is the primary javascript file for the HTML output. The `full_list.js` defines additional javascript loaded specifically for the search field menus (i.e. class list, method list, and file list). The `jquery.js` is copy of the jquery javascript library. ### Adding a Custom Stylesheet or Javascript To load additional stylesheets and javascripts with every page (except the search field menus) generated from the base `layout` template: 1. Define your own custom stylesheet and/or javascript file (default/ is the default template name inside of the /template root directory): /template/default/: |-- fulldoc | |-- html | | |-- css | | | |-- custom.css | | |-- js | | | |-- custom.js 2. Create a `setup.rb` in the `layout` template directory and override the methods `stylesheets` and `javascripts`. The path to the template would be: /template/default/: |-- layout | |-- html | | |-- setup.rb And the code would look like: def stylesheets # Load the existing stylesheets while appending the custom one super + %w(css/custom.css) end def javascripts # Load the existing javascripts while appending the custom one super + %w(js/custom.js) end To load additional stylesheets and javascripts for the search menus loaded from the `fulldoc` template: 1. Define your own custom stylesheet and/or javascript file. /path/to/mytemplates/: |-- fulldoc | |-- html | | |-- css | | | |-- custom_full_menu.css | | |-- js | | | |-- custom_full_menu.js 3. Override the methods `stylesheets_full_list` and `javascripts_full_list` in the `setup.rb` file inside fulldoc/html. def stylesheets_full_list # Load the existing stylesheets while appending the custom one super + %w(css/custom.css) end def javascripts_full_list # Load the existing javascripts while appending the custom one super + %w(js/custom.js) end ### Overriding Search Menus By default YARD's `fulldoc` template generates three search fields: * Class List * Method List * File List Their contents are rendered in methods within the `fulldoc` template: * `generate_class_list` * `generate_method_list` * `generate_file_list` To override these lists you will need to: 1. Create a `setup.rb` in the `fulldoc` template directory and override the particular method. /path/to/mytemplates/: |-- fulldoc | |-- html | | |-- setup.rb def generate_method_list @items = prune_method_listing(Registry.all(:method), false) @items = @items.reject {|m| m.name.to_s =~ /=$/ && m.is_attribute? } # Here we changed the functionality to reverse the order of displayed methods @items = @items.sort_by {|m| m.name.to_s }.reverse @list_title = "Method List" @list_type = "methods" asset('method_list.html', erb(:full_list)) end ### Adding Additional Search Menus By default YARD's `fulldoc` template generates three search fields: * Class List * Method List * File List These are defined in the `layout` template method `menu_lists` and pulled into the `fulldoc` template through a similarly named method. To load an additional menu item: 1. Create a `setup.rb` in the `layout` template directory and override the methods `menu_lists`. The `type` informs the search field the name of the file. The `title` is the name that appears above the section when viewed in frames. The `search_title` is the name that appears in the search field tab on the page. /path/to/mytemplates/: |-- layout | |-- html | | |-- setup.rb def menu_lists # Load the existing menus super + [ { :type => 'feature', :title => 'Features', :search_title => 'Feature List' } ] end 2. Create a `setup.rb` in the `fulldoc` template directory and create a method to generate a menu for the specified `type`. The method `generate_assets` will look for a function with a signature prefixed with `generate`, the type value specified, and the suffix `list`. Within that method you can configure and load the specific objects you wish to display. /path/to/mytemplates/: |-- fulldoc | |-- html | | |-- setup.rb def generate_feature_list # load all the features from the Registry @items = Registry.all(:feature) @list_title = "Feature List" @list_type = "feature" # optional: the specified stylesheet class # when not specified it will default to the value of @list_type @list_class = "class" # Generate the full list html file with named feature_list.html # @note this file must be match the name of the type asset('feature_list.html', erb(:full_list)) end yard-master/docs/WhatsNew.md000066400000000000000000001514471265676644000163540ustar00rootroot00000000000000# @title What's New? # What's New in 0.8.x? 1. **Directives (new behavioural tag syntax)** (0.8.0) 2. **Added `--embed-mixin(s)` to embed mixins into class docs** (0.8.0) 3. **Internationalization (I18n) support for translating docs** (0.8.0) 4. **New C parser / handlers architecture** (0.8.0) 5. **YARD will now warn if `@param` name not in method params** (0.8.0) 6. **Added support for `module_function` calls in Ruby code** (0.8.0) 7. **Greatly improved tag documentation using custom template** (0.8.0) 8. **Tags can now contain '.' for namespacing** (0.8.0) 9. **Added "frames" links for non-framed pages for better nav** (0.8.0) 10. **Added Gemfile support to YARD server for local gem sets** (0.8.0) 11. **Server now displays README on index route like static docs** (0.8.0) 12. **Added line numbers to `yard stats --list-undoc --compact`** (0.8.0) 13. **Single object db now default (multi-object db unsupported)** (0.8.0) 14. **Added `--api` tag to generate documentation for API sets** (0.8.1) 15. **Added `--non-transitive-tag` to disable transitive tag** (0.8.3) 16. **Added `-B/--bind` to bind to a port in yard server** (0.8.4) 17. **Added `asciidoc` markup type support** (0.8.6) 18. **Added `yard markups` command to list available markup types** (0.8.6) 19. **Added `yard display` command to display formatted objects** (0.8.6) 20. **Added `--layout` to `yard display` command** (0.8.6.1) 21. **Added `stats_options` for the rake task** (0.8.7.6) ## Directives (new behavioural tag syntax) (0.8.0)

The tags {tag:!macro}, {tag:!method}, {tag:!attribute}, {tag:!group}, {tag:!endgroup}, {tag:!scope} and {tag:!visibility} have been changed from meta-data tags to directives. This means they should now be called with the "@!" prefix instead of "@". Note however that for backward compatibility, the old "@macro", "@method", etc., syntax for all of these tags will still work and is supported.

Some backwards incompatible changes were made to {tag:!macro} syntax. Please read this section carefully if you are using this tag.

YARD 0.8.0 adds a new tag syntax called "directives" using the `@!` prefix. These directive tags can be used to modify parser state while processing objects, or even create new objects on the fly. A plugin API is available similar to tags, and directives should be registered in the {YARD::Tags::Library} class using {YARD::Tags::Library.define_directive}. To use a directive, simply call it the same way as any tag. Tag syntax is documented in {file:docs/Tags.md}. ### Notable features of directives #### Directives do not need to be attached to object docstrings Unlike meta-data tags which apply to created objects, directives do not need to be attached to an object in order to be used. This means you can have free-standing comments with directives, such as: # @macro mymacro # A new macro, not attached to any docstring # ...other Ruby code here... # Using the macro: # @macro mymacro def mymethod; end You can do the same to define methods and attributes, as discussed below. #### `@!method` and `@!attribute` directives improved The method and attribute directives can now be used to create multiple objects in a single docstring. Previously a `@method` or `@attribute` tag would only create one method per docstring. In 0.8.0, you could attach multiple methods to the same block of Ruby source, such as: # @!method foo(a, b, c) # @!method bar(x, y, z) # Docstring for code some_ruby_source The above creates #foo and #bar and the source listing for both will be `some_ruby_source` with "Docstring for code" as the docstring. The attribute directive can take advantage of this functionality as well. Note that these directives also do not need to be attached to a line of code to be recognized; they can be in free-standing comments if the methods are defined dynamically and not associated with any code. #### New `@!parse` directive to parse Ruby code A new {tag:!parse} directive was added that allows a developer to have YARD parse code that might not necessarily be parseable in its original form. This is useful when using `instance_eval` and other dynamic meta-programming techniques to define methods or perform functionality. For instance, a common case of the "self.included" callback in module to extend a module on a class might be in the form: def self.included(mod) mod.extend(self) end Unfortunately, this does not get picked up by YARD, but on the original class, we can add: class MyClass # @!parse extend TheDynamicModule include TheDynamicModule end YARD will then parse the code `extend TheDynamicModule` as if it were in the source file. You can also use this technique to register regular methods as attributes, if you did not define them with `attr_*` methods: def foo; @foo end def foo=(v) @foo = v end # Register them as methods: # @!parse attr_accessor :foo ### Backward incompatible changes to `@!macro` directive Unfortunately, in order to create the new directives architecture, some previously supported syntax in `@macro` tags are no longer supported. Specifically, macros can no longer expand text on an entire docstring. Instead, macros only expand the data that is indented inside of the tag text. This syntax is **no longer supported**: # @macro mymacro # Expanding text $1 $2 $3 property :a, :b, :c In 0.7.0 to 0.7.5, the above would have created a method with the docstring "Expanding text a b c". This will not work in 0.8.0. Instead, you must indent all the macro expansion data so that it is part of the `@macro` tag as follows: # @!macro mymacro # Expanding text $1 $2 $3 property :a, :b, :c Note that we also use the recommended `@!macro` syntax, though `@macro` is still supported. ## Added `--embed-mixin(s)` to embed mixins into class docs (0.8.0) Methods from mixins can now be embedded directly into the documentation output for a class by using `--embed-mixin ModuleName`, or `--embed-mixins` for all mixins. This enables a documentation writer to refactor methods into modules without worrying about them showing up in separate files in generated documentation. When mixin methods are embedded, they show up in both the original module page and the pages of the classes they are mixed into. A note is added to the method signature telling the user where the method comes from. The `--embed-mixin` command-line option can also take wildcard values in order to match specific namespaces. For instance, you can embed only mixins inside of a "Foo::Bar" namespace by doing: !!!sh $ yard doc --embed-mixin "Foo::Bar::*" ## Internationalization (I18n) support for translating docs YARD now ships with the beginnings of internationalization support for translating documentation into multiple languages. The `yard i18n` command now allows you to generate ".pot" and ultimately ".po" files for translation with [gettext](http://www.gnu.org/software/gettext). Note that this tool is a small step in the larger transition for proper I18n support in YARD. We still have to add proper gettext support to our templates for proper generation in multiple languages, but this tool allows you to get started in translating your documents. Improved I18n support will come throughout the 0.8.x series. ## New C parser / handlers architecture (0.8.0) The C parser was completely rewritten to take advantage of YARD's parser and handler architecture. This means more YARD will be more robust when parsing failures occur, tags and directives will now work consistently across Ruby and CRuby files ({tag:!group} will now work, for instance), and developers can now write custom handlers that target CRuby source files. ## YARD will now warn if `@param` name not in method params (0.8.0) YARD will now give you a warning if you use a `@param` tag in your source but give an invalid parameter name. This should catch a lot of common documentation errors and help keep your documentation consistent. ## Added support for `module_function` calls in Ruby code (0.8.0) The `module_function` command in Ruby is now supported in Ruby files. It defines two separate methods, one class and one instance method, both having the exact same docstring, and marks the instance method as private. ## Greatly improved tag documentation using custom template (0.8.0) We have completely revamped the {docs/Tags.md} to include documentation for each meta-data tag and directive with at least one useful example for each one. This was done using template customization and extension available within YARD. ## Tags can now contain '.' for namespacing (0.8.0) Prior to 0.8.0, tags could only contain alphanumeric characters and underscore. YARD now allows the '.' character in tag names, and it is now recommended for namespacing project-specific custom tags. YARD has its own set of custom tags that are namespaced in this way (using the "yard.tagname" namespace). The namespace recommendation is to use "projectname.tagname", or "projectname.component.tagname". ## Added "frames" links for non-framed pages for better nav (0.8.0) Frames navigation has always had a "(no frames)" link to get rid of the frameset. YARD 0.8.0 introduces a "(frames)" link on non-framed pages to reverse this, allowing you to navigate between framed and frameless pages seamlessly. ## Added Gemfile support to YARD server for local gem sets (0.8.0) The `yard server` command now supports `--gemfile` to serve gems from a Gemfile.lock, instead of all system-wide gems. ## Server now displays README on index route like static docs (0.8.0) The `yard server` command will now behave like static docs regarding the index action for a project, listing the README file if present before displaying the alphabetic index. Note that the route for the alphabetic index page has now moved to the explicit '/index' action. ## Added line numbers to `yard stats --list-undoc --compact` (0.8.0) Line numbers are now listed in the compact listing of undocumented objects so that they can be more easily located in the files. ## Single object db now default (multi-object db unsupported) (0.8.0) YARD previously would split the .yardoc db into multiple marshal files for load-time performance reasons if it grew past a specific number of objects. This check is now disabled, and YARD will never automatically switch to a multi-object DB. YARD will now always use the single object db unless explicitly set with `--no-single-db`. If YARD is taking a long time to load your .yardoc database, you can try using this option to split your database into multiple files, but note that this can cause problems with certain codebases (specifically, if you have class methods using the same name as a module/class). ## Added `--api` tag to generate documentation for API sets (0.8.1) You can now use `yardoc --api APINAME` to generate documentation only for objects with the `@api APINAME` tag (or any parent namespace objects, since this tag is transitive). Multiple `--api` switches may be used to generate documentation for multiple APIs together. The following generates documentation for both the "public" and "developer" APIs, also including any objects with undefined API (via `--no-api`): $ yard doc --api public --api developer --no-api Note that if you use `--api`, you must ensure that you also add `@api` tags to your namespace objects (modules and classes), not just your methods. If you do not want to do this, you can also include all objects with *no* `@api` tag by using `--no-api` as shown above. Remember that applying an `@api` tag to a class or module will apply it to all children that do not have this tag already defined, so you can declare an entire class public by applying it to the class itself. Note also that these tags can be overridden by child elements if the tag is re-applied to the individual object. This feature is a simplified version of the more powerful `--query` switch. The query to display the same API documentation as the above example would be: $ yard doc --query '!@api || @api.text =~ /^(public|private)$/' But note that `--query` does not work when YARD is in "safe mode" due to security concerns, whereas `--api` works in either mode. This enables `--api` to function on remote documentation sites like [rubydoc.info](http://rubydoc.info). ## Added `--non-transitive-tag` to disable transitive tag (0.8.3) You can now use `--non-transitive-tag` to disable transitivity on tags that are defined as transitive by default. For instance, in some cases you might not want the @api tag to apply to all methods when you define it on a class. Only the class itself has a specific @api tag. To do this, you can mark @api as non-transitive with: $ yard doc --non-transitive-tag api --api some_api Which will avoid classifying treating @api as a transitive tag when parsing modules and classes. ## Added `-B/--bind` to bind to a port in yard server (0.8.4) You can now bind the `yard server` command to a given local port with `yard server -B PORT` or `yard server --bind PORT`. ## Added `asciidoc` markup type support (0.8.6) Support for the AsciiDoc markup type is now introduced using the `asciidoc` markup type (`yard doc -m asciidoc`). Requires the [asciidoctor](http://rubygems.org/gems/asciidoctor) RubyGem library to be installed before running YARD. ## Added `yard markups` command to list available markup types (0.8.6) You can now list all available markup types and their respective providers by typing `yard markups`. This list also includes the file extensions used to auto-identify markup types for extra files and READMEs. To use a markup in the list, call `yard doc` with `-m MARKUP_TYPE`. To select a specific markup provider library, pass the `-M PROVIDER_NAME` option. ## Added `yard display` command to display formatted objects (0.8.6)

This feature requires the .yardoc registry to have already been generated. To generate the registry, run yard doc -n.

You can now display a single object (or a list of objects) in the YARD registry using the `yard display OBJECT ...` command. For example, to display the `YARD::CodeObjects` module as text (the way it is displayed in `yri`), type: $ yard display YARD::CodeObjects You can also format individual objects as HTML. For example, you can format the above object as HTML and pipe the contents into a file readable by a web browser: $ yard display -f html YARD::CodeObjects > codeobjects.html Custom templating options from `yard doc` can also be used, see `yard display --help` for more options. ## Added `--layout` to `yard display` command (0.8.6.1) The `yard display` command now accepts `--layout` to wrap content in a layout template. Currently the `layout` and `onefile` layout templates are supported, though any template can be used. If no parameter is specified, the layout will default to the `layout` template. Example usage: $ yard display --layout onefile -f html YARD::CodeObjects > codeobjects.html The above generates a `codeobjects.html` file that is self-contained with CSS stylesheets and JavaScript code. This is similar to calling `yard doc --one-file` with only the YARD::CodeObjects object in the registry. Note that even though this uses the onefile template, the README file will not be auto-included the way it is with the `yard doc` command. To include the README text at the top of the onefile template, pass the --readme switch: $ yard display --layout onefile -f html --readme README.md OBJECT > out.html # What's New in 0.7.x? 1. **Macro support and detection of DSL methods** (0.7.0) 2. **Inherited attributes now show in HTML output** (0.7.0) 3. **The 'app' directory is now parsed by default** (0.7.0) 4. **Added support for metadata (@title, @markup) in extra files/readmes** (0.7.0) 5. **Added `yard list` command (alias for `yardoc --list`)** (0.7.0) 6. **Added Git support in `yard diff`** (0.7.0) 7. **Added `{include:file:FILENAME}` syntax** (0.7.0) 8. **Added `{render:OBJECT}` syntax to embed object docs in extra files** (0.7.0) 9. **Added improved templates API for custom CSS/JS/menus** (0.7.0) 10. **Added Ruby markup type (`-m ruby`)** (0.7.0) 11. **Added state tracking variables to Parser/Handler architecture** (0.7.0) 12. **Added before/after callbacks to SourceParser** (0.7.0) 13. **Can now use `--yardopts FILE` to specify a custom yardopts file** (0.7.0) 14. **Added new `-t guide` template for guide based docs** (0.7.0) 15. **Github Flavoured Markdown now works out-of-box** (0.7.4) 16. **Added `-m textile_strict` and `-m pre` markup types** (0.7.4) 17. **Reorganized markup types 'text' and 'none'** (0.7.4) 18. **Add support for `rb_define_alias`** (0.7.4) ## Macro support and detection of DSL methods (0.7.0) YARD will now automatically detect class level method calls, similar to the way it knows what an `attr_accessor` is. By simply adding documentation to your class level declarations, YARD can automatically detect them as methods or attributes in your class. Consider DataMapper's "property" declaration: class Post # @attribute # @return [String] the title of the post property :title, String end The above declaration would be created as the `Post#title`. The optional `@attribute` tag tells YARD that the property is an "attribute", and not just a regular method. In addition to basic DSL method detection, YARD also supports macros to create docstrings that can be copies to other objects; these macros can also be "attached" to class level methods to create implicit documentation for macros. Macros and DSL method detection are discussed in much more detail in the {file:docs/GettingStarted.md}, so you should read about them there if you're interested in this feature. ## Inherited attributes now show in HTML output (0.7.0) Inherited attributes will now show up in HTML documentation using the default template in the same manner that inherited methods do. ## The 'app' directory is now parsed by default (0.7.0) YARD tries to follow the "It Just Works" attitude in writing developer tools, and therefore has added `app/**/*.rb` to the default list of globs that it searches for code in. You no longer need to create a `.yardopts` just to list your app directory when documenting your code on rubydoc.info. We should have done this a while ago! And don't worry, YARD still checks lib and ext by default, too. ## Added support for metadata (@title, @markup) in extra files/readmes (0.7.0) Extra files (READMEs, ChangeLogs, LICENSE files, and other guides) now support metadata tags, just like docstrings in code comments. By adding @tag values to the top of a file (no whitespace preceding it) inside of a `# comment` line, YARD will detect and parse these tags and store it for later usage. Tags can contain arbitrary data as well as arbitrary tag names, however the tag names @title and @markup are reserved to specify the document title and markup format respectively. The title will be used in the file list menu, index page, as well as any linking of the file via the `{file:Filename}` syntax. An example of a document with metadata would be: # @title The Best Project Ever! # @markup rdoc # @author Foo Bar (custom tag, does not display in templates) = This Project Rules == Contents ... Note that previous versions of YARD recommended specifying the markup of an extra file with the `#!markup` shebang, but the `@markup` metadata tag is now the "best practice" for specifying the markup format of an extra file. ## Added `yard list` command (alias for `yardoc --list`) (0.7.0) The `yardoc --list` command is used to list objects that are parsed from a codebase. This can be used to grep methods/classes in a codebase from the command line. `yard list` now calls `yardoc --list` as a convenience command. Note that the `yardoc --list` command may eventually be replaced by a more feature-filled `yard list` command, so `yard list` should be used instead of `yardoc --list` when possible. ## Added Git support in `yard diff` (0.7.0) The `yard diff` command can now perform object diffing on git repositories. Provide the `--git` switch to `yard diff` with 2 commit/branches like so: $ yard diff --git HEAD~5 HEAD Added objects: YARD::Parser::SourceParser#contents YARD::Parser::SourceParser#globals ... ## Added `{include:file:FILENAME}` syntax (0.7.0) You can now use the `{include:file:FILENAME}` syntax to embed the contents of an extra file marked up in its markup format. This syntax supports embedding Ruby source files and performing syntax highlighting on the code. ## Added `{render:OBJECT}` syntax to embed object docs in extra files (0.7.0) You can now use the `{render:Object}` syntax to embed the documentation rendering of an entire object (method, class, module) inside of an extra file. This is useful when writing non-API based guides that might require listing a few helper methods or classes. The {file:docs/GettingStarted.md} discussed this syntax in more detail (with example usage). ## Added improved templates API for custom CSS/JS/menus (0.7.0) Plugin & template developers can now more easily insert custom stylesheet or JavaScript files in their customized templates, thanks to an abstraction of the template API. This is documented in the {docs/Templates.md} document. In addition to custom CSS/JS, developers can also create custom menu tabs in both the framed and non framed version of the default theme. ## Added Ruby markup type (`-m ruby`) (0.7.0) The Ruby markup type (`-m ruby`) will now use syntax highlighting for all formatting. This is probably not useful as a global switch, but can be used on individual extra files using the metadata markup specification discussed above. ## Added state tracking variables to Parser/Handler architecture (0.7.0) The parser and handler architecture now contain state variables {YARD::Handlers::Base#extra_state} and {YARD::Handlers::Processor#globals} to share data across handlers and the entire processing phase. `#extra_state` provided a place to store per-file data, while `#globals` gives the developer access to inter-file state when parsing multiple files at once. ## Added before/after callbacks to SourceParser (0.7.0) The {YARD::Parser::SourceParser} class can now register callbacks to execute code before and after parsing of file globs, as well as before and after parsing of individual files. This allows plugin developers to perform setup/teardown (and set global state or update the {YARD::Registry}). See the documentation for the following methods: * {YARD::Parser::SourceParser.before_parse_list} * {YARD::Parser::SourceParser.after_parse_list} * {YARD::Parser::SourceParser.before_parse_file} * {YARD::Parser::SourceParser.after_parse_file} ## Can now use `--yardopts FILE` to specify a custom yardopts file (0.7.0) The `yardoc` command now supports `--yardopts FILE` to specify custom .yardopts options files. This is useful if you have multiple documentation sets, such as a guide documentation set and an API documentation set. ## Added new `-t guide` template for guide based docs (0.7.0) You can now write guide style documentation using a new 'guide' template that only generates documentation for extra files. You would use it in the form: yardoc -t guide - README GettingStarted FAQ TroubleShooting LICENSE This creates the sections for the readme, a getting started, frequently asked questions, trouble shooting and license page. If you need to refer to class / method documentation, you can embed API documentation using the `{render:Object}` tag discussed above. ## Github Flavoured Markdown now works out-of-box (0.7.4) Due to the growing popularity of Github-Flavoured-Markdown (GFM), YARD now uses the Redcarpet library as the default Markdown formatting library with GFM fenced code blocks enabled. This means that you can use fenced code blocks inside of Markdown files with redcarpet installed without any extra code. Previously, users who wanted GFM in their Markdown would have to specify `-m markdown -M redcarpet`, but this is now the default behaviour for YARD. Note that you can still specify language types in code blocks without GFM in YARD by using the "!!!lang" prefix syntax. For example (plain means no markup): !!!plain !!!plain Some code block here. The GFM version would be: !!!plain ```plain Some code block here. ``` ## Added `-m textile_strict` and `-m pre` markup types (0.7.4) A new "textile_strict" markup type was added which behaves exactly like "textile" except it enables hard breaks, so newlines behave as line breaks in the HTML (using `
` tags). This option is added for users who want the classic textile behaviour. ## Reorganized markup types 'text' and 'none' (0.7.4) Due to the new pre markup type, the behaviour for text and none were slightly reorganized to be more intuitive. The following behaviours now represent these markup types: * pre: Used to wrap text inside `
` tags
 * text: No formatting except for hard breaks (`
`) on newlines * none: No formatting at all. In all cases, HTML is escaped from input. If you want no HTML escaping, use the html markup type. ## Add support for `rb_define_alias` (0.7.4) CRuby code can now make use of the `rb_define_alias` function. Documentation for aliases is not supported, however. # What's New in 0.6.x? 1. **Local documentation server for RubyGems or projects (`yard server`)** (0.6.0) 2. **Groups support for method listing** (0.6.0) 3. **Single file template (`--one-file`) support** (0.6.0) 4. **`yard` CLI executable with pluggable commands** (0.6.0) 5. **`yard diff` command to object-diff two versions of a project** (0.6.0) 6. **Added `--asset` option to `yardoc`** (0.6.0) 7. **New template API** (0.6.0) 8. **HTML template now adds inline Table of Contents for extra files pages** (0.6.0) 9. **Removed `--incremental` in favour of `--use-cache`** (0.6.0) 10. **Ad-hoc tag registration via `yardoc` CLI (`--tag`, etc.)** (0.6.0) 11. **Added `--transitive-tags` to register transitive tags** (0.6.0) 12. **`yardoc` now displays RDoc-like statistics (`--no-stats` to hide)** (0.6.0) 13. **`yri` now works on constants** (0.6.0) 14. **Plugins are no longer auto-loaded (added `--plugin` switch)** (0.6.2) 15. **Added `YARD::Config` API and `~/.yard/config` configuration file** (0.6.2) 16. **Added `yard config` command to view/edit configuration** (0.6.2) 17. **Added `yard server -t` template path switch** (0.6.2) 18. **Added `YARD::Server.register_static_path` for static server assets** (0.6.2) 19. **YARD::Registry is now thread local** (0.6.5) 20. **Support for ripper gem in Ruby 1.8.7** (0.6.5) ## Local documentation server for RubyGems or projects (`yard server`) (0.6.0) The new `yard server` command spawns a documentation server that can serve either documentation for a local project or installed RubyGems. The server will host (by default) on http://localhost:8808. To serve documentation for the active project (in the current directory): $ yard server The server can also run in "incremental" mode for local projects. In this situation, any modified sources will immediately be updated at each request, ensuring that the server always serve the code exactly as it is on disk. Documenting your code in this fashion essentially gives you an efficient a live preview without running a separate command everytime you make a change. To serve documentation for the active project in incremental mode: $ yard server --reload Note that in incremental mode, objects or method groupings cannot be removed. If you have removed objects or modified groupings, you will need to flush the cache by deleting `.yardoc` and (optionally) restarting the server. The documentation server can also serve documentation for all installed gems on your system, similar to `gem server`, but using YARD's functionality and templates. To serve documentation for installed gems: $ yard server --gems Documentation for the gem need not be previously generated at install-time. If documentation for the gem has not been generated, YARD will do this for you on-the-fly. It is therefore possible to speed up your gem installs by using `gem install GEMNAME --no-rdoc` without repercussion. You can also add this switch to your `~/.gemrc` file so that you don't need to re-type it each time. See [this link](http://stackoverflow.com/questions/1789376/how-do-i-make-no-ri-no-rdoc-the-default-for-gem-install) for exact instructions. ## Groups support for method listing (0.6.0) You can now organize methods in a class/module into logical separated groups. These groups apply lexically and are listed in the order they are defined. For instance, to define a group: # @group Rendering an Object # Documentation here def foo; end # Extra documentation... def bar; end # @group Another Group def aaa; end Note that these `@group` and `@endgroup` declarations are not "tags" and should always be separated with at least 1 line of whitespace from any other documentation or code. In the above example, "Rendering an Object" will be listed with "foo" and "bar" above "Another Group", even though "aaa" comes before the two other methods, alphabetically. To end a group, use `@endgroup`. It is not necessary to end a group to start a new one, only if there is an object following the group that should not belong in any group. # @group Group 1 def foo; end # @endgroup # This method should not be listed in any group def bar; end ## Single file template (`--one-file`) support (0.6.0) `yardoc` now has the `--one-file` option to generate a single-file template for small scripts and libraries. In this case, any comments at the top of the script file will be recognized as a README. ## `yard` CLI executable with pluggable commands (0.6.0) The `yardoc` and `yri` commands are not deprecated and can continue to be used. They are shortcuts for `yard doc` and `yard ri` respectively. However, `yard-graph` has been removed. YARD now has a `yard` executable which combines all pre-existing and new commands into a single pluggable command that is both easier to remember and access. To get a list of commands, type `yard --help`. If you are a plugin developer, you can create your own `yard` command by first subclassing the {YARD::CLI::Command} class and then registering this class with the {YARD::CLI::CommandParser.commands} list. For instance: YARD::CLI::CommandParser.commands[:my_command] = MyCommandClass The above line will enable the user to execute `yard my_command [options]`. ## `yard diff` command to object-diff two versions of a project (0.6.0) One of the built-in commands that comes with the new `yard` executable is the ability to do object-oriented diffing across multiple versions of the same project, either by 2 versions of a gem, or 2 working copies. Just like regular diffing tells you which lines have been added/removed in a file, object diffing allows you to see what classes/methods/modules have been added/removed between versions of a codebase. For an overview of how to use `yard diff`, see [YARD Object Oriented Diffing](http://gnuu.org/2010/06/26/yard-object-oriented-diffing/). ## `yard stats` to display statistics and undocumented objects (0.6.0) YARD now outputs the following statistics when `yard stats` is run: Files: 125 Modules: 35 ( 4 undocumented) Classes: 139 ( 29 undocumented) Constants: 53 ( 20 undocumented) Methods: 602 ( 70 undocumented) 85.16% documented Note that these statistics are based on what you have set to show in your documentation. If you use `@private` tags and/or do not display private/protected methods in your documentation, these will not show up as undocumented. Therefore this metric is contextual. You can also specifically list all undocumented objects (and their file locations) with the `--list-undoc` option. ## Added `--asset` option to `yardoc` (0.6.0) The `yardoc` command can now take the `--asset` option to copy over files/directories (recursively) to the output path after generating documentation. The format of the argument is "from:to" where from is the source path and to is the destination. For instance, YARD uses the following syntax in the `.yardopts` file to copy over image assets from the 'docs/images' directory into the 'images' directory after generating HTML: --asset docs/images:images ## New template API (0.6.0) The new template API allows for easier insertion of sections within an inherited template. You should no longer need to insert by index, an error-prone process that could break when a template is updated. Instead of: sections.last.place(:my_section).before(:another_section) use: sections.place(:my_section).before_any(:another_section) You can see more in the {file:docs/Templates.md#Inserting_and_Traversing_Sections} document. ## HTML template now adds inline Table of Contents for extra files pages (0.6.0) A table of contents is now generated dynamically using JavaScript for extra file pages (such as README's, or this document). It is generated based off the headers (h1,h2,... tags) used in the document, and can be floated to the right or listed inline on the page. ## Ad-hoc tag registration via `yardoc` CLI (`--tag`, etc.) (0.6.0) Simple meta-data tags can now be added at the command-line and registered to display in templates in a number of pre-defined ways. For instance, to create a freeform text tag, use the following: --tag my_tag_name:"My Tag Title" You can also create a "typed" tag (similar to `@return`), a typed named tag (similar to `@param`) as well as various combinations. The full list of options are listed in `yardoc --help` under the "Tag Options" section. If you wish to create a tag to store data but do not wish to show this data in the templates, use the `--hide-tag` option to hide it from generated output: --hide-tag my_tag_name ## Added `--transitive-tags` to register transitive tags (0.6.0) Transitive tags are tags that apply to all descendants of a namespace (class or module) when documented on that namespace. For instance, the `@since` tag is a transitive tag. Applying `@since` to a class will automatically apply `@since` to all methods in the class. Creating a `@since` tag directly on a method will override the inherited value. You can specify transitive tags on the command-line by using this option. Note that the tags must already exist (built-in or created with the `--tag` option) to be specified as transitive. If you wish to do this programmatically, see the {YARD::Tags::Library.transitive_tags} attribute. ## `yardoc` now displays RDoc-like statistics (`--no-stats` to hide) (0.6.0) As seen in the `yard stats` feature overview, `yardoc` displays RDoc-like statistics when it is run. The output is equivalent to typing `yard stats`. To hide this output when yardoc is run, use `--no-stats`. ## `yri` now works on constants (0.6.0) Templates have now been added for text view of constants, which displays any documentation and the constant value. ## Plugins are no longer auto-loaded (added `--plugin` switch) (0.6.2) This is a backwards-incompatible change that disables plugins from automatically loading when YARD starts up. From now on, you should manually declare which plugins your project is using by adding `--plugin PLUGINNAME` to a `.yardopts` file in the root of your project. You can also re-enable autoloaded plugins by setting `load_plugins` to true in your configuration file (`yard config load_plugins true`, see next item). You can also set `autoload_plugins` to a list of plugins to be automatically loaded on start. If you are a YARD plugin author, please make sure to inform your users of these changes. Note that `--plugin` switches passed on the commandline (not via `.yardopts`) are parsed before commands are loaded, and therefore can add in new CLI commands. ## Added `YARD::Config` API and `~/.yard/config` configuration file (0.6.2) There is a new global configuration API that can be accessed programmatically and set via the `~/.yard/config` file. The file is encoded as a YAML file, and looks like: :load_plugins: false :ignored_plugins: - my_plugin - my_other_plugin :autoload_plugins: - my_autoload_plugin :safe_mode: false You can also set configuration options via the command-line (see next item). ## Added `yard config` command to view/edit configuration (0.6.2) A new `yard config` command was created to view or edit the configuration file via the commandline. * To view the current configuration use `yard config --list`. * To view a specific item use `yard config ITEMNAME` * To modify an item value use `yard config ITEMNAME VALUE` ## Added `yard server -t` template path switch (0.6.2) The `yard server` command now accepts `-t` or `--template-path` to register a new template path for template customization. ## Added `YARD::Server.register_static_path` for static server assets (0.6.2) The server now supports a command to register static asset paths. If you are extending the YARD::Server modules, make sure to register your asset paths through this method. ## YARD::Registry is now thread local (0.6.5) Creating a new thread will now implicitly load a new Registry that can be used to parse and process new code objects independently of the other threads. Note that this means you can no longer use the Registry across threads; you must either access the threadlocal object directly, or synchronize threads to do the processing in the initial registry's thread. ## Support for ripper gem in Ruby 1.8.7 (0.6.5) YARD now supports the Ruby 1.8.7 port of the `ripper` gem to improve parsing of source, both in terms of performance and functionality. When the `ripper` gem is available, YARD will use the "new-style" handlers. You can take advantage of this functionality by performing a `gem install ripper`. What's New in 0.5.x? ==================== 1. **Support for documenting native Ruby C code** (0.5.0) 2. **Incremental parsing and output generation with `yardoc -c`** (0.5.0, 0.5.3) 2. **Improved `yri` support to perform lookups on installed Gems** (0.5.0) 3. **Added `yardoc --default-return` and `yardoc --hide-void-return`** (0.5.0) 4. **Multiple syntax highlighting language support** (0.5.0) 5. **New .yardoc format** (0.5.0) 6. **Support for yard-doc-* gem packages as hosted .yardoc dbs** (0.5.1) 7. **Support for extra search paths in `yri`** (0.5.1) 8. **Generating HTML docs now adds frames view** (0.5.3) 9. **Tree view for class list** (0.5.3) 10. **Ability to specify markup format of extra files** (0.5.3) 11. **Keyboard shortcuts for default HTML template** (0.5.4) Support for documenting native Ruby C code (0.5.0) -------------------------------------------------- It is now possible to document native Ruby extensions with YARD with a new C parser mostly borrowed from RDoc. This enables the ability to document Ruby's core and stdlibs which will be hosted on http://yardoc.org/docs. In addition, the .yardoc dump for the Ruby-core classes will become available as an installable gem for yri support (see #3). Incremental parsing and output generation with `yardoc -c` (0.5.0, 0.5.3) -------------------------------------------------------------------------

Note: in 0.5.3 and above you must use --incremental to incrementally generate HTML, otherwise only parsing will be done incrementally but HTML will be generated with all objects. --incremental implies -c, so no need to specify them both.

YARD now compares file checksums before parsing when using `yardoc -c` (aka `yardoc --use-cache`) to do incremental parsing of only the files that have changed. HTML (or other output format) generation will also only be done on the objects that were parsed from changed files (\*). This makes doing a documentation development cycle much faster for quick HTML previews. Just remember that when using incremental output generation, the index will not be rebuilt and inter-file links might not hook up right, so it is best to perform a full rebuild at the end of such previews. (\*) Only for versions prior to 0.5.3. For 0.5.3+, use `--incremental` for incremental HTML output. Improved `yri` support to perform lookups on installed Gems (0.5.0) ------------------------------------------------------------------- The `yri` executable can now perform lookups on gems that have been parsed by yard. Therefore, to use this command you must first parse all gems with YARD. To parse all gems, use the following command: $ sudo yardoc --build-gems The above command builds a .yardoc file for all installed gems in the respective gem directory. If you do not have write access to the gem path, YARD will write the yardoc file to `~/.yard/gem_index/NAME-VERSION.yardoc`. Note: you can also use `--re-build-gems` to force re-parsing of all gems. You can now do lookups with yri: $ yri JSON All lookups are cached to `~/.yard/yri_cache` for quicker lookups the second time onward. Added `yardoc --default-return` and `yardoc --hide-void-return` (0.5.0) ----------------------------------------------------------------------- YARD defaults to displaying (Object) as the default return type of any method that has not declared a @return tag. To customize the default return type, you can specify: $ yardoc --default-return 'MyDefaultType' You can also use the empty string to list no return type. In addition, you can use --hide-void-return to ignore any method that defines itself as a void type by: `@return [void]` Multiple syntax highlighting language support (0.5.0) ----------------------------------------------------- YARD now supports the ability to specify a language type for code blocks in docstrings. Although no actual highlighting support is added for any language but Ruby, you can add your own support by writing your own helper method: # Where LANGNAME is the language: def html_syntax_highlight_LANGNAME(source) # return highlighted HTML end To use this language in code blocks, prefix the block with `!!!LANGNAME`: !!!plain !!!python def python_code(self): return self By the same token. you can now use `!!!plain` to ignore highlighting for a specific code block. New .yardoc format (0.5.0) -------------------------- To make the above yri support possible, the .yardoc format was redesigned to be a directory instead of a file. YARD can still load old .yardoc files, but they will be automatically upgraded if re-saved. The new .yardoc format does have a larger memory footprint, but this will hopefully be optimized downward. Support for yard-doc-* gem packages as hosted .yardoc dbs (0.5.1) ----------------------------------------------------------------- You can now install special YARD plugin gems titled yard-doc-NAME to get packaged a .yardoc database. This will enable yri lookups or building docs for the gem without the code. One main use for this is the `yard-doc-core` package, which enabled yri support for Ruby core classes (stdlib coming soon as `yard-doc-stdlib`). To install it, simply: $ sudo gem install yard-doc-core # now you can use: $ yri String This will by default install the 1.9.1 core library. To install a library for a specific version of Ruby, use the `--version` switch on gem: $ sudo gem install --version '= 1.8.6' yard-doc-core Support for extra search paths in `yri` (0.5.1) ----------------------------------------------- You can now add custom paths to non-gem .yardoc files by adding them as newline separated paths in `~/.yard/yri_search_paths`. Generating HTML docs now adds frames view (0.5.3) ------------------------------------------------- `yardoc` will now create a `frames.html` file when generating HTML documents which allows the user to view documentation inside frames, for those users who still find frames beneficial. Tree view for class list (0.5.3) -------------------------------- The class list now displays as an expandable tree view to better organized an otherwise cluttered namespace. If you properly namespace your less important classes (like Rails timezone classes), they will not take up space in the class list unless the user looks for them. Ability to specify markup format of extra files (0.5.3) ------------------------------------------------------- You can now specify the markup format of an extra file (like README) at the top of the file with a shebang-like line: #!textile contents here The above file contents will be rendered with a textile markup engine (eg. RedCloth). Keyboard shortcuts for default HTML template (0.5.4) ---------------------------------------------------- You can now access the "Class List", "Method List" and "File List" with the 'c', 'm' and 'f' keyboard shortcuts in the default HTML template, allowing for keyboard-only navigation around YARD documentation. API for registering custom parsers (0.5.6) ------------------------------------------ You can now register parsers for custom source languages by calling the following method: SourceParser.register_parser_type(:java, MyJavaParser, 'java') The parser class MyJavaParser should be a subclass of {YARD::Parser::Base}, and the last argument is a set of extensions (string, array or regexp). You can read more about registering parsers at the {YARD::Parser::SourceParser} class documentation. What's New in 0.4.x? ==================== 1. **New templating engine and templates** 2. **yardoc `--query` argument** 3. **Greatly expanded API documentation** 4. **New plugin support** 5. **New tags (@abstract, @private)** 6. **Default rake task is now `rake yard`** New templating engine and templates ----------------------------------- The templates were redesigned, most notably removing the ugly frameset, adding search to the class/method lists, simplifying the layout and making things generally prettier. You should also notice that more tags are now visible in the templates such as @todo, the new @abstract and @note tags and some others that existed but were previously omitted from the generated documentation. There is also a new templating engine (based on the tadpole templating library) to allow for much more user customization. You can read about it in {file:docs/Templates.md}. yardoc `--query` argument ------------------------- The yardoc command-line tool now supports queries to select which classes, modules or methods to include in documentation based on their data or meta-data. For instance, you can now generate documentation for your "public" API only by adding "@api public" to each of your public API methods/classes and using the following argument: --query '@api.text == "public"' More information on queries is in the {file:README.md}. Greatly expanded API documentation ---------------------------------- Last release focused on many how-to and architecture documents to explain the design of YARD, but many of the actual API classes/methods were still left undocumented. This release marks a focus on getting YARD's own documentation up to par so that it can serve as an official reference on the recommended conventions to use when documenting code. New plugin support ------------------ YARD now supports loading of plugins via RubyGems. Any gem named `yard-*` or `yard_*` will now be loaded when YARD starts up. Note that the '-' separator is the recommended naming scheme. To ignore plugins, add the gem names to `~/.yard/ignored_plugins` on separate lines (or separated by whitespace). New tags (@abstract, @private) ------------------------------ Two new tags were added to the list of builtin meta-tags in YARD. `@abstract` marks a class/module/method as abstract while `@private` marks an object as "private". The latter tag is used in situations where an object is public due to Ruby's own visibility limitations (constants, classes and modules can never be private) but not actually part of your public API. You should use this tag sparingly, as it is not meant to be an equivalent to RDoc's `:nodoc:` tag. Remember, YARD recommends documenting private objects too. This tag exists so that you can create a query (`--query !@private`) to ignore all of these private objects in your documentation. You can also use the new `--no-private` switch, which is a shortcut to the aforementioned query. You can read more about the new tags in the {file:docs/GettingStarted.md} guide. Default rake task is now `rake yard` ------------------------------------ Not a big change, but anyone using the default "rake yardoc" task should update their scripts: [http://github.com/lsegal/yard/commit/ad38a68dd73898b06bd5d0a1912b7d815878fae0](http://github.com/lsegal/yard/commit/ad38a68dd73898b06bd5d0a1912b7d815878fae0) What's New in 0.2.3.x? ====================== 1. **Full Ruby 1.9 support** 2. **New parser code and handler API for 1.9** 3. **A new `@overload` tag** 4. **Better documentation** 5. **Template changes and bug fixes** Full Ruby 1.9 support --------------------- YARD's development actually focuses primarily on 1.9 from the get-go, so it is not an afterthought. All features are first implemented for compatibility with 1.9, but of course all functionality is also tested in 1.8.x. YARD 0.2.2 was mostly compatible with 1.9, but the new release improves and extends in certain areas where compatibility was lacking. The new release should be fully functional in Ruby 1.9. New parser code and handler API for 1.9 --------------------------------------- Using Ruby 1.9 also gives YARD the advantage of using the new `ripper` library which was added to stdlib. The ripper parser is Ruby's official answer to projects like ParseTree and ruby2ruby. Ripper allows access to the AST as it is parsed by the Ruby compiler. This has some large benefits over alternative projects: 1. It is officially supported and maintained by the Ruby core team. 2. The AST is generated directly from the exact same code that drives the compiler, meaning anything that compiles is guaranteed to generate the equivalent AST. 3. It needs no hacks, gems or extra libs and works out of the box in 1.9. 4. It's *fast*. Having the AST means that developers looking to extend YARD have much better access to the parsed code than in previous versions. The only caveat is that this library is not back-compatible to 1.8.x. Because of this, there are subtle changes to the handler extension API that developers use to extend YARD. Namely, there is now a standard API for 1.9 and a "legacy" API that can run in both 1.8.x and 1.9 if needed. A developer can still use the legacy API to write handlers that are compatible for both 1.8.x and 1.9 in one shot, or decide to implement the handler using both APIs. Realize that the benefit of using the new API means 1.9 users will get a 2.5x parsing speed increase over running the legacy handlers (this is *in addition to* the ~1.8x speed increase of using YARV over MRI). A new `@overload` tag --------------------- The new `@overload` tag enables users to document methods that take multiple parameters depending on context. This is basically equivalent to RDoc's call-seq, but with a name that is more akin to the OOP concept of method overloading that is actually being employed. Here's an example: # @overload def to_html(html, autolink = true) # This docstring describes the specific overload only. # @param [String] html the HTML # @param [Boolean] autolink whether or not to atuomatically link # URL references # @overload def to_html(html, opts = {}) # @param [String] html the HTML # @param [Hash] opts any attributes to add to the root HTML node def to_html(*args) # split args depending on context end As you can see each overload takes its own nested tags (including a docstring) as if it were its own method. This allows "virtual" overloading behaviour at the API level to make Ruby look like overload-aware languages without caring about the implementation details required to add the behaviour. It is still recommended practice, however, to stay away from overloading when possible and document the types of each method's real parameters. This allows toolkits making use of YARD to get accurate type information for your methods, for instance, allowing IDE autocompletion. There are, of course, situations where overload just makes more sense. Better documentation -------------------- The first few iterations of YARD were very much a proof of concept. Few people were paying attention and it was really just pieced together to see what was feasible. Now that YARD is gaining interest, there are many developers that want to take advantage of its extensibility support to do some really cool stuff. Considerable time was spent for this release documenting, at a high level, what YARD can do and how it can be done. Expect this documentation to be extended and improved in future releases. Template changes and bug fixes ------------------------------ Of course no new release would be complete without fixing the old broken code. Some tags existed but were not present in generated documentation. The templates were mostly fixed to add the major omitted tags. In addition to template adjustments, many parsing bugs were ironed out to make YARD much more stable with existing projects (Rails, HAML, Sinatra, Ramaze, etc.). yard-master/docs/images/000077500000000000000000000000001265676644000155235ustar00rootroot00000000000000yard-master/docs/images/code-objects-class-diagram.png000066400000000000000000001731201265676644000233030ustar00rootroot00000000000000‰PNG  IHDR¼ŒO{öIDATxÚìÝuXTÙðK¬n¸nÙµv v®]kÇÚÝJIcwïê®H¨ˆ¢ˆ" *¨ "ÝÝÍ0]÷ûûƒt¸‹+1èû}ž}<3Ì\fï|¼¾÷ÜsÏa@¡4Ð0´ („—B!¼ á¥^ …ðR(„—B!¼”O/?À—BQøð«ÀðU‡ÎŠ‚§ÃWUàõi“TH¡(x’ÚøT…·=‡ª(Š¢‡Ó¾j¼…´k(ŠžBÂK!¼Ÿw¤²w³òwʤ £ýDx.;uµµl…•ž‰\¯VPþ ù¨žîvOˆNö½ H–ñ· ùlÂ[/¹;9²Ëí"*?çËä–5ã'ÙÊ4Áèr ~ÀûÛ\•¥´ o=$è-8øÝó€ü‡..ª¹@âƒÇ…ëjÀ•áEè~Ú×.ìKWþÐ!@Žã}?iöF7ý€üÇ÷ßHhÞ:ŒûOY •³‡–ßYqEÆ”½5åâõ¬k'æ¤ÛÛ@ê>PÿÕþÜHö*73-/L@ØŒó6³ÎgíktÍù¿î°þœö'á­Ã<þº´Ú ì‚°NþØ9–Å&O2Ú˜a"j伯ÏÑ]0þ ‰L,¦LV`® àn…—_É€pæüÞÒþ$¼u˜?”î-›ær°­nbÂjÀ[9¿à›…úúãteÍœ ç[wt;Üj…&VÞ|¦¾þ¬åìOwÈñô+. ØÐkÆ5!íOÂ[‡IUs§üû-¤µºƒ)+Oåü¢o\$bAlþ^xÒ;ÝÎÖíKðÞ–ˆE²Ö6Dxú‚t[ÁÒ%¼u˜Sóòã z=Åó^Ñ87€‹ß•Xl¸ ß‘~@ö¬ó€ÚbK5ÍÄBc5pù ô—V'ñüK‘ t8ÕŽúÌoæ†ÑVCPÀa‰É’ßxÉaÃF»rRÖèï.< ·lÕ·øbËE®_”…h&Ùšš&›3‘g c¬›‚ÔQËŽ²© ŒLØÓÞ$¼u›Ü¸1äÅæ›˜,JO’@Ÿ A|\> OKfÆ yâ8&&Ä È’âø8q"€›Pòv áUÔÃô•k}ri7Þ†˜ˆÍºoh/^ á%¼ÂK¡^ …ðR/…Bx)ÂK¡^ á¥P¯ÂDâfwO1bçXD_áý ï6|˜"dxߟh0áý°]Ó÷:·X éâC_áý ]ÓßAA>Išº7}„÷Ãð>PO’Ü›ð^ÂKx /á%¼Ÿ^·ï½u2Ýôäùóg= /áUP¼©“†½ïGÜÇÌÝ [µ[„—ð*^–ðn,^1@Æ·¸d–Þ¥(`öo¸%?—p„PÌ#¼„·^ñÆéêjh&`ÍXH÷®[£™ ¼]¦½öŠw-×[Ÿ‰JñàÝ áU€çbíÕfÈÛ¬½þ/á%¼õ‡—3ñ¤«`ÍXpwK0] ˜6YÚxÒ(B ‘Ye0}VòöcvC6#ÖÕÜ vŒá%¼õ‡÷í×É@^!ÖŒ’l­'üìivÀGŒ –Kd¢äÈë]¹s1±·®lêp,@VüÓöë7†Í"¼„·þðúªæÖŒEÄУÏf ༬ëoéˆÛ7Hýa Þ çßÐÁçŸÈïÎïº"æ«ÓÏŸ»…^Â[x“Ú½bÝ8ÜúÐ 8³ÿòn\4dKG@šR4ðM¨E{`Ñ4À ðU~0ìàáDx oýáeOÎ{yw^lÜØ®QAÝþ|Ý«cïs·ýdêËç¿ý È–¹öúå²U¯.–/Ûõ‹ÅŒ³îç†'?ÿÀi‘á%¼õØÛo‹kð¼dúoM훾@Ú]ókñ¸Zš»@Æ3 K‹gbÀ÷¢£ƒ©o™_O‚-¯&€ðÞúÄ[ë!¼„—ð^ÂKx ¯ÂãU”Áè©„—ð~(^ëüÏW.xÊÍyá÷ÂOx8G"O·lÿWE¢W^@ìñ,©äåí-$*…s°ñÂKxëo¾êëÒVÔå!Ë®¶;|µ0y'sÖzð9°Z›/» Ýk-™vÑfâ^pÖíµ˜ý¬2Þx`¬á%¼õR6¨VÜòð«kÑÐ<þL ~ï¹ ÔüpQÌ=Ük!=6 ¸5HX ï©Û‡æÇ^Â[çx“6h*/2Ôô K ìæi="&pW-€y°>úSÚ²ïm‘ÊãEcéÌnF†+Õ +á=g;d7/á­s¼²"N’ª3§H  hÛŒž[ÕGÞÜåüâZßä\nÈ~°EŠR0\K§-ær¸9òJxãà×ú á%¼õQ6”×¼Øù;¦8€#®u„?“Š-üè€\¥x6†éàbø™T” 9J‰/^Nx o½œ°)»—5'9¦ôμUÉ:vySûüE ¬æ4¹Ç¹ÝX3êó{ÔVå+ùúzç´\ÊOØÒ0{àÙáTÂKxë¯,ZP.I$Lbp¢b Ã"c! ÏŽŒGG…åGEGæ‡GEÊõ&»äÕm­nHtṗÎ0ÂKxëïNß©Ç Ê¤ï0ƒðÞ†‚· 5MZþ@œ’Î!¼„·¡à­‘^ÂKx ïgW÷MÊ: ½²võõÃ7øûÆzüÿkÎLÒ›4OÖLH.­ž˜Kx oýàžK¯8í˜þx<€ðï‚#¯ßt¯±Ýÿ¿yc±’žZâ¢eKäz1i„—ðÖÞŠQe¯Žö{½~‘;?ï‚Ê“„¬àlˆ›ÚÈzí/¤î±2Ð ý §o@ J:á%¼õƒ·bTY„éàEæíö™$mW9ù:¤•v ^ïù¦»Ö‰´6šÏq¬„׸ÚNDx o}– ªþåíÉÏŠ‡æðo$†ê@ÜÔ¼q×±' x»Và4óÑõ97Ax o}áMÖ3ÖV^l¬ã@–ÖÃÿö¨dNÉÀ *Á›Ühµ±I?]ÙÆn+ïË+áb³lt1á%¼õ†Wš“£ú(7[ póŒî&}†ëÙþ¯[nn^>àcÜ}¥´¢lØ ÉÀ¿/á­Ï²¡@µ¼;l÷aLuÿFb`¨ðxNÇí2ךpËñØÜéÌ%¼„·>OؘòQeRz¥ˆßÊO k5êÙM­XøÎm"ñ×¶öy8çH/áýx¼—‡óƒ'ìyÓíaˆˆs•¹:Iò•–S@ùÅÒè½G¬\ÄÆM° š{ƆÞSx–9¶k¶@¶ä¦ïÄ@Ö”³!ÌäLµ]g$«„×òñ:(è[Ý{:I÷&^Âûñx¥ñªO òEùÈ·‰#<™$œë DsŠ/tðÝ%$3¯àÜTª7­¨øv+ÙžÑl0ž¨¤#¿ËcDs‹ÿPö”g/;2<¯øÕ7)x¿Yh4Ó0X´,k¿`Ž^®œðÞÇ›¤k¨¥¼ÈHË€àžE[‹m}oî `Ñâ K&Úûá.R•Bð¢‘tJ#Cݵ‚¨…½ÆÚË¿Í%§Œë,˜ XÕÎØPYFÞ/o§M—Ú^Âáq/‚ðÞ)eSœ ì×O~8lýÝ7åí »æ•'Ú“,X ^ÎGÔɯ_¹6âBÜÅ.¨q¬:Ú“¤Èõ&HU*\ÁéuHl¶Ô~½æF^Â[Ó'lØx#¼ÀC¹æmÒØ[~ðí]¤1¡x¡"zÒ'·7a©;ŠZ9½dîâ‘zºßW!ÐêxõõÃÓÕBŸÞ^pYÄ)ÇËWyëW ÑÈŽ|ˆ»÷•^Â[3x‹z•¯þ»Â;i&@øºÎW?-<3c¾ú_¹Çz-÷ÙÝÝÈwc}Ü{kuv¥Áv½ÎÚ3¢ÇM¬?‡è™ûµû™JðTKË(pZ§µ%¬¼·!ݸÇN^„š¶îá%¼5ƒ·Š°rÈX9d+d¬ r¹ òÒ§Jæx’ʧoe%ƒrä2@†òŸ±eÓ@õß(cYär2¶Òo ¾ºKx o-à­f22¯Åÿø ½™;ª/ùHkôkÂKxëoÌËû‚Üá%¼õ‚·&Bx /á%¼Ÿ=Þ§é¼G¢ÛV¾õUOø[Y[_µ+BÂåkO/_àÅ;û«/á­M¼òay›£ôºïâõcn„#zýwÏ×Ïådnøù%Ø!Y¼œýÄCÿ;ÂKxkoÅ\e¬Üe¤àÔ:JF¤Ë€­ø­xe=_*¹.v²¾}…·ÍR7¾SBþn´"¼„·nðºo¨®÷ótídø­ÑÔx„‚]ZO ¾8ÐŽ=ªþ&Ys€ÍžÑ/f ½þ¤˜D{£•¬o:€³ÝÁ×N(ìi»S]žÃư"¼„·VñòT}Ë+ˆ™ÖÜþÑz†«!6°oúzí/ XÉ!ÌYÜ÷Ï~q“ã¶ogÄJx»ðø‡f€]:ÇüVco,á%¼µŠ·ðá£[*ÇÙ—,äΔ8^`z›qú÷À¯Ú@'Sp¹"X)ÀíŽR >½õ!Ç'#fVà=ßÔ`Aï@gûdê‹Íë°„—ðÖ*Þ¼›6Êûo[Ç(4YÓbÓ¤nº¶@á‰=ö‡*Ç3Kñ*§¸Ô ¾8tûö=ïJGÞîLÕÖíÜøö6»ÂKxk»l()ÏÝ¥™7ùT6rÈï*;us|ô ë9$¨¼D¨r:€'‹€' jv@¨[¥#o7àu»pÃz>o¤šá%¼µŽ·bZL¿VÐ3€läÃ(󾿅_›hΈ4c¬r1®Å€`ÅÞÈ ŠnŒ÷ò_ð²oö–fñ2Ì^‘$Çv•l`ÕO9„—ðÖþ ›n\YóD|Æa¼>°å`$pgë¡d¹ûö˜ìzvHÇ8ï–ãY€Ó¶Ý%Gì@•ÀÑ@ç8AZç…xs\ ¼8#p½%á%¼µ‰÷cãÏ<Œ¯òâ·Û~ ¼„W‘ñæš^|U帷/Þ!¼„W‘ñ~\/á%¼„÷³Çû*“ÿ¬üæˆdßÿ¸y‘Ý-WDß¶½}Ë.OnÛ¤÷Xˆœ{·’]oÙ‹ /á­)¼òŒ NÜ>o<+F•ÝXñÞ M‹ü‡Íç0G<°ƒ¹ûpëälÇë²àÎø ÏD3Ýó“Kx oMáÍÿ²bqìW£Äg×Wë,ù's¹*ž}#‡¤ãuü¶8ýÝAà`à÷Eá%¼5†·bT™Æ5ýNS´“ñVCSÇ5eÎ*·Wì¸4x›Í²ŽZkS!7Ó\w ù۔慬š( œ³ ×&èß\½R -­³â¼^¿á]Ïãä»Yw,ËÓç„—ðÖ^®jÙnb%3®õêᤇcÝgµÉV&…µf^ Æj€§“&ždd©xÊÁ>h$`u;³}ç(ÎýÆ,ü£2Þ"±Kï`D6I8ô¢gJà_,á%¼5‡·èéóû*§ž;¥„ƒãߎ“˜4ðA*'z«f>Ln|'ÁúQ@†§ËÜ!@ŽŠ7€GM8¡ÌœÈÐ_ÏÕU[­ïcÕM+{8’Þ7ïßvq¼kÂKxkoî•k”w]³ŒP¸uCs½©]õï9G†ô:Ìžì L] +¥áFsF u–ÁµIƒ+ã=©Ìšm4¯]»áTùÈ+•êÍ`òÛïo°H÷HÂKxk¶l(_õ]–¶}}ú¤ã)Atƒ‰?ߨ4xÁ¤áfs`ãHØ}-…I? G9 H€'_ ±G˜½Fžò]*ð>ùFˆÄޝ€‡59°n»AJx oÍâ­4ªlÖÕ¢^ad#œ“¯õÌØÕ6“ és7YW)÷Wã¬âßzåù´²‰Ð%E-¯Axûë ã;eç—àñ0÷xm«r¼s&Z íéIÒ„&@˜ên^Â[³xybÊš¿Ç¤ïÀ‹=Æ{"Òt×_ ÈøÈ½/²ƒô×]ñÖZÚ'þZ]އšV2ÀAçúƒõ—m7jg¼Ú²åaiW™/ிnW×)ÀÑ—ï@x^Â[sxÿ9Yæ€E_·m>‡¹[å‚XòKºHAxë oΔ?NNsúÀÍóvm³¨r>Ñ¥mûø„—ðÖ ^ä¿É©ÅOBx oíá­å^ÂKx ïgwWp¦QÉò­>kµª~‰,¿â\L`[ÕK8 7ž…›Æ<=í—82](2Öå"^wå›s–^Â[SxE׳+úú%9,iJOÿXõ{cJ–X+yï–¸ª{žCxS)-ß¾[h¦Ú 2!=c&.v¤ÞÂ[sx+.Rä‡\ª¿"LðÓ¯µZ2—Njh‚( ‹ˆž(9'"/2ƒ+OÉ’ ¢’‘Éš“¹*Þ#ºšbílGÔ´ÃÀ“úy oÍá­é³YmüΖ붥!sцӫÜo[y€Ùê­Ë ¤¡sõõ7d+iYÂcjkË?§›©¼NÑltþÀà›€ËÔÍ'{ª9”à-Û ¬ãe\ï%29:D’³ELWØoâ«–·§=æÉ µÐh‹œ~×ÔË Õ⑦!Òë %)g¸Ñ(Ï9âÆ®ˆdžá˜ ú˜!·CÉHöÒQe_ººý97ͼߞ íá~„—ðÖÞ“mÊ+¶ú`y‰jáÆæ‹€ŽÀåVh” 5€ÎH<8w˜|<Ê ,Ú@QãTNÇÍæˆPMÆ/¯Œ·Ñ¥?:ßäãO\yŒ>VVÏ/á­A¼Âظ•Ûq1…†³:éõ¨uhw¸Ò ~ªÙÀ0]hŽé'Æu~W‚·}9^•tÜhŽpå$`Be¼ŽM€Ký¸À±Aû¢¡?oW:á%¼5[6ªz–5÷îÃ4;X¤˜´EFWGä©Ùà–z.òvòÍ£žú©L–G1®uacO„©äÁ¶r:Ù‚×ce%¼Ï¿aÁí} x¥¼J‚'_¯á%¼5ÝÛàVÖ?­{*„Ž:n3±‰£Øz®µ¾ÒͺÖFG؃KoœžäYØ}»QaÜš¯n˜]þ27’µUœ¤–¬¬Ú®®ÀiÈXàLÏ{¼¼vÛ„fg/á­a¼×òâÏáú”\H{ì“úüµ‘Žžrðu Ó€ØGÉHu~îÄü\ž…¿pñÌ|þÜK& uL˜°±¯ò[ ÑÉå痼ɤùðF•ðÞÃ[SÙù á=JÇóªn~(­ê5’&_^«px®ÕZ{§d‰ Y˜OX•ãye¡>á2ÂKx ï á%¼„—ð~öx…RðKþéTgAwÙ»Ëe ‹òd²|nAnž ¼Â¢b@$[TÈär¥„—ðÖ&^ÙïÈ1\€ï´>ÕØÐ“iï<ü­ß®Ìü?-0Zµ,Ýa@Ÿk`Ç\‚tÿ°®-î^Â[Óx‹§‡•·cFˆl–¶oµªÆ†xoßy8j|óì²Õ0$¶^$Á›3š_'¼„·¦ñV\¤ˆ0ÝØóòÔ™æ¹À[³'¦máfz5'ëÊeçKΗ^rŸË‘@ÂåkqVwQæÎà\½@øÀÌ&0f-aàt/øµˆ†Ý¦Ÿ³qù€7/á­i¼C"3^Ž6~ÑÉÚ­nCn¿šÚa=×s¹k‡MøÑõV·'H˜úøê`/äžeξž8óúcõkÂ_³à-ßãvdba%¼Ïõ‹P8è,Ž=ï鈃Q„—ðÖ<^V,ÎR})—.ä>Ú/uD1€_w‡Z'~•r5yX×OŽÁà†‚¥x3±¸øm1Í‚Msçú ´æ”ã}¿pûÒ5)ÀŠ……[¹ó5¹ºÂKxko’¶ÞF¥ú=]l;Ü><àIÐæ*pµ5Þíͳ“Àš±ÀpMX£×z à®ZËöÀŠ %óï*ßnÉ‘÷Ûó!ÚãÀÕŽ;ñûH— ¼„·VÊŽj)žõª±×‡,½ìt¿˜·°AkwP9Þ==9˜¼pÿ"íq£9 ã_äK*• Ž(d ¤´\ñþê /á­¥šWÙ½¬©{c_À®éRé¶ܿ]+Ö†kcs/™ ÇÀG…‹«í€U“p§à­î7 òËñâkgàr_¤c[çA¦ÞOx oíà-h]¾›æº%Ž)Φ•Gõ:þÁ‡x¬ ðxpÏǺuI[²äaŸF¯iù»çìæÏ©[Ðö ë6i½,/²··žûE£—àØoŒ6±„—ðÖ^ˆËÇЈ!—”|¹r´ _  ø"°Œ/’rE<1OÈñ<žˆË¢¢Ò m#ÖòbWHŠ%ËÈK6ÿ£5á%¼5Ž÷ýñÿÃÌ샶«1fkj•?pÖQBx oâMß|ú'7…”­òi¹ô=¯'¼„·vðÖAR/áýP¼÷$Š‘x5ÂKx?l× lÕ[MÒ»ë·ôuÞÚ5v;)F®uò¥¯ƒð~XÙðDA>I¶:• „·ž°Qoá%¼„—ð^ÂKx /á%¼„—ð¾/wI$á%¼ o¥…³ /ámXx+nÀ|­¡¯¯¯¯¯“Œƒ›ôõõõuNb—ž¾¾¾¾öÂKx¯\Z²’† Ò²á%¼Š†7QKo£Ò|½ åéãããããÍÃ[oï0úøøøøxE^«ØGÞðófffffs`cjffffúÖ—ÌÌÌÌ.>&¼„W!ñª¼¦6ÂÛ0ñ|çEx oÃÄËI /ám˜xë7„—ð^ÂKx /á%¼„—ð^ÂKxßßÛ ”^ÂÛ0ñ´ð&¼„·aâÍW.½Âöt…ž£Ö.ºgÓÞTù‘ßö ÷²Ñ댊/áUL¼ÕÒ+l¢£J>ɽ¡pÊ5ÞÙÉœøNØõ]´l‹+Kx ¯âå½uW± ~“gf1g>îwönì‚ßvK6÷´è‹©l ¼Šˆ7uûnåÕ{¶øÀ™ÀÜ90kºw÷î­Q°œèyþÄÒ—g©æ%¼ŠZ6ˆUK[¥xïu˜‹¤îFî=Ü /áUT¼å‹Š´Š'OL:Íy6/ÒEÝùâAƒ‹ /áUT¼Å³ÃKî«fßs7ï>Rwéìàp8w„—ð**Þú á%¼„—ð^ÂKx /á%¼uŒ7¦H.%¼„·¡à•U\þòóï/ ¼„·à-ìP±*DÀhöòZ*oCÁ›¯Tv ÍsÓø.&êãõS ÉÌÊÊÊÊÊ °¤•Í^«xx‹T=K[‚¬©'RÔ¡Ùû‚;yÑÜÜÜÜü|ž•´®J/áU¼²¡|T™Ø[wïè-ñ@±§····÷ëlD{x{{{{ùÊ/áU<¼å£Ê€%æ¢AuûI/áý¼Å“BÊšÁ)ëx„—ð6¼õÂKx /á%¼„—ð^ÂKx /á%¼ÕÃ{.*ïˆ7Øê€×; | /áUd¼RNy;_=Âu xɸ§#7äSÂKxoÅE QíðÜýë dpoTí, /áUd¼ë°yh«1l½@/îò /áU|¼BÕ€òöÌ»¢Éá%¼ oŽåÕóÊ;¯šG úŽ'"¼„·Aà帼x¨ræÅ³t…ú Ûhè¥iCx o)¸ªe»IzÀH6ÝR*#¼„·Áô6¼*kN¼•Õ5T6Þ†‚Wt%«¬ù(»à¾´/Ú^«Ðx«Ê+Æ*±÷¿4'¼„·¡áÍ·¿ýQwî§^ÂÛÐðÖ]/á%¼„—ð–…eÁÊ /ám8xÙ•þ x@`Ÿõ¶pÑ`Ox ¯"ãåiÇ–·‡ØOà¦T­¨·ð*4ÞŠ‹Iv¨;.™çPH)oÃÀ[1$2öúÐU7Ú»™_ ïU]cccc£4ÑáU@¼c€‰/ †æ£òåan^~~~~~MqJx o’޾†Ò Òh¯.¯,‡‡fUÆ›''¼„WÁðÊ‚tU_  hçŒÞ;ÔǘܯŒ÷ºÉŽ;vlßGeáUèšÛaò3€F•Þ†‚÷‹r¼“ž&öÍ!¼„·Áà•'——™bq î_ˆ á%¼ŠŒ·ªx§u/ZÞ"¼„·¡á•erÀË(”^ÂÛÐðÖ]/á%¼„÷sÇËn HZþÎÄþìÕ1Ç {ë¨Ò§ò¶¯_örUl&^Â[¯xùFñåí¤Á¹§üíµƒJÖsMcÊ&Ö9Ø[êt'ìⱄ—ðÖ+ÞŠQe©Îûû<_µà’à§¾{–4r# ~ý*ªlÅ«ØéÝ]²ByÀŠ‰Âž½%¼„·žðV\a‹²²ôj»CWra7ÿò]`6éŠe m×jØìVySòª€q®EÙ3n%xO®¼²v?á%¼õT6¨ú•·u-šÀ7éM‚‘Öé ÛkÂJ­O™R¼Ð p¿x ¬˜ˆ î ÈîèGx oÝãMÚd¨¥¼ÈPË€,9°›×õ±ù@ΡMÚÊðû"¶£ ¥Ò²Úƒ¼R¼·¾624ìø„ðÞºÇ++*JTu.*(Ú6£çVõ‘÷€éër“¿ð€ÿ™ÀÐФW·eaQq>ŸðÞz) T=Êš;Ç'hw±L 2{ÜBv+=Üé‘ {¦¬«LÀû"X;áÝ_@¸)šðÞú9aSr/kNz”Ò;Nÿrnʶ\ÿõÜÙ6¿xIt×XlQÞðÑÎ\`ÃlŽõØÅóÏn?&'¼„·^ðÊ¢eÍ$¡0±ä~Ÿø7™1¡Å@j`vzH:؈à☒«é¡ÁÒ¸¨‚´°°$ =0îc> á%¼·~Cx oà ¾÷àÁƒû „—ð6<¼onÙÚÚÞŽ#¼„—ÊÂKxko&_–&+yIdu&çd—7‹£Â9„—ðÖ^ɯàA% Ó~®Æ†M(k¥Î20˜@x o]â-êXÞ%¿¾²´}§u56Äf–Ä{Cå„—ðÖ!Þ|¦ì"…·ÑÔÎ;ŽÝœ <22;ѶÛR’¶l¾¢sÆÙð2 ‰í6 x«‘ïžýY›ÏIò¶ìû׿^R p½¥ŒðÞ:Ä[qy¸(jÒ¡°îN1"<ä2ùg¤ Ö‰tÌÓg}çûªóÄÍ zÖÇÜ›Œiììawƒúœ‘ûšEÞ´S1f£ î$m*oá•dfE©:de–\d“‰%0êp¼pq´¨@Sˆµƒ€¡zÅäÐ<™$\úNˆ¥Óq«9‹ã%8p8Ï8ŸðÞ:Û¬o¢£¼Äd“þ­ m.÷±òZYV­¼îž5cášHÓYcÜv àþE,Û+&àFsëF—lëâ‰ÿðI/áýˆ²A¨ê_Úx²qºó/Ú¡€úYÀ´%Ã¥["ÊñnQ“aêrÀý‹|X´VLÄæ,¶ Dd(á%¼õu†u0ÜŽ/,žÙ€ï·¬ Þ€=Ý ó;.ܘ|˜µ–Ž…õ÷,B¸àÕœB\#¼„·nñ xSŽ×/i~1ˆ®:zhÈQ>äSŽF8>üeÒ³Bƒ¥ÇçŒwŠÚÐï¨Ç¢A—œ'Œ:³|à~¼uµŒƒÁ®v#¼„·nñþC¤(ÐåÕî'!¼„·vðzëÿq„—ð6D¼…ÖŽbÂKx$Þ:á%¼„—ð~öx¥ßˆ´´w Ý1KªšÜu‹ë^ÂwžâÜç^Â[ÇxeêŠÔƒÝú‰Dµ‹f‡LÎK=™»UžÈ¶t»Ö˯ÇT,”øká%¼uŒ·âÖw¹Øq$ÿw +¡’¶©=Hþ6XlÍfOåvФ`%€L ) ¹´äo„²„—ðÖ2Þò‰ö^kôï§ß~–vFð"åu·\û„¸©=P°CgýÕwêêµõf!—„þ¦ªq œ½þ<5ÕäH—4˜Ò¸òÛ6䦋wïbœAx oíâ­<ÑÞÌ›üþq<q€Z7µ‡Dc7 ‡Ü€(ý’Ñg±C¾Ÿp8xÒD ?¬GÞHb€qøÑ-q_-Û™*omâÍ·½g¥røžMÉüÒ¼ ~ãe(]‡mÄMí‘ñý±{ö}W@´qéIZñ­Eš?Ç£&²ïnWJF¯ÚXaá|À[)“ðÞÚÄ[p÷þ5•#÷ï$(4ZÑRg|wíÛïâMT:wÿ¾ã;3Hó$O™T†÷GÛ2¼cÖ­¯â×å@ 2á%¼uV6È‹öl*žz¾HPZ6 Ö…¬©ò»:>î•ß¾é-€cáð4Qüx@”R 0v=Ðút'ÂKxkoÅ´þ˜b×= @¡%ó²8·Ãœ¤PæÏBöÊd¯—óßÀÛßJ†éhÏö~kû‹¼~|°E*‹T>œ ù#ƉŸÚcrnâ—{ #]Õ¢#/á­ý#¯IùNg3‹„ì6Úãc¸åÖi£ÁÀãÃJ¤)ê~mߎC>€øòf?ðϙ܇ä”Ñ”†Æ>7Œ¶#b×_e^Â[Ëxk!i'†ñ /ámxxóçë,á%¼ /øI‰ÕÄNx ¯‚á­~/á­)¼ÏÒyDH¼a#ú í‰<­o$^Â[×xå‰c9êA¯ûŠù'“÷Þ÷®²ýÿçìÆ<2ò‚ðÞ:Æ[10‡e]F O­cïF…¥CÂÞýÛõ8[ùëúX8ƒðÞzÃë¾q ºÞÏÓµ“áÞøŽÑoA€Õúõ:©@ÎÖõÚ•h•Y~?rK"2 µ—[É€B“µ§41c,"¼„·®ñòT}Ë+ˆ™ÖÜ~Ñ^3vО ¹I$ôçÆ}Yîâ²âBíŸHîè¹îRQF؇Ÿ^Â[—x :Ú¨w´/¹ÛG0(!p¼€»rÌ:¹n¶´N4=\>ë¹ÚIìÔÒÜæÕØ.xM'l„·NñæÝ°±PÞoc  ÐdM‹M¿vÓµÜÀ¼òçiÞÚÔ`íçužW¯Ý¨ó6ÍMQ¨êhþ`ï\<›ðÞ(eíÉsviæM>•] x4*„eø1Ù¸Óð#¶ÕæÒ×÷:#ÎÅäù@ÇKt»,ø@Rá%¼uŽ·Ò¨²éV=#ðn0ÁÅû¾MIèøgÜÂ/“YmÑýËæÎ™²éê#ìíãÿœÙ]ÓÑ^=Çy “/á­û¶Må³;þ—qH z§ö…à-Ú—äžFXiŸ—$œÚ¶Í¹ìE!ƧŠ!\¿¾† içÖ­+*ÁëÔÈ‘cMÍ»Œ—p7í8=׋ðÞ:.TÊÛSyC²¼QÉÎDÖwÏ‘­·¯­­vò¶%xñ£-2ãq÷@œ˜˜^Â[wx“ ·è*/Ý¢ç @^Ó+øþ˜,>॒ ô1€¸©=’•CàüZYAzÝhk“Ë%x¥?؈mgLíµuËÊŸ9„—ðÖ^qJj¨ª]j2@¡ÑÌ.†}‡èÜ)ÅÛ×° ¼;‡§µ¶¨„—?i½¿8-5#MFx o– …ªeÍ=0íªð€þ[€ïž K9ÎeÏ$@kŒ[ñO×ë~tá±à÷Q„î^Â[ǽ åË®NxÚ# €ècž÷ªÙø˜ÇŒ^’5s$3¶Ûží¸7Zv§ïéS_¬JˆXñõ#©«²f´³ÆâÒÔΚ͗5é„ðÖ-^©Wy©Â录x{z‡½vÏòtÏyãéVˆX—< ÜãU2"ŸÇ¼y••úÊÃ_æñ*=ÝãÅÓ§^rH¼]þÓÄ „—ð~Þú á%¼„—ð^ÂKx /á%¼uŒ—+f9r@Æe /ámXx¥¼ÃGð€ aÕº“=ÕFö±Ÿ$EðÞÿŒ—3!¤¼5Rr{ yXµT:1ýIüÛÑ×Axÿ+ÞŠ‹açÖö4ûuÆ…\Éus‘üÑ™WÏϽ$Î_O ?oýö’ 9^°-ðü¢EP‚~ãÓ®ùI<˜ãôuÞÃû°¼]1$2Û{ì6Ï.w|ùr+&‡j?0è˜Z,¶þêviÎ^æ/¿5«%RCßÝ‹²í«|ï÷»ø•{üG~’è–Êké !¼Õg@éü7r?Uõ9ŸWrG;;*0y€¯J.Ðo5xß9bü Ö6_å"¾½_Pûq^›§m¢ûÜgM¤]óvc˜ŽÖôÞj'«céÌcI:úÊ 4<¯·³ÞÛß>¤lT™$Míá3Eí77ÜhÈZ?ð o·JH­ü»žÜ;Ø„i¹¢g y%¼ÿ’G?1 Ã0ˇ|àÀœÐ‹çìDµƒ7Àm¨/ ûåXÂû/ñË0Œ²ÍU&Ë ‡­•’XÂû/Ùþƒ*Ó-bð{ð ¥°ðY@üœØÂbN^^‰?/ ¸µ9‰%¼ÿœ‡-^Úü´˜7 j¼²)Þ‘c¹\ÞºXyâý›ÿõóc#£‰Å°Y\#xaÝÂÈÞJjçC€¯› ÒÀœâÓåÅŒÙ.૚D&ÿÓ–úØÂšÁ+ÓîŸGf ïû#[:M¼oTYÄ¥=¯Liž ÷Fù¹ ±5p°LsõJÄ»›êgDF"×ÒŽïåÙ^ˆõºäêgæyªèŽ97ÎòfÜ;ñs—jáEÑPM2Kxß‹ö%+ÿT=Ñ^Æ‹ÑF®®½*†{£|¤¶Ù ódVhŽ.‚Çdûû_€4´t8À%zÖ(Öl þ3¸ºû³ã†µu¿ÒÝ_ìÉ<Þc¢³0/FÏ· v¯ZxÜæ&¡%¼ï‹o+[¼‹—K²T_JÄ%*ØÑ~©#Џ7ÊëMÌþE4&öL€Üþá%ï<ÖÔtŽ p¡;¢vh¿X8 èqÒ&Hd¢á¬œŽc­Å˜¶¼zxq£5•½„÷=á]‹¿áMÒÖÛ¨´@£¡ËÝ· tŠ,Å;H⦠6Sõõ—k€¥ÓÇ>}í«‹æ­Þ\Âû÷HæÎT‰ÊŬ\ ’bQ±\$àó¹"®„'âÊbNé?èRX®€WÌñ„\>O(ðB>_$rÅ€€WÈñÄ<¡@Èç «†SÙKxÿž?:VšÅQqgÌ)´‘Ê^Âûnü[Ú !à…O«[D—ðVg  ^\míOv oEXÃwKIEÆËjô/ ¼„·MÞᘗτé¸Ñ\`îd@í4ŒÇߥ Ûeà÷®e}¡œ Ó–,Ï€UkàÀ÷W’ó0m SVL;üF®šÀv¾îùeà×òá%¼ò壋ß7û’Åiåm–#íÐjn0³«±àÞ¨æ€å“%·YZZ>+Å;o vK¦‰JQhjœï^Ž·1;‹§Âª5 ºòk§ iÙ†ô: ³Nÿ+gD*ÇËš<N÷ú¼0oBx?{¼Ö­‚*ÊW}—Æn^?ápt6ðºQ,:+&£Ë Ù×›#˜7P;…£Yx6Kƒúà`ù ÛËÆ˜v–LŵÖ@Ä~?îŽ÷†RèÕN€à+gD)' —°ï_ñ²ëGrïgŽ7¦]Uƒ ß½‡íUYó·Ë\õb{&NðÇ…¼C8—ƇÇ/t„ÃO»PÄ.Lr]ãE®º áý ñîì“S-¼)8q–ƒc7¯Šó’²… é¤iq@žüíÙd BT’²ê/¼ZÜ ¼ŸÞÇÍ^ Zx+&Úó6ì=zkË•&Y¡+›Þ5û°¥îL_Î4žu$Áªç÷³©c¼8Ù6šð~fxÓ»îGõðŠU+îÑ™î œ €q@x·W8ÃÅ#üè „yˆ?ÕäuŒW¾f¬€ð~Vxå g «ƒ7uÛ.cåU»7û`%iêÑNãŠe€»J>Ðwbîü­- ûÁ@°R îü(­c¼Èí¿•ð~Vx­Úýã?¶åxùÁ¡*×Bßæ(ÔŸÓaÓÀ~š6€»jÐwg~Ÿ?BþhUŽW¹^ð³Ù]Âûá n}Õ  Hµ|þ½½»1í¼fü‘ÙÝ>„É…E @öCj¢”³`ÿê/þlEx?¼¼1KQm¼•†DŽ¿›Þ-^«|°q,gÌzÇ™_¸JØ)kw¾-<ÍÜJ3fžIê¯|ÉDáý\ðîîU}¼’Gå£^r^ÉÀý˨‡NB óÓÛ‡/$ȰóE‘£ƒkú£‡/ê/²{šÞÏïÓŸ\Q}¼UÅC™[GŸµZxñ²¹=áý,ð¦õ؋ðºûî|E‹Óí£ïg€—];Fð‘xå2ÈX…Â+ž;‘Gx?}¼Õ‰ÕPF•U$³ÏvÂûÉã inÿŽ÷xxÎ~>ÀJ /¼›?"¼Ÿ8^þØêÌ,þNoÓŠEsúÄ<"|Û)^œèCx?m¼zçâÃðVôóòÒ¬‡¦ìX“&Û«„ål^ZI¡™—.)ÊÔ3^éì BÂû)ã}Þ̈·bT™§^ï›[-5̈_¥¬e\]ª;û5‹Ù[ÿh±ôM=ãEr}„÷ƛѫz§5UΘ`†½hP¿F"É0í'Á›nÁp`Üë»l^5{@x?ÙÿcvÝ(Þ‡á;pé„ò³³áÀf÷‰~1ŽÇ–®€‰Sƒoù0ípTŸÕ?^ì”Dx?ÕX¼÷ŽË÷áåùú¹¨Xøyç(ÔŸÛNgˆº†M)ÞÂ_7ûžýšÓ½nã§ €Wºp²€ð~š ia…Ä €S>?/öîÀ´[à¦Ê÷“Å1Ñph,Å“®yeáȋ잛 ï'þØ5øx+*›p'£k"Dµ9i,æÌXùlã,­Ôq:ªeð¢™áý³¥WÎÁ+¶-ï\sÉ+r–ëgäÛÚùß~,D±ƒmT“ ';FÞO/.Ížã¿àý×H $¸Ý#U1ðJçŒÞO-9=¡vð²{Öi¯xÅÀ‹ÔÞ{ ï'™öh~-áD|9/^4w!¼ŸV.· C­á­Å|8^üÞ5‰ð~J kmŽÁË‚Ut¼¢Y“ù„÷Ó‰`ÂJyMà•Ï÷Ί^I/’»"¼ŸNvvÏÆÅË]Yq‡M°b»Ù¼¾ãųæ ï§—æÎøÏx+.RÄÞ0T³;Ǧ0ç°ª…ÿä†' @à`›àh›‚7s/öuJ!¼ŸF²z~hïQÕC"í†kÜïpΞ“w\õº°oó½É'ñ­G»˜}éû<ت¥xųfIï§éŠ*Ö¸¬>ÞBÕŠUßÇ»ç +àÓˆÀƒ‹»mDpê–‡æÔ4!²S ¼Hè|€ð~ ¹Ò& ÿo¢–ÞF¥ùz=ˆŸwzrnˆwré¨2Ö{ã¦ÙßVŒ*»Û{˜q‚‚àÅ“Ÿ\oÛ_u¤/+“媺Éd,î¥åÃ/ ž{öUÉÚÃHoyWæü{–Žç-v\Ö:\AðâÏn)„·¡‡ÿË ùÇ _¥¬æÅæ¿0é¼V-¾.NTõic  kž0ϰ®)ܯdêb)ámàÙÕ?…· IyÍ;Õ%qPdO\|D*þ}ܾµMŽÃröŽs_>ÅžuÆ+ð/;!¼ ;/Zü—cae¼l^ù‰{¡LZºs©bYé¼ÜL›T‘ÖÔòì”ìÿüÿ/î5AxrrzïÆGâý÷ÞŒYî)ÆÓki¶¥À‹Ý=2oÃtõÈâZÇ‹‡[ åBñðrÇ/Þ«ÖÁ¨}¼µ™Á‹ØŸOÞ†š¨ö¦øœñâ^swÂÛ0#³LVÃx# Å!Еæö*¨ŠYÍäo½Þé„Mr «¼ØÖ#ð6ÈüëìýÕÃ+©Á+èçß_ÄhVëüÌ~æÙËkgüÕ-{ÒB¯òã ]k ¯pÚ|9ám€yÒÜ5€·°mÅnòÍZ®àÅTgrYg3 wvU÷,4|ç¡YmáELSÂÛð’Õmjo¾RYÝè¡3¶«±Úx½ô¸ÊWðp‘Fd–þ³uÆ·õöäiût½Ó7%m¾[ ¤H./0ÈŒÚhpiÉQ; çÖÝg1`µ¥–¹ð6Ö¿Åg»Õ^Ø5÷ ¼ -ò5“¸5‚·b6aδSij^y2éãFq\ðÖ¬ÊwY`ò´Š‹¦Zý9 ¯_–¼áÊdÓ·@î°Ýr™Î‹âi­£ƒ:¬N¹ûs8†ô‰Ža ÏžI¿^¬U¼Ø¤žGxXn¶‰ÄÇã„…{©\-™_Z:,*jŒÀëF^öÍ+Ò(ÂÉŽrD5vèáÓØ í,­–/mÑRWˆócÄ©›ä˜?èq‚o£ß:À\‹—7» k/wÜ*9ámP‰þ¨Z¯oÊÖFÊ+wûàšýÞúOÞçÜÊf‰ ¶{~8Ñ(ú2àò÷»wî4þû|5…6~€ì.×oóf½OAØÄý GM1LxѸ¸Vñ"¢ÕEÂÛ"¿P^xQiÕw±¿þ€1Û|·/ŠŠåÀ‰_ ƒYÄ6‹¼ß@på®x» “`8×( ˜7 è}Â&è»°ì‰ùË;j÷È ÜjáExPöõÊB áÍcʇö,¶ö¿/ƒ÷ò€¤ÖKYàtc¾ÞlQÁØ ¼çóòàšEÉß î·ùü›}¢ßo¶âi“$âÎG¤…ª·y}ºÆ§:…WýßdM; ÉíDµˆ[{gÞ—f7]ne¼ÅSCËšÆ!)|ì]y—°è.€“Ýïê§ [µwÇ.-yýý-ú›¶NõìfÏz|kú ÷S“×hÎ8xvÃI ધc)…ó²iŵˆ—;r©”ð6döÚÃûÞˆùÅzùÎõù—òÙ£ÿx©¯fð"¢ÝÂÛ0®ͯ¼³_¼ðG÷®¯Ÿ®Ûé„zÅ‹;-^Þó6!¨¼"—WÑNOþ/ç±[ÏxY}µ\ÂÛÕæ£»† û;¾ç'µV;¾gž…tõÁ‹¢1X«ðO\óÑò…}OEEV‘¨ðC‘µ’ðCAUýÆ(×Î>5³["Û\&¼ ŸÃjß/Ä™ÐôçU¤óOLûµ’Ÿ•¾ëTÕÓmþãpúÿMK«àyѬ•bsÓÓªJH'•×iµ’æß{TùƒÌ›·Ic@áUèdöÞR‹[ߣ¤âZ;[~û=£QË»†óË«Èa7ŒäÕÞÖÛ3L- ½×ˆiòª–wNH+ «À¹Úúm-þÍXÂ0L-Øÿbflmßë{µEáUØD·=_‹[öÃ0 kgÛz Ã(Õúe0­aù„WA#œ´¼‡®rF2 ÃŒ©•Ã#;Ÿa¦smÏW4d5áUÐlíU›£§v3 Ã0½jeî†afMm_HnoNx2®ÍœkqëÅK{|¯Ä0?„ÔÆÆÓ;0 ómש9µ½n´!¼ ˜ì^µ¼Nîýïtg·t«MG·lø£eL-ÆjüRDx.r1‚Zþð$ùµRóJóÄì›u±›òúm’^E‹e«°Úþuk³&Õ[_'ûÉ·ÅM«`‰h]ëMÒ×jsó×Õëæx©MáU¨ðƯ®õ¯>B-¸67ïשnÖ –®Î!¼Š”=ÝjÿlçNŸZ½–;ðnÝì«Üÿ±w—QeÇcu{]×ÖuÕµ»Öv펵;i•²»;PlÅDì. P@BB¤»{˜žù>/H÷ÑÝUaüó{Ã03̽÷ÜwÎ=çwÎia^ŠWƒâN•‡E¾ •é´¢ÝÀ35•–kõ“¥x5&"ߨ†šI›¢ÝÀòÁ 5•×Áª¯JñjHÈÆôSÃüõUŠøëãó&›øˆPêôÈ,Å«aõë[5låP§">á±Õ<ÔUbÉ­•âÕˆp­f«ŽÍŒŸUÄwWß0³g•íJñj@¤µÓSGiF‡"Oå6Ÿ¦¾RÛ^çM)ÞâEíÔ2­ûïE½‰Ó­Ô×s«Û_TŠ·¸ãF5WµlçXÛ"ŸøàEÓõ•[LcU)Þâ°ßÔ³Ö˜jZÑ·Âf´¾¦Æ’{Vå|)Þb ɈRµl(«þõ¢ßÈ€-ê,;Ë\íý"ðîü-X=r«XôY=YS‘J'öÈ(Å[|áRÅ^M[ÚÔK ý ›¨u:¼¸æ‹Kñ[$·«®ûóQFjØHd5õŽMwªz³oqżvêÓ’ÔVw7Yª··6 *Å[¨rõKÃkÔ¢Ý ô{$*j‚wµ(Åuq­E¹xy\Ëx»ËNçr X×€™½T?^—Ë%)±·SOɤà]1ns³y]”µO~;¬É’0™àß$ð^Å,” ¬3 ÚnVÈäItÚHh]LxÓÚ\Qãiq¨SL®.òňÔ÷~óf¨Œz€Ñ$ýp–H}°¯rÊ Lº°Ö8VÞÓ&(ÛN¯r™ØÔ¾ÌЇõ‡2uÁáëôiõ“ØÐE©ßùïF`6A…õVÌÇ(9µ‘î7 Íh)‚û¸ýî˘a°yˆËKØ=@ÈõE´5‰xZx_USçÍLXs‡âñ 3XôeáåÄtSë×[Õ>ƒcwƒ Õ†¸ §Ï5oë=Ú|þ'€£&½¥¶C¦lmÖìn¤N…M®#~<îÐêW»=ÓeIrC³ G˜ÒâÀü¡Î¼ê7cKýÖH134™NÊ<3“ð[hn>o¯Ôm\åÍ‹‡ƒ1Ã@h1Ëb^â:¦ú>ìþÃУ8ðè¢Îv9yïµÅ"¦%9üÇvÞ„à$’#£ã!-$5)<IDH"d„†d½ÅF„ i:d…ƧF¦H"â¢3"cãÒ¢¢‘……)@†¥‡¤™! ©‘© ŠʈP1€<<$2ÂÅ¡±ªTÆ ˆ ɈÎUL\±T&ÌVëy™3¦¸DÜÿåÖ†·ð¶7 Ë®Í%.öì¼á^W'^Q{+µž›ö)ÅEbGý°R¼ï ÛY3þóÌ„òc†;ł׻‰—ZÏKH ßâ"¡ö—´oQ‡:ñÚ6UoŠ­¨UñMÃ^õ—€w FÏÂæ¬F¼æSÔ{l*ݹÅW°WªÜ/ùxµýÚªoxu/5Ÿ˜çŠÑxÄÀ¬_mè›.Öàx ¾jƒm»d5Ÿ˜¤ÖÅ9÷hxƒu%ï¹&ﻓúðª¿Ùµo±vÜ«r­Äã-mm@ÖkƒÚnéPEqîêz¥x¿¼ÁÔ~tw$gáJG “—âýðÞýUýc£jxké†6ØõEâ‹$$¯“WæíýX¢Túy%ˆ^ú|8%_áëêG¬›·«ËK)RïþšwíHõŸÑ€ÅKãö/÷¾¼»+f/“wpÌý%ëlù ¼h—)¿Zy@òß7™ 0»ŠA™½ûu¦¦ ÏO«ªÔx¼½‹a(:ËÆ³•šÞÚûŸñŽ\š÷Pù§sDÇn~ΙU?Uͳ¿kÊ|xaBYoàÁ÷^ÛìÑx¼éué±i++^’!£d_Þz¹uSí*Fƒ̹ ëæ/{Œ¢ò¾}.Ó΂¦»Àcþª+å‚<æ=[6%œÐU öd]Ÿ±áæœ=ò¼ÎÀõïDÐ`/œ©¢ñx7/ŽQµ>ÍýŠGx½µ_ÞΆ9äÑ›ÇÄ ]NÔŸG£÷HSU™·­Qœò¢ šî" Í¹ØÅZþ"kUŒ™o\ŸsqfÓR'|çîÑÀú¼*ü{\"ðnêY7Þ’f—Š[Ç5ÍNrøoxÃCÚL Ιîhž%ýž«;+‘Þ)]ÅÄÙâ€÷bËâI±Šnð¸øÜ¯âPòñênË}´kúÙk¬{š, oê9ÛkM·¦Ý…ïí=î>7g,:ñ§ÉU݆!€»±ÁŠð»Ãú^»Ñoèíl¼.à0µ‡Y4/û¬Új<^íâÉÉ—õׄ›ý-"K<Þ‹xÁÌ| ûÐt¼Š««kÞp "î=R^Š7ëd=˼ÏMÛ8ÛH¥Ùx×·÷™âB\ ~ÛQŠ·ÐCMxZÆÓ†Ö{¡ å|í—‡¥xK(Þ}=ŠëU­NjDA[4Žûrð&ÇýŸÝ„ú(3^úz¿–  ô V”4¼z‹ŠíìéiñÀ±ò/¯ÁbE—ÿZTTn) ÔÌ[:if¢äऊÉE…÷õãG‹ n4^ñä£ÿèÑ“B™Úܦ…f y[{{‰Æ;¾ÀD½ŸEwø¯=ÅO×À2ÉÈZ¬÷rE…W1²öŠ Ú5ù„?êT³P½yÿ¨L®üò¨$ãmŸÛ¿o¡WeîˆúÆ×!f‹éj×}½kʽ:÷•çšÞ/óy®kg¿]l¾/@Qéà]&zOƒ§å‹ o¿e©EéŸð7B£¾…q„é×'«‡–`¼r³Êd!ëG† ^œLl?«à¦­iÅíq©Á#|¶¸ÐV°%Ì̾ձ°™ç âM$±éþ"Å;@“†­,/œe›ÇéjÈñHú •—P¼qÑÑm§EGå¬d²`7ýŸë:)ܧ4v`Ó5¤A‰ ]õÀIŠØ¿â𔸄|¼>Zº†=·IН&5G.-¼ÛÿkÈ5Ú\2ñ*ךš×hm>ÿÀ­Sm檷íJ^Vs Òu²ˆÔŸeVk&<-ŸØýÙH÷MÁ+¯Oì”É”âýÈp«¤)Gtç—§%¶ÚÐ%7«Ìyw“k¦Ýî:‚yw PÂóf»­À¬¹ŠSáéWÉ IÜG´”ÀIðo7Jñ~ddÖ½£95¡&Ñ%þ† ëÌÙàÕÖAu÷¯tD6ðƒ “ëNQñX^…lo&ËÃûR†DêÄ«ºeùäÃP{.*â÷ïó,ðtÚé½Q{§ì¦åk Âf¿M$¸[æÌÂtË_x•cVi •Ì^c%%ïô¼9c¶meֳ싰±…pÄX )¦“·é{Û_·½®k æúäU^i·3ð'¤×üøçjÄÐ`Ú‡¡ÚÜV ¶ç.‡=~ˆk© øn/\ŸxÉÕ~ìu¢~Í~Úðïct”Ýî>^v÷Ô+Áõ¶”P¼ŸŠoNˆó3oÄwIêÀ«Ê’ÝuEVöxI– å®u3¥ãDà­ÞW÷@‘¥i =‘áWOÄÙïe_fYÔ?H@+7àY«ö5Qf)@–}L"1€,KÂoO‰T…Ž×¡A¢æ`¹]åÖÿ^å´é›2ò\vÌ—¡¼/ f-K§›¸N3c§B¼uÒ\íˆÔù³ -²mjŸùŶÚý|“gºsf=ádåVA¤}½uS¿³JÒ–êÏ>¤€'cW?ÄŠ>J@Þc–µÎ÷‚MCÆj}µ"nêΙ¶+cëWW&:Þ¨–75HËŠÿSx‹0>ˆ7úã$Œð¥›ØÙáX#-6¾8Zfe×[¦ÆöGˆAÆ·wc:>àIëp:,Ò˯æÌ¯É˜LV&¶;Etkkܾ:Ìðq ÇÞ¯½ØÓ)‰–›a±6LØíÑòîÃSøùrTT®Ð —.+Å[´x/WCtÝt@öôÌ‘²Î×u%š›?š:äÌS5%åî¯×^Q|óøj•³6§¿ºA;c ½ì^–’U»:ý¸S)jdDöì5ÃDz§ÄþäH«­È~wÎvü€…=A!SVºPx1ýK©AERe)Þ¢Å{¦jöÏn:°lèeÛ²Ï!duû–68ë7íî–7N1¸û¡ø›'g¹uóæÃ„l¼i_=Æ«L”äë»0·—C݃¬è«=×±§d|sŸV[ÿ¸êæÍ{¾3ûwgZøxo4IÔ¤2¿Uù^ Çëò„kÿ0Õ}«¿5Q ì¿×GžŒÿ#û‹¯ã¯a`Iw=¨zŒ´2®„¿Ãæ^I¤4žÀ´Dn|}Ù7Ož×K‚s´Y AøÕS|ËÄ*Û[ÁèY8WBXé­Ý€gmBÙWMÌËšÞ´ÚŠ¢óxû`w "› åWR“ oT5oºblhSòðhÿ³^Üä½9þ‰íýÿÆÞ}:\pÌŸ¨ZOõˆ"þYuâÅ+[ írtbj@ýþÌä²CpTèÔû±óäåV3]ït9 ðªÇm¡ÌOšå$Ø¥¯ã|H[ÈÄA®ÉœRmw$×úÜ?ÛÛ©öT—C³XnLºìb?áQÆ‚ã.cŒå´Ú ÷z\y:ópôFçus¤t´ØìRøxÅ}j^éÐÑÒ‡7¯“B%Žiïò¼cœ© ©$Ù•2‰ ÂϤ@ß™Šì?ÌiuŠÐz \üd5l€6󋸵Ayw¿M*·,÷º’qúÀãƒG‡÷ßP¤_=x0ûxí-%ÉÇöî­¼ne'„¨Cç%Yçöž;³÷L:žE¢ó\mözC¤Í~›(pß{Þe¿½Zm^:왬®JàÍÞ›òÂÇ˲±šUY‹ª¿¼Äáídó vî¨ZsÛµÖ»"^õûÎmCvÝ_4è¤,6Ô>–d¡5n»ú²g’Å[=½]Ùx½ó?+ Æ  uQã-ꈼN£CÿøŽÂÃ{¾•†MÕx½Ê’†·Kþ¢v{ôsP}·€›e±µµL®·a'ûô2ÞýÛfÅÔ¸Éø¾¤Ì*€·R|ÒñŽA_Þ˜YS'Ç« ïëf¾š…—õÂJ^Õ5Û û_8÷(ûÕGèé H¿µ'LàËoÅ •Ö_°o;9£Œ;@ïIPç(«~Þè&ÊÇkWÁdZƒG| xÉŒù—Š_áᕵ²Õ0¼’¡ƒE%ïÝ+W ºzùÀƒÚ£gTÓYÒﯢåÇíoÄQeö\½zÛ'>oŸPû(\Ó`lLþ•·2Ì®*:¼;5è/+4¼L\¬im” W—¼]ŒrdÝ}¢PŠï¯®À½o¤é¯óÓDo¤ú΄:Ö^Qƒ«Xú²ñýD¥xKñþ[Œ^¦‰ÅÝhaIÄk¹#×ùàÐô÷<) |·Ÿ~ʘÕé¡s»é̾O¦82³Gtà•jûûëäW½gæ¶š¦N áÌÀl í—Ñó»…Áö] |·Žùª›Ž-Æôg8ë™È¨·nÏÆÉp˜ ã·vì$uà=ÐU¡‰zŸV±/!xϘ`x艌ÿVá©eýž'ßj½ÛdYkUˆÀMÐø0 oAP!áMß•ŸYØ6ÃfD–­¹Ç$Þ‹bdNgÂΕ¿à5\´‡WZïNGûL­@±±¡L¶¿qldÝ›*6^¢\뢒﫮¼®54s~ÜuýKÞ¼NЬÇWœÙÛâfàóÈ#ð|ñŽž)ŽÞ*Èxö$Tîû‹Ås!ˆ<@áõ<áµc2ÂsZ6ÞJäîÞd_Ûê"µ¼`üPð+\HxC¹ÜAK;>0ë±ÔÿùóÔ '—w?%Ä=vŠÇû•Æ {~>ékùïIæ)­ >„9=K»Ô9 p3…‹uÄÐĘèïžZ&’6¼¼[ïî‹ÛF¾*L¼ñZyóÚªz¹Eý‘¬›ˆdYO*f²÷g1ûÓÓʾ€ Í…ìo•N%{‚µü`ÜH(“œë¡d¡/yxwÖ¾j¯½P‚[¥Ø3ÕOßy[}x7õÒÐyÜ«_Ðt¼ÊÕóM«·25¶HŒº3¨ÝÃx˜Ý¡ß"Êûð°|VõIÒbö½ì¬2Z<ì7ðû^„_ßÁ¯LÈŒë;÷Nµa›MÇ¥Þ7F&Ú‚i&s<y´Kc¿C}"„àÛ Ð}ž’{3yݶó_b˾€qƒÁ÷«ÕO9xG¯2‘@R«'afÒ‚x/¬oð’šØ™¥Ôz¸4H}x]ÔL¼®å­éWÞ”¤äö3““ÒvϬa0ê×›A»7= ¼¼+¤cUp˜SgQ6ÞäæÛ“®TÈ€†ð‚粦ÙÓ^åàõǽ†G¡á•%%{i9%'I8Ó~ÍÌÿiüTCWo¿÷*f‚ØvB•³)e_ÀØÁà]á}x1š4{^²üjü~˜Ô{¹P1aÂ&‘úðfÕ½¥¡xUS:§• :/÷û°ÅÀ¾E áÆÂ‹Íã9Õ2‰çdý磰²µN‡z.ðä|y4>Œòë'ø âîdÄ-ƒ‹“òð¦h½E9qRaVµ^å>4²¤·cv{IýIRxZQ…Í#è:MQÖ¦6Î`w› *Ý F+ Æ/Aòí ð¨3,¥Þ½-!¢öØ'Ø©âàWGP^Õ„ÅŠ—¤Žs4oþ,‘‹gÒç€r¥¡Õ+•b±ÑþQW 3ØNüñ®ûË}£N û—…"Ã!ÖÓ'ÒïTÿÖNkAdrÛyfiƒ6Nž‹7v«`Yε7GÞPOî³]¿n™}mH¯½D G2.ýupËPÇs‚¥QOÛüz`Oï+Ü.oà°C°19¸Y³ûÄ·Y`ž Ò?×ñ¯*ç$,üã²Ü÷Ç[ð¼ê35âŪ³¦âţеÆã Êë@ˆŒ#0g%é—`?—XHõðy“ä騌us ‘G óöˆññ‘¼õòLzãã™F¼k¤zºätÖÿv2Ü}ÜRÀÏM¡UXxe¾¹=Ê@‰0·õ8< d^>/%ªPW·$Þøx¤‡zDEºDA g°—§(ÅóeĹ&¹çâA˜‡—·¡Çk¥2P Ò`À©ÚêÁû¬žÆ.Ìñj/4o‘Dë[ò(=3ûûÐBÂ[wÈ}YÎt´®Œ.¿÷=)[¶RÞäv6‹—-ÿñ&„„æõ«bcšƒ7y²In÷‘,êíû‡ ËBƒÕƒ—as5oz—ÉòÿA¼Ÿÿ3‰9ÀæÞÍ=¯kï-Å[Š÷ƒá^'\ƒÏÄÅjK ÞƒV˜¹åÿ*ŽRÄdå=óÔŒÔÕž¿Û¦òÞ)ÑÝû\æÌèáó çxñÆbÄêBÇ+3 xkôŸ¿Ö²†Mß©tœÝîÜÙW Ÿ1d¡ˆë&pyÂü³‡$2^•XôY!ŽýýÚg~Äÿ‹wËDþ9{'š×<¤°wïŸCñQx/˜ùqØÑŒ‚Éý÷¿—T;Ÿ÷Œ×vTé_]|§tÆzßI¾­/C:µMVÖÆÖI ш¾…‚7ã@¾³ Öiç†þçÏLÜ#¿.ˆÍzPÏUù ª›JiP9ž s?ñAô'ã Öçó¢w¥º}ûjô½ñÎÞèÿ9ŸÕCP¿_5F¿…7/«Läz·á…#­†CÜ w!¤ZVx„âÕk^J„¯„^nq¾‘ ýá’Ÿ[&©~ª÷ "þìñ"xã$ºzf73Üý:Ðí åÜ` BÁ›ŸU漦Ӌ©:®bxã(\^‰ ÖÅäÞ^)o^¤"·ìÆà´¯*¦C‹]Hê!F§ö"ç)q+óÉx_•ßg{î³Âþ¹BÓõw¿³‡;úŒ=´½XÈ»÷Ïqò×#…7¯‡-åÀìÖ‡ÿ¹ï9aÃv™Š |ÁW» ½øí¬Ó ë«O÷:¡_¤•§Ÿ^846l~ŬÑMpnÕê?¬c5ñ>ý7ožUo7ðûÚ§Ððæg•=Û×júžë¦©VM°š²Õj+ýiò£¬Œ+Ķß³^6(œèÉë·Žò+ˆWŒü÷£ ;•Çkǭ䆟…×·V#ÞÅ»c %'TÞ¼EaË"þºDœ‡ÖëáÑ·T¹„ .w¡&Ⱦ_-åÉ×™lãG×[eàY?yOM%;2òñê7¹{CÛBVhx´òÓÚ{»Æt‚ì;KÞæRó(bMƒZŸ ¾¹Ôœ™k+Æåã}øÕ¥›ëÆÇÁ¹º Ë{G»±ÊósñÆjØùWûÞŠ’ƒW:à¿ã}gùÖ´”–‘ž¦‚Ê~y5C¸ýPýrx­X×éw—`SGî|ÉžF0z`Qe¡™ñ/¾¯šô\T Ú _ÿôâF>^c3]ÁL³¹ž€"ɳIàñ~qbT ëL<+E¿' õ.=õ¡êIØÛ”¦ý,ÌGüQoù#–N¯ë9gzWymšQŠ·„â%.:¦Ýô˜è$€3j茮c¼ö4s‹i¯÷7¼eÞÁ»¹w* ًפE\L\¬˜´cÃk\,PmèÓFÉ ¯$:æ…–CL”ˆß¿±i“îs‹Zô•ôð)=õrð6¡Á–˜˜øØ‚Õ9g'äÏ ëI묿GYŠ·¤â:å%ó?èͶù3ºBó¹p»¢âŽUå‹!þ„”‰lj?¬‚Ñ<©˜„a õ—ü>WG‘º ÕÞ ÚÍÌÇ;§;øUw/´jC¬2ã]ôyWƒ“ âRóXb4·!©¹ T7ƒÉL‡‡›óñ>«(GÔa?`Qî<è|sÂÄ«ˆŒù§¹ó2?Üq÷/! N‚´ðœ vFÖ§âUÅFÿÓŸ˜àp¤‡½w7eá1QrT±‘ï—*%¯m.)"å=Å  IÔ𜆢tqáám«“ûhñ4zŸ¸ßfÝÑŸºxáßhÙ9LoᓲE°>˜ÔY/&+ÿ×é¥ý£H }}L•ÛJË6«Ž¡Z1ë°ÙnÕ™ÑG·rÌÃû¤síKr z=`báà-UÖÉÁ¯y* ºîˆž~–j©áaãªK66•C±çVõ &ò¯•‡µ]òð¾6LĺáÉtnWð…#Õ ¯pû§?ü§L™M6 ýÀ«ö>ïyòZö‚ì¦æÆ'”O6Ê~zƺ¿¿ñ¬ÿëđ[8[3û騄¿¿ñ§ÿµÚÐMïC;(Ÿ¾J ;ºgqµÒ{;²šnÜþž‚œ?GÉœNÙ? 1Ñí9Ä ¶äpƒì'¢Sÿþ¹ì>oÅýr¦ùƒB×6]è=lÿòŸþn$í‡Iß›E ;9ã»ØBÀûrÍ’ƒqÔ°†Ðí–é€Ãâ•WŠÓ ×= ÛpÏ ’w-:­ t……Ûºµñà½r©uÊùÊ}×…#:³t¹8[lt[ºWÌÅš­W¡šfàÐ4ñT—e;Óq6»8¯Xþx¹vÉÁðÓß Ùû/x¥'—¬y¬ ³>ò+Ë?Rv,Üù®-\}àjËx ÍVÌùŸå(®-_üHÛµp»?!k–IÆ´m&˜=^²ÊœÌ¶x¬œ—qÒ"ˆä‹Ö‡zï-:(Íù¾·lµ/ŠqËn6O;ÐÐa‰eŽæO§ËW8n«—‰8PqÄ–DÂ+ ôοže¾òW'ÞÌu='ÿ-UêôÞ;e¨o¨âóñ>íqÃkúRjXÃú•Þ3t85¼íÒ-n[Ï˃’ÊMŽÚì=Ã\.ë ¸Þü™CÏtÀ¤kîßœÿYNØPÇk­ïÁ$ßMúÒ»|¦ÚàYñ91zYÏFxYv "q™à¨×ÐÈW‚{Øi{¯é™s~¸òr¤¹‚šÖpn¨Ëõîžâ*7~|y¬â9ï)z²„ÚëàFÿ§z;ð ç—SVý¸åD£ð~N” Äœ<¼}WCð=jXCxbæƒo°+s[õJ:£ž^ñesÿ욊ð­ö oÇk Ø+Š¥å. =P˜ñÛ18ó}ÓúBw]@ôíMù÷÷lH#°Öszhßk„ÂÝè¿Bîøžþ^‡_£áJ,õù‹„Ý  ÑÄ‘/Vß¿À[h÷(ˆWì/öÖ†æcâįâÊoÇE!íc€ýnÒ…iµNÃñŸÒI’eVxHB”0òÛG ×TŽS`jZ“Õü¸P8lš¬Âc€¬ ÏTóª¦'í6£è´M(´@÷Íðö!•/hXµá oÕ3Ô°Fu}¼ñä²±d,lÛnWÊÛ M{ÚKÔwsþf{KȨðϲќ«¬TîêÔÜ<œ;€=?€“Õ`v·ìuj‘Õ?XÅõlMUºDwmTµ›˜èZP=ûö§Ö±Ã{"g ÎúęΘ_s&<ìÝdÜsU¢~ËN‡3¥]Tð&˜OŸ_{ <îÛdŒ“âd—fó‚aÔ…/ ÔÑ]ðí18R ­ÂC<¦Î-{7; ¦¼;5­Iª0ÑÄdÚVEËÑ•^nÂoïÐv3ÒÊ#LL´—«~²PV>WxE¤çW …QÉ*Èü7çªäÈ8UfTbDx ŠŒËTÞ4©2EõHŽÍ€ÌüFyzÁw¦DÅ(%Q‰‘áQJc£3 M<&*39"Qþix›íY45¬I«tž7ebkWkŽ˜€=ß^:¦Gîq¸9Ä~ï‚gÙ(l~QÈIØ« Íw¢`b? ­àd5³»CW]`>àB‡¬“UT$W½Kwmhd „ÒbÈ¢©yÅ?ã½TS ±B:볨™„SQ‰UîÆ?¾•jýóZÀ¹y¹9‹ó?ËYÞP̰ñ ÆcÁÞ*áãÁ­%ÕÞ0_ÁèÁP÷HA¼—À×w@·øÿðŠšÖ¤ýòDJ#=€“Åû…˜ŸŸÒv3òº@¦üý8Hb”?Ûæîüçà¿LÙ;?ÉÌm|U!Œþ·q*Y¿Œ¶”»LþzžÙó ^-©?[=x…]^9ÿù!jçO€‰[óÛkºˆx})÷·ßnÍ Ò¯ k6A?Åú÷NŽ¤ÔºM²^W'{½ŠžŸ†wwÿ¶¬£ê Ò*Ÿä˜ #ëa®þ}„¿žðï÷®uó#°õcvôJÅKùJ¼ÐU°¹í·xÞeJ/EÌwàÔ/0«+ô™ùæ:„÷·QòzÐ9Nn³¿}ݵakÿT¶lÁ²_ ÛÖPÿÐÓ§ÿŒ7¦ËB†ó‡K ÓêOG>$·ïÂwEÙÑ`…QIÓת¸ðƒŠ• 23OD94 ¯ŸÎŽ‘°¿žFV°ƒ±ý•A_ƒ£52Ë>âS^îÁw¾,ï“Iµ(M&‰d†' êgÞý¯°¿œ ;:'Ñv3¬š¡Z¿‡ÍƒÓY¿•g¸|^ÝmùÚïQ|û£õ}-„°KvV|¸•“\o?0tBÑáí–?”Ó­'õ?ø“†@xþ4v %{êäþVí<)ˆBÜz‹ÆÂƒ pö¤k¹^é^=õ‘šz¦º8ØtÙï‹’ýõçê™Å_Ñ6š½U@àêys,|€Çº†sß®ßpÍËIMwD™Î1ÔuçÜàùAMš±¹ËpÑM9ölw–kæ¾¢6Ï3Zø”‡#z6šè Ýgƒdûl£ÍÈöé®NáÐ`óÈimð564¼Çþ¶=o$êNÜÒ¿ë véÎ8«rÓ™«³, @~ÎlΜÃÇ6Ù™d8aó .W°Ô5œq&}ñCíçÀµNñðvÂÌmFº½ø«ù‚ØÓhÊ‹—Ãõ7·šúæj¡VÓýEë›r"c•ŽÑA)„m˜g´è9w†ö¶š3é%´Ý ¢M³¶e!Ù­g¸.Ë!‹â> o»ÜNŠ«576Ùñ ¹Ã~«Wdw»ïõøs–6™€Õû2RNﻥË£¯ïOË'C»9À ‰E‡7¿“ÂÉrb«ÝÇíOï½y¹Ã2øÉöV½K†qCy¹× ð;lu%]|üòõØjV9÷LÕO‚·0t,vÓÙ¤×V‰™/Ä”ùD¼ …T2«@&T²ü¶ YÎÀ>• P)P(ÈA.P*dJ”J¥…R…ÈY5A.SR2$tÑÍÝ`Þ¥êßÛyeJ£R€\‰J Yö6åùÇ ²÷ ¹¢À›äïÌa+S¡P*•ÈT @¡(T ÈÈ-äòÜÏ9<¢(Zm%ÿóäïîüGwç¦DŠ=–òêgêÅ›ÁN6mŸgã­²všºëÎ’ð²‘½ó ¿´áûµ{¸¸#ÐЦµc!u 32:hgdät‘˜ocàC@è/·3ÍIÌi¶ÂÄ®ø%¸FPƶ?ÒÄϾK6­æ‹§2¯c™ùón%^yFÆk-׌Œìÿç¬ÎÁ>=• ì²M,^8é¸I Ãá‘ „´ÆW7Ú¡ìºüàP!Ë&¹Yý$ðV »`ÈŠ è´Ûo³¨ãÎW;(xåÿáôk8^ÙýƒÎ^åJãÕ[.0Úðäê&¶¿[=€8Ó™óªæ¦D6Ý 'Í!D¸¤mûé:5M扎œÒ¢‡(ÿÊ[ÎËw E‰÷áüY‚©ó <€Œ+kÛ.èh„ô—á ÌZ !å6÷+dBÓ½Œ íŒþ½¶Íý ™ìnüÞÁ£·ãfËG[ŸC{¼ÍÍ’÷_â*«,oùÖûž2êpþ,h+¥›^>^qCD ‘kßÌÈ¢)•°ï‡Ýª ©xüê\ÄÕ†X­œ!vé¶ã‡Øµ6<€ü×󠊀»ƒÛ…Áƒ²)È›Xçâ•ÿv¤qܯɮƹ-29xƒúõ68VÒ{Í¥FÓc? ¯Æ¤D ŠIÑ!/QãÜ@L×Ìk#M­e÷*H ñnÄÕ­¸(Ãv9ÌáÙÜÇñ£‹È›®ÌÃû¬LŒ™XÔuÞ¼6&wöX9LÈÆÝ„/Hœ9VÎ-š2n´1‚uÃ…lØC9 V Ó, à „Àœrâju—SiŸ€÷U%ÓU+5)V­høî\ – –kÖþÓÎ/«ü£ðþ•·"ÍÚ•Œuˆœ6ys÷nîë¯Ê¸×lðu®œ¿¢Þ‚ø`ݹú†o¹>ÓÐô%7fͽ"9¯ã”zsCpoµ0¾HñFÕËMý“ÿåí;T \?Ûhs¦Û¨qiK7Ïrøú¸ÙØ«œù£ýù‡-z\B´UÏpMz†n½Å‰ÁCg\ÎÇë¯û›ö+‚:Ì Rj¯éŒ}Ÿ„÷‡ñ3ghTL¯iõÎî­9]ÃöðÃ1sZuëOì¤PAn“…DŽ\¡©¤*…R.¥¤*H% ”dˆ°Ü- ©J¢¥T¥ê7V-ª¼E*…L®R¨¤<úZ$U€L¡+” yΫ*™Jª‚Ü£®|\…RŠT *©²à‡F Ü>²Ú iß¼ÃKðLÅ@5ç6ˆûNÚšŸÑé½ ÷:5u¿/vžþû±».õ½/œÒîä_zÃVrnØ40>oà‘„E¹o¥xKñÞ"R¼¥xKñ–â-d¼Þn<Ê›·KtíÜœµ[z?oI×ôûïûdO›0åm›s6§žÿY›àÂÀ«¼Ÿ˜v·pOŒüâ™;Ê@[›3çc¸{öL’ë™$Û qˆÏ¸#ûÛsa¶öï-÷ë§oHãlmmΞ ãñ™3(n&‘yéT€ëÛÔR¼ÿ€7¾@ñLX%i–7¤øà?ÎÚÜÝ/÷¡_÷÷%¡i׸­r¬:ð¦mÏ=„ÞøÎòSñ*¢òAÄ7ºÕIùÑå“<àí_ˬpR†oœ»¾²gC­IÑx î‘¶\;Òc— ìßð*¢òK5¥éë‡íþŽ7z‹à½cÊ¿ŸûD–tPpøÆ–NÞ/Ú %Tp†¬M“Ã|¬î¥xÿo—üEÓ:»øv,€ïçÂZHÎð€v¦pº¦ìÿT¼aå|ó¯W½UëM>~_bþÁƒ°â#Àå+!ªf«˜:W·€îð¦LÄ¿á-ŸÿÉw{Ê·þÿÕt^”o\U[ ¸Lô0bS°­3v?€$-ÏR¼ÿ€7/«,ÖhluÃÎÍt.ÁscÝ“JE¥ ð@WWÿ-dmže´^¹@wNÎë´5Ü1úØóEcž±µ½/V]fEÍvyiûdÕþŽÞ*#ÔXÏðl6ÞmæÃío³ þ§ãÍË*³×kÝ֨Έ¹©.“ûœ˜7ÝÕ1ÝÙæ‰$.íplÛ SœÔÕ6‰#uUÇ#ÛFŸpZ8Æ®¬ÍH2×·]„ÄÒ@ÏJî2¹Ïóžþ6ÓL#³ñÞž~• mæq¸U;(ÅóSÀû?à-“ÛFüH¯]+ãºCç$žï<Å/fü ÿÓ÷HÁ©|²êh×ÝìêàW Öf'OW= ¼)'q¿aK¶5)Là ºï?â휛ۀj·6£ö©T¼lë z< EUél}À†žRÎÖJƧNHø”Üúáúò«ö(7µ•Å œQ-ë½Ì WA ªö2ݪ:2b¾Ó â+I™®£ü¼1Z¹;+éw%¦e„ ®ΪìÛF+ŒCU3u £ì‘ã5æ¿AH¾™«°«¸_µ¦£êz—hL T1eÜU°~²,sä® Î+O]þÆe· â‘H)ÞÄkêtƒ>§OÜØ=¿îhýjz›aj¿l5•. ™?ñä² ©pwBƒ!Þâã}ëäTŠ•ìˆÐòáa…l¼\ÜÉÁÛa.ŠŸÏ“u¸w}ãÔW^S|»ûéx£­OïÒÚtúx(g:­šI¯¦ÆOàêwRøíxê_sOMo™ï‰cõOéÔé÷W ÖzÃíoT=ÿ$™Í¬:¯_ãy—@Ôõø¥<ëµáTÓé9x[ÏCþãEºõ>sÚæŠ¬À•7œmí…°·ëŽ[,´ëy)Þ¿aË]K)ñR‡ÐM£bãaC'²[B*Ù-pǵ\:éD4›æÒ­bN„ª’=QZ¾<ª•Tîd.Û)2ñÐq.ªŸípGñ°üå|¼mÀ²ÞªÏ©6ÄçÎÏ+ž3?ºûÁ(!\-—@Jý‡Ne…nYN‚dÎÔù÷×Õòçî7ÌÒëÊ-Ÿx±¼ÍQˆuàÆwRˆ C»¡*¯ÓW©Äü~V˜™ÌåZS¥ü§jCzßÜ3™ÛË2* XßW'œ9­`Àx^>:‘ðÍe¦OÉ yÞ€2!¤¶´ïoÇFãX}¤°ï¿âm™;­?›‡ñ×^€¸~ûƒ-§ ÃËîÎLm½$là•bßìPŸ®û&[†^²< îÍÝvH÷dÒ6¹×ãÍGt÷'ïÔYä¾Ig£û’€åægpÕð¢î[,¾ƒ¯™ŽE¢“‹M-Ó³ñ>gS%aÄê¯Idç]otxýïxÓtCsm _“ÓÊ»ÃÇ­Ó{àc¡³!‰Ôõ‹^˜/ðÀo¹ùÙlWUm `¡Ž…?éó–„pÀûïgÓ”âý¯=lE:¿zæ7§yüøÉï‹{ßÚ~ »ýß{ªUÁgáÕÃö1ñýŠ×²÷¾v«´“¢pñ*d2™LöQ][Ž»äwkùXí~]ˆxÝÆ•ÛYXydò#–öïJRqkïÌ"Ã{ÊòÜûàÁÞ}‰¥x ¯ž±±±‘KÂGáM~ýö­WÈ-MÌù_«6|&^K Ú·•Ã[;UÓJodI€9øÓñ¾ñây,¨žÊRõ^ùU׸÷¼þÄþ¶(åêÕKöà ý¦½ÓðÔ¹§9ñ·Å5^U±½§Yq§ã»ÿë»Ûß¾WbâfÛ£…7µ”I+¤-ž¼·Ãßœ¥Œ ú„Û´õy‡\}Ïëu§Ü¥X 6Úoíô‚ô›ãš|ï ›jL4ûaø;Çðú›M5+š”·-Çê›ÆMKL4.â£ðö˜›³ÝÕõMÇ÷~ Æ <>ï*ü¾©HÒÊxÃÐÉÀ®Vª6l‘jN,ú[µ¡f¸T³B<äoÕ†~"i‰‰Ì~Wmø#?«lB5ƒîMt/q´çnŽžqiö‚TÄ;µçз]„ê„öÊtâw?·aÜ#5š³$'cÃÕ9-azýn˜Os¿¡?7'ý¶‹çw;ðvÔì8Û^7q?þ–þœx$ûgo4²âʼ€)ý­­>­©L½ñÿnØâ4¬Ö¨ú7lÊ’Så•}lVYnÚ©Jf9M>z§Løëó(·”÷Žo¾ ›:)©ƒ£Ê¸ÈA4Ó_8r ªx…lSëLvˆNÞîßѕź9ÉŽ‚cRÝ:·Ó;/BÙy*ñl‰ÑP)ªDy@ð µý"nü.T¯‹"ª£eÉÅ[ÚÚPL­ *çÇOš|ò(§ÏUï½ÝÙOv°½! Àůw$åÎÅãöÔ¨¤h=àEù8é¯ *ʤ½ãë¯Âs6 ʼnŸäÌì =g‚ûïÓœ€:GàHU%Sp·âj¿DU>Þrãõ[lR–â-Åû±xÏ=^¿×ñ÷öšý6Ú¨ºÁÖ\¼ÍaØXT—þª?æm|w fŒÑÑñ­!¥œ#îec³*8Œoi}ÌútκŠ.å°®3{fãejä\¼µaj_¸=¹ÁpïW^wö·L)Å[Š÷ÚyóV}>ßÎÝðÐHÿd;šÃðq„ˆ•þ t3´¼“%\« a_3H-çˆGÙ8yÓðöÕÒ¾À½œE]Ë%p¢Ìê =g÷¢þf@£p´6LëKx¡­Fåá/ã†°ÃÆOÀ«zž’é”_Ÿs»æYÎÒR¼ÿCx[ÍÊ}´}(c÷Ä—ÝŸ•µ¸Nzf·¾»Œb:mͪl»"„Uí"ü–"\ßx+Nõñ }9²ó‰è=Ù½ª²ë¿¬mß%gŽl•&l52%rºÏ/Ö¢´Ÿ6 E›~LmŸvdFTðŸ‹sñJ½×EþÝGòŸð*SóÏDRÓ·w;åÿú¼ñ(xÛ!®ïÿÞUÇsYŸeÕ+€“SœŸëM»ò`ÆŒ[1ÛÌœQ`§c«@uYoëîé§7L]újÕÔuÉÜ27½Ëçï˹ð†[LÝîb<õÈÃÙÓ/:M×>±eš»Ûô™îvÓ {N;á8{ú¥ø]f ŽK탰ES_"š7ÿ ÛÿÞðoóÓ"îôasÁ˜#Æ‘7 ~)Þÿ ¼Å¿šæï†ü­qãÇ&È€©ß¾•q½¡Æ ø,Ð7ô†ŽCº¼w<Êst¶gAüRýyv(NžPâcd`ò¬o)Þ´/ªT*•êcþb‡É–ü‘àñMöý;Þh­7¹Ø3û‹lþV¢ÂÊRiÙ*†ŽwA™ÓýSº®™}åÞ£9849¶ÿiZ®W3.Å[Š÷½l`lllp°P¾¶?€7ÕñÙE­ÓÏžf'^¤¶Otê |ít¹¬_6^­pˆ~é<¶3Ô¼•¬jºÔÙE·3þ|Ÿ^Š÷‹À;P®É‡àô~¼‘ûlÖZ}Ä*ˆ[¨]Õ¢SGØ1ìÀf­Wùx£ÆîÕ2öô¨o‘XÙèÈ‘£× _ܺµ¥¢ï—€·_–B®±¡|üÁjC¢VÎ4gÒ·zo»ìòOEöãY’Ê¼ÎÆë«ý·2ÌÚ€"‡ ¶Aêseé–eJñ~x­+õé§¹1 }]áð†æÀìkß<PvÕß'x*Oï> CõDà)s¬r=²]ã4FKxQÿÙ¥®/# ÎÊ;9'žø=ºï€÷Xã½ökl4­ûÁ+ïĈܶ¥a‹o癲8æì”i—äë&, W×Þ¶vò)^¬X°à.\Ÿoz ®-š¿Ø«´ÎûET4;»Þµ´{¸¯Z›Ê 1JsJñ–â-Å[Š·ï‡ñÖNÔ´Ò+É+`*•âU#Þ*¡÷¼³‡;»G–˜ìpä“ñÚœ`CÞ=yú¦©/^.‘YM»»|j´¦à•¯ [!¿•ïíq‰Y>5ˆð¥™{úÚ¢;Ò ¯ßw[hV4-{è=<ô­¦íá?D“²§? ¯CÙ°†[ ›äÍ›¯ˆ)w€·F"UR­­JÁëâÄ›u1^hóx»¾€ï¼÷Ε$ó8j˜ñ-EÍœ")4¼b/·žïVd’<_” x™üQxóf‰”…x4»s©­W2«DYÉ.&R"&CMw‘áAeß'ÞüY"“‚-»…Î ‘)b2qHxžHiDˆH(몊IW$"T£Èr€— oiE|üšñÕ_Ô²Û‚ëpl†é¤EReÓ}}J…úߥBÓ](ÖŽ^³¡\±âÍ_“âªI£þ¦U´&eNÿYDÄdƒy3sôÊL´õÇB|Ùòùâ‘ÌÕÓÃMf®°¯WŠ÷ËÀÛ5?Sp§ £Ï·›þ{÷Åõ÷q|@£±%j4‰-F½ÄÞ5–ØKLÔØÅŽ  Ø{ï{/ €ÒVTÄ (‘Þ{Ù¾û~þ ¨)¿˜ˆ >÷srN†™awfçåp÷Î÷Îl¬+7Ÿ{¥ƒ¸_4¯MýhŽHo^mðóíøiÀµ2¶W†9wœÈÚCG@\¼ôâHß 'B§_H[ªmöhÞÂW»~á¢*ÍÍ; VÙŸÚö¡¦tÒ´š/Ï®çÅÍϲñŽëAzoà\‹éÒ‹9^€NØ(úL/™.””qÿ»>[ó¾Iz._Ô¢M6^ý8x´|Qã®°½â¨SYðàg÷|ìmùhxu¾^Þ‡z{¾Ø8®ò¨!• WÀ¸îÙjÊÙ¼wT/xññ¦{z_Ò;çý4ˆžÖ§†Iã–S®gã%lmÇÚ—sìÖÛï=¢Å+¼êñþ­ðļaÇPëÐP»ƒ].d/ h>Û©Aå‡)'¥ ;¤©>?Îw¨ýýCÆÌ²[ÝóÄ™÷ÓÁ{;¯BÖÓ—[ÙƒÊ47lî¢rupŒtu<ÉñBòmû³¤99‡9;}L¼2ÇÜ~[íÍôÄ[:@~ÞñB–ÂÝî\PîJ/í®yœ{˜rÞÑ)⊣s*Á¶7îŸ{Hâ5Ûóñà$ð~2x ` Ñåa7_ð¦xz{{{F ¼oáÃë5ÇÂÂbîEWàÍ·Páµ=Å&ïÜÒÖO~›Û¡ëTš×*»<7â0eû_¬”¿xÕ«CÂW©!`ÍߌãWéþðα˳î›ÎÕþy¥œÜ\dﯿ¦ú&ÖÝc:ðbky;Õ²R^/ ô§Ñ­ÁŒQWµÛ†šõøox_U•9˜Ôé6£¢Á¬ÄŒ1ßʈ2˜2=çɨçN˜4ú%É‹ô†oPøþÌÄšsMÚžÚT1¯T8g¾Ø3§¯§ksªÂ)ÙRýß×e€»ÙØCw¾ðx ÞתʶÍ`ð1àjC_üG$ëÊÙÀ¡@Ž6s°<ÌNëß嬜•C6Ãánq5`Ú e'¥ÂÛ :&VŠdCÛt*ž Eï?“^Møýãâ78ãðßð¾QUv#¡y àZBÆŽ*039{~æZøm ¤ñ.0¹R$§ ’B9#ݱ^0ÝÇ@ÕÈŠ>b[] ±Ñ´O»ÌR ¼…¯îÄž}5:ï³tÐ1bŸ¬Ãÿºµ¦œ ¤Ù3çóî|3öLë+Ît‘ç¾Öã}ûkM†kÅS£–M¦œ¬¨c\{ð/éGÅ“Äè?Äí³D`oåû¶•¸Ø½ÍnßÿÒlßµoÞ’};ƒt/Ç8ôT’]˜s­âÛ¼+/ŽìëÒ:»0Ëȱžé…rú ²*vt U’TÔ ¸UbÛ¾ß ¸“èm(4xŸz¬Òä`ðªª,³Éý}ÅRàåòvõ.â1­ÑO/³_êt;¦ÞÄûãŒ<¼áågÞT8ItÞ­5z<ô–+÷«½Lûïñ¦º{8êY{¸'ÑÓú}7ýÇfyUe‹[5Ìyòá³&;<†¶x¯A—<¼å5h*¢Ëëx¯¿éáᙀï<ÑUV¨š ¯ªÊ®tRoš °¿i:)kS)oO¤ä‰k‘,\ŸCûá§d$—9–½ö„ÖÐf\+¦ðP3µ÷¡ÙL€3_ä:rìkÆPíî’nE2(¹T/ízS°«Læj6D¾ªÈ4]­íê p¥¤†ËAhš¾VUfØâô¼ƒq,¥óÐ2¡€¿^4g‹¾äÙ÷îôJbÙã$é? I  ºX>%=Rà-TxåŽaÃbÝŽÈ&Ìsš·0ëš4;2ó—á—'HΊ㿞·îâh8Ëyw眘çêí=[ºc >•·ÍR`YÇr=+ö¼™æú7w*uıÛVsº]Þ$mKª¼e¦ µ±±Ó ‹mN:›®ýOx_¯*»X'/—\dû‡?ÑÙ>{‰oc‹K ª<Ñe4^8?”G•wÎÕ´«åªAsD:é9GZ}aèt GÙØê‡ÊšÎ]ŒnÓ §}“R˜+μ… ïÕ‡y±^\Ž@uùÄ ÜÉÚ:„d[Û‡§äŠÛ§Ny“pñ¤MDÞêÇn^=éîþñ]<“‚›Õ©k~Æú¼ÛÉ[OO¸Y¶66 x 4WN\Óâksâšê¿}aË<š;÷rjü ³³¶Ï’ÝþüY^W4ÞÂ…Wý4*Õ›½ÕÿZú¡ðêxëGg©þþ>ŸZ…Vàýð.[¥zÔÝþ°@¹­ÁÑ×¾Ùëõgj4<ø›$»)û‹¹Q÷ÿ#^ùÏAjpïÿFŽ47ƒq¹?ß ÷hàðXã‘öoáÄûêñ­ÐË!ùÇÀõÏ÷Cªû¦ ËZoüØxÝ[lR˜ús÷UúxFçõÔñ¬­æÈ( åòÛœ9ûþÊ‹yÿz’¯h¡Âaà—»\ªòTà-”xóJ"ÓNﯶkqý#O¹w!–ç§oœ¾àfíõ·i.ÙÅ)ÏŸÍë»[ë­/)€[§ýšmÈãåxúv&Äœ³ÏÓw}­>Öö!iû¥-×5bÚRÎF8;f2©âi/·µ}ªýg¼¯J"ŸXMmjÛgä™ …ÓU ø>˜·Ö=ëë:?+ûÈÖwCm\Bl\”Ðo(šË.2ˆ<{æ¡RîäªÓÜ.oè˜J¨ËÙ ¼…o^IdºƒIçãÎ>Ã]:ߨ’öë;£]`tne÷êoÓ\”œ”G$ÜÚpìÞݶ‘ç,&Èu«úÙþ2×Wpßíöƒ—Ðs÷¡žOyÞ¹¼óîú®8·=qðçÄ£Ò.7 ™¿í8Øî*©Ç¥—{k¦~mïC`Û­6?ûý3ÞW%‘ÞvÍÍ­ªîwÈT,‘dÜmsìH—œ:uíjƒsÓfø«y¼ÛƒˆùÒ2Ç Æú EsPzɃ^m»î—/ÔWhÜ¿šv1 À¥Òc·Pâmkôª±Œ~NålaG%ÝÇqó‡H4¢¨¿]©ó„Jü¼LêXã)Ê:.‘UîVicÎKŒ3„'gs£Ú*Ú˜`öm"6êp)_Ñý!ArÆ¡\:kç%onEü3Þp½¼ëhªNÞ/Ú*€+%elû*Ûœr‰§5ƒHùînZÇeKžÁ%=ÂjÞ¦ßPÐ ÓõXŽgp)­€jÇ4gºímÞ‡W»hšÉ7L¦îðÚuùÝF¶> *k ›Bÿ!XÖÉþÍú[‘—:O ¨+{vÔÆµ¨‘‰i+ÇÅS¡Éúœ7¨±ÐQ{X­er;è<ïn͆ßÒI€êÔøéõ:C¤ž'7Ч°ç{ qD£ÖÊÀëkhb 4™ü?v®ykmÇqÙUe!=šþ~=§CÁ®¸‰‰isÜ‹lK) ÆÁÜçc*J_t8–V@ÕƒIÝ_ˆÞ†ÂxæÕh4­ 5-€Ý‚›'6´´zï¡:€\Eý­ÈK^ÀW ä[kØR›[¥4º”¬{%ã¡A.Þ†;L~Ü G«ërñ½Åå÷EJ€KE­a[ˆÔ{ú /øl¯iòxuÍ =/F$YþÚyo£Û½rJ"¹¿¬|΃D+dhtIéÜnÙ=œJÈÐÔ8‘ƒ7LUÑ´YÙx«È:€À[H› ­sÛ¼œïÁ2 Ê:ÃŽÆðËp|º;:‚»Q}·ŸcRÆ ù­!±Í£šì•Øð8Á_äþá]9@É©¥¬¨c¤w€®“YtšÍˆ“BÏÄs¦¬Œ!Iòý¸‚}Õ5ÇpÜ3:¾E›WÊ{êÀ¤ýt~àZö:f×g¼ldKºÁ‹´9Aýg‚“tûµ}8‚¤x¦Ž‡–\* T;öüD<x +ÞNÓs§æ›Ðã<ÀÑ2ƒîßëúãµêžÇi¬ùdkÍîoºÝàpû;‹›FEŸ¸aDå=÷áfÓ÷j¸ÔÇ|s½Ÿrî/š±pŠù´`ÒgM12IäjÓj.—ª7¹~fÈlà /åõÈ$aÔ€õªŸ‰Ÿÿ¹ùóÉ%Wfø´¿ÏÁ³L‡ßÿg¼aŸçŽuVÿäáÝ&Hiʵ!³ÆåÞ„Ìõw3ãSûÿša\n‰â|É]óûåäõìÕó>Ÿ?ÃxÆœ¸ÔQ¥—'±´ët8ñ»À[Xñ¦äAIÏ"Y •‘—œ“)a èââ¢Ò >R¥Dž¨Œ‹Ó‘–‘•[ªHt˜ ÐEEh -&6%56&”°%(Ãe€*2.=6I#‹NˆÑ©…ÌððŒ·èçÕ&ä^)Ó%k•)šèø( ©a¯v)=,žÌÈXMB\´Îù‹ÌðxHŒ‰IÖÅ&D*ÑF†«ÑDÇG©ÑF'ÊL·°â-€ÉÇÚ†Ì}R¨.?·MàýñÆ:zôè!WÝGÄràèÑ£¾1ÏÃtܦ WàýŸI½ríÚµ+žoìåk×®] z¿Ÿ«À+š ÿ ïÖ´m‹ÞŠ72ÿdÐùÿṑh=ÝãÞXñökw8CçãþO6Sxx¤þg¼ªLŸZP2½vWa«ààU¿Véj`¡næªö®x5õùr[^ÿùùà^§íZqýßnÈÃZÈ<)9þW¼Úc æœ,8%l¼}ç¾"ÚùþËV€ìÏ¥Û ßüÛ} ö?6ßð·bW €Òçÿ+^÷ïð¶š’û}g†AE£ž?LuàÈï\;÷‚Ñ*Ä­6™å ¡þvåÚÁžYKG£;8uïâú¾Åd¾Ä/6µo˜ƒ7ÐtÔù¦Á×M–¥Câ:“¥ÏŸ~ä_ìÙ2Ñ‚çN_ì)ðŠäÞ¼ª2MâÆß“¬NÌ"ù³ÓÈ–ñ¬·Ô¾[/·}Iý­ºÉQ÷PògoûÀ Î‘ŸâÐ!F9Ø8ñb‰œÕEiO⨺á-–‘1xuÊÞn‰GËÆf‚ü‹ÉIê$ÒriÊVWäÝñê}}› óõÉy ú´]twÔemas-}‡cûƒn§R+ŠRç ’i°VÖæQ…ë~~•O–{¶Vn³ÁC ãÈ ºãú­‡Ÿ÷—WΗӊÖø ¤Þï”WäÝñj×Î_X¹Ù¹Îíi4eKõU§ß¬*Ûùç’È2°³Wôç.\höàn±tø1÷ Ûý¢ñ©ã:qús‹… Íž;”SòÒÎK<R»‡“NàÉ—fCÞýyŸhì¶°û¯7ñž®­¯TêoE^Ú™'R µšÚx”O ø§_†Bí yxã²ñvær%5ø¦Ù•Ó¥¼´AR€6šˆe%^¼"ù‚·ÙÄÜ)˾ŒÝ ùùqµzeM•ª{?UR÷½Y®ý߯QkÛÍ‘­•¼´Û:D†µúA‘õ»i¦ïÀE?ó¬Ëú+³ÇÂkoHaêÝåªa­”i}-²ÜI¼T6`‰N—RôŒæ™ä©h磭À+Rèðj³²²²²âÌ+ò‘ðÆEò2 t¡™ù¿A1q¤=~®xEÞÞ ê–n jwõ ÒLÂÿÝÛŸÜe’œ7Çp‘ ôß(¬dÁCWäð²xõ§¿‹{x« íŒH~5äüí2º €ŸŸ7Gž ^E“ÞX«”µÀ+òx[æU•ÍœXqZßZÆŽ3xÄåIK.Mߨ@wÚd®MüB½‘ÛepqÎô}*â–¾ºqÚ3ÀeÎ̱.6Û“ÛØ^;cž/\©_u–ÑFz÷qcÊ×9ã]Çï‡ûÅ\,fùqiÜFœÆž`{‰ÞËcáο ã;xëG{¿V‘Aßaà!¡lº™  ýøú0Ø(ÞifffÓö‹ª2‘‡W’’’’’?=¯À+š "ÿðÞ¹ÆÙ7g8¾¾Tà)Hx}^¾ú¥_×Èê=zóuÎæMn\*ðŠ(¼Ír/Rh3šݻÕ*B¡ËT!“C¦´ )”ZE–Z£M¦šL%€<]#ðŠ|d¼yo1TÕ´isCGù²ïÖmêµîâüîˆèÝ™u~šÐã¡óÑ„W>`ÑÕõáß§õxE>.Þvy²b»1ƒ”žÉýli¤d_uXß!ÈÂÆtƒPé0ki#?»Á~›÷µíw^÷ñêÎ?Q«Û‰£W²—Ž9 íôP–²#TzÎ¥’™XÖÕÀÖÀèŸ!PòÇ©Œ2¹Y«÷¶í6ßËÄxÿ ïÍ‹—ëõ»ìò`ÓäªCF3i%(ËØ¢çËżØJyxq.-#iK‡ú;tïiÛ–ðPà}‹fCÛi9Ê+íÒ¶ŒR(A[Ɖp½@®”T°·ÄÏ[Ò<Æö€)—Қě°ª\Ö{ÚöRÕSZqÞÄÛh\îÔÒAôܨJkâ%ÛøÍ’{²io¿Q{Íú‡$uªïŸe'9$mùµ<Çpìûêo¸#IE†‹c(ðþÞ³·r§n¹cÈìv<³Û:ðÈî³áûw;\Ùáš|hÇÝ—––W“Žï9óòÈî³™ïq¿·/lÅ%IúîˆNE·Ð]¾S®ˆ$IEF…ˆÃ(ðºÚ†ªm$I’¤*gÄqx Þº«$I’¤·Åqxÿ„·o>¾“"ß·Ý£îr’$õK‡QàýÞµo¸çSîy̳wÏßÜßU5©µT±G=oqÞ?á=[­I³¦ù“fMŠ~Õ¢i¾¦YÃöºMî*gÖÇQàý#^ERB|>%ñ|‘V‘ñù›„¢cA>¨»¨qxÿˆ7?³XúòÉ{ڇȺ Äxß^YIZó¾vâvEñŒu÷ýáu..IÍUïk/¶Wz*¥Àû¾ðN‘$éóïk/tÆM“ıxßÞøÚ’$Ifïm7Ò:(ÅÁxß ^=I’¤†‰ïm?‚¾[*¦Àû^ð—$I’¤ ïoG\+GSà}xÕûV-¯ñ˺•wÞ㞪(JÞ÷ò… eÇ÷Ü¥›ÿ}€8žïûÀ›ÔÚö=ïŠzxGQ¢#ð¾¼±Í.¾ï}Im;D%ލÀ›ÿx#Þzï;Ts‘8¢oþã ©óøýïÛ7–â ¼ùŽ7 †ßØnŠc*ðæ÷=¯ñ!ögÃw>â  ¼ùœ'ß$~ˆýÑ6‰GUàÍßxTIù ;”Ù£{¦8¬o¾æöwéf¢šÓˆã*ðæg®ÕøP'DŸjKÅqxó3çë°û‘^¯xPX7s¶©üƒíÔ±Š—Å‘xó/§Ú|Àjñµ•Ű 7ÿrð§Xw 1k%Ž­À›_ÙÕSýwKÞ«–8¸o>eÓÀzó˜†ÅÁxó)«†~Ø›@?®¶N]7²hÌÞ³‹Ž‹Ã+ðæKfð?ãûªÞÇWàÍLŸ–ïÛ¶xæÿÊìje§Íü˜1Ÿ³Oû$ðNš•ïÛî¦odnö÷1Ÿ3Óì£fnׯØ'wÌÂüÇû¼`¸§› `ŸÞ!+òï÷¼øñt3ì“ÀÛoÃ{À[Ào*m-ð~x»ïxE )Þöû^‘BзűW¹µ“Ýß/MØiflr(M½½óο^AvÜÜxÞe°ê1íÄ?vküeïÿ¼?Z„3¯¶ææ¿]Ñç„Bs¯æ´uMÿr…¬QË“4#· Ú5ç ØË?~zÒC÷ÓÇ«kh÷añÊîº>SRo(ž^yª’o^Ñêê [0 `÷hla×o¦ºÇWŸÊ ÌÕ-ŽeÀã†>Œìýòj øbüEi£D³á“Ç{µićśïy´Í³Ê¿|š‘Àûiàµo‘XÈñÆ-wT#ðþÄ{¼Mf!Çû"ð~xw·ËÿûŽºÕPì×Fàý$ðnù)ÿ·Ýí[Ç+97´À>*Þ›ƒ‡Þ=‡ûý¯rèÍ’Ä»ÅýXÓ¬Zkì£âõüªA×.ïžî?¿ûkt-;âÍ3ïwáI9ÉD³áãâ}Ú(¤Àl¬ÉïøÂ&+Øî÷cã ,0;m˜èmx^WàxÞ|ůTÅý‹—M IøÛeI/_ÈÕ!!AA™þ"MœÙˈ ™À[ØðÊmöýÝ«]¶xþĬ¬ØÛÏò¼Úkïü2'Þ†Wõø³C÷j¾c¤s¤A¯ÿVÌôos'w%û¼ùçF;¹|›î9GyÄÇ eµõx;¼/[¾*ü¹Ù-³ÿ͇°åïï)Öe"@™‹0é7øÙöÙ Û= ÒQ·0áÕ*4@¥c€"û…@‘3†vC«Î™9뫹€&çê­R{°&j ¨u .åLί?iâ 8·ŠÅ°½Nä<µB©Ê~e-$ê]PêÞ¯¯”ûçÀ~v׆ õ·H%rõœ±—LŽà`â&ß`ryûÜ›€›…ÅM<ç/x²Ê8 §… m²XÛ Ü–Î>¥õ±9+î‚û‚…dzºŽ”eìaG°è,gþþ(Óà[·0á½nhd°UͷLj˜j4|·ݹáFðbÊ”)Ù7HXu¸Ò)8»¥8N42 ƒŒ™c7O«ƒ]ËiX7<м”3$Ì5žp“YÍ-1¬ÈhŒ§êÚ@êâ©“,U8L6k•¶´ÈÀ©oƒ×_ÿEÎT´gË5oûªTùšïŒëø3Ñ•Öi|ôúxÚ7½K÷;·»]LÝ/mòŸü`Ó §w;ر¶Š¡¶]wÀŠöÏ{ã[ÓîÙ€{¯á½£ÇÂíj/â,N7Nö_¥x Þ'?Þ³o,ßÃc9qÕoVƆSÕ™Ôq,w7i.—ONhfÆÝ†žXô“±°¿"k`øµÔÛ„¼”3Š +Hiu¥›! ™ZÞ¥]Ó©¼­©ŠŽ'Ýš<ãêp¹¼øÍ·h6(“îë?JJÌ~Ò[J›Ø{]¬òÓ“SÂÚoBSê ˜Œ ýê´´ù¹®FfpåkpË“µÍÐd¤­h£k>×ysW:® K~…·ü@óâ ³šË•# Õï8žBà-\xç·^*ùöxÙœ­¸Ÿ¬Ví­^ÂÊò«fõ^~7°¢ãÅ41ô3ø– ¦ÆØö=ü6lA^Ê™ð/7ØœmhÜ+ïd&·€€2>T;@ê׋m϶>u hBµéÅ]߯·‘¹Þxsãg@ÒéMÕ¬&µ± ÇŸêŽ}Æ~ÐhŠÒN°¡)ßô77Ÿ²ˆ«ÅÓÁW/ûËãÚfd­ÿݬscY¿£R¹¾u£…1¯ð~q8rqËT`ŒÉÖ{tYµã‘À[ÈðNi—ýÿoqªÝ!‡¯÷A⦠¶jqRkpÀò›7L3Ætƒ0½ç”·½5á×Wxƒôö88¸øš ·ØÁävõÙcª ±Øz—g³¯¿^à¥~Îxœ”s¿ ql4Û.­BýРzÖ°¾P3Ê’6°øgj]W?OƒÒÞÏÚf\+ξºAЮRŽ*’/·êÿZ³ÁyÇõÀ± 3ãØôãô,·áÝÑTŽÊ&•oOÒ}(|·ŸL7Øñy²›–_Xé†O©¹ðãLÖµVs³Rm×Á’š0¬Šïw *åBüWáν§ƒ+-£™ZOÍíJ!T;@VC+xtwIW-i¶ÊŒÏn'¥ý»/l ´Mk$ôLÁá›Ì…-䥶¢ür²2¦õÖõJÖ­ÞŒkÑ P 5ÓfŒ8Ïš&Ü(é«PF]%½šý5˜Õ9¯º„X×M¯Ï ྾o!Û6xÕãM“2}‹-N\Ó膳471¾…Ë“ýµc–; ^¥Å±å¥;­*jÖ»~¹ÈŒð'ÒædÝáÞw\{c5Æõ±íÐDöûìô£þs5T;6]®Þâßk×c‹¥jEí5«ž¿ Þõs»å¿>þ]¨WM5špè±lûõ¾¤)·tíÈ5j›'LÛ”ùÜ þ”@ˆ_l4õ˜Æ±oóýòµVLm¾‡IÆã·È£L§N ÈÅ?¯Ád¿ ÷@1ø8$ ¸(ðºÞ†Ì3;meJ«-;}uç¶¹Úá˃»¬R‰°ÚµÇÀu뮀Êjë¶Û$ßå pw»ãÝ-ö*­ýΧÖÛožÚjn»¾첊†;[lÝvžÓ@µýÀË}tbçy5<ÙrIû6xÿ2ÚìÑÐé´e.¡Í›«Ó¡Ñh´ýŸ.ûh´šœ‡«uhÐiíëAÔªÊx S?ï{Í Wm¥Óÿsw¨mß”–Åÿ‡šßoÎ__O¼lüÓUWàÍIȨ‰ï o¦íá£aúÃxÿßà%9\É¿Ã[ÀŸì.žô±ñ6-0kú¼ßE$èx?.^ÏzöOŒ<úæ¶»Ÿ}W£ §f91óãâõ®\çÇ&#ÍÊ}óÌ[ùÖÃUͰ{æ­#<´`$jÌð7ñÖPì×V4>ö¶fc§‹a@"´·á#ư‰¼¯À[Pñf¨µé€:¯XŸüÍcU–À+ð0¼)í‚oöÒ•n¹w¦ÌÚXá/FKÚ Í騷{ïŒS©¯Àû^ð†u{…ðN¶Ïä>¯*iªüÅ ÑL@ºòvï-…¼ï{Áûªž÷Ö®¡Í÷wµ?3óÐIîïp|dy¨jyÁÒ:¸ï11÷Üúä -²SŦYefoy<îì8ÿp—+uv÷‰@È<³ûBΠД­zKu>–'ƒnK#ùänWÀu÷ÉDWà}W¼~úÁ9S!wZn¼ð½‹‡R¹ê3MxŸÒ×jŸ…ï‡xZ4æQwû«=ÓK‹?¿°"ª‡ŸoöTrj¼ûìÞ)„v/wÓîgÒ‡/sߨ%%kø:wÃÙzåçõ¬}tq‹¤Ý݃û[Þ¹M½bÌýýã^÷]ðj²dOõŸË²²›¸©m#=~8WVq=  ¡ò¢ŠÝgÐ\•jS3žKIWªª’—€¨(uD wßLGK3v5‘¡<¥ØÛ$Eýì Ÿì÷× ¬K$§^Ñ)S}½êíjÔ™õ7¼ï»àõ24£g`jè ¤:ï©î0½½c(Ø–Ucغ@•Ã$½C½®3L'Lâ©~$°¯:ÈJ^<ÇMª º@›©¹ƒõL+˜™šôóÏ9¡ëù'*ê€ß™™µÓŸj:càaWà}Çfà ýðì‰Ä¿ °j0íXàkxÇA•C$½C³í@8Oõ#rñ–pAG3 ”Å^á׈×Z4¢sîH"ùëtœøZ LêDß+©ñ¯Àû®m^)·ÍËà3²¶þö_ÀÔÖÐeb%»;Ť ÏÅÓÁJãÓ-$®Ý!ÍönIº i»fq M|Y'6×vœ ÑÁÞã©›„¶gÝÄà*.$»ªkp4xÞ·ÄåúQ½“ׯd? 0¦EÆÅ>S˜ÓºL€J{ˆÿì.&ß¼1»:žÒ tºWUemŒnÞ0«Eë p¨\Þ35Uà£:[]FrEWB$/.”–%}?øNœŠN²<]­‹øCÏß Æ>ÒŠ]~j}!*Sàxßoèþ#kô69„ÏõíœN Mïåàm›SU–]ùƒÁÑ#ÇÿTùý„£G;óý^8“ÛæÝ]€UAý¥!z~\,™IàÌú­Ïäà]5àÐF=?è5jìÉÁ»¼Eƒu*Wà}ëfC¨~tN¯XØøY/Û Í»²Z¦¶®ã¡Êa’ŠÞ¥ÇJH¿Š§~°¿:ÈJ\ÎȤëZH»J×¥`Y.çjeÀµ4—ªäF¨ž—JÊÒýHŸ[A×i’6 E)[bõü¡÷H¨±—´Ïn§gi½Ö{&ðd¼ñ¦i®+€ë«òfÝ8Aó§õtó£MÔ¼ÝÖ¨uÿ¯”»™ºö.!¢µe‘ˆä!uSÓ~Wfm–ŸtVq­Õõ03KåEÉ]†je¹X­²úŽí¹Òêf¨É>œšÞóïV**ûÔ›1xM¸Ý Ô¬_‡Ï%SÝ“nÊŽI¡-žFXtÓ ëçhƒ¦ã¤ˆÍÒMUJëžéÉå—gfUÞ»å¹¶íµˆ#uÃÞ‚†7ú„*oúZsÌ€;¯ÆÁ(ö—ü ¤KŸ]Âçí¶Æ½LêÄ=.w0™bqŒïJ€äYãÖÙŽ¿pyüdç]ãfxn3˜Ìí9³l‰\``êM´É¸­Y\4Ü«„[sfL¶ž·!çUS·˜­Š€ÄMfÛÒ‰]b°úÙ|ƒMɶóÍÖÆâ;cE¼˜5çØ„E1öã'Þ¶7í!ç§TqÅÂ|Ñ3Ñæ-px/I¹¶B½ûût^ã«“&¢ôÊ ÔÀ™ ©Ï¢b½CHñ “ùø©"¢ê’]°²ü½Ó@ᜤd¾Ï€`ïÜ!¸'ŠÜE˜á‹.àY*@€wÊ?ã-x ^×Ïs+u|VÕQ†ßÎY¥ìÖˆÄEoï°NÍ™ÒG涺.#æ=àõû»WÔó´ýüLú"iÂ^*“)Ó='n±ÞŠ­í6k Ÿd6§ïUݺ‰ó‡ç\å ž¬?ã$ò½e'îùe¤zñÔÙ£|/3œ3ÒûƒâÕj´Z­V'ð~Rxï~žwõ)¹C´[_€½u@St._Åq¦ˆCúÒðéu}îHwxMÅS$ê²}0òWéíãlÅí°™°íÄévZìÚ¥g¿ê£Ï5&#»µógØÙƒÝ`o7å‡Ä»ÎØÄdúì0÷ÓÁë>cÞð¢fófEêô+-Ó–LÏPÃöºöÙu<õÃ9]VÃÔV\ø|ö¼Ï]/!´N®çðÐb^³V¯ïÎý¢ ¥¯J=¦Æ‚y“+Dæpü, ê>àçF æúNÛ¯Á‚ycª¤‰fƒÈ;àM zq¢¸×‹`à=µmSój¦zåà-–ƒ·¼š©­p.ã÷"$<ë|iÙx×<ùb|3ˆ/âÎý¢ é%o íþòEh˜ê ¼Õ†‡¼ §ÛaᚃWs7-ížæþéW]¿ð·$‹}òçyÎ7þ¡½ðÜé¡À[› ×?ÏÓò«}FÛP€=õAYì.~úñØÓÛàWó, ¹Q€Šv„KA÷’°+©ebsH/ò„§EÓu½—ñ³û[da‘Ólp+’uCß–tÑò|9«:ið[ªø'¼Ú”Wõ4QuÃ:ëàJ×ÜÎåÅâûÿ¼ï¶@9òñóBKýmaŽÖàð´mk·⽜×ÛW7Ä¥ƒHþååTkiIÄVé÷4ý«A¿½ËîAÇÖÏ}9S:·‹LöKkm6#–vÆ6¿uK?&­‰X+Ë|2`羑¾ÊI¦ÇL¬rÎv!?,™-W»–sG.86ʼnäÑsMµÿÇ/le^U•9ôd¹Àk «ù+ ’\ÞœçPþï«Ê>·˜Ú^à-„x“o妕?ÐÄ<H½âz?Ãíú¸Û×Ý‚]¯?Џêê ¾.nÚ¸«×/¦€×µ+¡Dº¼¢/ß{æê•uûú͸[×oˈ¿z9Ôw]^õ¸Ä yxíÒS@qË%PÞv ü箲תʦ6m6½úÀ©)“ã0pÚ¹ 3¡ÚŠ]ÃOiÑÙN3Þ£zaÜëüâ>çÆ¾²h¿eÉèÎL3Ú§F»güÆU9…9Êí½öîyÈoň  96ÍøxÖ†b½ÇÃäg',Ê"sãdÓ½:·°àýØù_÷mÐϽoƒ*­‹C`ƒ0¹Nw²„Z=¡´OxP}húé*Áœí‘:h³ö¾´V¶ëÁžJèRKÚ+tœé•<`;'[¾Høå›œ3¯²N¯”Ë_ÎÍÜùCûú%Æô<®,{J¡ï|Ãk[²¦NjTï WàM»sïÞ½;Aÿo’Û=k}Û{nIÙßÃZ¦_î ¯ªÊ~š•,‰/vÎFîó¿ÇS B«}U˜Ó~ºÇýÙµi·æV•Qo-òbvø ¦ÁÂû÷§´¡œ À¤Ði JïMÍ—èÝû÷ïß}S÷ßð¾´Ü¿Boõ~ËP bŽÁ7óº6œéþ×Ue£ì?hó窲±´{³ªŒúÛ•º@€¤+o|àÀgmÞÐi"ʽkŽ x 4ÞÆQùð6ò|Žaö?[U&00õoeé—ve5Lm“‡7©è]º­Ù-<õ#É«*ËÊ¢óFÝæ§°·œî^y© JÁ49©÷´eÏÊ3ar{è4‰­òI%s· ãõ¬ØwÊäwÎvùð"S¾ÿ_UeymŽNÂGšýEãÒ‡×ÏÌlþkFÊ—›Á’“êRË»±³¶«¯IO¨×}•¬SVÝ»û1Z¹Ç˜Yr¶é“o•Zu‰,Z:!¿/yh¬Ú{FL=E­-î‘9´QfæC²Œ,šnx 2Þ¨¹ã'¾s&×~{÷W™8áÄßâ›{’Ÿõ|‘Hš1lÍøç/Žë¸c¸ñÓÍ¿Ï ÂÕÜü”6bÎïÆ^DM¾9 Çñ;åpÅÜÌZ §6[ _— >4|ÊíÃf>\ö»EN3fž…‹¶eqiìˆ .#Æ\ \i>ÃJ+ðd¼ù“–’uþo»¸<,ð~¼7KH}µ¯H!Ä«[(I_û¼ëŒML¦‰ª2€ä:’$í*4xu:N—7}x?¼.’$IÝÕ¢Ù RøðŽ•$I*ñìCáU, Z®ïÿº­‘œÛý§ Ûg™_xÿÿá¨!I’$-|ŸxÓÏeæMû7L=Öxlþ¯ñ^«,N®ûÓ‚ƒ¿†º58%ðþ¿Ãë\¾lÉ¢_–í‘õñ¾úžøbC×°I³_jÔÑ™ ‹ IË[IÉá±Y‰áq§bBÒÑDÄ(£Ã4ÈŽ k!œ¿Ä_z„ÕÕœöìÈðó¼¹lrÇ¡qÏ N­²8ûc:eÌPöXÇR¦­`‹tfWsüózŒ’×¶òxÿ?â=Õ5ë=âõ™³hªÞ´Es}êYã¤#ýZ°-«MéØÄ"wÈYJÙÑ‹—4¾Ü£ûiL®¾dÑôR!ÚÒö°ºKfF­¡×X¸Q:…}U`d`é¢8ñ…MàÍw¼©O½ôÏ{=MÂŒzÔ2­ßfŠ[vIdÖ©AµVd÷Ù&}~ÄËË/üËÏÐñû@F·æõ<@¡*íëZ¼†·ëxp+žÄ¾ïrðn @àxßG³!Pÿeîä”mšÎ×Êìë*f÷0+;m+” ~tƲe&1k{šËHZ–ª.µFMÇ¥„殓¶°¤«–­®czƒ6\.ð ¼ï¹·AÙÔͳa5[ºô¸Ë1Ûá‹r×ÿyÿ‰Q>/L'j&VuNŸ4ßvÆ.]–ÁLÛY´ÊòÃ×uÆ»ÚÆ9êøŸ*ÝÖÆ ^{¢÷M^N,q?¸ÅO‰lùRàxß Þ ÇÜ~^õõ¬¸ÛYŽö3}ímîå]é}yÖ!Ž6—å×Î^Ѩ]ÏÜ”Wm€ò‹3×í"@÷èLqgÏÝÒ’qÞ.BÎÚ»=û¹[–À+ð¾¼ïm ç÷ðá ¼ï;ãMö|öì™WìÿXaqឯÀ[ñ>šmaa1÷ê߯ S¡Ñ ¼ïÄ[C]°?ܳ¯ÀûwxKî?Yc=©¡&ðþu¼ÛtèXÓ©íLàý›.¹¬€G)€ ¼""¯ˆÀ+ðм""¯ˆÀ+ðŠ¼¯ˆÀ+""ðŠ¼¯ˆÀ+""ðŠ¼¯ˆÀ+ðм""¯ˆÀ+ðм""¯ˆÀ+ðŠ¼¯ˆÀ+""ðŠ¼¯ˆÀ+""ðŠˆ¼"¯À+"ð~œ\3¼ dØÈEZRàýwY_eÕšÕ?†US ”ï¿Ëºß Æv\®£(Þ‰÷B]Wàx^Wàx?¼Z¹ö-“˯À[@ñMú>êï–U3˜>r½\àx f³ÁG ÿÛe1’/1 · ¼oAÛ`êFžúáröäs÷(\N\Íþ¼Âõ¼`X{§3.ÇC9m WO]Jr>zßÊ.5挭Làx?Þà>;œ~_ˆ§~8²¡Û·u†]?9lÊÄñN“-rð¡noè$M»:öð“ŸOîì­ڃҧÌt¯fœ‘8t½Bàx?ÞñSÀk?žúá(]abwèÝN†¶ì2âÏçà]ºß|Ptªt†”ˆÞËa‚1Ühxp‘æ 'kê?~›xÞ÷·¶%žúᨬÆOoÔn¶nfà©ÛS¿Ý¢È¼ÇÜɉѪ2N°éG`y™'€oÍ—vŠ6¯ÀûQð6Ýd·y]Ë?Ó™5Ô×g”¿E²ý€š±Ùx}€l¼ÊolaM;Ðn©>Ð Y°ÈGàx? Þõ}äX-"@/ÇR©üÖŒüPW8h¨Æý³ €D) UÏtFãQôÚW6z5¸ 8–6Ö ¼ïGÁ›µd²Ùô“KÎŽMžÐwm—jÇÙ1Ò|üÜ„SÌFlW/¦—q–áñÓ&-”q¢ñŽ˜õí!­¥¯ÀûQðB\¤eLr¬ML|VB$GÆêÐÄE& ŒIŽÊulrT& ‰Ž’ãRU q©1%Sàx?ÞwÉC ð ¼…o€á¦tWà-”xß2¯Àûïñ)ÛqYàxÿm64?\r¬žÃ&ðþËlþªgAHï¦õ^÷ß6© DE³Aà-¬_Ø\^Wô6¼¯À+𠼯Àûñ†…ã—‘oæî– }|ÿÞí›! yvû±Jàxó¯úµÊÅ_·¤5öÉ¿·™XåPˆæÜWCméd‹úÒ\)Vàxóo»Ãy“í·ËÇû6NîÐxl¯«ï¢q¯À›ŸxkæŽÖya2âÓÎõ¦.rqÝä'àc1Í"Ý¡áÛ­&Ú4é pÉ|†5Ú#ƳNè.›yÆtq<+3£Zàé<ÓÅ^$¬5Y–=^~r;€†[àBIÜxÞüÅûÃîœ U‚ÅĤŸv%(´ÁÒ̤ùm3Ù°%yA?9i­ê…]úÆ8zßœïâÚç¤}­ÐஉY«$ûãÁòä!þM€{Ëë Ë Ò~]›¼«Gêkx·£3é¯xÞ|Å« ðóûn±ŸOö€JFYÑÙHÑ»Œ{ñ’^ú9 ‡NáÂ.b?ó ‹y`àâÇKÚ$EhÙQUCð×u¡!ýûÁàQòÐ¥Ê#¯2ίð6kgÒcH,¯À›¯xË,(×sá,+ëÝ?˜¯ý~ƒ=$½Ã£"Ñ0wŠ &Á·ÇH(âN­¾ Î[ŸµºUýEql¯%¯%Ž[P¯74p¢Ä¢ ͼ^;ó®—Ÿ«å-ð ¼ùßl¨“;äÁs[³ûÓÝIEÝxX$VVê,az¡Ði"|{”ø"î´Û Ï8ÒnVžÁöj:^Vð±ú&vƒcAîçTU >ño¶y'þ.ð ¼ù·ÚöÜ©Õ#ùõ( ‹’®jܤPe½%²m’¿NÙr¤ZQv¯:Bº¡=Ûòyæüƒ[)Z.cW±+²™}•Î_?mÐYÉÍf²U “z-‘Ýý%&¯NQkµÏJ×T¯À›ßxÇ:äN­?©6ô’–ülþlN÷E©Æ˜oýy^¬Uß_]w÷œà¾ºûô@쌦ïSÏ7™ºSÆŽš6Óg„¡Ú:zÃôþÖpÛÌxs:‹Œ<Ïëm¯ë=ü$ºÅ¿]ÄCàxóï;dO½ÿ½|\£ø×îø”zA\¤x Þg#¾¸¥ù_+9óiÞÊ}FÓ^·`à ¼pñÁ»]xÞÕlxç¼o¾áŽ!äm7]ëûÐWÿøÙÞ TÏè^÷#â²%½éÛV•¥}6ýœÖg†´u÷”áI2›‰_*^÷ãírà?­‡uûÙËÜ^·Êñþ¯‘IÎ?.:^_àxk ^ù¤Y?éW|/Ü8sŽZàxkÞ¿"¯À[cñŠ)NÞ?÷Ã8Ž+¯Àûg³µ¥•!Äv¸X“Bàý³ÙòÑ|CÈ¢Q¯Àû§» b)+W\°‰ÑWàx^Wàx^Wàx+ ï£\Wà­¡x›íxÞŠ·ÕžòFÞ%OOOOO÷Tî_òôôôô¸ªQx–mŠx^CÄÛú`y#çÄÉ“'Ož<ö˜›e­3š’Se›~x^Cë:ëìüÞ gÇÛ¢Û ðÖ4¼j¯K—›\¾p ÞÔÊÊÊÊjnGÊZ‹Tù6VVVVVÆ.¯Àk݆ýå MqYÔ(Ë%èÊ7• ¼¯!âm´]Œ6¼5ïñ0Wà­¡x«3¯À+𠼯À+𠼯À[ÕxoßÕ]ÊxÞš‚7áé‡× ú9·u¬À+ðÖ¼í® «Nü<Ö³gQÅÒjZ¿gÖVѹ弯¡áÕW•=6ú¡eÇ/æ»ã›>·I»êããããs½ÙÝMýŠ^× ð¶> o®ZÀ€"— Ÿ›yAÔA‡Ã¹¶ÅÈhM”Vàx ¯ÊÝÍ­Ñ·³å%£Üä_Ç…-ÞÙ”÷Û½T}ëx^Á{á¬k£Ù®.AkMOœÜÄx”î8ôÇ pÛÄÆÆÆÆÆ"È?3ÕhÎCWà5ÀnƒìT/éÒ¹ù…ÊëÆ]¿?™‡2/?????OCÀÂîÃv¦‹>¯ÀkHxŸV•ÍŸŽÑýö4çÑ^ÏŒ6LZªûËCàx_ïÚ›­×Õ›RŸ}™æÚ¯Àkx«3¯À+𠼯À+𠼯À+ðмÿ%ÞÍÇÔæ1¯À[Sð:†ë›Ú¾RÛ‰z^·ÆàÕߤ( 8×êò¦Ïý²^·†àÕ—Dfîßýplj?G#_¾ØÞÞÞÞΙ yööööö R^×ñ¶9¨o.ÚÈ€«€&.66666:“‚èØØØØØ…À+ð^…½­Ýýì,HsŒN<úân>èò¤R©Tú¤å©T*•JÕ¯Àk`xuÙYY-6de¬›ÔØ|h+«P²hž­­­­Å Ìlmmmm­R^×û¼?W´\‡±dM•‡À+ð¾ÞwV´Lçiº]«)xñ9~2Aà}1¼úǂ㳵‘òš‚×ì__÷¬ÙùºËŸ{¨Jàý-ÞêÌ à;¹Æ÷4}÷ ¼ÿH¼Æ“j<ÞRWàx^Wà­Éx‹ É+xÿÑxO÷ÓÔL¼Ó¶Ê{„×D¼qGœþŸ›€îGŽþê·ÖçÐS º[G¡Ðåp—w^ ì‡gàûWBˆô¬^¼ ø?ePûWûüŸs½ŠñŽ>ûôÛìþ¨«¦&âÍ\'ùã‰ÔÂ&õ=7àûg_ ‹l<«¢]h¹ÊçúâùJù ‰·‡=T§Ç²ó’ePæêW¼]kòûrøkOªoL“ÅûÿÇ<¼ÿNÓƒUŒ·YÅMФůï-ÖfÁ=P—Eƒ¶¼¥{ºÉððª5pµa1 )?<µЕŸ‹e}œðþ¹Ï¾€/ÍÊ_¢³œ©õÈí”6¸¦ÑeçÝòÝÕjÐnm®Ö“ڡe§mý_ÕNì®~ö,­l§˜!­÷jÐjÑ”OÙûiТÕi+ot‡ÇÕñ?zߪƫ/‰,±Þ}õ)%¶––––ÆÜšciiiiišÌj3KKKKÓ­‡7ÞÖlörù•†Å(WͲ¢B¦Ï>Å…‰¦sBwJê Ÿšû´RW6ÞöáÕ·wUâÕÉ dm•”__Î:BŸ{5l´AÚwùßE\oXLÎ<­ªÛ:è¾€3Å+n> °«þc).èÿ3ù=7öª%A]bØ? °~*@èKiÊYhR;œâR%q_ÞçL÷L+cjÆv OñÒy.)™¨b†Qù[k,øjиòŽÈÌ'×ÞŠÞœªxä˜ Ùûݽ¾ìî"GÑ}'JãlÞÆ«XhmóF_Sïsí—n}ÈJ/º¹¹¹¹ &ጛ››››kÞçÜÜÜÜ\ý ¯ï›RHQ\iX —/|5¦µ:]ZüiŸs):€z¼mÀ¶/¸ûJ´7Ãö“‹nûê»4H«“ª¬w¦~‹û+J5»àæøÒ¹÷î@V;Ûü oS¶½þãý"˜Þ»ü­m_ú!Lßð[7‚ö@„$(ö?·¥^.lï¥ó^…Àû×tôíy­h{fzß³>Pzþ¬««««Ëâ]]]]]OçáuÆÕÕÕõŒ¡á½ôŠÀ³a1á_o<Ûm8È hiQœ¹®[‡½:àb»"€"îíSp 97_ʇ/̘Öþœ«›WäÚÈ\ã¯pEÉÖ¦n®ç<î׉ø^-t1…KcZŽˆ}Š×BŸ¹WŠËXÔߨ¸Ýgj4oÂk§@©é„3êæ@jËP»ï_„·…þÒùç1ÌÜ[¥ö/À{¯q,xe_o¨`W3û-Ü„’ó÷ÑmzE äõtîŽÌ§÷zXò-ßCÕÒ‚ ݳE³ÍƯGYÏ FÌÀý%gÛëà|t[wü…mH„œÚ!s¾4'PI⻋˜fDRÅhÝúoz­‰ÍÈ’Jo6ö†·Îk§AŽ$ˆûµ¥À¼>öŠ*Æ5§ÿG›~=×|êÁß\ˆ—Æ—]{†¬0·9T\º­¯;©SrŸ{aI‚®úðö;QÑZ´S="¤¦áUÙNw•°Oªºöáù຦3àDıÏ|º]XØšºkñš{·—.Jv/º¼ÃúY›‘ƒÂyÉÒs¤›¬¯ïXt.½¬„üŸî-„+K–߇ÂíöÑ$.²šgkkåÀ-«yWRvÚ/ñìu+õ‰FivKãવµó>+[7Ò×X-ˆ€ÇKל¶ÞœEÃr«oÚÍ€,ëæÀ“;7³û=(Bâ÷¨ì»•Ä·c!Ãÿ¾ Â?J\j¹„kÉþâ, ¸ƒûÝÌEúP<öHö’J·4ðŽx_ä&Å_ÏÂÓ*ïùŽTå-ý©º*ðº}`cÿ°»us_½¡ß]8>àà<æO:0Þ±o2|mÎíá{ḭ́nÎÑäm©µÞCƒ{sÀö.´ýîäÚ~Ñš’88ñàÌå:ÇZ;$`A½=~¯àÝ;y¨Cå}âSC̪oF»³ðcÀ½º9;ÃØ±Ðsš=ªúû‰¾\ŽwÿùM#cå½öPøùA‚Z'p½U<‰µ³€#pâ=ZšÂ¬©Ä×J$êãHòZ§¶¹ Ë“ü_©Æ 6÷¹+•¤ôJüÄÊ„§@uéçS‰†×dxJ|ÍNBT÷}•?T–ô@Sx74Dô—‡I÷£x"'ÿAÐ# ‚Âó!"Xž®ˆLÈ *ëÇÝ“¡‰| ¾“§ÒDIäÀ‡iA¡ZH ’U[·A_UVh>2¸ëÒ€²¾Ý¸x¼ª°žÌÜrsÈpü캻‘zþ ;Û&^ã¿ÁÓÃýjÚía'·³­þ¿BåªÅ«Ë[þ$——?ú3ç}‚%}5äVÉêù@d±úØû¼I°®gmðß|´¡êRój‚Mføë ¯b¥Õë}¬MŽøytZãÔæx €¬žê“,†¾­&qb‡¾.ò[ýÛ Ð ¼ÿT¼ÿ)U_UVqÉ{qIÇ©½œ¼aÒH [+«çCl<^S¡"j×[´übóÚ/¯áãí]Ÿ¨O•W•í®hÍÜ=W:Fã9[©¬s‹è—Xó*ظÀgöÓ£HyõºÀkðxcš[nX_åÙðá‘*ÆÛá¢e·U=¤¬ÜúôlS«ØÜÅL /Ý4p¹i³JÏ©–³ççîa>e‡\à5x¼±ï÷9¼Ê3ò­£UŒW£ïkž®0\Z¬A+WË5 ,Ñ©å:4Å%@i±ò¯<·Òú¼ÿˆ>ouFàx^÷Ÿ9Ú ð ¼¯À+ðV'ÞÐHü¥ öæ Ȫh…=Òo|p&ļoµâ}òÌÐ×ÐyGAaÏúMºÁ^py€ÅŠ§Ê»õ€9ë^·Zñ~òôÌîsë«ß ÛÝäù-³ŒD·Aà­v¼-+ªÊ›ŒhbñE§¹AìüêgŸ™º°˜ã__!Ðè53wû¯hk“¾Àt#üûmD;ÅÜzì× hŽ™šì.xÞªÅÛº¢¨T§^a­éB­ã‰äÚÉï$gµÚ‰æ-t»?RkÑõ göàÑ"¦¡í6…Ò¥š'=g—²XAɸõ¯À[uxÕþ>>ï[ù^‹,ûqŒ«ºW,_Ϧu‡îf臟?4”>õüaºôš®ˆE]òàKs?«6¯À[uxUŽGÞìpÈ`£Íû“f71ßS·t7~ï¾AûöÖõÕãçÆwg98¿T¥xk~1ºZà}ÑnC›Š•ìÒvOZ059 êùÁô>ÐÝ€=‘ ƒ'@³]h^òƒ} ×Lˆi¾‡½7ƒìF•â¯)­ÙQ ¼/ˆ·ÉO­%“x à±Ä¹¤pX'YAÛÑEÒ†[ qþ `Å]JõCòqÉieÁwòŠ:Ï—u²åž]o%YªJ¼–ïô7ªÙéÓû#ï‹á] ¯ÏÝI½, `ÿT›7fM¿â1}Žÿéiæ~¬± á—³œÉ°ŸwÂx~¬ûìé.·¦Ï¾5ÃÄÂ|N"øÎ·;W¥Cef]©Ù9z°íA÷ÅðVg^¤Û0µÆ÷y«`Ò×0ñŠÑWàx^× ð>¬ŽOd$ð ¼/Ž÷cçw«<:ªF¼û\4Kƒ|þ·²Ððð†.çÈ9`ßIý¦T;ÉÒ…QK¶õ…àO¼±Zvl_åéø/‡*Æëþ´*WÛÏ%ýãtPÚþwx÷fxyó6Ú^Þ?òië¿ÿ˰RsUd=–J£óYÔc…<.E›P•PS@þ’fQ¹†€wÝG­ÇQƒ ùôb2éÅ$%ÊS—¢MÎÕ’Ñq\L i9*P%=zðÁaJóPÅEG'¥Q‰¢Ï[Ãú¼ú‰ö j·´õ7v÷Ø[×÷ögô'â{KKãDó—–¬ù~†è© f­P’0ÃÎfø½ào-ºjx·t¬8n2~×vdë…n6]÷óæ¾1+)_;ƒ3ïu^‘Àáz^ðãÄyC|ÊðæŽø€À~K–4ª#xò™?ªþ6xÿaµ °t-ßxŠz¾0·E–cÖVh“$N¤µ½ r¾:¢¾Ö8³¿­atv}ªoôçgK(›oíC+¾£ZéÐÃоìn¿”4ðÁa8ûѸ}AAWèâ(ðּЕ‹íßhow@!p:¹k¤²¢ª¬t7Æ£éàm<¬•},rëϵ_ÚÆ<¿A(å CV3^G;û~ïØ/^U ¨äÆ(&í“ë`àhriÝÛ<¨•ÝL€’—= ~ý¢1o*Ëð:¾ „7> êšÙ/ia#ðÖ¼ÚØè˜f+b¢ÒVOn4{XsÓíx »1¤nîÝÊ/®V"ô5É©ë“úRY°AàMŠYØ&&:N œÓª¿ñ;“­ž”á}ÿÈïàÍî¸6zÿ«Ïà-ìiDÔñ‰IÈxkT·¡•þt̲eòz0«ô0ç`|l*ñBÖÁAÙõpWö܇.²£5¾†ÐmØÖ©¢%íØS 0d |àHqÝ»DÖ’BW‹¢pÔ/_'J’€óË@Ópú=0í­ÂKÛæ ìñxkÞ§%‘¦Ú®^—%K“~Ù,<´IÏèÕNíê;®öb7³q%\|dߌ4n;ºob<Þ­6­3¼ë[U´ü:iLˆoùùm¿ú³“ÏI֦bÛsµW%ó w~´Ä]v­ÁŒÇŦu=œ%ÖNǾSâ2ÄaÏì,·Fá½¥_44IPpÇÛ#-ÎÃ3ú‘§G¼"ØÝ#…‡uB½½K€xwo|ÙS š_yFƒÞ¿ÞÆã¼ÊÄ€vA]cŠÈ.Ô M+”%òÄT•ê†äf–JS“J¡45[•’PšœT ¤'>iRœªƒÜ¾CR”W¡àåkU€w]ËŠVjâ°Q½2ÉN/‘&– NËV«Ór´• …Q£ ’äï߯¾ª,ÁvÐÇ‹Ûô³fOƒ›\èØÕqÚà$537˰ª5û€¥ùÜY“RHµ©¿}mwH1¶¶¬Ý<ËfjElŽ©ÙÜE87oc„½q§ ð>­*[?ç]«-íöqì£^ÛÍ¿OÌ_YÿNyÃ,ÝÞQóF{3úË“Fæ¼¼ÏT•-_ÅÀKTT•5“Ñnæm`¡&±v6 Ûßš@¶Ä‘}-JUcÁ §^ðóàò)"ͦ¡¶F´áƒÌ•U€÷™ª² ¾ì5ôi16cµÊº·‰¬%¯ ¿SüÐA¡jqBàý[àU®Y¶ìÍÁ˺¨U]3ºGk~]Uv±Éð=Ù<¬pwõ²ß@B­‡\ù—<«á]P”ŽüdŲÿÎ+ë4¼ç[;Ãw?¼t•~ÁvrÑòï._¶¶Ъ7ÕL= ÖAŸÉpã‚üº·¹['S=é#ë0ò;øä§Þ¿ÿj@šðÐЦö¡’VMi4cø‡ÆÛž«*{¼ª[»€¸Ú ÀOކï«Ç›Q7à›aa¡‘1jToºÂŽvåxÓæWÁPYâƒPÛÖ¡¡ZàÌìÖF&ïN´Ì…¾SÁ¿a^~‚ëd¢sŸÔÚB;jÄ?ï'÷UÕ0ûZÏ*ŸŸ÷iUÙ –Ù”Ô €™}¡‡9‰hÚX§H²‚‹8üLè éµâðù—FþÕ>pò^o¤#y¢¬Óùí˜5FŽŠRª/ÏV•åv‰ üª _?[{–Ê^Ã¥n~á>p«£û=´ßóÀ÷öíÛUy>©]Õ+`êG03Õv½ pE²*5º[óG‘ï÷Š[6Ù퀑¯´ùjë<Â;-½øQË£’C«$—”¾ß:?zù9s§òþÁ½Gv ‰çn»O½t¬U5xŸŽ6øwT/šÀ O\OôðB=s„÷BÉ©ôÞ{]MMÂ;¶ }cRÂ߯ÜÿJuÄ;£Šñ^Óÿ[ÇinÈnž?—åê~Î5¶øÖÙsñáÄžñ t½/»|þJºûù« ιeA‰ç™PýÛ¥œ» ¿¸žóÐZ5xãôã¼Ü/[³¨ï´§Ã™»gúùË…Iî§o¨Â\]£Cι>þûãý;çp{ØhšÁÿ+¼†‚·0,222<Ã@ðê~Þó’À+ðþw‰š¿téÒ… åÌ«Öi5¯Àk Ý†)5þ_AÓOàý ñê4h´€öî-h‹å†‚wNßĘšØ°Îï_ˆ×j§rh$öûýa‚ISWÞåM;v¨áiÿái÷ÅðZx=í(>î,ü~ÿ Ùÿ#Ÿ¯4 ¼Ùk~¢ ÞÃûþŽ Ç·6=`ÞñècnœË…ŒÓŽ ²J/»®©& 2 ¼ÿ¼¼¿Å«/‰Ìó˜=Øûs›K©øH®“ÙcƒçŸò_­³¾<|¥ §ý:Wà58¼`±›¾·€âz¾„H®ð ºü¿H¹úf2i¶Làx ¯b¾…åëF–s<übëåvç#ʪÊÖúü\> ‡îÎl³1õrgCmxÅ™÷™3¯óü–û&vÛ¡¼$’¤ãŸŽ,2Ëk|Œ_êäÓ^×pð¶Ü]Ñ:þ=V;ä/¸ Ö·.ÛÓÀ'I ”\+x^ÃÁÛ逾˻Vm°ëµ‰÷2'ZY/_ÙU³§÷RóW—KIéš"𠼆ƒ·¨b<Œb•®P W£ 4;óéi6/[Q«AW¢x^ÃÁ[xÞJÃ[|äðáÃ.” ¼oë¼}ëÖ­›¡jWàÝWà­,¼q „Ê(ö÷/»–÷ë‡ÿÓ¯?¿CžÏõäøk7ž¼ouàU<Ó)±½ ý# ŽJüð4ÒþŠö´wž·;ØvÓǃ­ïwOàx«ïO§{*ø*6ø+ ÈëÞ*ÛðÜ•šKãçÞ'Fò„£gaäWà­¼UÜa‹7ÓȲG;“ ¤uŠ,Çî—O¥hÝp—]S.êО³sí;=¶7ßOü É´#Z`º‘À+ðV^ýŒ9Ùò¹E}÷ËTHëþ’3Û·Dw¸¡VWøÚø‚ÍR9Þ56mP³ò—>éuLf;A® ¬ýP„¶:"ð ¼UŒWÒtqèýIJ'œÖõޤõ'Þ\ÞÒÂ[‡I­û€.Û`g£òýÚªHú÷=Âj§§¿;¥xÞ*Æ[zèç½ïŒÛ»Ó`ûâ¦S,𨀼C¿ØVŽW÷ö)2jߣÑ18VÑçÝÞJê_%¬v °ôÆÿz¯ÀûBÝýü¼ö|b=:4òê^ ø(\ÞÒÁÛ'ɨ}.[a×ógÞðÚ©@t¶À+ðV Þ*žacÍD¾;h“%Þ:‹^Yêà dÚ¢†Tq?ͱ.±)½ß)*+ÌyÒûXÝx¹æ¶$R…Ì:Uàx«ïœË­m§ÕVq€tÕ0뫆.‰´ønmæ¶áÆ¡†ÍKÓž³õðˆ%OGòˆ·6û.2‹dWà­¼ÕWàx^÷?çGsKK‹E©¯À[óðªJKKKU:Wà54¼É)Dýá^Úˆ;¿9åÆþÎ<ãŠèç*€ÓS^·ðjž¹;6j»¬ãÃßÛ!Ã84žïX?ÿ‹;gEÔ¨OŸù]d,𠼕€·‡ƒ¾YÔ#æþW¿{§7N’ðÙ¼ßüfòï-ç[ü\¿B#xÞJÀû´ªÌrÂ{Ö½ÛšÝ-X>æÊF“û! mR@¹ßjaX®Y­é?«á³YÇgÖÁ/vÖ§åv‹“ß -Û;séï ¦!÷ÌK׬'E{ÎÌöR¾Ó|;“7³oüÞã3Oëàªéº3cVå ¼ï‹ãmUQU¦ÊY2Sj´;G©},™÷dEÓ9Æ£¶š+½Ñíapí{:ø¢[úÙ¦a|~;á›hW~—~·éðò“kŒdtɇ‡rÆMÆ_’‚Oã´þiË»eߤ+þ5m;§Ÿý ¿ö7ÓÆH’4¯Àûbxµ±ÑÑ.~”^Þ8Eï‡@~­+Ü•Äsü}’þ}>&¶Ã¢”Ú‰ç Ý1À±µJÚø* RþžO$× ’$qäCÂj¥âYgNªÖê½+²˜Ò>â ŒžçëŠnƒÀû‚x+Û¿9p‰ÝIç}­æmh¾ùHËìÅñÂ%–öö6ç—­=Üi¥¯§‹9ܨ/O“„ÃøŠ>oN;Ü©›Ã±F„ÖJEµ»WÛä»N¶1¥?|fƒêõs|i¾õd¯ÀûtôUe!?u2y'¤uoq·NŽïÿz¤&F×J.Ö@'J_;ÏÈÉàÒ\õäøî)Þ îÔÍÆ¡1¡µRy¢–P¤öñLpOr==r âRhìŇ€âªWT½ò/5~Z‹‹±À½ ÷8н{Jàx+¯¾$2çä”>g>ã”(w”_œ¸“}ãOÍ7S-rÎR•GÃþg6÷Š"nèŽÝC£¸ß½±û–Žȧšœ[Qç—²7ˆ™ÐÌù!º'œ°Iàß(Pàx+oëýúæ¼íôó䵑ŸœØ2ÕÇÍ–“ëMìiL3Ëñ0§­ŠÎ pø¤€›’r¼lï ÜmAH‹Ð^î¿^'𠼕„W±ÀÒêõ>V&G⣿Úw»Ó$Ö¹ \¯kfeÝáì‘–ý6äÂ{ÇaokZ€ãïÃôÞÐÝÓîS»âKÝô)àÔ4ïœYÿH1Ú ðVÞ™W¡P´üI!/Ø2åýC?Y¸·l¢=ðy9K¡”“º«GÇ,Þs€]íh³Ž6ƒéFÐÝËnýk¼Î´¨Þu…’M¼oÕôyqÁüÍŠº÷´Ž§ÐZÙè«N9Ÿ…ca’5Ìé=-¸Ø:7IDÅhçºÓDµõåZÛ8È xÞJîóþ\Ñ2Yªþê&·¦Î8/Àwô|«¥¦Æ &®QÐtæŽérš›š›ærµýW¯4þÔO»~äÊ•ÿš_öAç8À¹qóÇ]NxÞÊÅ›¡_»*·H—¡T )19yQ‰Pš•4:‘£Ôqq*ÈOÈÍIŒ—Bb¬<-®bª§¬8-• — ¼oåâý¯¢Í{å§Jp&𠼕·hãXãÿç©÷Ž...'c^×ñþ‡Dž¿téÒÅWà­yxE·Aà­v¼«©¦Gæa‰À+ðÖ¼knê›ê>W;äA¡¾NLàx ¯þÑ÷ü+'Zœ]ùÙå µWm¥„ùø?ñõº”u=@Äy©^×ðêï°e;LüÚ©Óô#Kk/¹ À«Éœ‚ŒQ í%K§Xkqã0ßT.𠼄·õ}Ón+ýoòºw,fRj¦½#ù…äV¹ßF×ÑAàx ¯b¡µõ}lLÒ¿>|ï³[™…9Ük•~m+7êÉ Ýáˆ:&Öó>Y/𠼂WW(“}´U&“lœÜdÞ6v{ôx5ßü´ú7^’A»#‘õãe…ù¯Àkˆ}^NgÑ€¼:÷ƒS€So™¨¹!ñ%ºå½¼ްðšÀ+ðÞvW´Œ«»ù¨Æ}g“H;ž„õ·­þn+øý°pÞ1­¿ÀkHxô>=_—X¶fJQX&€|f>Üh¥Càx ïæ—K§wƒê‚$³ÒŽCàx+oØøÕOà®É°µ¯À[³ðVA^WàxÞ'OÈP¼oMÄ;qsI—pPìNxÞ€wðÓùÄ_?Šè¦¹~Wà5d¼Íw•7íf¼g7ðc›ûò5µÇo-âÄ\ûìX;“y¶7–,MµÃü5  ,*.....Ö ¼oµãmU1oƒ"nþ¤„ž›b µáu\’5$v\¬R̺xR²6~c?™ÆÖ8Þ©O2Î&ÖÖÖÖÖ6¯À[­xuY™™-Ögf”þéÇ1 òëlúF“eŠ_­ŠÚº'½{+'³õZÑmx ¯b‰­Ýýì,\pl»h×G»¯è«ÊÒZD8çFýBh·?´–¥ÝŒ3srrrr:)xÞjï6èW}÷[×Ásö Ï Ö Ðh€9Óç'q£öTŸœŠ}5²Óˆ¸äååååuE)ð ¼ÕŽ·YÅ;Æ2ù@AÃë§£ŸÖpCr‚Kí“äC—j³ÇÜÝ×€ð~çRÑZq@=>@»eäÅ€²¯/Üø×IÛI7 c¡±•'¯Àk@xÿ0¥dX«àfýÒJ;Wà­¼Wmל‡ôuO…À+ðÖ,¼¹Ç½5pê”{‰À+ðÞ ã8<^÷ÏfÓP…!DéÖFàxÿd¶Húô7€ ü¤…Z xÿ\âΜt2„œòÖ ”¯ˆÀ+""ðŠˆT^™øjD =²ßÇÛ8þ‰ˆˆ'¾ñïá½×°isOÓ†÷~oI؃OXÉïà©axE^WDDàxED^WDDàxED^WDàxED^Wäoÿ?›q"Ï>„UIEND®B`‚yard-master/docs/images/handlers-class-diagram.png000077500000000000000000000255011265676644000225440ustar00rootroot00000000000000‰PNG  IHDR+ã6ÝkPLTEÿÿÿÿúú9fÚÿÿff¶ùùÿÖ‹f99d99Žÿù³ŽÖùf³ùÿùÖf9ÿ³d¶d9‹ÖÚùù9ffd9f¶d8‹f899fŽ88Ž88ff¶f9Ùÿ¶Ú‹8ÚÿÚd³ŽŽ9f9Žf8ff99ff8dŽfŽ9f99f99µÚŽŽ¶Že›9898‹ŽŽf9999ŽŽ¶ÿ¶µÿ¶ŽÚ¶9޶Ždfdfdd98df8‹µÔŠŽ‹d¶Ž9Ù¶fµÿÚ¶d8ºŽV¿¿‰¿¿£‚fŽÖ³8ey9›f¿£k8yy¶ÚŽfŽŽ8y999d³Ž8dfŽ¿‰LÙÚÙÿÚ19Ž0Od‹Ù²cfd8Ž‹8f889‹‹eµÚf¶ÿŽÚÿÿ¶ff¶fÚŽ9¶ÿÿ9ÿÿ¶ÿÿÚf¶9ŽÚÀÀÀfÿÚŽŽ99Ž99fff9Ž99ÙÚŽò¨Ðy)‘IDATx^ìÛÉjÃ0@Që“çŒC§Ï¯%Ȫ†ˆhÎÝ(ÚduxRÜT“âÏ5/’â _ VþQbE¬ˆ±"VÄ +ŠVÄÊ#SäXù=+SlÊâ+bå‘¡RbEæŠX‘ßAOH¬Ès[±RGòß¡XQÔTÕVM==ÍŠX+båt:ÕjE¬ˆ±"VXa…V.·X:²²!V'ãܲ²)VºHÍXÆKYR&+~Xaeè§Ëg›—¼æ¶,ýÄÊjî+]DF’…”C©‹ÄÊÏœAÇŒd(B"úiŒÕ/+¬ì·qnï§Î)ïÖcÅ\#íÎs»|Zv) ZóŠûÊ¡Ù_#Þ#•3¨è‰Hæ +žÛ²ÂŠX+ÏH¬ˆ±òøÄŠX‘÷™kµ"sE¬ˆ•ªbeHû·¶ÙV_·Xê§ý5ÒkYa国3ømã¸Â¸` (|ñ%ÐÁ‡*jˆ[·€a'çNhôP´=rI‘”(Ö¢eÕ~ßÌ~Ú£‘<š¬Ì]Ï|"gw9<øa×ó›÷ ”³ÃÕ}Y9?¸xäÍÉ«‰AV+b|˜‹ââêËÃß™BÛ:*ÍÁÅÓ''«¹3$gC{…¬¸÷ªX+¸U,7FÄÕd~²:ûÍÌapñ®ñ–ç–¢6n°+uÞWÄÊœBµ²hŒ•Æe#PäxpØXØ€+-+°ã •ZYQ2$|RYXæñd`˜¥ ©dÅÍ탺X+üikÉǾm ã`~5Á¼•ƒåɪ:Vä$\<žØŸÛÊáÈp ضBÜ™-6n¸ÁÊz{^+b…?mí¾ò{Ë4~òOÏâ{²V°ÿ£JVä$ø”°Â+ ±â€|”ðÿ¶ ù+ ±¢+bE¬ˆ±"Vä¯@8âà”Xi©ƒù+ù¬DJKù¬È_™x[Å»*^a±#œL/mIzn¯Nfyü5¦DJKù¬È_­bi ‹ýA]Yoˆà?ëd¬Õx_‘¿b„ ­Paºâ´÷²SÊ,À)RZ*`E9ÈÛ*Ž*,PWvXÁ²*-U°"Åi… ®“•ë™d%TZª`EþŠqV¨°@]ÙaWÈJ¨´TÁŠüØ*ëíɪUXÜQ«®ì²Ò^+nJ¨´ˆ­e(-bE¬ôVZÄŠX‘“0{ÄÊÙ[Úvëç«q²òù]+ßo¿ÁÑÇò‹÷O±r{ˆ•¿®¸Ré×u_¹#ÄÊßO¨†Ÿ¾6tÄÊÞ¡4+´Vp”[}žåÎÝÛŸ·6ô`åŸW`e”T‹Z+8Ê®¾²ÜØð~ƒµÇ~÷•ñ²"Vh­ðÈÛ(ëmã0̯>xEå#ÕWla`}ù'÷6+=¯Œ’±Â­©ÝVzìh9mì•»«¯˜špöì«ç+{²òýÖK1#eE¬0sàµìnqüòÜÒ´ƒ»«¯¸9GF‰½Ù{ÿÿ_ä0~V”ƒ> †ˆ{ ùùÑëNgúHõ•e³læOjŠõøÅJüÓÖ^­tðË‘ùµž ÷º»úŠ›udoE³"V`­Ð_™breû‹¬|¤úÊÙ»LôtU4+b%þi C¿} ²°rwõŒabo³"Vz©*qˆ•ÜðÞòtS(+TU¿ÞZ+Î7=•ÃÊðîGѬX"?{û‡wö”ù®+C½ñбM ×Ûéu²’f¾xVNVþdy:sÃ|Úxkùdå‡ÓLqÓk¼¯ˆ0à pÜø…XÖ"ã±À€)nzu¬ˆ•©Ï-+v°+Ø:÷Ëù0¥NV”ƒ8Æ÷DGOÃûÊçà¯|*¿E¬ÝïãÁþÜÙÜßZ œò9ø+í·ˆŽ;ÏAvê²NÓ ˜‚éƒû+ðUÐ?(.¹bt»á,h3„mˆ˜‘ð[JaEþ |_‰J® > Û aZã¾äg$ü–RX‘¿ÂµB‹[K®@rŒÚ ±ÃPÂo)Šù+,¾—\¹Î˜a›!¿T ¿¥Vä¯xNX|%.¹‚ú,·µÂŒ„ßR +òWÀ НÄ%WPŸ%l3´ÞzdÚ ¿¥V䯀ôŠJ® éÜh3„Ï0#Ûo+E¯3<¹~‹X+9~‹XéòWÄŠX+bE¬ˆ±"VÄŠêÅ=¸¿w„Y48êþÒžJ¬¨þ Wqè$=• XÑÚáþm‡—o­à©xá½9*Ý}å“T~hÜ’@ÂS)œù+–… [l†§âYAy~þÍÍqÙ$<±âsº9d?!oçeîñû+ön(¸Âß+öÚaÅ ˜ÏîöTÄ sz·8sïP~Õèa!‡EÈÊúòÛg“„§R#+q?¦¿›ž¾ñÙ;Û0¿¿âÝXˆq‘°âeë»=±B'•ÏŽÙ†éøë¯,§þÈ>BN'è(¡Ú’¨ÃR%+qO@²’m˜Žß_ñxBvŸƒNgÀÝ‚ÖÏ“uX”ƒà¤‚• ô,'áâ(á©(ÑI+ ôDV°2á©ÈI@NgÞÎ0Lå$Ôà s:YÉ4LÅŠœ„tæ+b%m˜Š±2@ˆ±¢þAbEýƒÊfEýƒZo…; Yl%¹úU+ª¿o…UìÅV2V¿ÄÊžjª ê¯Ð[±M?Pl%cõK¬ì©¦Ú°9ÞÊã ˆ$ÆAÎê—ü•ýÔTÔ_¡·Âû Š­d¬~‰•=ÕTÔ_·ÂŠ*,¶’³ú%e?5Õ†õWñsŠ­d¬~) PSmx'€g¬~‰•jª’•´·"'a5Õä$ÀÊjªí—•E ¬ _SMN‚XéŸóÅŠœ±2þ+P RÁdM¬ˆ±"Và7ÁXá&m,c]<}r‚ ,ɲ,üæc†`¬VÄ Œ•Ý¢–±.Þu©†%Yvʲt_Ã|LÂ,É_É÷SFÄ ×º(ºQSá2–ª-aYæ ®…qàEù+ù~Ê8sŒnÒÆ2YaI–²,Ý×0“0 d•ù+ýÔ±²B™v—±T[X–¥ûæc†p¬Vöà¤úÔ+/Z ‡ËXn 'Ðvœä„²,Ý×0“0„ duù+ýÔ1²?q‹¬ Éø^¢, ¿†ù˜„!X «) à¤æ³‚ ‘xfÕzÐ'eeH'5Ÿ•Ä3k+Ð÷ Äe„ü•!œÔ|V¢gVù+ûceP'5Ÿ•Ä3«XIÅðNêÞXI<³Š•TŒßIíÏ žh“ϬbENžhϬb%;ä$¤µÔÌ®’±2+båþþþ­ëA¿å&m[IüvŠÛƒ@«Åë,°QŠfE¬–ˆ•p“¶?ÃzδáVmÓY`£”ÏŠüÒû+ÔPøß¿ÈAŽ!\·Ã:rüÒ9 ÔPpÖ^hhµ¸ ´QÄJÚ_ñ¹Û”ßcÞÕcÙIéûóWzDÄ 5”ð¾‚#Ì¢’ Õ_•aGËicÜ™ÒÇî¯ð¾Â7i㌿Whµ¸A¬Ü×_²bNÂñËó5Z¾)}üþŠ%b… ÎLÃÀLf©{S ú+Þ?x}øó£×-aJOø+£yúÔ!ÊÊÁâ—#+×2¤ôü•\RöÊüänKNþ‹g"Léø+Yøïù+0ýSwâ1¥§ýí}×zP¾¿"VÄJE¬ÈI+bEþŠX+bE¬äù+Ü•V+b%ß_ÉuWä¯Äé{Çéú0ýYÉ÷W2Ýù+{a%mÀôg%ß_ÉwW´vÈ¢jLë@"ðXðÁΕhÎ Ì‹lÖ„ÓŸ•|%×]‘¿‚ôÍ쎴 ð™÷Xðͯ¸¿B›5mÀôg%ß_ÉwWÔ? @rgL5øÌ1„Ü̸öµV~…6kÚ€éÏJ¾¿’ï®(¡êÊNvgjÀgX›³Á+~¿B›5mÀh=hüþ ï+ÈîÉûJ(«’¾è¾B›5aÀ|6¬¨PXT-þ½‚ÏðÁΕxæE6kÚ€?+òW¸ Ùݧõð9 àš-^ñ/~Y-aÀˆ­¥ ˜X+¬«–7'߀)9 òWÄŠœ¬F'B¬ˆ`73=bEþŠé ÷¶ÌÅŠü骿B3ñá˳ ì¯ mÒÈ_éÉJÿò,Cû+÷¶rä¯|‰^AHí”N"OÅÿà²ÿ—Ú^hx §Bþ zu©Ò ­æ ¹¥üÍ'i/4~Eþ z"H'¡•BV ƒÉñ·Ü_AË»t(µ½‚˜Úo´÷ YY_~ûl’Ñ^Hû‹ª¿‚^ALía«„ïTg´*‰ù+èÔ¥vJ'‘§‚9í… bEþJ×+ˆ©i<öTÖ[+Xù<£½PQ¬ÈIÈ-|q”Ñ^¨VÄJì©,í-£½Pù¬ÈI¿"VFî$ðˆÁ§=z bE^\ÄJtQ¬È_YAZɲ»åúÑ7îØ_€ÓR1+b…ÒJÔ^9¸*òWL¥ÿ)JßVIk ÃVXؤs&ñì¾þJÀJPy嶽ܜßW°¡»f…Ù˜~awâý9¤ùüEý•VÂÊ+á^îõÖ#ÓθµÕ&Vî¯ ¦yœØ<&ñÜEý•VÂÊ+á^n|†ásY± Ý•û+d…i'–ƙċZ¢¢•µ¡»b%f…ùÉžy«pVÒKbK\ªØ_!LËíÑrô­õ ù+`Å‹¨/v…ÿhd±a=+bEþŠX+bE¬ˆ±"' Ób%b…‡ÄJ2ä¯ü…‡ÄJ*ä¯ÀePÿ DÈ_AÇ!õJ‡üsèêí䫨°†š]af瀿bGÕöòƒœ‘·™Ù9 ä¯ÔÛ?– “3ó¶pÆ¿bùªÞþA$gæmfv ù+5÷Šï+afç`!Eýƒœ‘·™Ù9ÈIPÿ TQ žƒ‚ÌŽA¬¨'LÏ+bE¬ˆ9 bEýƒR½ô舕tüwÌ!Vöb…Nü”®Ìê{ú)v_“0fK5¬ˆø)dåjÒù)ºýÚ˜„!0[ŠfEA¥{¸#+ –1˜ƒ(±pàÅBYQÄ9ËW+Ç^Siýj-˜„!0[*aE¬ÐOá}…í±¨µ`†Ðl)œ±‚p™–'ÆÊ9|Z^t &a ÙR+bIÆ‹)¯ýsÐé ¾µLš-¥²¢ÐzB¬(ÄÊøC¬ˆ…XQˆ…XQ¨×YQ¨×€XQ¯}²¢P¯±¢^ýYQ¨×€XQ¯þ¬(Ôk@¬¨×€X‘“ 'A!VbE!V…XQˆ…XQÒk`ÑÐS¼†:Y‘¿"Vé^pV|衯 bñNKP‰ÓXYo¯&U°"%ìd-Âb+dåZp :üërf§ÊAuø+q °Ø `}– røúò TÄJq½è¬Ü,¶‚8ž• #ÁzûêÙ¤Vä¯ÄýÂb+Ôg‰ï+³e-9HþJØÈ a±•Ž•s°t$øëå,ñ($VŠë5@gåF±ê³Üò”µ7D¬¨~¼X+l$VÄŠœ…XQˆ…X©-ÄŠX‘¿"V䯈•Ì¿âÅ•°G,{q+òW¼¸˜)ö â Vä¯Ä=íÝAÔ@H¬È_A“©ÀL¹Ñ+ƒX‘¿ßW¢^AÄŠü•ÀLY±W±"Jðö ZüŸ½{ÙmÛˆÂ<¨ ÞttÑE»ê¦E»+Ðu¢/0¤¬«UÉÎåõËÃŒB’IZü~D޳0$|˜¡N˜3Sø$ž_VDŸ„á#yD™€gÚç”/y~½°Â +9¥“°°"¹¼º#¨\‹°"¨¼aEóRgD0V„aEXV„V„a¥—§IÓ¤ÂʨÞ?+¬+Š +¬°2¯Î·"¬°ÂJtSü³t³jþ 1û;VÃÊSNâUþœmÓlËÊAX)Nb,®½ù¥få«a%ˆDñ¿»údź]ò¶éhXa%šZ-î+©ÊÊñ°’9ÿu»,¦ÍïKVNŠºíþÇÄÊ)ae±ªGc…ÿÄ + +¬L/¢×ɱ®ŒÇа"¬ˆ Xa…VXa…aEXyͰ’ÏÉ´¬°r†8VXaEXé5¬t¯¬°Â +ûï–¬++ë]¾_¦ÞýQ§ýSÎU;[Õ/»T°ÂÊ|›)†Ùª^_ øïÁ³ÿ|Ù¥‚VBÇúvÙüI›÷uJ)fa(¥—]*Xae—s^Õû»›ÏVæ9ß/c–ÒË.¬°r»ŒIYWÖ»h—TÖ•ƒ.¬¸_™}¼)÷+¥7Åæ±%Ó\±ò"¾­êÿïëhSñüðx— VÔmCNg— VXÙ<Ænw— VXQ·V#¬èíðzV†Ê4­¼Áß‘ÿÄߊVXa…Vâó¼.+!„•s +û§Üd›ºÃ +Û“{:³ÂJšå*-Ú奪 ”øa…•ù}< CL竺b–Ž…÷+³œI‰M)›‘XÉ}äT+ö m ™·BâÖEŽlÇb%½~N´ÂÊz÷+IÙu¹ŠÙñ°b]i€¬w«º¹ŠÍ'óŠúÊCûàÙ‡\µ{P«'7“ Y ¬œ‘+´Â +¥þÌ +—¬?³ÂJwý™Vί?³ÒC±r~ý™{Pwý™VºëϬ°Ò]f…•SëϬ°¢nË +¬°Â +¬°ÂʘkÃCuL`åx¬+ÖVXa…VXa…VXa…VXa…V@âUø”YsUö 0ÔÌbxÞ†¶i+Ã?ok*Væ±Ë”Ùç´Vv9zQ<7· Aê+“¶&ªÖ•¸*‰½) MÙŠïAÏH>Õeöâ~%„“ÖŠú +i‘Ûo>e¶yüâ{Ъ.;Tк»¹6+¬¨Û²ÂJõgVX)õç©Xaåüúó¬°Ò[ý™•Òƒ•êϬDþû–äøx¾1=X9·þ<+¬ô^fåt*)åÑY9¿þÌÊå“Gõ>óõgVN§rI,궬°ÂJ~Ya…V.^¸c…•¾Þ¥çm{+ýÖYa…VºêÏS²ÂJïõçÉYa%wPc…VXé©¦È +¬°Ò]~‹Vò42·ÅÙ›´’:rŸñ[·Â +¬°Â +¬°Â +¬°Â +¬°Â +¬ä>rVXI¯VXa…VX¼g)+¬°Â +¬°Â +¬°2|± õ.¯ßÊõõú÷²Â +¬°22åƒü¶áÏ}`…Vþgï\v†(©lø,*,Ê® uÉ·Øy8̓< ý}f&·5m*9ƒX4©T»–rœ•ÛÞT|ŒÀ>NŒ=œ_¹}<diN7(\ñ ó5Sï øÃJ0ž¤.®l‡UÙm'>ü¹+ý—+nsˆ=æW®,®¼ÞåÅݓԕ¶¯"‡ÞsojÃo0J¿ÒGq'—ͦ§&àÊ„›N)5$À¸Š9Û•²ÛuÕ±® Z«Þ¶+»Ï¸½ChÒÞš*W†u—æGWÚCÌêG‹F\¡ó¯ÐJ÷ ¢#‘W|˜’vxëÒ® Z€ÒoÛ•:³I5Vœµ÷sÞŒ1Rn0Jò`z¹G Ï~È"cO)õy˜‚©pű®œ¢E7ðæ]qüÁÞ6ãê;YãòT³3WÜèŠá«ºâAp…î@ \ña3™:WÊnX® šÝ0š?¹¸’T™…+mÏ{Ï©+XdW—]AW<(PWèÒ3î v$l«±ó‹+íÃK<ºB«oM ðŠ+\‚±ä.ö¬ÒLWÂ)“0%3ì ”¯ÑD³¦àÎ.®p}]á'š˜zêJÙóuõ¯RÅí¼ºÐå{P”]„é™aWÊŽ@Ä­FW$ÀZüfïîu†¡0 [´bagb@âÂlBÚ¦ü©×ÏùKf`°“SÁkNåk¤ÇNEޝîÛrß+XÁ V°‚¬`+—ÿ–,‡4‡£ü;V˜W˜W°‚¬`¥‹iÞþ³¬`+œƒ°‚¬`+XÁ V°‚¬`+XÁ V°‚¬`+XÁ V°‚¬`+Xáy[ž·e^a^Á V°‚¬`+XÁJŸŸOKXñMkŸ‹ƒ²ßKXñJkœ‹•ìãðÕÎ÷Û‡imÙ»Ûça^Œ2X±=¹ÓÅRj­x¥-“‹Sp »ÑHœ7ݼ¬gèÇÐi‰ë¤bÝQ²J©µâ•Ö4+]T­#(}2+IóôÛÕ0Ø_Oƒ>h‡JîÕ+wHs;Jÿ;å+žƒ¤ O¢?±¹ÙHÇ«™*ËæRgÅ+Í!·âíB§ß5EԵŭHEb?ޏrA¨©:—J+^iMs±Rš ,Û´ §L@ʙܺsǶRj­x¥5Êõ·Rš¿•rÑgCìQóîdåû/„ü?ôQûr©´â•æ[ae¶Ê}[MÇÍ¿¯WšCî%XÁ V¢“žIÀ V°‚¬O+_ìÚ» Ñ«u ÿ¿¹™âx·¼~”[aªa¥¿í#ê"ÃmÁqÓØ{>uÚ|+±+HÂf%VŠŽ•ÅÞô4Ã`xRG„8qØqæ þ‚»µ)lý¾¶¢ûûØ®·tÚ$Ò‰­¼‘:“%¯­©OŒS‘q9+)Õiñ?å|?TVLH`%]›+`¬Pò»Vh^¬€°B¾•¤°¤g%¾ö7Zª§Ó`%©ö§Î>²X+`¬D+ó;ûVâkÁ Xiº>s£—ÿ·~µ؈Mçwî@WYT,œÌJIĪåäpñYA½â–»•°ØêµocVt4+›¶ÏÄݰV6íS»åW¢·9+úÙ½¿J^yè¨VdÊâ™GûLχzVÕÜÕyÜ+nV†iâgõ=+¢0kÕäf¦…+qµM—»¢’ÌawôwPŸ96ÊJ%#M§?îYiv«¡Ûß·ú®(YhÓ¤WcÅ<ªöofJ¸D¬Ð_aÅÉ È=+l­^:<+zW•â&wx-ÆÐàA+ lš(X‘Ï/æQß23!X‰©µzAH8eEù³BÒj[èzKË#Vœ²bÓD11¯˜G‚ŠÊL`8°_k붨‚òʸش¥}n¡ûjxR½b>” ÊÍ„‡Cm[ë(×—SVúŒÐÂÀ×+Ϊ±…>. lš(Â÷AšÇÌ£àÉ=3áÀJ|í¦•…ÜtÛEIEÅ×ã•aÃQê†CG×GÙ9}jËÑÆd˜ÊŠîÀT•›Gq ‘Õ„†KË á¹-žÛ‚°–y²VÀ XAm VÀJ¿DÅ÷$\QKùý+È+ úbïìz'¢0Ó&@’Ò&*-°E„®VâT€e$®¸^$.øÔ”–Ým….?ŸóÚo{ìŽëtFµÝ˜3j43g&Ky<»ìdu’sÆÊ5“±B*Œ•¥ÉX!ö °¥ÉX 0ÜcEÁðX¡¶A HuWO"\fv„c¥çªXñt×ÿ3+ÆJÏU³‚ ÞÈwª»^NƒlÔÕdÅXar¬pzø„R "žpl£’ceõR+s _y‘Ó]‹bX€Ú+%éV°2x¥-*znÜ_Õ†øò`Pw²l½2wR(è®*œÙ¨6¯4Å ÓͳrRÅ ò¡â’îªSG ê³b¬ n§Ÿf÷%ƒSçÆimo´5NMÑósÓ6„>cwÿXá_ÜÛéo:)‹·¾tn"‘I2ÜþI¶—hgmãp³Y¹<þ V`£¾KÑžbiQ8 ´Q}VŒ•­I2ÛO³Í½ÑðdÂH6wÐ$#©MÙÆZúV¸…ÁéX˜è£HVî ¸âp±;ÝÜékç\#pVœ$èÊ=Hʪ»…Ó0ÕgÅXðËŸì#  –µ N¿FDjø°5)ñ†—¢žK°9ù 8\ŒQÔι6F8H+ÿzÆÊÂ99?àd“²²…³j‰Ô¿y8UVØÆZ+ÜBœJÉgEþŠsmŒ¬+ÆÊöyV0è/6{0I”¶yó ·@öp")cEíœkcdX±õŠ.?xt8Ð.¥+lc­°^áJY9+‹}ĵs®‘ÛÌŠ±’®÷³KžÙ÷òãÍ®nÜø6ȳ5™TXcg=K•ƒ~dvεé׳1¾ÛY1'Á;¦“›I@""ù¬Ø{ÉêHa¬`–àªTÓ X±yÅœcÅX1VŒ•æ’±b¬+ÆŠ±2?|ö÷¯³Âq›fÅ»ñUƒ Ð]V”§ëOg…ã®+ÆJʯ„çÛ®ßMµÞ7_ƒzéà^J&VŽœfá£Õ0n$+0EQLQk$óOhªø’I%³°3·ÞV„ñ©Ž‰³µ£ì1¦½ùqïèlíÙ_‡È¤òûsôÖ,|´Æd¥¨¢Ð:¡BSÅ—L"evf`eY9rHðªÊªË!Î ¾ô$âéËi±‡ÈX‹!³®qãÏAê”K&‘2 ;#Эs(˜|€Í«kè¶H%p>ÒœYðh5ŽÏ ž,¤@SÅ—L"evf`õY< Ko]~âÄÀ,x´úÆg…N ýš*žd+³°3¸’ÃXþ [‚’[7H5«HY+5ŽÏ ’Œ|hªø’I¤ÌÂΨt.1±"x³|ÊÊ¥ëÄÅüEŒYðh5ŒËŠ˜"„ uJô\ASÅ“Lbevf 3÷m1ù7î¯p\»oÛ-VŒcÅœcÅX1VŒc¥æd¾­Í+ñGÜIIYip\c% +±NãžsàGø?äÂ}“­qŒÃÐ}VŒvžíN;ËJ É5>b¤¿’VËü”„AÈ)Œ†Â  SìÃ[ÚaÅX‰ôWÐTê§09…‘ü¼rÁJZÜŒ|xK5+u™¨ÆJ¤¿r¥Ÿ¢Ad…õŠðtÁ HÇ>¼¥š•VMTcÅ÷W®ôS AFP” ADZbÞRÍJ»&ª±âû+Wù)¹ #„!™ÁdÒy-±o©d¥]ÕXñý•*?…ÁâzEàÈ,]0³•º1o `¥q¶‰TŠk+]Ï_AS¿ÌOI4ÈaH•m´þ²ë l-öá-(.c¥¶þäJKí$פ“0x\›“ÐŽ[W2Vf{£XiÌD5V:é$Ä›¨æ$TïKXiÇj IÆŠ±‚UñsÌKù× Ið8üÕVq¬Ìó¿ª{âG‚w£û¬hª›•¬ÎÀ ©VøÊ5Ÿ?Ý?Ò&+ÆÊÇr›fýîùõ7.ÖÏþ==À]ž,ÿ´å¬1ޤÛÄd“îÉZ~0î[ÀnÜ,+ÆÊ§¸góÕÅ{Bpìòg|MäkЖ³¢óGÒmöæÙ JŠƒ!´aå?öÎ.a‚§ðÁè%<е¦Uÿ¨ç·“¬l—¼dIãKÙ—˜a[!ð½o«]ñ®ª; ec¦("<ò´ì®8 T”Dð,)Ķ‘zù£])xS ]À"o»‚Àx ½WDItÌFšaÄ0!l7'&Ò•ºsX ’[ºWÞÁ ‘ß+v¯„I\ V “LéÊ¿+×Å PŒ™b[CX4ý´­T)&î_¯+† aã»RæhWØ”`Ì€A[ÇðÌaИ® ,AT”Æï œl¬¼eÛx²w?½N2QljÜĸ¹ãÂ…1ÆD¾ ׺Ñwàp¹PÛbÿ<¾}çÐÐ&$¨3µ~OªS áÃg¦påV"ÆüZ"Z¹ýŸÛÞ¾¬`+XÁ V°‚¬Üþ< õ`…q…q+XÁ V°‚¬`+XÁ V°‚¬`+X¬`EÁ¸‚¬`+XÁ V°‚¬`+XÁ V°‚¬p¿-VWW°‚¬`+XÁ V°ð)hî"y±4"=Í]$/V‚F¤§ ¹‹åÅJ°ˆô4w±¼X ±ž‚v±¼X ‘Ÿ‚6?/V‚Eì§ ÍÏ‹•Pó)hóób%dÄ~ Úü¼X ±žl ï``+Xឬ`+XÁ ÷Ûr¿-V">­(òÓ{°‚¬¬`%Vð¯Ä V°‚¬`+XÁ V°Â< nÀŠ»¦ÀÊÕä´rƒ£V°‚¬`…{âß§€¬`eµ;Ü2_t™Vä.Ë]¥w‡W²}¡•Û½_Sý>Wñ¸°-ÇY)œóy-Ã@tµ¥I}޾ÈQµaerÞÒep²¢#a–Ö¶" ujð†¬ Õ¦ˆb+b¢ãU¶½ÑBîúfš•ùycZÁŠE¾Nʪ™Ñ<·IÖ²$)ª$¯ÓÕ.³Æ/”k“Õ7Ó¬ÌÏÅ Vrç43›A)2o%³o…í“Ebù´y›Øb–F‹y#Xá;È™±?ÆæYj:6Í4Ú¦\Í$+ó󯵂S¡=Ø¿mA‘שšiVæçk…ë ßýË&›4äè¼Á/üKÍ4+óóF·‚búýÎFùÆÊñõˆþN gŸ©™fe~ÞxV°¢¸øÙ£¬„ΫÀ V°Â= XÁ V°‚î·å~[¬ Æq&oÜÀ V°‚¬\yX!°B`…ÀÊ-+V¬X!°‚+V¬X!°B`åW»vNA ­Àÿ*æ [náþùN´‚Vøõù°»èÑѦÖkIEND®B`‚yard-master/docs/images/overview-class-diagram.png000077500000000000000000000174241265676644000226170ustar00rootroot00000000000000‰PNG  IHDRÁaôô{PLTE²²²ÀÀÀÁÁÁÊÊÊÕÕÕßßßêêêõõõÿÿÿc›d[±IDATx^íÝÍŽë6¶6àe$kö}×Äã êμ'5Ý£® HÃû ™­Y÷ºÛƒ&)/É”‹’)–~ü®H”,Ûñ†¤´ùƒÖÁÛOˆí/(Ü0(La S˜Â¦0…)La S˜Â¦0…)La S˜ÂεÑ%Y>Gö!i| ²Œpþï…Ái3lRØ)sa|*¬€tÂò¥Âpá¾ûV…!¦–ðÒ§r* ^Ѽ”û÷‚ ~Äf…#Â^b* «˜¦‹YŠáð’¤Ï€Y¼ ÝÛUâI•e„áÓ5¸¢³F<Séõ²®°Æ„&„” Â+0¤ ’0Ì…Ñd*Ö]ß.Štr!a ‚PÿP|ÿæx¾ÛlB¢¸n’pLª(‚µÁv¢‰VÌK ˆ¿]a×·h<›…7*‘\“süé|w°a3ø¦W£hd† /HŸá5ü3ºßËÇ`œ6Ë ›†«­°N¼3÷¯Ý˜p' l@.Ô¢° …ƒy*Û§bË‹…ô…NÀF…%m£Ü«®jD8e`´¾H95\8œß†°WT¾éÉþ¯Ë…6*œ$S9±¼°Êm9Œaß«l¢=,ƒšÎÐF²qa tŠLØkº ê5,[ÓÅ!‰B¼=œjº›_¤²{º±ÖZz1 IØ[kÀM)q¿µ&]Ão±{º°Åµ ˆûî›Åt;­5oéäw‘1Õ^Ä›Ÿ}áOî8â¯Ö…„%|¢¨z[âzÇaáüêwǤj„k¾qoÂ0Åc¼h,œóbŸÂ½YØ× °= +ðÅß)»ê³Àþ¦0…)¼~P˜Â¦0…)La S˜Â¦0…)La S˜Â¦0…)Œõâþ~@¸âóW[-~úñ€°T|þÓ ¿¼·~yváScáÓž„)La S8ÿ!š’ژ¶”0…‘sˆ%wˆ LM}ÜFEPXM4lÂ.dZ5˜¨‰‰¦}$…£©X_X®Â¦ËùRQx±R‚Âf7y8òÛ®K –ÃlKh£¶ïé´…*…€Ûï^˜Ï%(La S˜ÂØ`\>nðùGËÃåзB®þü§>7>?½ðkcá×Ý S˜Â¦0…)La 7ïŒ;ù{Ž*,Ó;ãjMìò÷^¸ÜWkúc—¿çY…O‰nê÷PX+žUR˜Â®nú¬/¬¯¤B¸Ü$Ù²°iIXÊ?bÚ“LXL ¿¼oHXF„µ›-ûFX¢0ŠÂjê‚w…E&Ó¥…O[V ‹y5 # ‹˜¤¾W覹W »tBÌD5]¦¢Fø"Õƒ Gb¹Ñ—À3†¹pà‡!$T¯+¡Fá뚌–Ã…MäØÂ¦YFÈyúÂH>‰,Â^A5~Œš]…͹3áHÆÇ6ÜG‘A¦ÐÄÒ½$aÀ©øÂ@O(ëÃÂíÝ®°Á…ÕLÕÅ…¿ÉPX=›už)[Oج$¬N3OXzø[6¸0 õ5cü‚ž°Jª§œV´ÛXü“—ù°" WÇ®Ïj ƒL·$ ˜!mdRÏ&„H?M£p¿-!’Úᤷ% .<ÂjÚ«e¡Û–,g1ž‡ Jc8Ÿ Ë a–ÃA¸_õÊ6…Q®œ¿Éºüs •^S +6(ì™aÊ/Wqá5Ÿü¨¸°šFé°Û®°NüåÛ6í Ëa1Ýð=]Û6ÜiK¨lSXÅ& 6!œW~¸)aoôO¶-çM ³ÞŠðÆÿŽÃÛê)å›ÂÇP¸6S¸y9¼Caâ¥^xâ÷”…a{þë—?þr »kâ7MÇ¿VôªJtþ=cáßSÖ½=Žññ=„üü}ø¦éøOïøïÜãùMGO&:ÿžñHßãR¸§Û°‡š2ò[þó¯{<ßtüd¢›a;¬p9Ĥp²^Xl×ÂÈ=¡fº1aÛ“°Œ «'æÎñ£fZ8¹”p±^ݤ°£ºî\a“âÉzáa“ä7Œ6I¶),ÖW×.‡¿³t²~ǰIòíÛh“ä€Â~uñd½p¹œßœ°C¨'ÄÝ7 La¿:?ÙNXÍt7ãéC ÃXKX¦ Ë„=´—˜i£ˆ1z²°„?Ï \è ÑJXCü¬Â–Küg“¦°•…ÕwÞÏì¦0&ÇåàÂÖ@x–‚¾UÕtet Ÿ Sø•ÂnRÓQ˜ÂV3Ík*†ë޹島‡ç·k]X áüI.…ç¶ksa…´7Ët¸î…g·k]X5Ñ"ìâæv½¥ã Ûb¯w…µ/<’†çíÚYÂîõPkíã{}\¶$ìíZŸŽ$k×ζ áV±¾pÚŒ¶k«…) Ü(\ÕZóûH7IÞ®¥p›{:õ$…›<½”ÆÂ¶Õ„)ŒÉqnÒZ;¾ð_¿ÔÑð¡ïéä^}k’‡…·݌)Œyqq…2…çg }£p¡¦«>7¦ðë×SXᣠ·¶'NÆ®¦p× bzoAa§£pPòÐòQ_-ô΂ÂO(l÷…e@¯…!.l¦qcù‚ÂNÇöp€ë-$‰iÅ!. t¥„ #¶þBâ)}èlLEÒ”•]Øì®0…£”šk 1ðò#ðß[P˜íáqaEØÜ .Ü«¡¦÷v: ;¤/qšåa —(n°CÚ–˜+ïéòÁpÝ‘Xy‰¹r°=œ †S5‚0PZb®ÎéšÚÔ%æÊAál0\PGwVXb®lçƒá¤[§6ì`…%æ AᙡëÝÓáëâþ^OXÖû²øéÇzÂöÂ/ïn§í SØ6"La SXö$LaÖtèOò¤Ú Þ0…Õ…ÕПäÉg §·)Œš8¹ðíÊ»IØ}·&œŒ©'Ó^ë΀Nx›¥DíZô—uòpoçyضYJ4ˆÆÂÿÛDÙ^9l;ö¶„Å]8†A+%(lj-ƒÂ ?¦0Ÿ^M˜Â¦0…±¸ÌÆã¼z®~dÏ$¶¿¿m\ø5Â1’¤³¨¨—ÙpÌÀÃ%½;a£ðMÊP /¬2^J¸pz§t;E¥°V8¨¨k:±)ÂÁ¤ÛY&Láè$…µ'Œ¬¦CìwòÎæ-YDXû¢»`*bƒ¸0ìFØXÑ--vƒ‰ºLETFáÒ}šÛ"Ä—ÞÓ‰L‹ÿÍbÚ FÏù«…Å‹œ^Z&üŠÕ„æ`N*÷=’°aMa… §Ajr8a“…óyÕL'¬²¢°JÚuÚG6Å ›—"¾ƒ³”¨®éxOW¶ç¦0…ùô…8Wöªzyváÿã,ä” ñkçÆ¯?ž\ø?ÿúž…üœ ñkçÆŸö Äc™‘2ÚôõyxýÐ7 · =/#,fÒR˜³ˆ™6¦°Z[a KØìV˜Âœ_B}»Ka S1d«ôn+<šÇ¥NXÖè;¼†pÅmæî„_Þ÷%|~LØÖ>íLø•¦p9(\_ÓÉCú“ì*àpÈd®0…ÕtxhâšÒPXUMM`brhaµ¸ª¯ivw%„»dO#Üý´SÒî­ó±€°Q{aS5Žx|G…)Œ¡p¾ÎGµ°=¡°Š › „óu>FÈ{há/‡{ãM²u>–NË2]Ø bð¶Ò"Ôi7¾ÎÇ’÷tÆM¬~O×nôïšÛ…)\ S˜ÂØP\ø¾mè…Û†žKÂ3æ¦ðøO©_Pß SøÌ¶Dcá×Å{U Âöqt•K5å®Gçq)S¸:¶/Lá©~çô´¥°õ•'vø•imQÛ7›Â/ï…Ïq7·o6…OS…_ Â/ïm…)|z&a9¤0…)¬O…Ø”°šè΄M?6“)²^F ?®ð×F8uƒÜÀHVí­xëNdÂyÖŠ-„¥×¥V‡0ˆ¯zïÚ¬£W_8ÐKک鮄_ÞµÖ\_ÅäF×rX-ºFZ_` <˜²to§†Âb”Uô…µ{Õ\ˆy÷„#¾˜‰¸0…“ ¾QeDX§Éˆ0„¦p°Q5Daqáob™°—ãÂfþÂs ˨0 †Ø‡±ðx[b¼FL¯),éSDÍÙ!¹Þ²ÂÁ ª¥w@¬xÝx[BMeea˜fÂ…åè¾úÉä‘»fçÙ‚0D¡]#^'.G×^ØËáG„§YSXDnfºGa9º¯~WÙÌ“â|_ØëåÂrt+›nC¸Üïá÷·qa`(œ/G·²°aÂå~—qa³L8[Žn]aÃ6„Ë‘ kTua–£[GØd²0fÇ¥µ°¥†~jK”–£ÛÙßÓ•Cß–®GwDás»R¦°ŠMîøMáù¡fZèø]+LaÓBÇïZa  ¿k…)l(tü®fk …Žßó…)œºÃ4¤ ¿ë„‹ÆeÂÙ›ÐôžN,u¾3aØž„Ïû†íJøuwÂjn|OW¦pEM¬¸ Lay¼&Vk/<>NN!Ù[ kÐíBøüÅOwœœ˜ÞzRv(ì@²Žp>NNMB_35¾…‹ãäbÖ_dN¦¯AGáÏÇÉ)¤?õ‚§¥°Ý.…Qˆ—já|œÜ@Õ_¤°Ý Âz¥Rß8_ºä¾pÞ¡[NYÇjá|œœ k/]Xƒna1Ôçºåç¬ãGp>N®F:¾¦ kЭ&ì5´¨ÝÖÇ")XÊ7š¿P+œ“Sˆ…3i‡˜ÖÂtë«ör†¤´ŸôJy៿¯.¬. ÀìæœM'j,¬] wõ±";7UX {ìQ8 eç’°”„õ–…Â&^k¿ÖÁTYøngd { -Þ–ˆ~ŽÂ«ÝÓy¸ˆîV˜ÂF yT˜ÂV¾A¡0…)ŒEãLaOÆÉU¬A·‹š®½paœ\Ýt^;(ìAa cNœç Sø¯_æÔÄó…)üñpM\¦pETS¸å]zïÂÝ{ˆâ:,%¤õ¶DàGºØÛs…‡¥>±l$öÎ…mé˜/ K ¸pH×ÔtV/õ½”pa³ a ÉA©/v;›€V SXaƒR_Ò¡t;HA˜Â{¼§£pûy~(låy~òžÖÎE‰f?À“¢›þ(.ð´ª°¹°d ›.ÇZÂbb"YwÏ&inAƒA¦im ™OK8G˜Âj½§kš}^ ‰Â¸¾,&k Ëž„UµƒŒ‰v0[”iLFa{X˜Â >¦pÚ8ø]a™  Ç?W=/hûå°™T––`¦7ÝÜ‚0…õ…}ZÂzaLŒó®…+®«þ÷?*f 8š°ZáÉs \ž@ØWÄÞ…)La©š‚ç_P³=(üñ}ù¸Ì59¢pû`¦0…ç…)La S˜5…)La S˜Â(ÄK0…§MfRž4™IEP¸}Pxý ð1k: S˜Â¦0…)ÌÖ…)Œ ÅùxÂU}¸ôý:žð‚}¸~^¢ï×ñ„·Ö'—¦pƒ 0…)Ü6(La o5(ÌšŽÂ¦0…)Œ Æù Æ÷žŒÞ¿ðÇ÷íÅå ÂŽ#S˜Ân/Aa S˜Â¦0…ù\¢nzy>[«Ÿ~P¸m¼¼S¸mœ(<'dƒÂ¦0…)La «Š)LÕ Søºž¥„-653I;mIa…¨Ä€ÂNY7$¬‰0Ëauê5Û’J …-,Lá Q S˜÷t¦0ŸÀS˜ÂØh\˜‡Û†¾Q¸my©çÆÂ~¥0…)¼^P˜ÂkÆ\/ Ïëï;˜Â2§¿¯¶”¥ðË»JËâ™Â§ob-…) ±¶Â~76¾©– p…"…»•ËárPXG~‡˜æÂïú81…!&&ª‹iÍ:ŸÞnSøÚoMÔ$¤ý8%‚°áA5–äiÔä¦cqžILaß „€ï‹áÂüd ë­ptÌ:áš °¦]DÍ:W ³=Œ®#qL‹YÖ±¸©0ïé/La S˜Â¦0€ii,Ì<¼Ka S˜Â¬é(Ì^U/³…)\X2â4<üõÇ#^þ˜¼BðŸÏ­é(\%Ea S˜ÂFa s\3…›…מeÿøÂ²ÎйŸ~P¸mkíå½­0…OG¦0…)l SXv"Lá<(¬ª¦&0iÄLaQSƒI&¼ 8…½Ÿ»Zca ï¶µFa Ã`bÒH˜Â5µ¦pAfAa «µ¦0ïé(̧—«S˜ÂØX\˜‡ÛöùÑ·ÆÂ>?°F)ýjá×çv&Ù­0…)¬qÓ:(Ü,(lþ´ «‰¶'¥p»šŽÂ&"»¦0…ÖV˜Âº0…ç,ÞÙb”Ìñ…eÆâÒj” …ÏUÂåQ2~]Lø´ua SX¾\˜ÂÖÄ®QøDX¦pÂUK[i La1Q5½.2# ‹‰p8›v&&3„),š„Óè™.áÂéÂîE™.Ìr8qŠ(`‰Ü,œV3øô‚ÂÌ…ãeAÞ¸‚°b†0…M†Â¾ì‰Ù°çì™ÂVÑ`…ÑC-‡ÃÕ2Ý€5ЍJ6¨‰um mKˆÜ`ª ïétÂ=_6_˜Â2EX!.}a>— 0…)Ì'ðFøPxµê»GÉP¸ò0Œž' SXq] œòE÷)Œ)q~T˜ÂãËÊàæø÷·LxÚè /+ó ·g.™ðľó EF¹¨0…ñ¸ðÄB‚Âh)La  GÍ„«ûÎS¸k²¸0…áÂwòðÜA嫞OIXuLXf*âUO%¬.ìQ. *âUÏ', Ÿ& ŸžKؾB˜ÂFá¯h«I#a g$™0po"ÑÎFz·cžZØ&«™|&l¹°™¿Â6E¢°°QK h° /¸p>–Á&&O)¬“„˜÷Œ‰TJhðtá|,Cä¶ç›Z'Xï´íÂcåpw‰<¹°•…#¢B|ØAJt¸¡p>–!SøÓšNÂ&êÅ„ ”Y6-SXï—™p6–¥D±QQX4K ( bÃ@x8–Ø– p‹{:mxOGáü˜Â|.Aa S¸çZþ÷™5ÂÎç\Ëÿ>³N˜ÂåXVX žÖ#¶N˜Âå±m…)üòÞV˜Â§ S˜Â¶²0…)\žëg a «™´¦py®ŸºšŽÂå¹~*„)\žë§N˜Â…¹~ª…)\šëgia kƒR‚ÂŹ~ØZã=…)La>½¤0…)Láõ‚¦0[kf¯ª—*a ç=b‘õˆ­¦ðGažŸ?+{R¸<ÏÏ¢ÂFsa £¥0…µ½0…! …) n6R†Âh'Laý a G¸ÓVÂ,‡Õ4Š/_ÓQØ\ØÔZ³=ìÂ"‹ SX\xùö0…­½0…­©0…Õ…Û´‡)Üi@Læ#S˜3xP˜Â¬é(Lám…)La ³µÆùÖZ s¾µ¶ÂÞyïVŽ2 0…)La û:2} \ 3‹e¶°0…!&–æ[‹yXaXlF; «© ¦Y‹i[T˜ÂU¯Â¶¬0…!¸°"¸¿™/ÌR®ÂÖ¨”`9lËa¶%L @,%d¿Â›Oa S˜Â¦0…)La S˜Â¦0ç[£pyâ:a —W ®¦pEP˜Â^'(La S˜Â¦0…)La4Œ3…ýiO‹øýÂþ´§I\(Ü:(¼xP˜Â¦0…±±8K¸¢}Û¬M|8áïÛŠËÁ„7¦0…¿((La S˜Â¦06çÃûóÆîœ#üñ}›q9€ðƃ¦0…)La o3(La S˜Â¦0…)La ·Æÿ⛫•qT)IEND®B`‚yard-master/docs/images/parser-class-diagram.png000077500000000000000000000260271265676644000222440ustar00rootroot00000000000000‰PNG  IHDR­%n:˜êPLTEÿÿÿe›9޶µÿÚ¶Ž9999Ú¶fµ¶f8yy9¶ÚŽfŽŽ›fÚŽ9ÿÿÚŽÚÿf¶ÿ9ŽÚ¶fÿ¶ff¶ÿÚŽÚÿÿf99ŽŽ9ÿÿ¶¶ÿÿŽ99ff99Žffff9Ž9ff99fÀÀÀf9Ùÿ¶9ŽŽŽ9f9f9f¶ŽÚ¶99‚f¶f9f99µÿ¶ÙÚŽŽŽfµÚŽ8eVºŽ99fŽ99fff8yyff9Ù¶Ù¶f99ŽfÚÿÚŽ¶Ž¶ÿ¶ŽŽ¶ŽŽ9e‚9ffÙÿÚ¶ffºŽ9lfÕ*èIDATx^ì݇z£¸Æqn@t×’>½lï{zo÷;G/‘Yâñ®‘üßg2ÎÎìo_Db=ɉBˆ‰è Ç‚VBÐJÐúêÕ+´´®&vYÙßÖ/ò$™Þ›ùF/ Ðj9¨V‚Öégy2}¹I’úºLšWIºœù¦õ¸ºvyH+!¦éW+ë4»øx3“VkS/®Ûv5[¾“µ¿ÿüz¾©™{Òvá[N­• uýâoW3³*º}kèM]»ï†mƒ·|[$ëËM’N¬öÒ-\Ë©µ´&©qÐÒ2©'º>]ÎÄ6»Ö­ËXÇÔn•d·PËéµ´ê,o5Î=ºza>Ô·úTÚÍ ^X©wÆØåù´´NÝÕ@Uø×é|#žõrÖÑjmáªÖo__ú—çÓJКßDýì$é ´KwùjNªÿªJ·8›V‚Öì]sâÿÁ£›Þ–÷ªaLÀ'5æýë¯V÷c‹œ¾•p/kT!h%­­h%h%ÄŒ!„Œ¦ÔŸg«• •´¢¡&´´‚V‚Öç‚VBÐJÐJZ A+A+!h%­­„ •´´šñ„Çt¡•yâA+A+Z Z™tƒ • ­­hE+Z ZÑJЊÖ'vç­ñ‡‘æ'ª­hE+ZÑZ›r{uú!i³§YO‘-ŸV´ÊÞÙµVEXôµ®ï&=jN½Ëf!­¶%]ä'ÑŠV´f+cŠv‘úž±6ÿ¾µ ¿V¸ Ë7w¾]ä~kÓ–¾ùÆ8É©[­µÞ¨}=öøÑµ¢µö½{³¾ÓoÔZõ™o´p~Mªù¦6ËYj G¯Zä¶µÛÃV»î@º…‡»œi!­níªw° ·öˆZѪ¾![íý{ÕÙ±Zä#ת³¶ú׺ÈkS6Oˆõ­“­­Åö‚[Õ"\·jW½ƒ}wmd­hÕÒø¿áÒw&þ4èÏíu,¥ÎxÍÛ§=5¬ouºªÆcÓƒºÖ{­ÚšJëξÕb×®z‡ÔÈð£iE«NŒ¥út‘K«? êü§“Z«ÕŸñ´G8íµM£»nMº(½;Kó^k»5hM¸nõ[´«ÞÁ­í Zé\Í|ã¤:|µ 4u&ÓI­½Ðï¾ëéì1¾1oÓõ­Ë™þ±Ö[ZµÕ®;•»Ç,víªwp­{Å¢õ¤V_ڜ췵êü§“Zó)«ðB+iížöF¢µßÏ^›¢¨›óweæ_9­ÚêÏûß¼yx¼uÒîªwøUŸ]ÑzPjS|ºoÕiP«÷ž»§½Sj¥N­ÒæNo'náÏw²¨óŸNj²¸}rLº§½“kE+}keÂ'·6ÿ´êü§“šo §N¿Ú=í¡­ÜËBëpA+ZÑŠV´¢­hE+ZÑ: •¾uÜËB+uhEëh‚V´¢­hE+ZÑŠV´VEv‘g+ó{ÝÊÚQµ:¸V´¢U÷PCÅßΪÕƒVê4>êòÝ÷fñƒï[wW­´¢U(ÓÒ‰ô¿TµcߊVê[ÕªZwT­F£­\ ,¿nµî¯Z¿Ö1­áCVè[wT­F •¾•1éÕÌþ ZwW­´¢5|È ZwW­´¢uo¤5äÉjÕÝ‘0ÒÎ2M´ÒIZþáÎËþètÙµväZûU«OV«.Ü•hoe'§ýéÝyÙ—´Œ«o@+uûÆD®þbLaU}ugæßZ[~Bõ­•1f¢;'þDÓ"ä¥ÿò3…ø+)µû؆î}#½vñ1em¿ônúoC+Z?uwäÖ¾ìŒ<߯ø>XwN¦0EˆŽÑÜ!–áZš=}zw^ôôþÙʵL’°Ý]œ ­ûîŽh¡oZ+~¿vB«™{©í®UZµS‡üB«Ze[Ç»îËnÔöî¥Z{áJ ¯U‚hÅÕÛ/jŠNŸÑ¶öKÚ=¡U­Òª÷ßÒªíhEëþ»#"laÝy’pÔ!;úV½{W«Z¥Uï¿¥UÛѺog€i\‡ÔÚ¿;ÒתÉ>š•ÆOUŠèö!ºMç^k¶ò›ö_hí^åêý·´j;×­ûFp˜Æup­ý»#Zd+7&&ñÃzDø"LÆÜ®oU$Üì¦éßy‘V½Ъ£Ø{Ýöf¸i\ã¯8|¼õ¿=vŒ·_ßÓ4®ñk§ýÉþqô?´öGpâÆµ¯•:®âžÆ­h #8±NãŠV´öGp"ŸÆ­h #8±OãŠV´0k´õ­±kEëÓ¸Æ[ßIÐJÀñwG ZG˜£´w­„¾õл#h h=ðîZZ¹;2@ЊÖÃu€ õÀ»#hã9¯{‡nƯõøñæ(´¢5ö¡›`­Ô·Æ;tÓ·G}kÜC7ÁZÑûÐ ZÑûÐ ZÑùÐ ZÑ:àÐMüó·>T쪭hEkõ­]­1­Ô ôŸn7ß4•¬þ1¢ËYgªÕkE+ó·ª"Àjµ/ºS­v'pEë™îÖÊü­*ÅÊ.~,;“~ô'pEë©c\>©•ù[uðöf¶=éGW´ž8FÙ¥•ù[Cßš§e»Ù1íOàŠÖÓ[UÖª¡-žV}k÷ºÕÉ “~ô'pEë9¬*Çi}šõ­ÙjkLÀ “~ô'p}vZ‡ÌAõ­¾Ñ5}kwù¶}^ßëý—9u<‹ðD}ë!õ­jÔ.~QÞW,ЊÖÓx=¨¾UÝ Ï5ì£ÃÑŠÖÇæz`}«ûZí¸ZÑz¯‡×·ª‘¾­ç‰9¢¾U}­\·¢5¾úV5êÙx}k·žÕLÒù¶ÖîvÝHQ㨴¢U÷Z¸¾5éÔ³&©1o/;ZÃvÝH ±heþÖ0<ã×?·»\½Ñ!¡Vÿ³»G¨YÏ„ÿ—{µ=L¤’Y ÓNZ¿Õµ„Þ±.“ºÔ!ÚAyp@G»¬/ÿî‹»ÃDú>á@µ£­Íߪ–r}3û"×!ÝØtÚ]RS:•á-µÖ=PíhEë¡ó·vµfof:¤[ûà€ŽvqÕ]^eg˜Hß'x6­# ZU}kWk’^—í!òþɾU»T×þŒß&Ò÷9sߪ¼:EŒý¦§ cûë[·øhÒî6öh[®þz‘‡¤Rß'´§­Ô·nóqc6Ù»ÑÛ”û:~—lUXŒÿ±Gw†‰ô}Âc×jô]cÑJ}ëôƒMÀùbô5HÐÚ¯qM¹´ö6î8âùh5"K¨@+ZÑú˜X—+A+ZÑŠÖã'Å#h¥xÒZ5ä©WCÿè6ZѺ/1jE+u¾Uu§š‹ÕÓl­ýB>¾ ­‡­·E[†ª9­¬ÖPzÚ«r=º ­‡†úV/Ru§š/°SzÚ¯r=¾ ö •¾UZUwª¹X;¥§½*×ã bÑzLЪ×ê[{¥§2­]‹VrX \Õö3v”ž>ZA,Z ZU©ª¹XCéiÖ)I}¼‚X´’ã{áíg¨‚X´sÀ\¬¡fõÄ¢•P'£V‚V´¢­hE+Z ZÑÊxkx¸É±5h h)hU¨5¬Nk¶ê?Ч2ÆLTš:XЊÖîüUVkõУxcµ´RßÚ™0»øÑ6ôÅ“¤eÛ:¨V´Ò·z’º x{3KÖýGñ\Ý·¬­h }kž–ýGñØfÙ&hE«Ò½nu`µ´¦e˜ˆuP­hEk¶Úp@U¥ÚjýêÎØ”MëA+ZãZ Z´¢­­hE+ZÑŠV´´¢­Uu­ ZCЪ)¢Z©Ð.Ë7{fe8hE«O=IÒr߬¬1hE+õ­ŽjUì•5"­håJ`Ϭ¬ÃkE+Zõ!kשּׁ1hE+õ­W3ûkשּׁƒkE+Zõ!kÿ¬¬C­híÏÊoЊV´¢•:´´¢­hE+ZÑJЊVê[cŸÆ­!Ô·F>+ZC¨jùîû¸§qEkõ­±OãŠÖê[£ŸÆ­!Ô·~÷4®h ¡¾5’i\ã×j>™³h¥¾5–i\ã×:xßJ}k|Ó¸¢•P'€V´¢­hE+1#ÌsÖJ^-hE+ZÑŠV´‚V‚V´´‚V‚V´´‚V‚V´´‚ÖÃBÐzHÈ:ÐOø/E+ЊV´´¢­@+ZÑú|ƒV´¢hE+ZÑŠV´¢hE+ZÑŠ´¢hE«9&h=oÐzô±hE+ZÑŠV´>àUj´>´¢­hÞ›­@WZc Z_:¨ér†Öq­z ¤_©®)œÙéZ# }ë½Vÿ².“ºDkŒáºu9KýZß̾ÈÑ_è[ëEžÜkuH«"»øx3Ck|Ak’Î7Û}k¶*’ôºLÐaК­&ÉúEîÕV“îg9Zã c·e’óöÒ ¸ ƒìÝ­# uÓ ZÇ´¦‹­±­Ô  ­hE+ZÑŠÖ§BßÊ|£É³ÕŠV´¢­hE+Z%­h:hE+ZÑŠV´¢­hE+Zãzæ.ZÑO‰Ö'´¢­hE+ZC¿V´¢­h­Œ1E²¾36eÄZÑŠÖlµœ%é"_ßM,ÜE¯V´¢µ6…_z­úÁ~SÚÕ?ß.r÷ºpÍf‘«i8­hEk*€­V7KJ5߬ïæ·êº[·PÓ}+ZÑZ‰`¸¨YäÂ;ßtm ׇVžìEßjl /´’V×Ì7©q)#ÒÊÓg¸n•^] ˆfj ŽC+ZçyÿR}kmJ§ÙöRÓ@ZÑŠVqÕxëä~õÚáJ lÅøúVæé N­hEkü3Í¢­h=AЊVôÍ7~ñþËÜ?“¦ðk‹\ùŠF+ZÑZ•I:ñ‹z‘¯_änƒ{®G½ü“m*Ç¡•ŸËzZÏõåÆþJ²‹Ü6¸µf›ò…VúÖ8´ê–ß"Ÿ^Í­•»ÙçÖ’DùŠF+ZÑzÙ.œÖõ]á6h›ò‘V´rÝZ/gºnÕ£½²•Gk_¡­ñ<‘vÒ|üOÜâ§‹Ü¿]¨1{·‰R+Z©PoÛ}ÈWdZÑŠVUS,ò^í%ZÑJÀH‚V´¢­hE+?—EÐÊL³£ ZÑmЊV´¢­gu€V´´¢­hE+ZÑŠV´¢­ÿgï v†a0\×t$m:hÇeâ€8pCBBˆÓÞÿ˜¿«GrÈiª2ï¹Vdÿé>Yî¡58¨ø½¬ËOöªA©YÓ¯þÚº’J¹~¥ë¯Õ—¦UiUZ•V¥UiUZU©Y볕Һ~¥J«Ò:„³9^=LñõywJ¥‚³wÞàf~ÁÌ’èÎä\ã¶T©Òê0!Ã&{\©R#2o&|}_äËÿ¤¦tŸttáöçý¾X©ÒJŒÚÞð¤Þ‚q4’n·w¥3¾*U*iÅ{¸ã–D3fã¥Eª!ö¼.µ•ÕÄ ¢ÙhÜL¾‰ú¾gݧƒ%J•VªJ3ü‡Ø–,[6ã«Z¥Fôu Ø B‡'ž!Œ¿(ÅK'5ä@ç=C 3=Xæñ`ZµoµÍ‰Ç|ò-,šñU¯R#S3K¾ £Nè@{N+ÔÀ††MÂÛòθ (þ§Tk+•…¾q›Éw¾lÆW½J¥‚ˆŠ,h…'K+Ô$µ5¶2^Њ|°T©v½ñ²bʼnHŸ®lÆW½J¥”g™­ðdi…8зòf³`Ì RðÁR¥Jëfâön·GÆÏÇ¥hÆW­J¡QB&@`A+C¨­ÔÖ¥´¢­hE+ZÈû׊V´¢ÕÑŠV´š¹? hE+ZT³;׊V´Ú=kE+ZÍŽ§éhE+ŸdàurÐJmE+Ï­¥¡­ôè`Ý"h¥ßŠVö²ÐŠVΠ­hE+ZÑŠV´¢•sYœË¢¶R[©­hE+ZÑŠV´¢­hE+ZÑŠV´¢­hE+ZÑŠV´¢­hE+ZÑŠV´¢­hE+ZÑŠV´¢­hE+ZÑŠV´¢­œËâ\粦ÿöS)º4sÝéôÌö›zDnBÞ§V´¢­eh€õ,W´^ݾ-v§éÇ”IÐzql+´šZ‡A+ZÑj“\¡Õú 5­hE«M‚…V‹A+µõÆ¡¶¢­h¥'@O€Ý´N ZÙËb/ ­/Æ„ ­S¸~‡V´¢­W5…ÖSChE+ZÑŠV´¢­hE+ZÑŠV´¢­hE+ZÑŠV´¢­hE+ZÑŠV´¢­hµ{Ê…Zm©,­­ ~ª¬%[ÑŠV´¢­hEëùÚpÏZeàÝkE+ZÑŠÖUmJµ÷Ó²-ÆŸvl-ïWÊϧʶڣõ¦AkTx^ëë O8{þ²FëLAkÙÚúӺÑk˜}k­ÖÖÌÌòUÝcr?øPïÄø¹}øG—µÞY¬êjÿøT õªA«Dfk§µlsöДmõo}h¢Ö€¹[M³Cjrž·Ò_Ê/ký nQÈÑzÍ 5S)Õuág=Îc­Î° w…8•R.Ʊ›ôKñÛµÚIX+ZŬl»r™™RŒ´º¿úú¨¶úïø»V¹vUxUï6nöF­óˆH_+µµúÑŠ¾j޵ºd–‡…øÜêGƺH¿ »×¿ ´^7h-Û„Ÿz‰³¨uk…^N{ëâ'Ý󄻤©­ãÖdù¹[ޏ(#‹õôwkfy¬­æRôO…#jG÷·ªÝTà£VUÝ_-w“j§Ze­g2nMª•®á3»Ö™"º‰jEklMZ—_ÛO;iõõM_9ü}hü,q­™Šp¢ZÑ[“±ué†üÜ8­±ç©–eh¥­UIU+Zck2¶.7+S_^5ÓÐó\J+ZÑ[“±u)¡å/½V7w/"zžKiE+Zck2¶.}[óÓ µõ†=…’’V´ÆÖdl]†–‘Ú›'Ï­šQ[—ÒŠÖØš´.ÿl ·>ê øž'ZÑÊ^ÖMƒV´¢5|»‰G4<—ñ{Ð:OÐZ¶Å*þ¼­¢áÛ¶ÓÐ:[Ðê®þèB8› ¡ÜßÚ·Öªjú >„÷̬­h}|²"Ëp6!´T4Üv„wŽ>Ä už U5óÐHk8›ÐoV~šQÓáчŴ¢•ž@æ‰ú³ A«)Å@kXA+Z'eÂç"†„•°á×]Zà ZѺàýecGThý0lú ´†´¢uÉûÛü¿ÿ÷ƒ?› aã»°­ÇGº÷ ­ ÞZ¯´¢­hEë­h¥¶^´¢­hE+ZѺÉW?­Ëßš×¶bª¯ýɬM®¹.ßזϪçj´*ÿ±wvËmG†“*ç $2¤d%&ú±åØ’9‰ç"J*‰ßÿ}ÜÓ<¬Áx¸Õà³;‚¾.p»Ë •ê«ævŸ3=†êçO¶Ã´šöâÏNÌ1´±ÓÓt0Íe2ZÉ­Ðj„îŒñÿî¯Ëߘ˜rõêÉ͆á^·Û‚V;^\]ž>þw:¬¦¦Z¡U8žl‹ç&nÒвó$þ™pýû_æV#üógï¿ÜÚy2Z¡ZÏó¤ ÿ«nDˆ—oÌu±öwƒ?®Ï¢õZ»¨Øƒ‹¯ŒS;ÌE+´ò&`•Ôóíéã?=»4L‰>Sòá*çÖs¿8YŸ¬-àÓÓ ­Ðª"+é”Ѫ[E•åÓ°ÒÅ›•­È´´Îг@°ÊÉ>N¤-òEçöGÿlã§Lë©oØóö*½ü°Vr+´ªÈò‘,§_n-·þS=?eZÝ|éÈ.Îì05­Ð ­õÐ+¯ª~k³Ò ­ÐªÝ¤jZ«µí*Π5G¤Ú…ŸC¹pàÿZ›´ªN­iåBã¼ ­Ð ­‘>¸uM0ÑêC›ýââê_K7[,ï ›Ñ ­Ðéƒê­­öÅBM¿uaЮ&Ë­Ð ­¡>hHZ)pú8mp(Ðnû#U¥\ØŒVh…Ö@42õðų˅BѪIm¥\¸­ø[T„fWhÍEV‘[W–nõø–V 0Y.Ü‹Vü­{Й]¡µÖó{«}t!Zí[-îE+®ùZÝoeެ^ªœUëß³+´Öú`î $ ] t2äº'p½Ù‡Vü­òµZ!à$^¯‹ ÖB³+ZV)îC+þVùZű!YV°vjbve]V)î§eñ&`l:tþ÷Éi-*Xûf׆´*^Œ GnttèÀß*_kJ±bS8gZ³ëT´B+þVùZesM§²‚µO`ví•ÖeŠ£¢«|­iÊøë—kG²¨`S}˜]›Ó:~ºõa,õF+Z–tÀ¸z­£oZU,5¢u٭Л]?NZ—KûÜGŒ%˜A×k¯´âh±ËEZ—B6ÐGÐZ;³ u|@«(Õ·»õÁËíêVÎúKÚuÈ~v¿.*ÁpÈõzü´Bë2ǯKk‰¿±YëƒFí:É€² MwÞ™ßõɯZ­™~÷í*îz¼ZÖ"ê·J\=;i­Ãa×+´fé5e#Q‰À«ÙW^ŸÊïzsò§þKsàwí„ÖEX[hY±ëU<âouxQ°Ž ô-«ùdxÛP)$Ÿ|˜ëŒ¹Z¡µÖõcD¡s­¬óÒ ­¼ ¼Y‰ÖB"ôa®ñÜVh®_­(ýÑU€ƒÍ«Ðª"+hhÖ¹Õ‡¹s[¡5ÞÄŽ£Í«ÐZ냎£} ‰ð·¾às[¡µÞäáß<·ª| Ì«3Òºœ"ÆÐZëƒgOÝT÷ü^<·Z‡÷±O^…˜W'¦µejÙjn+´Öõk¦U«0G˜W¡µÑÜÖšLü­¢U«0ó*´ÎçÀßšs«îæÕc¦U tK+þVÑšË×À¼:­ÐŠ¿5Ó*këó*´6 hm0¬Z´6Ö ­Ò¥ äek…Ö¶­Y,b”­Z´uó€›Z#œVh…ÖXÔ€›J#$·BkÎl’‰ –Æ´ÆúàbP#„Vrë¹j—ihõÁÅF8’Væ·F»^;£Us‘ÜߔκúÿõrÓ–ÖZ\ i„#ie~k±ëµ3Z}wÅ“‡+£5MHthØKägïmìdZ‡õÁ!p$­ÌoÕ^"ÚcD³Yll«6Õ\¯ýÑj¤.Õß<ÚøUº-hÛÒZ냃á(Zñ·j/‘rVsJJÚ˜$r½öI«å×TО'7%P;Z›ÙZ¡µ®_5«5/ Rfš¡ëµãÜúÙ§Ë_YÌOklkiåM@Uˆ/Î,hõuš‘ëµ?Z LoŸé”¯>lŸþVÍjÌ­±ëµãž€ýx7tÝ0·Nâ«öQåjÀŽN«6& \¯SÒŠ‹ù­g»=T”|![†×²‘ëµZ¡-+v½öD+´Bkìz=fZ¡Ÿ´B+´B+´B+´B+´B+´B+þÖÃm°Ñ ­ø[·ÁND+´âoUøý‹kÞóŠÎ×oGØ`ûœßz ´âoUØ}÷+:Ý–Ù`É­ÓÑŠ¿ÕÃï‰ør[íÐ;­ÐŠ¿5Ó*Ì-×WedƒŒVhÅߪÐ2#w–¹5²Á6 U å{….ƒ‘SGN+þÖŒ‚ÿ|}˵Þ[Ãá¯ãi:5­ÑX”ã§«Pð_yýr½³¢óûÇ¡ v$­ñ>j7ÿn?x¥÷¿t90r ZѲÄplƒ=œÖº£!½#aÏþódû±çVhU•ïÙ³ò·êvlƒ=œÖº£a‘GMYÖߨe4rŠuYqàhó&°;jÊ^§ÓeÙ™hI«âEëø i…Ö\d펚:{ê– h% µîh¨Ž’wõÞ;ÆegZghÍE–)KÃTü“]#§BZûþi…Ö¶#§ú§«d©#¢µ9u$´âo­Qeí@'­ñþ#û»Y¡µm@k¼ÿÈþnVhmÐï?²¿›Zg ÞDã=ݬÐÚ> 5Þ$v³ŽˆVþÖ R vZí˜Vh÷ÙßÍ:"šù[ã¬YýÓŠ¿µ¤õ^nÖ^\-ÃM`§Õã§-k´–ÐÎß:ÜÔÐM?cn…ÖØÍ:.Úø[£¦†:ö ²½BkûÀß:ÜÔÐM­ç-m¯ÝÓ ­ůåo šun•íZ§ü­AS#ØiZ' ü­ASC7ëžÀõZ§ h=|_šVæ·*I¹ïªZã¦F`{ýie~«huµõëþÖî‚©m®KݤSÑz®n$´öø[5¦õ•l¬þQâ…Ö«]cÑš”õ +]ú ü­Þµ”U´zÂ…Öþ«réî*Ý ¢«T€ƒ ®ýÓŠ¿UcZßÉÆÚ`¹vk«h=ÜàÚ?­ø[¥þÈÆ*Z ã~h;Ïÿ‘:jløRÝWh=<Ð²âŽÆŸ¯o{kCšÀàJnmÐw4äÍú\¡µA@kÐÑÈ´æõ¹# ®ÐÚ6˜ßZæÖÜØØÇà ­Z㎆0ÕúÜWhmÐZw4enlŒ0¸Bkƒ€Ö×i…ÖX Êꀴ׾hm`pí˜VhÕ .hÅ'­±¤Üj·LØrMÈU iBsÓ:AtC+´ÆjP¢U%ôr4!Í>‘&Dní!ð·æ6º¤ƒ8ÝÓì=†ÖkI«syæ´jö ´öø[ƒÜ*´¡µ·Àß*ZõÞê´J‚ÖŽk‘[`iBzJnÝ3 - Z¡Z¡Z¡Z¡Z¡Z¡Z¡Z¡Zñ·Ö!1KrAí]Cë ¿u˜Ö)(ï ­só[K« ®Ï¿µ»&Ê–O5ÞZg ü­—òìÌ6Yî¼ O•—¡u¦Àߪ÷yý}ñÞZ>ÕxWh1ð·Z¾L§ÂàªOñTï´Ð:uào•[íÀº¬Ùë¶ð±¼·êé,ê€âEóèŸVü­ªúÅc6¸ž>òž@ñÔA‡Öæ­ Z¡Z hmÐ ­ÐJ@+´B+´B+´B+¿ÕØ i* UM÷zû™½sYa¢h`Ì«&1Ï‚y}@ d×ÿÿ§‚LA°‚«"Ì\ܹ=ˆ‹Ã½?i ‡¤ßŠ<úhý¿?²†…CÑj9NP×Ò›®Ö'¶Úo«³ç­’~+"©3s!¤ó°œW!£¡•CÕo5ç»(åЊv6¹Fäæqú­Öλ•úhÅ&×{wûGP|Á/¾ÍNv³of»›ÐT ¡"¢©R‘jüÿÿï}ÚÙEf œ'ò;Ì&7—~<ÜNÂá¹leë¸}k(Y¨]à€­!9[Ù:^ßÚ+YM=ck4®leëh}k¯dÜé[ÛÖò埶FËV¶ê[q“[Ùêl[ÙÊV¶²•­l[ÙÊÖÿYßz. žÞšÁVè[{ÎNoÅV¨Z~éÎÊ82MT¬CkLoe+[Gè[#_-A`•3×3kœÊleë8}ký„ÇѸž \czë8¶Bß:é›–h\Ï®1½u[¡o guë`à»cÙ }kXYÕÆõCëX¶BßÚ}¦MÙka8p­Ž÷°•­:°5AàÊV¶:[SÀV¶‚­le+[ÙÊV¶BßZž'b+ô­Oçl…ªå¯÷· ·û‡¦™/ʧü›?#nId+ô­moëvY¬å¡q¹Z/6»\¶BßÚÛZVõ§:ǵYu™ÖVxèm-Ϥ¨œËVè[Û[ó­Ð·¶ûÎÍéæôM`-k"[¡o­~N›æþúôlý5Ýß ¨nmæ²l6Wk¶²U'ÀV¶²le+[ÙÊV¶²úÖ˜5˜ÑVè[Ë×ñ¬ m…ª¥Ý~üÉÁÑÅÕo1ž5§­Ð·ÖÁ¬åifå[º9m…¾õõ¼K\¾{XMcž5£­Ð·Öž5ÒÖ¾gÍj+ô­µ¾>íY³Ú }ë$ÒÖ¾gÍj+ô­ï¶úž5«­Ð·Nú´U'}ë$ƶþ»ž•­lÕ €­le+[ÙÊV¶‚­le+[ÙÊV¶ÂüÖ²ªY2Ío…¾õ¼­‰æ·BÕòãOMä­ÕÖv{µŽ1®7oꡚl~+ÌoL ØZïǸv{Éæ·BßZü­‰k»]öZ׌ó[a~k¼Ü?_·®éæ·BßÚŸ­Óùqëšo~+ô­ý{kyŽZ×dó[¡om·G¨‚ö­«ù­€­:°•­le+[ÙÊV°•­le+[ÙÊVè[óÛ }듲úÖWu„k7{u³®GâZ·M]Nºñm…¾uu;«UKY~´¿¨ýÀ»ÄuVÕ.ˈ^Ç·úÖòLÂã²7%®uYˆ¶BßZŽÏúþêæ÷ýÅñ8×ÕmYMbgt[¡o-OñqV—íþ›õQâZ¨ý`ìŒn+ô­Qv—¹L›ùÑ8×ú­~bgt[¡o}U´,š6/ïâú¡÷‰k¼Ä޳•­:°•­ÿ le+Øš‰¿Ù¥c"@`@Gý;dìÄ Ü“hÈf+¶¶zÈÀV[O²ÕVlÅV[±ÕVlÅV[±ÕVlÅV[±ÕVlÅV[±ÕVlÅV[±ÕVl½[£‘²µU.lÅV[±¾ÛŠ­`+ØŠ­`+ØŠ­`+ØŠ­`+ØŠ­`+,vé ˜Ìaÿ†~,!Ü2l[e׎i@ ˆáÿÙpðÉ­†ïím‘ZA­píÀ @0ýSËas:6î·c©ýÁIEND®B`‚yard-master/docs/images/tags-class-diagram.png000066400000000000000000000217711265676644000217040ustar00rootroot00000000000000‰PNG  IHDRgSz‡A˜äPLTEÿÿÿfff999Žf99fµÚŽÙÚŽ¶f999ff99ŽŽff9ŽfŽÙÿ¶¶ÿ¶ŽfŽ9fff9ŽŽ9µÿ¶ŽÚ¶fŽŽ¶ÚŽÙ¶ÚÿÚ8eÙÿÚV‚f9ŽŽŽ¶Že›e‚ºŽ8yyHI8)µÿÚÙÚ›f9ŽÚ9ŽÚÿ¶ÿÿÿ¶fÿÿÚ¶ff¶ÿfÚŽ99Ž9ÿÿ¶f¶ÿÚŽ9ŽÚÿÿÀÀÀf9f¶9f99Ž99O10eµÚff9999µ¶f9fffffÙ¶fóÐ>-"ÐIDATx^ìÛénÛ0…Q=ÏPûêµûÞ÷ŸÎŒY¡@ÄYhÅw„ ý ÆŽ…[<"¯ ¹ ‘â>áï‡3‚3œá gDN§Sñ¶ÁÁÎp†3œáŒà g8ÃÁÎp†³})"C½nt"ý€FÞ¿ÓE¶'…íßœá,í¼B[·c±u¶œwÎmÛ¿18ÃYœY¥LU;ÛpE$èf(º¡nä‹n~_œù‘éÔ¥µý£ß§ä>”Ÿ?ŽË9à,œé7]M•ͳý÷Ê.£³«yâ†-ö5NÕrÖ‘8úoã,œ)µâtüu³™ª­3‘õ(jŠÆŒ©]êÚ+5œ¥Ã<Å|ž•CÝm]hÅ£ñÊ™­î¬w.©à g½yј³qJ¾nÆ£Ä<Óãog‰àÌèèjfܙɚ*׳qlÃŽ}qkg˜ÖtpÆçg®½Ï³vù¥× _Í™_ýpgñÈïRXPÃåÎünœá,s\[æà g£ 5Î^œñ|gg8ÃÎp†3‚3œá g8“ÿ%í gLGp†3œ½*gÌ3æÙ‹¦3Îp†3œá g8ÃÎRÕFúFÎrgœÝ'̳Ÿ¥/DO•×¥s”£q†³ØÐê¿ué åhœá,¬ÂX—ÎPŽÆÎúXˆ^ëÒËÑ8cž­ué<åhœñþÌgX¬K¿a9g8Mø÷ÿÍÝZ—Þ”£q†³Ìåhœáì‘ËÑ8ÃÏ7 Îp†3œá gw ýæ¡¿‰³g†~ó g8ëúöcu#€ýûÄ'…í,–Äsœáì{çúäF­qr“lž< pC py|ñlÖëÁ°“ÝÊŠªýÿÿ ޤÞikשʸ,MÔ*g'zm†_klÜudÝ;™ÈûãŒú£lwéÒü‹Ž1´É²oƒ³È÷¡Ïîý×Ì))¶%¹~òÀ¼›á†Äïwa®ÃßãØþðé[ò…ëÝ^qvŽúÚ¶ýUKœá_¿î¢`i>§ÿ¼5^ ¥>X‡Œê]¸PŸÚ—Ì\»YïGÍÕ ž °Õ] ÉØ½’³ÐÚgËE(Ud«àßìÃ)‘+v -d Cì… #í²·!Ψ¿Ë „¶Ž\A¯mïg|nNQc« ¾ˆÌí±ÖmW²„!÷7ÿÆ{àŒj¥þÒMì!OðÇçæ1>-µÅ?˜ã_ßõ—Û­iy¹Á8²„!;ö3ô¶¶ŸQŸ<Ž‚…<­zå~¶´Z+œ±ØÎc¯h¡[¦ßN¾´K¨Å?«.\Ȇìx–õ¶Ãõ:ý£·´C¯ä,Úgü`ûÙ—QuëÅâპòŒ~bÎNCBû§ïÇŸ7³Þ†>oR‘&ÈÓ¡Wrfž·Å‹qöP€0§·În¶º1]Bž‰¸ñçÍãNœíø''Å8ËŸn¨÷ŸM/\¡nÎ(À ‡¢ —7ñXPhîUÃp£ Ÿ7Ö‹‘Y-Á”‡ç JÉŸn¨ÎÆv‹_¸Bs~ {³ÎÆ¥gPJþtCM~Òœ}¸ìÖ±Ÿf5úÖä×gòk,ÎTÄÙ~".ÎTÄÙÞHó9SgÓI+í?CwåF4q6´²þ3öù ̓3ªµ€µ¬â¬Ø‡öŸ!ÄY\â,vŸ  Ö4»Õ¾­ZΨÖÖ²Š÷³CûÏàzÁiÚ0kÍÁˆFÎÆjýö»Ö²ZߟÞ?–HÝhËÝŽ­RΨÖÖ²Z?oòŸÅçJZ"u£-wÌÁˆFÎÆj-`-«óÿŸ•ñŸ!¾½vígXË1¢Uÿܼ|TÞZVž³E)ÿBp ¾?Ã@kvhÕrFµ´–•笼ÿ ¦r,n:a˜»iF4r6Vk k™òŸM_"_ªRΨÖiÖ2q6ÙÆ%æoD#g¥¬eòɯQÌZ&ÎÄ™òk¨èüÍ*9SÑ~&ÎÄ™òŸùñXõ=hâLùϦsÆÚlóŸý ÅÎW§üg ³8nÃxñG´ý?TÚ|òŸ‰³ûÏB4ÌÆ1Þ‚&¹=Ú\òŸýt}§'Ô}å?ìa\ÆmbzÑa¤ïA«?ÿÅæUçoîÕ†YÃ8vaø<µªãA›Kþ3ŠÍêŒ9«1ÿfa\&o,°º‰³Ú\òŸ‘3G¨så¬Òüg˜5ŒCÙr¢ÝŸºŽm.ùÏÈ™+ÔéEþ3ò‚YÇxHœüô¯­êxÐf’ÿŒœyBPä?+œ ­|þ3ræ uoEþ3§kV4rV•rä×/È?(Wœ©È¯!ÎÄ™8g⬵"Îä?ógÐ1Áµ&Îä?Ûg¬•ãŒð{YõŽ‚ýSÎÞå Öw†–ÿì3N²•†ßæøn ¸ÖJr¶¼éÌú˜uÈçLþ³á•¯„ ˆßM)ךï ÊDiÂúå×A Ðy‚Ì9@Ï$Hüdz4H5 „$1Çýí¿5¶½æº£Ð¸ ûÏÈY¾R~° |7e\k>gƒ(™ìŒZ Fî*õrÃQ<{0ó8A1¥š²¨Ùsèrc?“˜cÐÍCÃñ ûÏ8#_)?X¾›B®5ßQ29µ0ÖF¦ÛÝcÆgeÝ!ǶTcµaZƻڲƒš¿+íúÏÈY¾&äûY!ך¿ŸA”yö@háŽFh…I¹¨8 Aò´ã¥š¦ÜŸ‚ÔbÛgÍ_ã[öŸqF¶&`.ž=¥\k>g%÷3tŽ42h®Ï=k²ýØ-™TC5ìO)#̪mÛœ1´Õðþ¬qÿÙÑ0#[ À|7…\k¾_#%Å‘}†)õ|[1ãlƒë>úS4JÕþloúFRj#gãÐòŸÍÁµæsQòµ0xÓF§o®n¬Bγ 2[šQóôØNÐ’éÃÚ2Î:i_þ3§§€k­v¿ÆÅÕ®6ù5ä× F&–5CdmâLœUSÄ™8g*âLœ‰3ùÏüIScâLþ36L>§ó7©¨»zceßEùÏ8) ˆ5q™›Õž¿9’Í!5¤üg0³` DœpæfÍçˆÁ˜y½Ál†ýleƒÎ¡³ýå?Kf¬ˆÎܬöüMJ,sÕ •¸ïAgû/Ê–Ì,,a&œ¹Yóù›ö"W”%*6ŽÊÝsQþ3˜Y°#ºgnÎï¹™sFY¢bò¡r÷\”ÿ 3°"N8s³Þó7GœA–¨åì/Sþ3N ƬˆÎܬüüMrEY¦JÌÿLåî½(ÿÙÅÖ˜¾þó7ÉôF寠V:èlßEùÏ`\Áœcòk”áLEœ‰3q&ÎTtþ¦8;ôðçGRÊs¦"Îæï?óÓP±°°‰³šýg¥8ãR‡àLe^þ3?Ýo‡œ2ý"Mµ°‰³üg~º34bH–~©+`agsõŸùéζf DšœüLœ5â?óÓqáŒ3DšhagøÏütg\8ã ‘&ZØÄY+þ3?ÝÞâ ‘¦ZØÄY þ3?Ý1d‹3Dšjag øÏªO~&Îæï?›žîÌ·°•ãLœ©Ì›3q&ÎTÄ™8gâLœ©ˆ3ùÏü¬¡}Ñí¶2ÑÇ&Îä?›ÀÙ|_âLþ3?ÄP³ Žˆƒù•ÖK÷Oq&ÿ™5LÈÒEáââ)Îä?óC † –qæúØÄ™üg~.Í`ìâ)Îä?óC † FμC<Å™üg~Ô0ÁBuÜÖ¼C<Å™üg~Ô0ÁÂåM|ÚŸ:‡xŠ3ùÏâck‹3ùÏ&„˜äc«‘3ù5ä×Pù‡;&@h3Ø?—-<>3Æèä„sþ t6 ÐÙ@Ù¹—Ý´8£Î¥­ò*l§øj.ê*­”÷ ÈGÄÉ.Ö @ç†-Ò§‘añ+ð;t†ÎÐè ÎÐ:¡3Ð:Cg 3t†Î²î´ç‡ÎÐYÚ(K3li²lÚ"KŸgóiß‘†ûÆÑ¾²yß_;î•ÍçÓ@gcOé:í¯}Ø+›Í§-‚ÎîvSgÓdÙq¯ìë|Úr8Ïnêù¸Ù§ù´ep6üý™æ±Vóa¶OóiKá÷æ´ªøa˜m\)›Í§1ìÎÐ:¡3t:Cg 3t†Î@gè t†ÎÐè ¡3Ð:¡3t:Cg 3t†Î@gè bvÉâøºlè bz^osfÏ:–¯6Ï&­3Õ\x‡“µõ8£ß<*–ªB½çÉ&áÌŽu8»(D‘dz3×úç€Ø×¯6mΞMÄY8G{î?gpæi€HÑ}»I<óc-Zì|çLÎ5œùþ¼ÅU9êÆ³€÷Êgä›!|…—H /…Ÿîý™vú±-v{ÕâL·`I¾HÒ‰]ÎtÂñÞŸQ³GÎ< $óé¢(>}\+üMÒo6ÇZ´èk¢Ñ9SÎÐÎ7õø•Ó×Ó.gWÚ}¬ù&‰b°ïídÄ™+p–h}‰_ÎÒÒeŠB1ƒÔÊÿô÷€Ÿ›r¦¢pgø5à¬GŸgœÁœÙxz鎆¢ø«x38ƒ³Òï—•ñ‹/+T7$gpgâJíl¢Œo>ݽÀ«8Ȧͼ³ÌNÒâh8ƒ³*Ö S=:Å³Ý ¼:gýýgÚÌ;Ëü¤#âŒû³Z]§ð2ÎÒ¯yÎúøÏdkü>ÖZÖYö‡ð­'ÏÏŸ¼›Ê¦æÞµ•38³pµ(¤Rœå ¼öçÌýgî( ~ká-ç,ÓÁõ¸ÖÂljæ]ûx9ƒ³€ÕJñÌó€ ¼Š³þ³ÆQ&Ø#vyg™ýÝîõø˜9ƒ³Ó·ñþLdgi×{ô¥?,®Ö2EÎF±JËh-Zx[ µJ?µ‰:gVëç#‚³| Ù¹ZâBî«Ò¼Ttgpÿ™ê”©— ?o^4-¤íV4n êmë§ŒY ÎÒbñlTýî2²Om_«¶ºDÏB_vÙÞÜvúZ×ó…å›aa½à¯9Ó)¢è/†ŽÕI³ýÒžÍjp–!4B‡ïÐÄSRè°H–/¢ÿùtÎÒ:e⾿M?u ³œ¥1ÄË&Û +nJµü, $6ÕÝ–3¯S&Îú[ÑôS‡1«ÁYÙFR É~ 8ó@’Æ8ƒ3üpgpvÄ‚38ãù€þÞ‘þÕÐà ÿYÝ«¡Áœ¥u\z̳™1˜Áœ¹ÿ,3Ïæ±TCƒ³Á5¬ÿ,?ÏfÿjhpF¿ÙcžÍœÁ ÎàÌÒ€!æÙ$žÁYÎ;ÒcžÍ¬Á ÎàÌÒ€^ólæ fpgÒþ«¡Áœ¼œÁ~ 8ƒ38ƒ38ƒ³û+8ƒ38£þ™oha;Òé8ó¥‹fÉ,È* e³‰Ö™f’iüîgøÏ*g"å,_ºÈê"´„3sz,/Ê_i&ÙViŽcâ Îòµ‹„ÈUã?›˜ïL‹3YËr¥‹â<Œ,?ýÓǶ¥6žíÍÌ®½¹Í+=sÅY56;åh8ƒ³´v‘BQówtó ™™ÜùÒE^ôEªÜ‚VÔöcÚ)ÜÞŒU\kdz“ÆçÇâ)åŒçzÖ.Òjx{4·ÌfK´ì÷ÂB ÙÙѪÞÞŒ¶¯å­y56;ζéÇ;PÏÚE£gÀ|g!š8gùÒEÍ×í +µååÔ"gân{3^qͶ…©¹âì˜rDœÁYZ»¨žx<Ë—.jߟuã™5æ÷gÛ›ñÎ×¶#¦uë˜rHÎà¬oí¢je>GÛh;ä÷É•.êæ›éý™¶tTùæöfÂz—3Ñj®8;f§1gÔ.R"x6±DÐ ¡©:Z¦t‘Žøø™ýž˜´|Ó¼ß6¶½™ªoÚø™¹â¬÷´SŽž3r_Å¥‹\ùfðk<`ΊH=J¹òÍôœáÁ¯Š{¬Ãr†ˆg©œÁœÁê=ÿ¦[%:Ûp6¸˜;¯ÃÕÁsYÕ²ÀÕW…ª˜5®/‹gUøÒÊœ_p†në?óªe WfÑiu¢nƒ3Ô£þYx9W^ Í6£9¿à¬‡è7SÎäú² ù:Üùgè–õÏÎT Í·ÕköepÆÜy)gzy™ÆEé¦8C=êŸ9gM%3s}i—RРÒ_p†ðk 8ƒ38ƒ3gpgp†àì¡ Îà ÿYªaçØ„3ügr†˜cÎðŸ}ó]1ÿc=ZŸ|öèK ù›Ólð96á ÿÙ¬ÍÊåÅùf6÷Y7žcÎðŸ-_mžMÔAzY²ÁçØ„3üg§ï¿~µ`^°lð96á ÿY¬k,Îl—4ô›p†ÿLñ*$–«¤ÆØPslÂþ3•;}­Œ_x=²ÑðslÂ~õeR’lè96á Îg“9ó96á á×@Ô?£þµ¿û«Pˆ¹CÁœÁœí ³ÑÞAƒ3TØ{¿B`vo@Cp†ÀìøACp†Pá}¬BTY@Μ!8CΜ!gΜ!gxüÑèð"JpÎà Îà ÁœÁœÁœ!8ƒ38ƒ38ƒ3gpgp†à Îà Îà ΜÁœÁ‚38ƒ38ƒ38CÅ¡t¨k9ü bÒÛ-Ðîa®Îà Îà Îà¬ÿ\[ÅÚ=Ð<0Á™gp¶E1÷9\«¢¨;'ÍÂöúòz*ÿͰœy£EÙ™‹V­¶åí)gpVÆù¬oæH7”Úœi>õ¸²§xVMï«‘IÍ¥²ö—38B lg…ùtÃË,¼«ùtVüó­‰qiqö/ÁÙ3G=Ît<+þ\”§jîßvEP;ÅYÚþQqgú/Q¥x¶þy¢Uã¬ÏìX8ay1g"¬¡mp^Äæ,ŠêÐz|þFñ6mÿØ8ƒ³R'"Iœ ©Iþ+gvLhT{à¬ÔÂ8ÓnÿiÿH8#ž- ©Œñl<ŸV[8³cb`±Îj!ïœiË8Ë·gù$+Ã[Íÿæ)×ðœÅèay€V·õ›vÌߟeâY®}8Ë'Yyμëœ3»ãD‘3‘u6‰=XÂYçØÀù欈gÚ¶œ³lûp¶=ÉúûÛUWXYrµ¼øÇøìÿnr-Ï®æ?‰³LÊÕkül–uŒgJø®Âz[5kÓ¦q;fW4ðøY“ojsþ‹ç›ÎY¶}8Ûžd-”äÕÖ;Ä á¹V'»Ê§\yΆTu¾ˆ3äåíÚÏsg›Y“@_­\˳«LÊuל) †öÃYÚ~ž38;}[.tO$•Æ™çZž]í’rñ÷Í®¸?,«ª4ìFÄ3Ï®vK¹à,ùæzl¤¥Z­\«]í’rÁY"ÆÏNßžo<Ý[µþÚ˜dW™”+ËÙ(ÃÙΆQ>å"žÁÙÐ)œÁ~Z8ƒ38»7‚38ƒ³ª>}?iÌ÷µÛðË®—âÝ4¼Ú^’ó§ã"h> ß­{qæWÐm0m*|QÛúøA­gp [>šv9s¦¶q¶2!Õ­úpæW(mj!ßÀ•>ÊQu œÁÙ [æf[^Ÿ>–Q£k»çFÆ Ñ!ûJfŠ*mÎôy+ÎÒ+øìÑ—1q¾iwýü±k7µ>Ùœ¾ÿ^“#â Î …‰ªT¤Å"2´üd¢…qÖ¼tÎb5Hî?gÔ ®>œ¹93M¹àlçðtP4³?‹?g^²G×°WÎÔ”Ë[…³#à9ÎÒ±+üp–ƒo†×Fã_LÖ'ŸEmC♢lÏFƵŒÅÜåFÀµiƒï1Í“×?f{>$®C62n#õÄ3 Îv·;’æ:êK «î¸-l¤>3Ÿ¨àùúÍ8¼nvÎ|(¾Í™Ô'cñÄ3âYf܆דxæCâΙ› ÜåFÀmxÝïÏ +÷Ñøh¨HÇâá ÎòcðU;ßüMÏ|(^ð7£ñ#©ÏÅÜå‡ËúÅÜm—2ƒ³ÉPcñpg<ïgpgpgpgpgp†ÿ,Õ€^48K…ÿ¬¿ Îà,ÿ¶Lfq5`ø²(ÊY4wDÛ™èkÛž ‡38Ë?-“™­6VÜ8ÓµqmÆ5âœÝî ì‘­jgx ;@Ü×FÛŸ ‡38Ë?=²Õgþ€¸¯¶?gp–{d«-Îüq_m.Îà,ÿöÈV[œùâ­µíυÜåŸÀ¾^mqf¶3yÑüQñQþ¹pž€3“0:Øsá?Þ¼µ_œ ü\8œÁÙgœ!8ƒ3gÎà åç I}@¶èQþL‚3ügyÎò–38C»ÌAróÀù¬0«Ù“çUÿÌj¢Y…´]ËŸÁþ³j\‡ÈŸEk™ùÑšEœcΆþ³tŽM8^øÏ’96álO¢þ™Ï± g{þ³tŽÍágøÏÒ96‡œá?KçØÜ?g¿Æ £ipgyËœ!üÎà ÁÙv!8Cpgÿ†ðŸY)³½r†ðŸY)³½r†ðŸÝÅ|(ÿ™•2Û7gÿ™JLí•3„ÿLŒí3„ÿ¬"ßDøÏîHÿ¯g¨8gèÇCèöœ!8ƒ3g¡ÿVÇ çZ!IEND®B`‚yard-master/docs/templates/000077500000000000000000000000001265676644000162545ustar00rootroot00000000000000yard-master/docs/templates/default/000077500000000000000000000000001265676644000177005ustar00rootroot00000000000000yard-master/docs/templates/default/fulldoc/000077500000000000000000000000001265676644000213305ustar00rootroot00000000000000yard-master/docs/templates/default/fulldoc/html/000077500000000000000000000000001265676644000222745ustar00rootroot00000000000000yard-master/docs/templates/default/fulldoc/html/full_list_tag.erb000066400000000000000000000004741265676644000256230ustar00rootroot00000000000000<% even_odd = 'odd' %> <% collect_tags.each do |tag| %>
  • <%= tag_link(tag) %>
  • <% even_odd = (even_odd == 'even' ? 'odd' : 'even') %> <% end %>yard-master/docs/templates/default/fulldoc/html/setup.rb000066400000000000000000000001651265676644000237630ustar00rootroot00000000000000def generate_tag_list @list_title = "Tag List" @list_type = "tag" asset('tag_list.html', erb(:full_list)) end yard-master/docs/templates/default/layout/000077500000000000000000000000001265676644000212155ustar00rootroot00000000000000yard-master/docs/templates/default/layout/html/000077500000000000000000000000001265676644000221615ustar00rootroot00000000000000yard-master/docs/templates/default/layout/html/setup.rb000066400000000000000000000002431265676644000236450ustar00rootroot00000000000000def init super sections.place(:tag_list).after_any(:files) end def menu_lists super + [{:type => 'tag', :title => 'Tags', :search_title => 'Tag List'}] end yard-master/docs/templates/default/layout/html/tag_list.erb000066400000000000000000000006071265676644000244640ustar00rootroot00000000000000

    Tag Listing

    The following are a brief list of tags that can be used in YARD formatted documentation. See <%= link_file "docs/Tags.md" %> for information on using tags.

      <% n = 1 %> <% collect_tags.each do |tag| %>
    • <%= tag_link(tag) %>
    • <% n = n == 2 ? 1 : 2 %> <% end %>
    yard-master/docs/templates/default/yard_tags/000077500000000000000000000000001265676644000216555ustar00rootroot00000000000000yard-master/docs/templates/default/yard_tags/html/000077500000000000000000000000001265676644000226215ustar00rootroot00000000000000yard-master/docs/templates/default/yard_tags/html/list.erb000066400000000000000000000010041265676644000242610ustar00rootroot00000000000000<% [["Tag", all_tags], ["Directive", all_directives]].each do |(name, list)| %>

    <%= name %> List

    <% list.each_with_index do |tag, i| %>

    <%= tag_signature tag %>

    <% if name == "Directive" %> <%= yieldall :object => P("YARD::Tags::#{tag.text}") %> <% else %> <%= yieldall :object => tag.object %> <% end %>
    <% end %> <% end%> yard-master/docs/templates/default/yard_tags/html/setup.rb000066400000000000000000000012101265676644000243000ustar00rootroot00000000000000def init sections :list, [T('docstring')] end def tag_signature(tag) types = tag.types || [] signature = "#{tag_link_name(tag)} " extra = nil if sig_tag = tag.object.tag('yard.signature') extra = sig_tag.text end extra = case types.first when 'with_name' "name description" when 'with_types' "[Types] description" when 'with_types_and_name' "name [Types] description" when 'with_title_and_text' "title\ndescription" when 'with_types_and_title' "[Types] title\ndescription" else "description" end if extra.nil? signature + h(extra).gsub(/\n/, "
       ") endyard-master/docs/templates/plugin.rb000066400000000000000000000033111265676644000200750ustar00rootroot00000000000000include YARD include Templates module TagTemplateHelper def all_tags Registry.all(:method).map {|m| m.tag('yard.tag') }.compact end def all_directives Registry.all(:method).map {|m| m.tag('yard.directive') }.compact end def collect_tags (all_tags + all_directives).sort_by {|t| t.name } end def tag_link(tag) link_file("docs/Tags.md", tag_link_name(tag), tag.name) end def tag_link_name(tag) prefix = tag.tag_name == 'yard.directive' ? '@!' : '@' h(prefix + tag.name) end # Wrap url_for and url_for_file to rewrite object when generating docs for # yard.tag/directive objects. %w(url_for, url_for_file).each do |meth| self.class.send(:define_method, meth) do if object.is_a?(CodeObjects::Base) && (object.tag('yard.tag') || object.tag('yard.directive') || (object.type == :class && object.superclass.name == :Directive)) obj, self.object = object, Registry.root url = super self.object = obj url else super end end end def linkify(*args) if args.first.is_a?(String) case args.first when "yard:include_tags" return T('yard_tags').run(options) when /^tag:(\S+)/ tag_name, suffix = $1, "tag" if tag_name =~ /^!/ tag_name, suffix = tag_name[1..-1], "directive" end if obj = Registry.at("YARD::Tags::Library##{tag_name}_#{suffix}") return tag_link(obj.tag("yard.#{suffix}")) end log.warn "Cannot find tag: #{args.first}" return args.first end end super end end Template.extra_includes << TagTemplateHelper Engine.register_template_path(File.dirname(__FILE__)) yard-master/lib/000077500000000000000000000000001265676644000140745ustar00rootroot00000000000000yard-master/lib/rubygems_plugin.rb000066400000000000000000000003271265676644000176360ustar00rootroot00000000000000unless defined?(Gem::DocManager.load_yardoc) require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/specification') require File.expand_path(File.dirname(__FILE__) + '/yard/rubygems/doc_manager') end yard-master/lib/yard.rb000066400000000000000000000042151265676644000153620ustar00rootroot00000000000000require File.expand_path('../yard/version.rb', __FILE__) module YARD # The root path for YARD source libraries ROOT = File.expand_path(File.dirname(__FILE__)) # The root path for YARD builtin templates TEMPLATE_ROOT = File.join(ROOT, '..', 'templates') # @deprecated Use {Config::CONFIG_DIR} CONFIG_DIR = File.expand_path('~/.yard') # An alias to {Parser::SourceParser}'s parsing method # # @example Parse a glob of files # YARD.parse('lib/**/*.rb') # @see Parser::SourceParser.parse def self.parse(*args) Parser::SourceParser.parse(*args) end # An alias to {Parser::SourceParser}'s parsing method # # @example Parse a string of input # YARD.parse_string('class Foo; end') # @see Parser::SourceParser.parse_string def self.parse_string(*args) Parser::SourceParser.parse_string(*args) end # (see YARD::Config.load_plugins) # @deprecated Use {Config.load_plugins} def self.load_plugins; YARD::Config.load_plugins end # @return [Boolean] whether YARD is being run inside of Windows def self.windows? return @windows if defined? @windows require 'rbconfig' if ::RbConfig::CONFIG['host_os'] =~ /mingw|win32|cygwin/ @windows = true else @windows = false end ensure @windows ||= false end # @return [Boolean] whether YARD is being run in Ruby 1.8 mode def self.ruby18?; !ruby19? end # @return [Boolean] whether YARD is being run in Ruby 1.9 mode def self.ruby19?; @ruby19 ||= (RUBY_VERSION >= "1.9.1") end # @return [Boolean] whether YARD is being run in Ruby 2.0 def self.ruby2?; @ruby2 ||= (RUBY_VERSION >= '2.0.0') end end # Keep track of Ruby version for compatibility code # @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead. RUBY18, RUBY19 = YARD.ruby18?, YARD.ruby19? # Load Ruby core extension classes Dir.glob(File.join(YARD::ROOT, 'yard', 'core_ext', '*.rb')).each do |file| require file end # Backport RubyGems SourceIndex and other classes require File.join(YARD::ROOT, 'yard', 'rubygems', 'backports') ['autoload', 'globals'].each do |file| require File.join(YARD::ROOT, 'yard', file) end # Load YARD configuration options (and plugins) YARD::Config.load yard-master/lib/yard/000077500000000000000000000000001265676644000150335ustar00rootroot00000000000000yard-master/lib/yard/autoload.rb000066400000000000000000000365221265676644000172000ustar00rootroot00000000000000# @private def __p(path) File.join(YARD::ROOT, 'yard', *path.split('/')); end module YARD module CLI # Namespace for command-line interface components autoload :Command, __p('cli/command') autoload :CommandParser, __p('cli/command_parser') autoload :Config, __p('cli/config') autoload :Diff, __p('cli/diff') autoload :Display, __p('cli/display') autoload :Gems, __p('cli/gems') autoload :Graph, __p('cli/graph') autoload :Help, __p('cli/help') autoload :List, __p('cli/list') autoload :MarkupTypes, __p('cli/markup_types') autoload :Server, __p('cli/server') autoload :Stats, __p('cli/stats') autoload :Yardoc, __p('cli/yardoc') autoload :YardoptsCommand, __p('cli/yardopts_command') autoload :YRI, __p('cli/yri') autoload :I18n, __p('cli/i18n') end # A "code object" is defined as any entity in the Ruby language. # Classes, modules, methods, class variables and constants are the # major objects, but DSL languages can create their own by inheriting # from {CodeObjects::Base}. module CodeObjects autoload :Base, __p('code_objects/base') autoload :CodeObjectList, __p('code_objects/base') autoload :ClassObject, __p('code_objects/class_object') autoload :ClassVariableObject, __p('code_objects/class_variable_object') autoload :ConstantObject, __p('code_objects/constant_object') autoload :ExtendedMethodObject, __p('code_objects/extended_method_object') autoload :ExtraFileObject, __p('code_objects/extra_file_object') autoload :MacroObject, __p('code_objects/macro_object') autoload :MethodObject, __p('code_objects/method_object') autoload :ModuleObject, __p('code_objects/module_object') autoload :NamespaceObject, __p('code_objects/namespace_object') autoload :Proxy, __p('code_objects/proxy') autoload :ProxyMethodError, __p('code_objects/proxy') autoload :RootObject, __p('code_objects/root_object') autoload :BUILTIN_ALL, __p('code_objects/base') autoload :BUILTIN_CLASSES, __p('code_objects/base') autoload :BUILTIN_MODULES, __p('code_objects/base') autoload :BUILTIN_EXCEPTIONS, __p('code_objects/base') autoload :CONSTANTMATCH, __p('code_objects/base') autoload :CONSTANTSTART, __p('code_objects/base') autoload :METHODMATCH, __p('code_objects/base') autoload :METHODNAMEMATCH, __p('code_objects/base') autoload :NAMESPACEMATCH, __p('code_objects/base') autoload :NSEP, __p('code_objects/base') autoload :NSEPQ, __p('code_objects/base') autoload :ISEP, __p('code_objects/base') autoload :ISEPQ, __p('code_objects/base') autoload :CSEP, __p('code_objects/base') autoload :CSEPQ, __p('code_objects/base') end # Handlers are called during the data processing part of YARD's # parsing phase. This allows YARD as well as any custom extension to # analyze source and generate {CodeObjects} to be stored for later use. module Handlers # CRuby Handlers # @since 0.8.0 module C autoload :Base, __p('handlers/c/base') autoload :AliasHandler, __p('handlers/c/alias_handler') autoload :AttributeHandler, __p('handlers/c/attribute_handler') autoload :ClassHandler, __p('handlers/c/class_handler') autoload :ConstantHandler, __p('handlers/c/constant_handler') autoload :HandlerMethods, __p('handlers/c/handler_methods') autoload :InitHandler, __p('handlers/c/init_handler') autoload :MethodHandler, __p('handlers/c/method_handler') autoload :MixinHandler, __p('handlers/c/mixin_handler') autoload :ModuleHandler, __p('handlers/c/module_handler') autoload :OverrideCommentHandler, __p('handlers/c/override_comment_handler') autoload :PathHandler, __p('handlers/c/path_handler') autoload :StructHandler, __p('handlers/c/struct_handler') autoload :SymbolHandler, __p('handlers/c/symbol_handler') end module Ruby # All Ruby handlers module Legacy # Handlers for old Ruby 1.8 parser autoload :Base, __p('handlers/ruby/legacy/base') autoload :AliasHandler, __p('handlers/ruby/legacy/alias_handler') autoload :AttributeHandler, __p('handlers/ruby/legacy/attribute_handler') autoload :ClassHandler, __p('handlers/ruby/legacy/class_handler') autoload :ClassConditionHandler, __p('handlers/ruby/legacy/class_condition_handler') autoload :ClassVariableHandler, __p('handlers/ruby/legacy/class_variable_handler') autoload :CommentHandler, __p('handlers/ruby/legacy/comment_handler') autoload :ConstantHandler, __p('handlers/ruby/legacy/constant_handler') autoload :DSLHandler, __p('handlers/ruby/legacy/dsl_handler') autoload :ExceptionHandler, __p('handlers/ruby/legacy/exception_handler') autoload :ExtendHandler, __p('handlers/ruby/legacy/extend_handler') autoload :MethodHandler, __p('handlers/ruby/legacy/method_handler') autoload :MixinHandler, __p('handlers/ruby/legacy/mixin_handler') autoload :ModuleHandler, __p('handlers/ruby/legacy/module_handler') autoload :ModuleFunctionHandler, __p('handlers/ruby/legacy/module_function_handler') autoload :PrivateClassMethodHandler, __p('handlers/ruby/legacy/private_class_method_handler') autoload :PrivateConstantHandler, __p('handlers/ruby/legacy/private_constant_handler') autoload :VisibilityHandler, __p('handlers/ruby/legacy/visibility_handler') autoload :YieldHandler, __p('handlers/ruby/legacy/yield_handler') end autoload :Base, __p('handlers/ruby/base') autoload :AliasHandler, __p('handlers/ruby/alias_handler') autoload :AttributeHandler, __p('handlers/ruby/attribute_handler') autoload :ClassHandler, __p('handlers/ruby/class_handler') autoload :ClassConditionHandler, __p('handlers/ruby/class_condition_handler') autoload :ClassVariableHandler, __p('handlers/ruby/class_variable_handler') autoload :CommentHandler, __p('handlers/ruby/comment_handler') autoload :ConstantHandler, __p('handlers/ruby/constant_handler') autoload :DSLHandler, __p('handlers/ruby/dsl_handler') autoload :DSLHandlerMethods, __p('handlers/ruby/dsl_handler_methods') autoload :ExceptionHandler, __p('handlers/ruby/exception_handler') autoload :ExtendHandler, __p('handlers/ruby/extend_handler') autoload :MethodHandler, __p('handlers/ruby/method_handler') autoload :MethodConditionHandler, __p('handlers/ruby/method_condition_handler') autoload :MixinHandler, __p('handlers/ruby/mixin_handler') autoload :ModuleHandler, __p('handlers/ruby/module_handler') autoload :ModuleFunctionHandler, __p('handlers/ruby/module_function_handler') autoload :PrivateClassMethodHandler, __p('handlers/ruby/private_class_method_handler') autoload :PrivateConstantHandler, __p('handlers/ruby/private_constant_handler') autoload :StructHandlerMethods, __p('handlers/ruby/struct_handler_methods') autoload :VisibilityHandler, __p('handlers/ruby/visibility_handler') autoload :YieldHandler, __p('handlers/ruby/yield_handler') end autoload :Base, __p('handlers/base') autoload :HandlerAborted, __p('handlers/base') autoload :NamespaceMissingError, __p('handlers/base') autoload :Processor, __p('handlers/processor') end # Namespace for internationalization (i18n) # @since 0.8.0 module I18n autoload :Locale, __p('i18n/locale') autoload :Message, __p('i18n/message') autoload :Messages, __p('i18n/messages') autoload :PotGenerator, __p('i18n/pot_generator') autoload :Text, __p('i18n/text') end # The parser namespace holds all parsing engines used by YARD. # Currently only Ruby and C (Ruby) parsers are implemented. module Parser module C # CRuby Parsing components autoload :BodyStatement, __p('parser/c/statement') autoload :Comment, __p('parser/c/statement') autoload :CommentParser, __p('parser/c/comment_parser') autoload :CParser, __p('parser/c/c_parser') autoload :Statement, __p('parser/c/statement') autoload :ToplevelStatement, __p('parser/c/statement') end module Ruby # Ruby parsing components. module Legacy # Handles Ruby parsing in Ruby 1.8. autoload :RipperParser, __p('parser/ruby/legacy/ruby_parser') autoload :RubyParser, __p('parser/ruby/legacy/ruby_parser') autoload :RubyToken, __p('parser/ruby/legacy/ruby_lex') autoload :Statement, __p('parser/ruby/legacy/statement') autoload :StatementList, __p('parser/ruby/legacy/statement_list') autoload :TokenList, __p('parser/ruby/legacy/token_list') end autoload :AstNode, __p('parser/ruby/ast_node') autoload :RubyParser, __p('parser/ruby/ruby_parser') end autoload :Base, __p('parser/base') autoload :ParserSyntaxError, __p('parser/source_parser') autoload :SourceParser, __p('parser/source_parser') autoload :UndocumentableError, __p('parser/source_parser') end module Rake # Holds Rake tasks used by YARD autoload :YardocTask, __p('rake/yardoc_task') end module Serializers # Namespace for components that serialize to various endpoints autoload :Base, __p('serializers/base') autoload :FileSystemSerializer, __p('serializers/file_system_serializer') autoload :ProcessSerializer, __p('serializers/process_serializer') autoload :StdoutSerializer, __p('serializers/stdout_serializer') autoload :YardocSerializer, __p('serializers/yardoc_serializer') end # Namespace for classes and modules that handle serving documentation over HTTP # # == Implementing a Custom Server # To customize the YARD server, see the {Adapter} and {Router} classes. # # == Rack Middleware # If you want to use the YARD server as a Rack middleware, see the documentation # in {RackMiddleware}. # # @since 0.6.0 module Server require __p('server') # Commands implement specific kinds of server responses which are routed # to by the {Router} class. To implement a custom command, subclass {Commands::Base}. module Commands autoload :Base, __p('server/commands/base') autoload :DisplayFileCommand, __p('server/commands/display_file_command') autoload :DisplayObjectCommand, __p('server/commands/display_object_command') autoload :FramesCommand, __p('server/commands/frames_command') autoload :ListCommand, __p('server/commands/list_command') autoload :LibraryCommand, __p('server/commands/library_command') autoload :LibraryIndexCommand, __p('server/commands/library_index_command') autoload :SearchCommand, __p('server/commands/search_command') autoload :StaticFileCommand, __p('server/commands/static_file_command') end autoload :Adapter, __p('server/adapter') autoload :DocServerSerializer, __p('server/doc_server_serializer') autoload :DocServerHelper, __p('server/doc_server_helper') autoload :FinishRequest, __p('server/adapter') autoload :LibraryVersion, __p('server/library_version') autoload :NotFoundError, __p('server/adapter') autoload :RackAdapter, __p('server/rack_adapter') autoload :RackMiddleware, __p('server/rack_adapter') autoload :Router, __p('server/router') autoload :StaticCaching, __p('server/static_caching') autoload :WebrickAdapter, __p('server/webrick_adapter') autoload :WebrickServlet, __p('server/webrick_adapter') end module Tags # Namespace for Tag components autoload :AttributeDirective, __p('tags/directives') autoload :DefaultFactory, __p('tags/default_factory') autoload :DefaultTag, __p('tags/default_tag') autoload :Directive, __p('tags/directives') autoload :EndGroupDirective, __p('tags/directives') autoload :GroupDirective, __p('tags/directives') autoload :Library, __p('tags/library') autoload :MacroDirective, __p('tags/directives') autoload :MethodDirective, __p('tags/directives') autoload :OptionTag, __p('tags/option_tag') autoload :OverloadTag, __p('tags/overload_tag') autoload :ParseDirective, __p('tags/directives') autoload :RefTag, __p('tags/ref_tag') autoload :RefTagList, __p('tags/ref_tag_list') autoload :ScopeDirective, __p('tags/directives') autoload :Tag, __p('tags/tag') autoload :TagFormatError, __p('tags/tag_format_error') autoload :VisibilityDirective, __p('tags/directives') end # Namespace for templating system module Templates module Helpers # Namespace for template helpers module Markup # Namespace for markup providers autoload :RDocMarkup, __p('templates/helpers/markup/rdoc_markup') autoload :RDocMarkdown, __p('templates/helpers/markup/rdoc_markdown') end autoload :BaseHelper, __p('templates/helpers/base_helper') autoload :FilterHelper, __p('templates/helpers/filter_helper') autoload :HtmlHelper, __p('templates/helpers/html_helper') autoload :HtmlSyntaxHighlightHelper, __p('templates/helpers/html_syntax_highlight_helper') autoload :MarkupHelper, __p('templates/helpers/markup_helper') autoload :MethodHelper, __p('templates/helpers/method_helper') autoload :ModuleHelper, __p('templates/helpers/module_helper') autoload :TextHelper, __p('templates/helpers/text_helper') autoload :UMLHelper, __p('templates/helpers/uml_helper') end autoload :Engine, __p('templates/engine') autoload :ErbCache, __p('templates/erb_cache') autoload :Section, __p('templates/section') autoload :Template, __p('templates/template') autoload :TemplateOptions, __p('templates/template_options') end autoload :Config, __p('config') autoload :Docstring, __p('docstring') autoload :DocstringParser, __p('docstring_parser') autoload :Logger, __p('logging') autoload :Options, __p('options') autoload :Registry, __p('registry') autoload :RegistryStore, __p('registry_store') autoload :StubProxy, __p('serializers/yardoc_serializer') autoload :Verifier, __p('verifier') end undef __p yard-master/lib/yard/cli/000077500000000000000000000000001265676644000156025ustar00rootroot00000000000000yard-master/lib/yard/cli/command.rb000066400000000000000000000060231265676644000175460ustar00rootroot00000000000000require 'optparse' module YARD module CLI # Abstract base class for CLI utilities. Provides some helper methods for # the option parser # # @abstract # @since 0.6.0 class Command # Helper method to run the utility on an instance. # @see #run def self.run(*args) new.run(*args) end def description; '' end protected # Adds a set of common options to the tail of the OptionParser # # @param [OptionParser] opts the option parser object # @return [void] def common_options(opts) opts.separator "" opts.separator "Other options:" opts.on('-e', '--load FILE', 'A Ruby script to load before running command.') do |file| load_script(file) end opts.on('--plugin PLUGIN', 'Load a YARD plugin (gem with `yard-\' prefix)') do |name| # Not actually necessary to load here, this is done at boot in YARD::Config.load_plugins # YARD::Config.load_plugin(name) end opts.on('--legacy', 'Use old style Ruby parser and handlers. ', ' Always on in 1.8.x.') do YARD::Parser::SourceParser.parser_type = :ruby18 end opts.on('--safe', 'Enable safe mode for this instance') do # Parsed in YARD::Config.load end opts.on_tail('-q', '--quiet', 'Show no warnings.') { log.level = Logger::ERROR } opts.on_tail('--verbose', 'Show more information.') { log.level = Logger::INFO } opts.on_tail('--debug', 'Show debugging information.') { log.level = Logger::DEBUG } opts.on_tail('--backtrace', 'Show stack traces') { log.show_backtraces = true } opts.on_tail('-v', '--version', 'Show version.') { log.puts "yard #{YARD::VERSION}"; exit } opts.on_tail('-h', '--help', 'Show this help.') { log.puts opts; exit } end # Parses the option and gracefully handles invalid switches # # @param [OptionParser] opts the option parser object # @param [Array] args the arguments passed from input. This # array will be modified. # @return [void] def parse_options(opts, args) opts.parse!(args) rescue OptionParser::ParseError => err unrecognized_option(err) args.shift if args.first && args.first[0,1] != '-' retry end # Loads a Ruby script. If Config.options[:safe_mode] is enabled, # this method will do nothing. # # @param [String] file the path to the script to load # @since 0.6.2 def load_script(file) return if YARD::Config.options[:safe_mode] load(file) rescue LoadError => load_exception log.error "The file `#{file}' could not be loaded:\n#{load_exception}" exit end # Callback when an unrecognize option is parsed # # @param [OptionParser::ParseError] err the exception raised by the # option parser def unrecognized_option(err) log.warn "Unrecognized/#{err.message}" end end end endyard-master/lib/yard/cli/command_parser.rb000066400000000000000000000051651265676644000211300ustar00rootroot00000000000000module YARD module CLI # This class parses a command name out of the +yard+ CLI command and calls # that command in the form: # # $ yard command_name [options] # # If no command or arguments are specified, or if the arguments immediately # begin with a +--opt+ (not +--help+), the {default_command} will be used # (which itself defaults to +:doc+). # # == Adding a Command # # To add a custom command via plugin, create a mapping in {commands} from # the Symbolic command name to the {Command} class that implements the # command. To implement a command, see the documentation for the {Command} # class. # # @see Command # @see commands # @see default_command class CommandParser class << self # @return [Hash{Symbol => Command}] the mapping of command names to # command classes to parse the user command. attr_accessor :commands # @return [Symbol] the default command name to use when no options # are specified or attr_accessor :default_command end self.commands = SymbolHash[ :config => Config, :diff => Diff, :display => Display, :doc => Yardoc, :gems => Gems, :graph => Graph, :help => Help, :list => List, :markups => MarkupTypes, :ri => YRI, :server => Server, :stats => Stats, :i18n => I18n ] self.default_command = :doc # Convenience method to create a new CommandParser and call {#run} # @return (see #run) def self.run(*args) new.run(*args) end def initialize log.show_backtraces = false end # Runs the {Command} object matching the command name of the first # argument. # @return [void] def run(*args) unless args == ['--help'] if args.size == 0 || args.first =~ /^-/ command_name = self.class.default_command else command_name = args.first.to_sym args.shift end if commands.has_key?(command_name) return commands[command_name].run(*args) end end list_commands end private def commands; self.class.commands end def list_commands log.puts "Usage: yard [options]" log.puts log.puts "Commands:" commands.keys.sort_by {|k| k.to_s }.each do |command_name| command = commands[command_name].new log.puts "%-8s %s" % [command_name, command.description] end end end end end yard-master/lib/yard/cli/config.rb000066400000000000000000000075111265676644000174000ustar00rootroot00000000000000module YARD module CLI # CLI command to view or edit configuration options # @since 0.6.2 class Config < Command # @return [Symbol, nil] the key to view/edit, if any attr_accessor :key # @return [Array, nil] the list of values to set (or single value), if modifying attr_accessor :values # @return [Boolean] whether to reset the {#key} attr_accessor :reset # @return [Boolean] whether the value being set should be inside a list attr_accessor :as_list # @return [Boolean] whether to append values to existing key attr_accessor :append def initialize super self.key = nil self.values = [] self.reset = false self.append = false self.as_list = false end def description 'Views or edits current global configuration' end def run(*args) optparse(*args) if key if reset || values.size > 0 modify_item else view_item end else list_configuration end end private def modify_item if reset log.debug "Resetting #{key}" YARD::Config.options[key] = YARD::Config::DEFAULT_CONFIG_OPTIONS[key] else log.debug "Setting #{key} to #{values.inspect}" items, current_items = encode_values, YARD::Config.options[key] items = [current_items].flatten + [items].flatten if append YARD::Config.options[key] = items end YARD::Config.save end def view_item log.debug "Viewing #{key}" log.puts YARD::Config.options[key].inspect end def list_configuration log.debug "Listing configuration" require 'yaml' log.puts YAML.dump(YARD::Config.options).sub(/\A--.*\n/, '').gsub(/\n\n/, "\n") end def encode_values if values.size == 1 && !as_list encode_value(values.first) else values.map {|v| encode_value(v) } end end def encode_value(value) case value when /^-?\d+/; value.to_i when "true"; true when "false"; false else value end end def optparse(*args) list = false self.as_list = false self.append = false opts = OptionParser.new opts.banner = "Usage: yard config [options] [item [value ...]]" opts.separator "" opts.separator "Example: yard config load_plugins true" opts.separator "" opts.separator "Views and sets configuration items. If an item is provided" opts.separator "With no value, the item is viewed. If a value is provided," opts.separator "the item is modified. Specifying no item is equivalent to --list." opts.separator "If you specify multiple space delimited values, these are" opts.separator "parsed as an array of values." opts.separator "" opts.separator "Note that `true` and `false` are reserved words." opts.separator "" opts.separator "General options:" opts.on('-l', '--list', 'List current configuration') do list = true end opts.on('-r', '--reset', 'Resets the specific item to default') do self.reset = true end opts.separator "" opts.separator "Modifying keys:" opts.on('-a', '--append', 'Appends items to existing key values') do self.append = true end opts.on('--as-list', 'Forces the value(s) to be wrapped in an array') do self.as_list = true end common_options(opts) parse_options(opts, args) args = [] if list self.key = args.shift.to_sym if args.size >= 1 self.values = args if args.size >= 1 args end end end endyard-master/lib/yard/cli/diff.rb000066400000000000000000000204051265676644000170400ustar00rootroot00000000000000require 'tmpdir' require 'fileutils' require 'open-uri' module YARD module CLI # CLI command to return the objects that were added/removed from 2 versions # of a project (library, gem, working copy). # @since 0.6.0 class Diff < Command def initialize super @list_all = false @use_git = false @compact = false @modified = true @verifier = Verifier.new @old_git_commit = nil @old_path = Dir.pwd log.show_backtraces = true end def description 'Returns the object diff of two gems or .yardoc files' end def run(*args) registry = optparse(*args).map do |gemfile| if @use_git load_git_commit(gemfile) all_objects else if load_gem_data(gemfile) log.info "Found #{gemfile}" all_objects else log.error "Cannot find gem #{gemfile}" nil end end end.compact return if registry.size != 2 first_object = nil [ ["Added objects", "A", added_objects(*registry)], ["Modified objects", "M", modified_objects(*registry)], ["Removed objects", "D", removed_objects(*registry)]].each do |name, short, objects| next if short == "M" && @modified == false next if objects.empty? last_object = nil all_objects_notice = false log.puts name + ":" unless @compact objects.sort_by {|o| o.path }.each do |object| if !@list_all && last_object && object.parent == last_object log.print " (...)" unless all_objects_notice all_objects_notice = true next elsif @compact log.puts if first_object else log.puts end all_objects_notice = false log.print "" + (@compact ? "#{short} " : " ") + object.path + " (#{object.file}:#{object.line})" last_object = object first_object = true end unless @compact log.puts; log.puts end end log.puts if @compact end private def all_objects return Registry.all if @verifier.expressions.empty? @verifier.run(Registry.all) end def added_objects(registry1, registry2) registry2.reject {|o| registry1.find {|o2| o2.path == o.path } } end def modified_objects(registry1, registry2) registry1.select do |obj| case obj when CodeObjects::MethodObject registry2.find {|o| obj == o && o.source != obj.source } when CodeObjects::ConstantObject registry2.find {|o| obj == o && o.value != obj.value } end end.compact end def removed_objects(registry1, registry2) registry1.reject {|o| registry2.find {|o2| o2.path == o.path } } end def load_git_commit(commit) Registry.clear commit_path = 'git_commit' + commit.gsub(/\W/, '_') tmpdir = File.join(Dir.tmpdir, commit_path) log.info "Expanding #{commit} to #{tmpdir}..." Dir.chdir(@old_path) FileUtils.mkdir_p(tmpdir) FileUtils.cp_r('.', tmpdir) Dir.chdir(tmpdir) log.info("git says: " + `git reset --hard #{commit}`.chomp) generate_yardoc(tmpdir) ensure Dir.chdir(@old_path) cleanup(commit_path) end def load_gem_data(gemfile) require_rubygems Registry.clear # First check for argument as .yardoc file [File.join(gemfile, '.yardoc'), gemfile].each do |yardoc| log.info "Searching for .yardoc db at #{yardoc}" if File.directory?(yardoc) Registry.load_yardoc(yardoc) Registry.load_all return true end end # Next check installed RubyGems gemfile_without_ext = gemfile.sub(/\.gem$/, '') log.info "Searching for installed gem #{gemfile_without_ext}" Gem.source_index.find_name('').find do |spec| if spec.full_name == gemfile_without_ext if yardoc = Registry.yardoc_file_for_gem(spec.name, "= #{spec.version}") Registry.load_yardoc(yardoc) Registry.load_all else log.enter_level(Logger::ERROR) do olddir = Dir.pwd Gems.run(spec.name, spec.version.to_s) Dir.chdir(olddir) end end return true end end # Look for local .gem file gemfile += '.gem' unless gemfile =~ /\.gem$/ log.info "Searching for local gem file #{gemfile}" if File.exist?(gemfile) File.open(gemfile, 'rb') do |io| expand_and_parse(gemfile, io) end return true end # Remote gemfile from rubygems.org url = "http://rubygems.org/downloads/#{gemfile}" log.info "Searching for remote gem file #{url}" begin open(url) {|io| expand_and_parse(gemfile, io) } return true rescue OpenURI::HTTPError end false end def expand_and_parse(gemfile, io) dir = expand_gem(gemfile, io) generate_yardoc(dir) cleanup(gemfile) end def generate_yardoc(dir) olddir = Dir.pwd Dir.chdir(dir) do log.enter_level(Logger::ERROR) { Yardoc.run('-n', '--no-save') } end end def expand_gem(gemfile, io) tmpdir = File.join(Dir.tmpdir, gemfile) FileUtils.mkdir_p(tmpdir) log.info "Expanding #{gemfile} to #{tmpdir}..." if Gem::VERSION >= '2.0.0' require 'rubygems/package/tar_reader' reader = Gem::Package::TarReader.new(io) reader.each do |pkg| if pkg.full_name == 'data.tar.gz' Zlib::GzipReader.wrap(pkg) do |gzio| tar = Gem::Package::TarReader.new(gzio) tar.each do |entry| mode = entry.header.mode file = File.join(tmpdir, entry.full_name) FileUtils.mkdir_p(File.dirname(file)) File.open(file, 'wb') do |out| out.write(entry.read) out.fsync rescue nil end end end break end end else Gem::Package.open(io) do |pkg| pkg.each do |entry| pkg.extract_entry(tmpdir, entry) end end end tmpdir end def require_rubygems require 'rubygems' require 'rubygems/package' rescue LoadError => e log.error "Missing RubyGems, cannot run this command." raise(e) end def cleanup(gemfile) dir = File.join(Dir.tmpdir, gemfile) log.info "Cleaning up #{dir}..." FileUtils.rm_rf(dir) end def optparse(*args) opts = OptionParser.new opts.banner = "Usage: yard diff [options] oldgem newgem" opts.separator "" opts.separator "Example: yard diff yard-0.5.6 yard-0.5.8" opts.separator "" opts.separator "If the files don't exist locally, they will be grabbed using the `gem fetch`" opts.separator "command. If the gem is a .yardoc directory, it will be used. Finally, if the" opts.separator "gem name matches an installed gem (full name-version syntax), that gem will be used." opts.on('-a', '--all', 'List all objects, even if they are inside added/removed module/class') do @list_all = true end opts.on('--compact', 'Show compact results') { @compact = true } opts.on('--git', 'Compare versions from two git commit/branches') do @use_git = true end opts.on('--query QUERY', 'Only diff filtered objects') do |query| @verifier.add_expressions(query) end opts.on('--no-modified', 'Ignore modified objects') do @modified = false end common_options(opts) parse_options(opts, args) unless args.size == 2 log.puts opts.banner exit(0) end args end end end end yard-master/lib/yard/cli/display.rb000066400000000000000000000036071265676644000176020ustar00rootroot00000000000000module YARD module CLI # Display one object # @since 0.8.6 class Display < Yardoc def description; 'Displays a formatted object' end def initialize(*args) super options.format = :text # default for this command @layout = nil @objects = [] end # Runs the commandline utility, parsing arguments and displaying an object # from the {Registry}. # # @param [Array] args the list of arguments. # @return [void] def run(*args) return unless parse_arguments(*args) log.puts wrap_layout(format_objects) end # @return [String] the output data for all formatted objects def format_objects @objects.inject([]) do |arr, obj| arr.push obj.format(options) end.join("\n") end def wrap_layout(contents) return contents unless @layout opts = options.merge( :contents => contents, :object => @objects.first, :objects => @objects ) args = [options.template, @layout, options.format] Templates::Engine.template(*args).run(opts) end # Parses commandline options. # @param [Array] args each tokenized argument def parse_arguments(*args) opts = OptionParser.new opts.banner = "Usage: yard display [options] OBJECT [OTHER OBJECTS]" general_options(opts) output_options(opts) parse_options(opts, args) Registry.load @objects = args.map {|o| Registry.at(o) } # validation return false if @objects.any? {|o| o.nil? } verify_markup_options end def output_options(opts) super(opts) opts.on('-l', '--layout [LAYOUT]', 'Wraps output in layout template (good for HTML)') do |layout| @layout = layout || 'layout' end end end end end yard-master/lib/yard/cli/gems.rb000066400000000000000000000045301265676644000170640ustar00rootroot00000000000000module YARD module CLI # @since 0.6.0 class Gems < Command def initialize @rebuild = false @gems = [] end def description; "Builds YARD index for gems" end # Runs the commandline utility, parsing arguments and generating # YARD indexes for gems. # # @param [Array] args the list of arguments # @return [void] def run(*args) require 'rubygems' optparse(*args) build_gems end private # Builds .yardoc files for all non-existing gems def build_gems require 'rubygems' @gems.each do |spec| ver = "= #{spec.version}" dir = Registry.yardoc_file_for_gem(spec.name, ver) if dir && File.directory?(dir) && !@rebuild log.debug "#{spec.name} index already exists at '#{dir}'" else yfile = Registry.yardoc_file_for_gem(spec.name, ver, true) next unless yfile next unless File.directory?(spec.full_gem_path) Registry.clear Dir.chdir(spec.full_gem_path) log.info "Building yardoc index for gem: #{spec.full_name}" Yardoc.run('--no-stats', '-n', '-b', yfile) end end end def add_gems(gems) 0.step(gems.size - 1, 2) do |index| gem, ver_require = gems[index], gems[index + 1] || ">= 0" specs = Gem.source_index.find_name(gem, ver_require) if specs.empty? log.warn "#{gem} #{ver_require} could not be found in RubyGems index" else @gems += specs end end end # Parses options def optparse(*args) opts = OptionParser.new opts.banner = 'Usage: yard gems [options] [gem_name [version]]' opts.separator "" opts.separator "#{description}. If no gem_name is given," opts.separator "all gems are built." opts.separator "" opts.on('--rebuild', 'Rebuilds index') do @rebuild = true end common_options(opts) parse_options(opts, args) add_gems(args) if !args.empty? && @gems.empty? log.error "No specified gems could be found for command" elsif @gems.empty? @gems += Gem.source_index.find_name('') if @gems.empty? end end end end endyard-master/lib/yard/cli/graph.rb000066400000000000000000000074711265676644000172410ustar00rootroot00000000000000module YARD module CLI # Options to pass to the {Graph} CLI. class GraphOptions < Templates::TemplateOptions # @return [:dot] the default output format default_attr :format, :dot # @return [Boolean] whether to list the full class diagram attr_accessor :full # @return [Boolean] whether to show the object dependencies attr_accessor :dependencies # @return [String] any contents to pass to the digraph attr_accessor :contents end # A command-line utility to generate Graphviz graphs from # a set of objects # # @see Graph#run # @since 0.6.0 class Graph < YardoptsCommand # The options parsed out of the commandline. # Default options are: # :format => :dot attr_reader :options # The set of objects to include in the graph. attr_reader :objects # Creates a new instance of the command-line utility def initialize super @use_document_file = false @options = GraphOptions.new options.reset_defaults options.serializer = YARD::Serializers::StdoutSerializer.new end def description "Graphs class diagram using Graphviz" end # Runs the command-line utility. # # @example # grapher = Graph.new # grapher.run('--private') # @param [Array] args each tokenized argument def run(*args) parse_arguments(*args) contents = objects.map do |o| o.format(options.merge(:serialize => false)) end.join("\n") opts = {:type => :layout, :contents => contents} options.update(opts) Templates::Engine.render(options) end private def unrecognized_option(err) end # Parses commandline options. # @param [Array] args each tokenized argument def optparse(*args) visibilities = [:public] opts = OptionParser.new opts.separator "" opts.separator "General Options:" opts.on('-b', '--db FILE', 'Use a specified .yardoc db to load from or save to. (defaults to .yardoc)') do |yfile| YARD::Registry.yardoc_file = yfile end opts.on('--full', 'Full class diagrams (show methods and attributes).') do options[:full] = true end opts.on('-d', '--dependencies', 'Show mixins in dependency graph.') do options[:dependencies] = true end opts.on('--no-public', "Don't show public methods. (default shows public)") do visibilities.delete(:public) end opts.on('--protected', "Show or don't show protected methods. (default hides protected)") do visibilities.push(:protected) end opts.on('--private', "Show or don't show private methods. (default hides private)") do visibilities.push(:private) end opts.separator "" opts.separator "Output options:" opts.on('--dot [OPTIONS]', 'Send the results directly to `dot` with optional arguments.') do |dotopts| options.serializer = Serializers::ProcessSerializer.new('dot ' + dotopts.to_s) end opts.on('-f', '--file [FILE]', 'Writes output to a file instead of stdout.') do |file| options.serializer = Serializers::FileSystemSerializer.new(:basepath => '.', :extension => nil) options.serializer.instance_eval "def serialized_path(object) #{file.inspect} end" end common_options(opts) parse_options(opts, args) Registry.load expression = "#{visibilities.uniq.inspect}.include?(object.visibility)" options.verifier = Verifier.new(expression) if args.first @objects = args.map {|o| Registry.at(o) }.compact else @objects = [Registry.root] end end end end end yard-master/lib/yard/cli/help.rb000066400000000000000000000006701265676644000170620ustar00rootroot00000000000000module YARD module CLI # Handles help for commands # @since 0.6.0 class Help < Command def description; "Retrieves help for a command" end def run(*args) if args.first && cmd = CommandParser.commands[args.first.to_sym] cmd.run('--help') else log.puts "Command #{args.first} not found." if args.first CommandParser.run('--help') end end end end endyard-master/lib/yard/cli/i18n.rb000066400000000000000000000045061265676644000167130ustar00rootroot00000000000000require "pathname" module YARD module CLI # CLI command to support internationalization (a.k.a. i18n). # I18n feature is based on gettext technology. # This command generates .pot file from docstring and extra # documentation. # # @since 0.8.0 # @todo Support msgminit and msgmerge features? class I18n < Yardoc def initialize super @options.serializer.basepath = "po/yard.pot" end def description 'Generates .pot file from source code and extra documentation' end def run(*args) if args.size == 0 || !args.first.nil? # fail early if arguments are not valid return unless parse_arguments(*args) end YARD.parse(files, excluded) serializer = options.serializer pot_file_path = Pathname.new(serializer.basepath).expand_path pot_file_dir_path, pot_file_basename = pot_file_path.split relative_base_path = Pathname.pwd.relative_path_from(pot_file_dir_path) serializer.basepath = pot_file_dir_path.to_s serializer.serialize(pot_file_basename.to_s, generate_pot(relative_base_path.to_s)) true end private def general_options(opts) opts.banner = "Usage: yard i18n [options] [source_files [- extra_files]]" opts.top.list.clear opts.separator "(if a list of source files is omitted, " opts.separator " {lib,app}/**/*.rb ext/**/*.c is used.)" opts.separator "" opts.separator "Example: yard i18n -o yard.pot - FAQ LICENSE" opts.separator " The above example outputs .pot file for files in" opts.separator " lib/**/*.rb to yard.pot including the extra files" opts.separator " FAQ and LICENSE." opts.separator "" opts.separator "A base set of options can be specified by adding a .yardopts" opts.separator "file to your base path containing all extra options separated" opts.separator "by whitespace." super(opts) end def generate_pot(relative_base_path) generator = YARD::I18n::PotGenerator.new(relative_base_path) objects = run_verifier(all_objects) generator.parse_objects(objects) generator.parse_files(options.files || []) generator.generate end end end end yard-master/lib/yard/cli/list.rb000066400000000000000000000012551265676644000171050ustar00rootroot00000000000000module YARD module CLI # Lists all constant and method names in the codebase. Uses {Yardoc} --list. class List < Command def description; 'Lists all constant and methods. Uses `yard doc --list`' end # Runs the commandline utility, parsing arguments and displaying a # list of objects # # @param [Array] args the list of arguments. # @return [void] def run(*args) if args.include?('--help') log.puts "Usage: yard list [yardoc_options]" log.puts "Takes the same arguments as yardoc. See yardoc --help" else Yardoc.run('-c', '--list', *args) end end end end endyard-master/lib/yard/cli/markup_types.rb000066400000000000000000000020131265676644000206460ustar00rootroot00000000000000module YARD module CLI # Lists all markup types # @since 0.8.6 class MarkupTypes < Command def description; 'Lists all available markup types and libraries' end # Runs the commandline utility, parsing arguments and displaying a # list of markup types # # @param [Array] args the list of arguments. # @return [void] def run(*args) log.puts "Available markup types for `doc' command:" log.puts types = Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS exts = Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS types.sort_by {|name, _| name.to_s }.each do |name, providers| log.puts "[#{name}]" libs = providers.map {|p| p[:lib] }.compact if libs.size > 0 log.puts " Providers: #{libs.join(" ")}" end if exts[name] log.puts " Extensions: #{exts[name].map {|e| ".#{e}"}.join(" ")}" end log.puts end end end end end yard-master/lib/yard/cli/server.rb000066400000000000000000000214651265676644000174450ustar00rootroot00000000000000module YARD module CLI # A local documentation server # @since 0.6.0 class Server < Command # @return [Hash] a list of options to pass to the doc server attr_accessor :options # @return [Hash] a list of options to pass to the web server attr_accessor :server_options # @return [Hash] a list of library names and yardoc files to serve attr_accessor :libraries # @return [Adapter] the adapter to use for loading the web server attr_accessor :adapter # @return [Array] a list of scripts to load # @since 0.6.2 attr_accessor :scripts # @return [Array] a list of template paths to register # @since 0.6.2 attr_accessor :template_paths # Creates a new instance of the Server command line utility def initialize super self.scripts = [] self.template_paths = [] self.libraries = {} self.options = SymbolHash.new(false).update( :single_library => true, :caching => false ) self.server_options = {:Port => 8808} end def description "Runs a local documentation server" end def run(*args) optparse(*args) select_adapter.setup load_scripts load_template_paths adapter.new(libraries, options, server_options).start end private def load_scripts scripts.each {|file| load_script(file) } end def load_template_paths return if YARD::Config.options[:safe_mode] Templates::Engine.template_paths |= template_paths end def select_adapter return adapter if adapter require 'rubygems' require 'rack' self.adapter = YARD::Server::RackAdapter rescue LoadError self.adapter = YARD::Server::WebrickAdapter end def add_libraries(args) (0...args.size).step(2) do |index| library, dir = args[index], args[index + 1] libver = nil if dir if File.exist?(dir) # Provided dir contains a .yardopts file libver = create_library_version_if_yardopts_exist(library, dir) libver ||= YARD::Server::LibraryVersion.new(library, nil, dir) end else # Check if this dir contains a .yardopts file pwd = Dir.pwd libver = create_library_version_if_yardopts_exist(library, pwd) # Check default location yfile = File.join(pwd, '.yardoc') libver ||= YARD::Server::LibraryVersion.new(library, nil, yfile) end # Register library if libver libver.yardoc_file = File.expand_path(libver.yardoc_file) if libver.yardoc_file libver.source_path = File.expand_path(libver.source_path) if libver.source_path libraries[library] ||= [] libraries[library] |= [libver] else log.warn "Cannot find yardoc db for #{library}: #{dir.inspect}" end end end # @param [String] library The library name. # @param [String, nil] dir The argument provided on the CLI after the # library name. Is supposed to point to either a project directory # with a Yard options file, or a yardoc db. # @return [LibraryVersion, nil] def create_library_version_if_yardopts_exist(library, dir) if dir options_file = File.join(dir, Yardoc::DEFAULT_YARDOPTS_FILE) if File.exist?(options_file) # Found yardopts, extract db path yfile = extract_db_from_options_file(options_file) db = File.expand_path(yfile, dir) # Create libver libver = YARD::Server::LibraryVersion.new(library, nil, db) libver.source_path = dir libver end end end def add_gems require 'rubygems' Gem.source_index.find_name('').each do |spec| libraries[spec.name] ||= [] libraries[spec.name] |= [YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem)] end end def add_gems_from_gemfile(gemfile = nil) require 'bundler' gemfile ||= "Gemfile" if File.exist?("#{gemfile}.lock") Bundler::LockfileParser.new(File.read("#{gemfile}.lock")).specs.each do |spec| libraries[spec.name] ||= [] libraries[spec.name] |= [YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem)] end else log.warn "Cannot find #{gemfile}.lock, ignoring --gemfile option" end rescue LoadError log.error "Bundler not available, ignoring --gemfile option" end def optparse(*args) opts = OptionParser.new opts.banner = 'Usage: yard server [options] [[library yardoc_file] ...]' opts.separator '' opts.separator 'Example: yard server -m yard .yardoc ruby-core ../ruby/.yardoc' opts.separator 'The above example serves documentation for YARD and Ruby-core' opts.separator '' opts.separator 'If no library/yardoc_file is specified, the server uses' opts.separator 'the name of the current directory and `.yardoc` respectively' opts.separator '' opts.separator "General Options:" opts.on('-m', '--multi-library', 'Serves documentation for multiple libraries') do options[:single_library] = false end opts.on('-c', '--cache', 'Caches all documentation to document root (see --docroot)') do options[:caching] = true end opts.on('-r', '--reload', 'Reparses the library code on each request') do options[:incremental] = true end opts.on('-g', '--gems', 'Serves documentation for installed gems') do add_gems end opts.on('-G', '--gemfile [GEMFILE]', 'Serves documentation for gems from Gemfile') do |gemfile| add_gems_from_gemfile(gemfile) end opts.on('-t', '--template-path PATH', 'The template path to look for templates in. (used with -t).') do |path| self.template_paths << path end opts.separator '' opts.separator "Web Server Options:" opts.on('-d', '--daemon', 'Daemonizes the server process') do server_options[:daemonize] = true end opts.on('-B HOST', '--bind', 'The host address to bind to') do |host| server_options[:Host] = host.to_s end opts.on('-p PORT', '--port', 'Serves documentation on PORT') do |port| server_options[:Port] = port.to_i end opts.on('--docroot DOCROOT', 'Uses DOCROOT as document root') do |docroot| server_options[:DocumentRoot] = File.expand_path(docroot) end opts.on('-a', '--adapter ADAPTER', 'Use the ADAPTER (full Ruby class) for web server') do |adapter| if adapter.downcase == 'webrick' self.adapter = YARD::Server::WebrickAdapter elsif adapter.downcase == 'rack' self.adapter = YARD::Server::RackAdapter else self.adapter = eval(adapter) end end opts.on('-s', '--server TYPE', 'Use a specific server type eg. thin,mongrel,cgi (Rack specific)') do |type| server_options[:server] = type end common_options(opts) opts.on('-e', '--load FILE', 'A Ruby script to load before the source tree is parsed.') do |file| self.scripts << file end parse_options(opts, args) if args.empty? && libraries.empty? # No args - try to use current dir add_libraries([File.basename(Dir.pwd), nil]) # Generate doc for first time libver = libraries.empty? ? nil : libraries.values.first.first if libver and !File.exist?(libver.yardoc_file) generate_doc_for_first_time(libver) end else add_libraries(args) options[:single_library] = false if libraries.size > 1 end end def generate_doc_for_first_time(libver) log.enter_level(Logger::INFO) do yardoc_file = libver.yardoc_file.sub /^#{Regexp.quote Dir.pwd}[\\\/]+/, '' log.info "No yardoc db found in #{yardoc_file}, parsing source before starting server..." end Dir.chdir(libver.source_path) do Yardoc.run('-n') end end def extract_db_from_options_file(options_file) args = File.read_binary(options_file).shell_split db = YARD::Registry.yardoc_file opts = OptionParser.new opts.on('-b', '--db FILE') {|file| db = file } begin opts.parse!(args) rescue OptionParser::ParseError args.shift if args.first && args.first[0,1] != '-' retry end db end end end end yard-master/lib/yard/cli/stats.rb000066400000000000000000000150621265676644000172710ustar00rootroot00000000000000module YARD module CLI # @since 0.6.0 class Stats < Yardoc include Templates::Helpers::BaseHelper # Maintains the order in which +stats_for_+ statistics methods should be # printed. # # @see #print_statistics STATS_ORDER = [:files, :modules, :classes, :constants, :methods] # @return [Boolean] whether to parse and load registry attr_accessor :parse # @param [Boolean] parse whether to parse and load registry (see {#parse}) def initialize(parse = true) super() @parse = parse @undoc_list = nil @compact = false end def description "Prints documentation statistics on a set of files" end # Runs the commandline utility, parsing arguments and generating # output if set. # # @param [Array] args the list of arguments # @return [void] def run(*args) parse_arguments(*args) if use_cache Registry.load! elsif parse YARD.parse(files, excluded) Registry.save(use_cache) if save_yardoc end print_statistics print_undocumented_objects end # Prints statistics for different object types # # To add statistics for a specific type, add a method +#stats_for_TYPE+ # to this class that calls {#output}. def print_statistics @total, @undocumented = 0, 0 meths = methods.map {|m| m.to_s }.grep(/^stats_for_/) STATS_ORDER.each do |meth| mname = "stats_for_#{meth}" if meths.include?(mname) send(mname) meths.delete(mname) end end meths.each {|m| send(m) } if @undocumented == 0 total = 100 elsif @total == 0 total = 0 else total = (@total - @undocumented).to_f / @total.to_f * 100 end log.puts("% 3.2f%% documented" % total) end # Prints list of undocumented objects def print_undocumented_objects return if !@undoc_list || @undoc_list.empty? log.puts log.puts "Undocumented Objects:" objects = @undoc_list.sort_by {|o| o.file.to_s } max = objects.sort_by {|o| o.path.length }.last.path.length if @compact objects.each do |object| log.puts("%-#{max}s (%s)" % [object.path, [object.file || "-unknown-", object.line].compact.join(":")]) end else last_file = nil objects.each do |object| if object.file != last_file log.puts log.puts "(in file: #{object.file || "-unknown-"})" end log.puts object.path last_file = object.file end end end # @return [Array] all the parsed objects in the registry, # removing any objects that are not visible (private, protected) depending # on the arguments passed to the command. def all_objects @all_objects ||= run_verifier Registry.all end # Statistics for files def stats_for_files files = [] all_objects.each {|o| files |= [o.file] } output "Files", files.size end # Statistics for modules def stats_for_modules output "Modules", *type_statistics(:module) end # Statistics for classes def stats_for_classes output "Classes", *type_statistics(:class) end # Statistics for constants def stats_for_constants output "Constants", *type_statistics(:constant) end # Statistics for methods def stats_for_methods objs = all_objects.select {|m| m.type == :method } objs.reject! {|m| m.is_alias? } undoc = objs.select {|m| m.docstring.blank? } @undoc_list |= undoc if @undoc_list output "Methods", objs.size, undoc.size end # Prints a statistic to standard out. This method is optimized for # getting Integer values, though it allows any data to be printed. # # @param [String] name the statistic name # @param [Integer, String] data the numeric (or any) data representing # the statistic. If +data+ is an Integer, it should represent the # total objects of a type. # @param [Integer, nil] undoc number of undocumented objects for the type # @return [void] def output(name, data, undoc = nil) @total += data if data.is_a?(Integer) && undoc @undocumented += undoc if undoc.is_a?(Integer) if undoc data = ("%5s (% 5d undocumented)" % [data, undoc]) else data = "%5s" % data end log.puts("%-12s %s" % [name + ":", data]) end private def type_statistics(type) objs = all_objects.select {|m| m.type == type } undoc = objs.find_all {|m| m.docstring.blank? } @undoc_list |= undoc if @undoc_list [objs.size, undoc.size] end # Parses commandline options. # @param [Array] args each tokenized argument def optparse(*args) opts = OptionParser.new opts.banner = "Usage: yard stats [options] [source_files]" opts.separator "(if a list of source files is omitted, lib/**/*.rb ext/**/*.c is used.)" general_options(opts) output_options(opts) tag_options(opts) common_options(opts) parse_options(opts, args) parse_files(*args) unless args.empty? end def general_options(opts) super(opts) opts.on('--list-undoc', 'List all undocumented objects') do @undoc_list = [] end opts.on('--compact', 'Compact undocumented objects listing') do @compact = true end opts.on('--no-public', "Don't include public methods in statistics.") do visibilities.delete(:public) end opts.on('--protected', "Include protected methods in statistics.") do visibilities.push(:protected) end opts.on('--private', "Include private methods in statistics.") do visibilities.push(:private) end opts.on('--no-private', "Don't include objects with @private tag in statistics.") do options[:verifier].add_expressions '!object.tag(:private) && (object.namespace.type == :proxy || !object.namespace.tag(:private))' end opts.on('--query QUERY', "Only includes objects that match a specific query") do |query| options[:verifier].add_expressions(query.taint) end end end end end yard-master/lib/yard/cli/yardoc.rb000066400000000000000000000642731265676644000174240ustar00rootroot00000000000000require 'digest/sha1' require 'fileutils' module YARD module CLI # Default options used in +yard doc+ command. class YardocOptions < Templates::TemplateOptions # @return [Array] # the list of extra files rendered along with objects default_attr :files, lambda { [] } # @return [String] the default title appended to each generated page default_attr :title, "Documentation by YARD #{YARD::VERSION}" # @return [Verifier] the default verifier object to filter queries default_attr :verifier, lambda { Verifier.new } # @return [Serializers::Base] the default serializer for generating output # to disk. default_attr :serializer, lambda { Serializers::FileSystemSerializer.new } # @return [Symbol] the default output format (:html). default_attr :format, :html # @return [Boolean] whether the data should be rendered in a single page, # if the template supports it. default_attr :onefile, false # @return [CodeObjects::ExtraFileObject] the README file object rendered # along with objects attr_accessor :readme # @return [Array] the list of code objects to render # the templates with. attr_accessor :objects # @return [Numeric] An index value for rendering sequentially related templates attr_accessor :index # @return [CodeObjects::Base] an extra item to send to a template that is not # the main rendered object attr_accessor :item # @return [CodeObjects::ExtraFileObject] the file object being rendered. # The +object+ key is not used so that a file may be rendered in the context # of an object's namespace (for generating links). attr_reader :file def file=(v) @file = v end # @return [String] the current locale attr_accessor :locale end # Yardoc is the default YARD CLI command (+yard doc+ and historic +yardoc+ # executable) used to generate and output (mainly) HTML documentation given # a set of source files. # # == Usage # # Main usage for this command is: # # $ yardoc [options] [source_files [- extra_files]] # # See +yardoc --help+ for details on valid options. # # == Options File (+.yardopts+) # # If a +.yardopts+ file is found in the source directory being processed, # YARD will use the contents of the file as arguments to the command, # treating newlines as spaces. You can use shell-style quotations to # group space delimited arguments, just like on the command line. # # A valid +.yardopts+ file might look like: # # --no-private # --title "My Title" # --exclude foo --exclude bar # lib/**/*.erb # lib/**/*.rb - # HACKING.rdoc LEGAL COPYRIGHT # # Note that Yardoc also supports the legacy RDoc style +.document+ file, # though this file can only specify source globs to parse, not options. # # == Queries (+--query+) # # Yardoc supports queries to select specific code objects for which to # generate documentation. For example, you might want to generate # documentation only for your public API. If you've documented your public # methods with +@api public+, you can use the following query to select # all of these objects: # # --query '@api.text == "public"' # # Note that the syntax for queries is mostly Ruby with a few syntactic # simplifications for meta-data tags. See the {Verifier} class for an # overview of this syntax. # # == Adding Custom Ad-Hoc Meta-data Tags (+--tag+) # # YARD allows specification of {file:docs/Tags.md meta-data tags} # programmatically via the {YARD::Tags::Library} class, but often this is not # practical for users writing documentation. To make adding custom tags # easier, Yardoc has a few command-line switches for creating basic tags # and displaying them in generated HTML output. # # To specify a custom tag to be displayed in output, use any of the # following: # # * +--tag+ TAG:TITLE # * +--name-tag+ TAG:TITLE # * +--type-tag+ TAG:TITLE # * +--type-name-tag+ TAG:TITLE # * +--title-tag+ TAG:TITLE # # "TAG:TITLE" is of the form: name:"Display Title", for example: # # --tag overload:"Overloaded Method" # # See +yardoc --help+ for a description of the various options. # # Tags added in this way are automatically displayed in output. To add # a meta-data tag that does not show up in output, use +--hide-tag TAG+. # Note that you can also use this option on existing tags to hide # builtin tags, for instance. # # == Processed Data Storage (+.yardoc+ directory) # # When Yardoc parses a source directory, it creates a +.yardoc+ directory # (by default, override with +-b+) at the root of the project. This directory # contains marshal dumps for all raw object data in the source, so that # you can access it later for various commands (+stats+, +graph+, etc.). # This directory is also used as a cache for any future calls to +yardoc+ # so as to process only the files which have changed since the last call. # # When Yardoc uses the cache in subsequent calls to +yardoc+, methods # or classes that have been deleted from source since the last parsing # will not be erased from the cache (YARD never deletes objects). In such # a case, you should wipe the cache and do a clean parsing of the source tree. # You can do this by deleting the +.yardoc+ directory manually, or running # Yardoc without +--use-cache+ (+-c+). # # @since 0.2.1 # @see Verifier class Yardoc < YardoptsCommand # @return [Hash] the hash of options passed to the template. # @see Templates::Engine#render attr_reader :options # @return [Array] list of Ruby source files to process attr_accessor :files # @return [Array] list of excluded paths (regexp matches) # @since 0.5.3 attr_accessor :excluded # @return [Boolean] whether to use the existing yardoc db if the # .yardoc already exists. Also makes use of file checksums to # parse only changed files. attr_accessor :use_cache # @return [Boolean] whether objects should be serialized to .yardoc db attr_accessor :save_yardoc # @return [Boolean] whether to generate output attr_accessor :generate # @return [Boolean] whether to print a list of objects # @since 0.5.5 attr_accessor :list # Keep track of which visibilities are to be shown # @return [Array] a list of visibilities # @since 0.5.6 attr_accessor :visibilities # Keep track of which APIs are to be shown # @return [Array] a list of APIs # @since 0.8.1 attr_accessor :apis # Keep track of which APIs are to be hidden # @return [Array] a list of APIs to be hidden # @since 0.8.7 attr_accessor :hidden_apis # @return [Array] a list of tags to hide from templates # @since 0.6.0 attr_accessor :hidden_tags # @return [Boolean] whether to print statistics after parsing # @since 0.6.0 attr_accessor :statistics # @return [Array] a list of assets to copy after generation # @since 0.6.0 attr_accessor :assets # @return [Boolean] whether markup option was specified # @since 0.7.0 attr_accessor :has_markup # Creates a new instance of the commandline utility def initialize super @options = YardocOptions.new @options.reset_defaults @visibilities = [:public] @apis = [] @hidden_apis = [] @assets = {} @excluded = [] @files = [] @hidden_tags = [] @use_cache = false @generate = true @statistics = true @list = false @save_yardoc = true @has_markup = false if defined?(::Encoding) && ::Encoding.respond_to?(:default_external=) ::Encoding.default_external, ::Encoding.default_internal = 'utf-8', 'utf-8' end end def description "Generates documentation" end # Runs the commandline utility, parsing arguments and generating # output if set. # # @param [Array] args the list of arguments. If the list only # contains a single nil value, skip calling of {#parse_arguments} # @return [void] def run(*args) log.show_progress = true if args.size == 0 || !args.first.nil? # fail early if arguments are not valid return unless parse_arguments(*args) end checksums = nil if use_cache Registry.load checksums = Registry.checksums.dup end YARD.parse(files, excluded) Registry.save(use_cache) if save_yardoc if generate run_generate(checksums) copy_assets elsif list print_list end if !list && statistics && log.level < Logger::ERROR Registry.load_all log.enter_level(Logger::ERROR) do Stats.new(false).run(*args) end end true ensure log.show_progress = false end # Parses commandline arguments # @param [Array] args the list of arguments # @return [Boolean] whether or not arguments are valid # @since 0.5.6 def parse_arguments(*args) super(*args) # Last minute modifications self.files = Parser::SourceParser::DEFAULT_PATH_GLOB if self.files.empty? self.files.delete_if {|x| x =~ /\A\s*\Z/ } # remove empty ones readme = Dir.glob('README{,*[^~]}').first readme ||= Dir.glob(files.first).first if options.onefile options.readme ||= CodeObjects::ExtraFileObject.new(readme) if readme options.files.unshift(options.readme).uniq! if options.readme Tags::Library.visible_tags -= hidden_tags add_visibility_verifier add_api_verifier apply_locale # US-ASCII is invalid encoding for onefile if defined?(::Encoding) && options.onefile if ::Encoding.default_internal == ::Encoding::US_ASCII log.warn "--one-file is not compatible with US-ASCII encoding, using ASCII-8BIT" ::Encoding.default_external, ::Encoding.default_internal = ['ascii-8bit'] * 2 end end if generate && !verify_markup_options false else true end end # The list of all objects to process. Override this method to change # which objects YARD should generate documentation for. # # @deprecated To hide methods use the +@private+ tag instead. # @return [Array] a list of code objects to process def all_objects Registry.all(:root, :module, :class) end private # Generates output for objects # @param [Hash, nil] checksums if supplied, a list of checkums for files. # @return [void] # @since 0.5.1 def run_generate(checksums) if checksums changed_files = [] Registry.checksums.each do |file, hash| changed_files << file if checksums[file] != hash end end Registry.load_all if use_cache objects = run_verifier(all_objects).reject do |object| serialized = !options.serializer || options.serializer.exists?(object) if checksums && serialized && !object.files.any? {|f, line| changed_files.include?(f) } true else log.debug "Re-generating object #{object.path}..." false end end Templates::Engine.generate(objects, options) end # Verifies that the markup options are valid before parsing any code. # Failing early is better than failing late. # # @return (see YARD::Templates::Helpers::MarkupHelper#load_markup_provider) def verify_markup_options result, lvl = false, has_markup ? log.level : Logger::FATAL obj = Struct.new(:options).new(options) obj.extend(Templates::Helpers::MarkupHelper) options.files.each do |file| markup = file.attributes[:markup] || obj.markup_for_file('', file.filename) result = obj.load_markup_provider(markup) return false if !result && markup != :rdoc end options.markup = :rdoc unless has_markup log.enter_level(lvl) { result = obj.load_markup_provider } if !result && !has_markup log.warn "Could not load default RDoc formatter, " + "ignoring any markup (install RDoc to get default formatting)." options.markup = :none true else result end end # Copies any assets to the output directory # @return [void] # @since 0.6.0 def copy_assets return unless options.serializer outpath = options.serializer.basepath assets.each do |from, to| to = File.join(outpath, to) log.debug "Copying asset '#{from}' to '#{to}'" from += '/.' if File.directory?(from) FileUtils.cp_r(from, to) end end # Prints a list of all objects # @return [void] # @since 0.5.5 def print_list Registry.load_all run_verifier(Registry.all). sort_by {|item| [item.file || '', item.line || 0] }.each do |item| log.puts "#{item.file}:#{item.line}: #{item.path}" end end # Adds a set of extra documentation files to be processed # @param [Array] files the set of documentation files def add_extra_files(*files) files.map! {|f| f.include?("*") ? Dir.glob(f) : f }.flatten! files.each do |file| if File.file?(file) options.files << CodeObjects::ExtraFileObject.new(file) else log.warn "Could not find extra file: #{file}" end end end # Parses the file arguments into Ruby files and extra files, which are # separated by a '-' element. # # @example Parses a set of Ruby source files # parse_files %w(file1 file2 file3) # @example Parses a set of Ruby files with a separator and extra files # parse_files %w(file1 file2 - extrafile1 extrafile2) # @param [Array] files the list of files to parse # @return [void] def parse_files(*files) seen_extra_files_marker = false files.each do |file| if file == "-" seen_extra_files_marker = true next end if seen_extra_files_marker add_extra_files(file) else self.files << file end end end # Adds verifier rule for visibilities # @return [void] # @since 0.5.6 def add_visibility_verifier vis_expr = "#{visibilities.uniq.inspect}.include?(object.visibility)" options.verifier.add_expressions(vis_expr) end # Adds verifier rule for APIs # @return [void] # @since 0.8.1 def add_api_verifier no_api = true if apis.delete('') exprs = [] if apis.size > 0 exprs << "#{apis.uniq.inspect}.include?(@api.text)" end if hidden_apis.size > 0 exprs << "!#{hidden_apis.uniq.inspect}.include?(@api.text)" end exprs = exprs.size > 0 ? [exprs.join(' && ')] : [] exprs << "!@api" if no_api expr = exprs.join(' || ') options.verifier.add_expressions(expr) unless expr.empty? end # Applies the specified locale to collected objects # @return [void] # @since 0.8.3 def apply_locale YARD::I18n::Locale.default = options.locale options.files.each do |file| file.locale = options.locale end end # (see Templates::Helpers::BaseHelper#run_verifier) def run_verifier(list) options.verifier ? options.verifier.run(list) : list end # @since 0.6.0 def add_tag(tag_data, factory_method = nil) tag, title = *tag_data.split(':') title ||= tag.capitalize Tags::Library.define_tag(title, tag.to_sym, factory_method) Tags::Library.visible_tags |= [tag.to_sym] end # Parses commandline options. # @param [Array] args each tokenized argument def optparse(*args) opts = OptionParser.new opts.banner = "Usage: yard doc [options] [source_files [- extra_files]]" opts.separator "(if a list of source files is omitted, " opts.separator " {lib,app}/**/*.rb ext/**/*.c is used.)" opts.separator "" opts.separator "Example: yardoc -o documentation/ - FAQ LICENSE" opts.separator " The above example outputs documentation for files in" opts.separator " lib/**/*.rb to documentation/ including the extra files" opts.separator " FAQ and LICENSE." opts.separator "" opts.separator "A base set of options can be specified by adding a .yardopts" opts.separator "file to your base path containing all extra options separated" opts.separator "by whitespace." general_options(opts) output_options(opts) tag_options(opts) common_options(opts) parse_options(opts, args) parse_files(*args) unless args.empty? end # Adds general options def general_options(opts) opts.separator "" opts.separator "General Options:" opts.on('-b', '--db FILE', 'Use a specified .yardoc db to load from or save to', ' (defaults to .yardoc)') do |yfile| YARD::Registry.yardoc_file = yfile end opts.on('--[no-]single-db', 'Whether code objects should be stored to single', ' database file (advanced)') do |use_single_db| Registry.single_object_db = use_single_db end opts.on('-n', '--no-output', 'Only generate .yardoc database, no documentation.') do self.generate = false end opts.on('-c', '--use-cache [FILE]', "Use the cached .yardoc db to generate documentation.", " (defaults to no cache)") do |file| YARD::Registry.yardoc_file = file if file self.use_cache = true end opts.on('--no-cache', "Clear .yardoc db before parsing source.") do self.use_cache = false end yardopts_options(opts) opts.on('--no-save', 'Do not save the parsed data to the yardoc db') do self.save_yardoc = false end opts.on('--exclude REGEXP', 'Ignores a file if it matches path match (regexp)') do |path| self.excluded << path end end # Adds output options def output_options(opts) opts.separator "" opts.separator "Output options:" opts.on('--one-file', 'Generates output as a single file') do options.onefile = true end opts.on('--list', 'List objects to standard out (implies -n)') do |format| self.generate = false self.list = true end opts.on('--no-public', "Don't show public methods. (default shows public)") do visibilities.delete(:public) end opts.on('--protected', "Show protected methods. (default hides protected)") do visibilities.push(:protected) end opts.on('--private', "Show private methods. (default hides private)") do visibilities.push(:private) end opts.on('--no-private', "Hide objects with @private tag") do options.verifier.add_expressions '!object.tag(:private) && (object.namespace.is_a?(CodeObjects::Proxy) || !object.namespace.tag(:private))' end opts.on('--[no-]api API', 'Generates documentation for a given API', '(objects which define the correct @api tag).', 'If --no-api is given, displays objects with', 'no @api tag.') do |api| api = '' if api == false apis.push(api) end opts.on('--hide-api API', 'Hides given @api tag from documentation') do |api| hidden_apis.push(api) end opts.on('--embed-mixins', "Embeds mixin methods into class documentation") do options.embed_mixins << '*' end opts.on('--embed-mixin [MODULE]', "Embeds mixin methods from a particular", " module into class documentation") do |mod| options.embed_mixins << mod end opts.on('--no-highlight', "Don't highlight code blocks in output.") do options.highlight = false end opts.on('--default-return TYPE', "Shown if method has no return type. ", " (defaults to 'Object')") do |type| options.default_return = type end opts.on('--hide-void-return', "Hides return types specified as 'void'. ", " (default is shown)") do options.hide_void_return = true end opts.on('--query QUERY', "Only show objects that match a specific query") do |query| next if YARD::Config.options[:safe_mode] options.verifier.add_expressions(query.taint) end opts.on('--title TITLE', 'Add a specific title to HTML documents') do |title| options.title = title end opts.on('-r', '--readme FILE', '--main FILE', 'The readme file used as the title page', ' of documentation.') do |readme| if File.file?(readme) options.readme = CodeObjects::ExtraFileObject.new(readme) else log.warn "Could not find readme file: #{readme}" end end opts.on('--files FILE1,FILE2,...', 'Any extra comma separated static files to be ', ' included (eg. FAQ)') do |files| add_extra_files(*files.split(",")) end opts.on('--asset FROM[:TO]', 'A file or directory to copy over to output ', ' directory after generating') do |asset| re = /^(?:\.\.\/|\/)/ from, to = *asset.split(':').map {|f| File.cleanpath(f) } to ||= from if from =~ re || to =~ re log.warn "Invalid file '#{asset}'" else assets[from] = to end end opts.on('-o', '--output-dir PATH', 'The output directory. (defaults to ./doc)') do |dir| options.serializer.basepath = dir end opts.on('-m', '--markup MARKUP', 'Markup style used in documentation, like textile, ', ' markdown or rdoc. (defaults to rdoc)') do |markup| self.has_markup = true options.markup = markup.to_sym end opts.on('-M', '--markup-provider MARKUP_PROVIDER', 'Overrides the library used to process markup ', ' formatting (specify the gem name)') do |markup_provider| options.markup_provider = markup_provider.to_sym end opts.on('--charset ENC', 'Character set to use when parsing files ', ' (default is system locale)') do |encoding| begin if defined?(Encoding) && Encoding.respond_to?(:default_external=) Encoding.default_external, Encoding.default_internal = encoding, encoding end rescue ArgumentError => e raise OptionParser::InvalidOption, e end end opts.on('-t', '--template TEMPLATE', 'The template to use. (defaults to "default")') do |template| options.template = template.to_sym end opts.on('-p', '--template-path PATH', 'The template path to look for templates in.', ' (used with -t).') do |path| next if YARD::Config.options[:safe_mode] YARD::Templates::Engine.register_template_path(File.expand_path(path)) end opts.on('-f', '--format FORMAT', 'The output format for the template.', ' (defaults to html)') do |format| options.format = format.to_sym end opts.on('--no-stats', 'Don\'t print statistics') do self.statistics = false end opts.on('--locale LOCALE', 'The locale for generated documentation.', ' (defaults to en)') do |locale| options.locale = locale end opts.on('--po-dir DIR', 'The directory that has .po files.', " (defaults to #{YARD::Registry.po_dir})") do |dir| YARD::Registry.po_dir = dir end end # Adds tag options # @since 0.6.0 def tag_options(opts) opts.separator "" opts.separator "Tag options: (TAG:TITLE looks like: 'overload:Overloaded Method')" opts.on('--tag TAG:TITLE', 'Registers a new free-form metadata @tag') do |tag| add_tag(tag) end opts.on('--type-tag TAG:TITLE', 'Tag with an optional types field') do |tag| add_tag(tag, :with_types) end opts.on('--type-name-tag TAG:TITLE', 'Tag with optional types and a name field') do |tag| add_tag(tag, :with_types_and_name) end opts.on('--name-tag TAG:TITLE', 'Tag with a name field') do |tag| add_tag(tag, :with_name) end opts.on('--title-tag TAG:TITLE', 'Tag with first line as title field') do |tag| add_tag(tag, :with_title_and_text) end opts.on('--hide-tag TAG', 'Hides a previously defined tag from templates') do |tag| self.hidden_tags |= [tag.to_sym] end opts.on('--transitive-tag TAG', 'Marks a tag as transitive') do |tag| Tags::Library.transitive_tags |= [tag.to_sym] end opts.on('--non-transitive-tag TAG', 'Marks a tag as not transitive') do |tag| Tags::Library.transitive_tags -= [tag.to_sym] end end end end end yard-master/lib/yard/cli/yardopts_command.rb000066400000000000000000000066121265676644000214770ustar00rootroot00000000000000require 'optparse' module YARD module CLI # Abstract base class for command that reads .yardopts file # # @abstract # @since 0.8.3 class YardoptsCommand < Command # The configuration filename to load extra options from DEFAULT_YARDOPTS_FILE = ".yardopts" # @return [Boolean] whether to parse options from .yardopts attr_accessor :use_yardopts_file # @return [Boolean] whether to parse options from .document attr_accessor :use_document_file # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) # @return [String] the filename to load extra options from attr_accessor :options_file # Creates a new command that reads .yardopts def initialize super @options_file = DEFAULT_YARDOPTS_FILE @use_yardopts_file = true @use_document_file = true end # Parses commandline arguments # @param [Array] args the list of arguments # @return [Boolean] whether or not arguments are valid # @since 0.5.6 def parse_arguments(*args) parse_yardopts_options(*args) # Parse files and then command line arguments parse_rdoc_document_file parse_yardopts optparse(*args) end protected # Adds --[no-]yardopts / --[no-]document def yardopts_options(opts) opts.on('--[no-]yardopts [FILE]', "If arguments should be read from FILE", " (defaults to yes, FILE defaults to .yardopts)") do |use_yardopts| if use_yardopts.is_a?(String) self.options_file = use_yardopts self.use_yardopts_file = true else self.use_yardopts_file = (use_yardopts != false) end end opts.on('--[no-]document', "If arguments should be read from .document file. ", " (defaults to yes)") do |use_document| self.use_document_file = use_document end end private # Parses the .yardopts file for default yard options # @return [Array] an array of options parsed from .yardopts def yardopts(file = options_file) return [] unless use_yardopts_file File.read_binary(file).shell_split rescue Errno::ENOENT [] end # Parses out the yardopts/document options def parse_yardopts_options(*args) opts = OptionParser.new opts.base.long.clear # HACK: why are --help and --version defined? yardopts_options(opts) begin opts.parse(args) rescue OptionParser::ParseError => err idx = args.index(err.args.first) args = args[(idx+1)..-1] args.shift while args.first && args.first[0,1] != '-' retry end end def parse_rdoc_document_file(file = '.document') optparse(*support_rdoc_document_file!(file)) if use_document_file end def parse_yardopts(file = options_file) optparse(*yardopts(file)) if use_yardopts_file end # Reads a .document file in the directory to get source file globs # @return [Array] an array of files parsed from .document def support_rdoc_document_file!(file = '.document') return [] unless use_document_file File.read(file).gsub(/^[ \t]*#.+/m, '').split(/\s+/) rescue Errno::ENOENT [] end end end end yard-master/lib/yard/cli/yri.rb000066400000000000000000000145521265676644000167410ustar00rootroot00000000000000require 'rbconfig' module YARD module CLI # A tool to view documentation in the console like `ri` class YRI < Command # The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded # from. CACHE_FILE = File.expand_path('~/.yard/yri_cache') # A file containing all paths, delimited by newlines, to search for # yardoc databases. # @since 0.5.1 SEARCH_PATHS_FILE = File.expand_path('~/.yard/yri_search_paths') # Default search paths that should be loaded dynamically into YRI. These paths # take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems # paths). To add a path, call: # # DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc") # # @return [Array] a list of extra search paths # @since 0.6.0 DEFAULT_SEARCH_PATHS = [] # Helper method to run the utility on an instance. # @see #run def self.run(*args) new.run(*args) end def initialize super @cache = {} @search_paths = [] add_default_paths add_gem_paths load_cache @search_paths.uniq! end def description "A tool to view documentation in the console like `ri`" end # Runs the command-line utility. # # @example # YRI.new.run('String#reverse') # @param [Array] args each tokenized argument def run(*args) optparse(*args) if ::RbConfig::CONFIG['host_os'] =~ /mingw|win32/ @serializer ||= YARD::Serializers::StdoutSerializer.new else @serializer ||= YARD::Serializers::ProcessSerializer.new('less') end if @name.nil? || @name.strip.empty? print_usage exit(1) elsif object = find_object(@name) print_object(object) else STDERR.puts "No documentation for `#{@name}'" exit(1) end end protected # Prints the command usage # @return [void] # @since 0.5.6 def print_usage log.puts "Usage: yri [options] " log.puts "See yri --help for more options." end # Caches the .yardoc file where an object can be found in the {CACHE_FILE} # @return [void] def cache_object(name, path) return if path == Registry.yardoc_file @cache[name] = path File.open!(CACHE_FILE, 'w') do |file| @cache.each do |key, value| file.puts("#{key} #{value}") end end end # @param [CodeObjects::Base] object the object to print. # @return [String] the formatted output for an object. def print_object(object) if object.type == :method && object.is_alias? tmp = P(object.namespace, (object.scope == :instance ? "#" : "") + object.namespace.aliases[object].to_s) object = tmp unless YARD::CodeObjects::Proxy === tmp end object.format(:serializer => @serializer) end # Locates an object by name starting in the cached paths and then # searching through any search paths. # # @param [String] name the full name of the object # @return [CodeObjects::Base] an object if found # @return [nil] if no object is found def find_object(name) @search_paths.unshift(@cache[name]) if @cache[name] @search_paths.unshift(Registry.yardoc_file) # Try to load it from in memory cache log.debug "Searching for #{name} in memory" if obj = try_load_object(name, nil) return obj end log.debug "Searching for #{name} in search paths" @search_paths.each do |path| next unless File.exist?(path) log.debug "Searching for #{name} in #{path}..." Registry.load(path) if obj = try_load_object(name, path) return obj end end nil end private # Tries to load the object with name. If successful, caches the object # with the cache_path # # @param [String] name the object path # @param [String] cache_path the location of the yardoc # db containing the object to cache for future lookups. # No caching is done if this is nil. # @return [void] def try_load_object(name, cache_path) if obj = Registry.at(name) if cache_path cache_object(name, cache_path) end return obj end end # Loads {CACHE_FILE} # @return [void] def load_cache return unless File.file?(CACHE_FILE) File.readlines(CACHE_FILE).each do |line| line = line.strip.split(/\s+/) @cache[line[0]] = line[1] end end # Adds all RubyGems yardoc files to search paths # @return [void] def add_gem_paths require 'rubygems' gem_paths = [] Gem.source_index.find_name('').each do |spec| if yfile = Registry.yardoc_file_for_gem(spec.name) if spec.name =~ /^yard-doc-/ gem_paths.unshift(yfile) else gem_paths.push(yfile) end end end @search_paths += gem_paths rescue LoadError end # Adds paths in {SEARCH_PATHS_FILE} # @since 0.5.1 def add_default_paths @search_paths.push(*DEFAULT_SEARCH_PATHS) return unless File.file?(SEARCH_PATHS_FILE) paths = File.readlines(SEARCH_PATHS_FILE).map {|l| l.strip } @search_paths.push(*paths) end # Parses commandline options. # @param [Array] args each tokenized argument def optparse(*args) opts = OptionParser.new opts.banner = "Usage: yri [options] " opts.separator "Example: yri String#gsub" opts.separator "" opts.separator "General Options:" opts.on('-b', '--db FILE', 'Use a specified .yardoc db to search in') do |yfile| @search_paths.unshift(yfile) end opts.on('-T', '--no-pager', 'No pager') do @serializer = YARD::Serializers::StdoutSerializer.new end opts.on('-p PAGER', '--pager') do |pager| @serializer = YARD::Serializers::ProcessSerializer.new(pager) end common_options(opts) parse_options(opts, args) @name = args.first end end end end yard-master/lib/yard/code_objects/000077500000000000000000000000001265676644000174565ustar00rootroot00000000000000yard-master/lib/yard/code_objects/base.rb000066400000000000000000000527461265676644000207330ustar00rootroot00000000000000module YARD module CodeObjects # A list of code objects. This array acts like a set (no unique items) # but also disallows any {Proxy} objects from being added. class CodeObjectList < Array # Creates a new object list associated with a namespace # # @param [NamespaceObject] owner the namespace the list should be associated with # @return [CodeObjectList] def initialize(owner = Registry.root) @owner = owner end # Adds a new value to the list # # @param [Base] value a code object to add # @return [CodeObjectList] self def push(value) value = Proxy.new(@owner, value) if value.is_a?(String) || value.is_a?(Symbol) if value.is_a?(CodeObjects::Base) || value.is_a?(Proxy) super(value) unless include?(value) else raise ArgumentError, "#{value.class} is not a valid CodeObject" end self end alias_method :<<, :push end # Namespace separator NSEP = '::' # Regex-quoted namespace separator NSEPQ = NSEP # Instance method separator ISEP = '#' # Regex-quoted instance method separator ISEPQ = ISEP # Class method separator CSEP = '.' # Regex-quoted class method separator CSEPQ = Regexp.quote CSEP # Regular expression to match constant name CONSTANTMATCH = /[A-Z]\w*/ # Regular expression to match the beginning of a constant CONSTANTSTART = /^[A-Z]/ # Regular expression to match namespaces (const A or complex path A::B) NAMESPACEMATCH = /(?:(?:#{NSEPQ}\s*)?#{CONSTANTMATCH})+/ # Regular expression to match a method name METHODNAMEMATCH = /[a-zA-Z_]\w*[!?=]?|[-+~]\@|<<|>>|=~|===?|!|<=>|[<>]=?|\*\*|[-\/+%^&*~`|]|\[\]=?/ # Regular expression to match a fully qualified method def (self.foo, Class.foo). METHODMATCH = /(?:(?:#{NAMESPACEMATCH}|[a-z]\w*)\s*(?:#{CSEPQ}|#{NSEPQ})\s*)?#{METHODNAMEMATCH}/ # All builtin Ruby exception classes for inheritance tree. BUILTIN_EXCEPTIONS = ["SecurityError", "Exception", "NoMethodError", "FloatDomainError", "IOError", "TypeError", "NotImplementedError", "SystemExit", "Interrupt", "SyntaxError", "RangeError", "NoMemoryError", "ArgumentError", "ThreadError", "EOFError", "RuntimeError", "ZeroDivisionError", "StandardError", "LoadError", "NameError", "LocalJumpError", "SystemCallError", "SignalException", "ScriptError", "SystemStackError", "RegexpError", "IndexError"] # All builtin Ruby classes for inheritance tree. # @note MatchingData is a 1.8.x legacy class BUILTIN_CLASSES = ["TrueClass", "Array", "Dir", "Struct", "UnboundMethod", "Object", "Fixnum", "Float", "ThreadGroup", "MatchingData", "MatchData", "Proc", "Binding", "Class", "Time", "Bignum", "NilClass", "Symbol", "Numeric", "String", "Data", "MatchData", "Regexp", "Integer", "File", "IO", "Range", "FalseClass", "Method", "Continuation", "Thread", "Hash", "Module"] + BUILTIN_EXCEPTIONS # All builtin Ruby modules for mixin handling. BUILTIN_MODULES = ["ObjectSpace", "Signal", "Marshal", "Kernel", "Process", "GC", "FileTest", "Enumerable", "Comparable", "Errno", "Precision", "Math"] # All builtin Ruby classes and modules. BUILTIN_ALL = BUILTIN_CLASSES + BUILTIN_MODULES # Hash of {BUILTIN_EXCEPTIONS} as keys and true as value (for O(1) lookups) BUILTIN_EXCEPTIONS_HASH = BUILTIN_EXCEPTIONS.inject({}) {|h,n| h.update(n => true) } # +Base+ is the superclass of all code objects recognized by YARD. A code # object is any entity in the Ruby language (class, method, module). A # DSL might subclass +Base+ to create a new custom object representing # a new entity type. # # == Registry Integration # Any created object associated with a namespace is immediately registered # with the registry. This allows the Registry to act as an identity map # to ensure that no object is represented by more than one Ruby object # in memory. A unique {#path} is essential for this identity map to work # correctly. # # == Custom Attributes # Code objects allow arbitrary custom attributes to be set using the # {#[]=} assignment method. # # == Namespaces # There is a special type of object called a "namespace". These are subclasses # of the {NamespaceObject} and represent Ruby entities that can have # objects defined within them. Classically these are modules and classes, # though a DSL might create a custom {NamespaceObject} to describe a # specific set of objects. # # @abstract This class should not be used directly. Instead, create a # subclass that implements {#path}, {#sep} or {#type}. # @see Registry # @see #path # @see #[]= # @see NamespaceObject class Base # The files the object was defined in. To add a file, use {#add_file}. # @return [Array] a list of files # @see #add_file attr_reader :files # The namespace the object is defined in. If the object is in the # top level namespace, this is {Registry.root} # @return [NamespaceObject] the namespace object attr_reader :namespace # The source code associated with the object # @return [String, nil] source, if present, or nil attr_reader :source # Language of the source code associated with the object. Defaults to # +:ruby+. # # @return [Symbol] the language type attr_accessor :source_type # The one line signature representing an object. For a method, this will # be of the form "def meth(arguments...)". This is usually the first # source line. # # @return [String] a line of source attr_accessor :signature # The non-localized documentation string associated with the object # @return [Docstring] the documentation string # @since 0.8.4 attr_reader :base_docstring undef base_docstring def base_docstring; @docstring end # Marks whether or not the method is conditionally defined at runtime # @return [Boolean] true if the method is conditionally defined at runtime attr_accessor :dynamic # @return [String] the group this object is associated with # @since 0.6.0 attr_accessor :group # Is the object defined conditionally at runtime? # @see #dynamic def dynamic?; @dynamic end # @return [Symbol] the visibility of an object (:public, :private, :protected) attr_accessor :visibility undef visibility= def visibility=(v) @visibility = v.to_sym end class << self # Allocates a new code object # @return [Base] # @see #initialize def new(namespace, name, *args, &block) raise ArgumentError, "invalid empty object name" if name.to_s.empty? if namespace.is_a?(ConstantObject) namespace = Proxy.new(namespace.namespace, namespace.value) end if name.to_s[0,2] == NSEP name = name.to_s[2..-1] namespace = Registry.root end if name =~ /(?:#{NSEPQ})([^:]+)$/ return new(Proxy.new(namespace, $`), $1, *args, &block) end obj = super(namespace, name, *args) existing_obj = Registry.at(obj.path) obj = existing_obj if existing_obj && existing_obj.class == self yield(obj) if block_given? obj end # Compares the class with subclasses # # @param [Object] other the other object to compare classes with # @return [Boolean] true if other is a subclass of self def ===(other) other.is_a?(self) end end # Creates a new code object # # @example Create a method in the root namespace # CodeObjects::Base.new(:root, '#method') # => # # @example Create class Z inside namespace X::Y # CodeObjects::Base.new(P("X::Y"), :Z) # or # CodeObjects::Base.new(Registry.root, "X::Y") # @param [NamespaceObject] namespace the namespace the object belongs in, # {Registry.root} or :root should be provided if it is associated with # the top level namespace. # @param [Symbol, String] name the name (or complex path) of the object. # @yield [self] a block to perform any extra initialization on the object # @yieldparam [Base] self the newly initialized code object # @return [Base] the newly created object def initialize(namespace, name, *args, &block) if namespace && namespace != :root && !namespace.is_a?(NamespaceObject) && !namespace.is_a?(Proxy) raise ArgumentError, "Invalid namespace object: #{namespace}" end @files = [] @current_file_has_comments = false @name = name.to_sym @source_type = :ruby @visibility = :public @tags = [] @docstrings = {} @docstring = Docstring.new('', self) @namespace = nil self.namespace = namespace yield(self) if block_given? end # Copies all data in this object to another code object, except for # uniquely identifying information (path, namespace, name, scope). # # @param [Base] other the object to copy data to # @return [Base] the other object # @since 0.8.0 def copy_to(other) copyable_attributes.each do |ivar| ivar = "@#{ivar}" other.instance_variable_set(ivar, instance_variable_get(ivar)) end other.docstring = @docstring.to_raw other end # The name of the object # @param [Boolean] prefix whether to show a prefix. Implement # this in a subclass to define how the prefix is showed. # @return [Symbol] if prefix is false, the symbolized name # @return [String] if prefix is true, prefix + the name as a String. # This must be implemented by the subclass. def name(prefix = false) prefix ? @name.to_s : @name end # Associates a file with a code object, optionally adding the line where it was defined. # By convention, '' should be used to associate code that comes form standard input. # # @param [String] file the filename ('' for standard input) # @param [Fixnum, nil] line the line number where the object lies in the file # @param [Boolean] has_comments whether or not the definition has comments associated. This # will allow {#file} to return the definition where the comments were made instead # of any empty definitions that might have been parsed before (module namespaces for instance). def add_file(file, line = nil, has_comments = false) raise(ArgumentError, "file cannot be nil or empty") if file.nil? || file == '' obj = [file.to_s, line] return if files.include?(obj) if has_comments && !@current_file_has_comments @current_file_has_comments = true @files.unshift(obj) else @files << obj # back of the line end end # Returns the filename the object was first parsed at, taking # definitions with docstrings first. # # @return [String] a filename def file @files.first ? @files.first[0] : nil end # Returns the line the object was first parsed at (or nil) # # @return [Fixnum] the line where the object was first defined. # @return [nil] if there is no line associated with the object def line @files.first ? @files.first[1] : nil end # Tests if another object is equal to this, including a proxy # @param [Base, Proxy] other if other is a {Proxy}, tests if # the paths are equal # @return [Boolean] whether or not the objects are considered the same def equal?(other) if other.is_a?(Base) || other.is_a?(Proxy) path == other.path else super end end alias == equal? alias eql? equal? # @return [Integer] the object's hash value (for equality checking) def hash; path.hash end # @return [nil] this object does not turn into an array def to_ary; nil end # Accesses a custom attribute on the object # @param [#to_s] key the name of the custom attribute # @return [Object, nil] the custom attribute or nil if not found. # @see #[]= def [](key) if respond_to?(key) send(key) elsif instance_variable_defined?("@#{key}") instance_variable_get("@#{key}") end end # Sets a custom attribute on the object # @param [#to_s] key the name of the custom attribute # @param [Object] value the value to associate # @return [void] # @see #[] def []=(key, value) if respond_to?("#{key}=") send("#{key}=", value) else instance_variable_set("@#{key}", value) end end # @overload dynamic_attr_name # @return the value of attribute named by the method attribute name # @raise [NoMethodError] if no method or custom attribute exists by # the attribute name # @see #[] # @overload dynamic_attr_name=(value) # @param value a value to set # @return +value+ # @see #[]= def method_missing(meth, *args, &block) if meth.to_s =~ /=$/ self[meth.to_s[0..-2]] = args.first elsif instance_variable_get("@#{meth}") self[meth] else super end end # Attaches source code to a code object with an optional file location # # @param [#source, String] statement # the +Parser::Statement+ holding the source code or the raw source # as a +String+ for the definition of the code object only (not the block) def source=(statement) if statement.respond_to?(:source) self.signature = statement.first_line @source = format_source(statement.source.strip) else @source = format_source(statement.to_s) end end # The documentation string associated with the object # # @param [String, I18n::Locale] locale (I18n::Locale.default) # the locale of the documentation string. # @return [Docstring] the documentation string def docstring(locale = I18n::Locale.default) if locale.nil? @docstring.resolve_reference return @docstring end if locale.is_a?(String) locale_name = locale locale = nil else locale_name = locale.name end @docstrings[locale_name] ||= translate_docstring(locale || Registry.locale(locale_name)) end # Attaches a docstring to a code object by parsing the comments attached to the statement # and filling the {#tags} and {#docstring} methods with the parsed information. # # @param [String, Array, Docstring] comments # the comments attached to the code object to be parsed # into a docstring and meta tags. def docstring=(comments) @docstrings.clear if Docstring === comments @docstring = comments else @docstring = Docstring.new(comments, self) end end # Default type is the lowercase class name without the "Object" suffix. # Override this method to provide a custom object type # # @return [Symbol] the type of code object this represents def type self.class.name.split('::').last.gsub(/Object$/, '').downcase.to_sym end # Represents the unique path of the object. The default implementation # joins the path of {#namespace} with {#name} via the value of {#sep}. # Custom code objects should ensure that the path is unique to the code # object by either overriding {#sep} or this method. # # @example The path of an instance method # MethodObject.new(P("A::B"), :c).path # => "A::B#c" # @return [String] the unique path of the object # @see #sep def path @path ||= if parent && !parent.root? [parent.path, name.to_s].join(sep) else name.to_s end end alias_method :to_s, :path # @note # Override this method if your object has a special title that does # not match the {#path} attribute value. This title will be used # when linking or displaying the object. # @return [String] the display title for an object # @see 0.8.4 def title path end # @param [Base, String] other another code object (or object path) # @return [String] the shortest relative path from this object to +other+ # @since 0.5.3 def relative_path(other) other = Registry.at(other) if String === other && Registry.at(other) same_parent = false if other.respond_to?(:path) same_parent = other.parent == parent other = other.path end return other unless namespace common = [path, other].join(" ").match(/^(\S*)\S*(?: \1\S*)*$/)[1] common = path unless common =~ /(\.|::|#)$/ common = common.sub(/(\.|::|#)[^:#\.]*?$/, '') if same_parent if %w(. :).include?(common[-1,1]) || other[common.size,1] == '#' suffix = '' else suffix = '(::|\.)' end result = other.sub(/^#{Regexp.quote common}#{suffix}/, '') result.empty? ? other : result end # Renders the object using the {Templates::Engine templating system}. # # @example Formats a class in plaintext # puts P('MyClass').format # @example Formats a method in html with rdoc markup # puts P('MyClass#meth').format(:format => :html, :markup => :rdoc) # @param [Hash] options a set of options to pass to the template # @option options [Symbol] :format (:text) :html, :text or another output format # @option options [Symbol] :template (:default) a specific template to use # @option options [Symbol] :markup (nil) the markup type (:rdoc, :markdown, :textile) # @option options [Serializers::Base] :serializer (nil) see Serializers # @return [String] the rendered template # @see Templates::Engine#render def format(options = {}) options = options.merge(:object => self) Templates::Engine.render(options) end # Inspects the object, returning the type and path # @return [String] a string describing the object def inspect "#" end # Sets the namespace the object is defined in. # # @param [NamespaceObject, :root, nil] obj the new namespace (:root # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. def namespace=(obj) if @namespace @namespace.children.delete(self) Registry.delete(self) end @namespace = (obj == :root ? Registry.root : obj) if @namespace reg_obj = Registry.at(path) return if reg_obj && reg_obj.class == self.class @namespace.children << self unless @namespace.is_a?(Proxy) Registry.register(self) end end alias_method :parent, :namespace alias_method :parent=, :namespace= # Gets a tag from the {#docstring} # @see Docstring#tag def tag(name); docstring.tag(name) end # Gets a list of tags from the {#docstring} # @see Docstring#tags def tags(name = nil); docstring.tags(name) end # Tests if the {#docstring} has a tag # @see Docstring#has_tag? def has_tag?(name); docstring.has_tag?(name) end # Add tags to the {#docstring} # @see Docstring#add_tag # @since 0.8.4 def add_tag(*tags) @docstrings.clear @docstring.add_tag(*tags) end # @return whether or not this object is a RootObject def root?; false end # Override this method with a custom component separator. For instance, # {MethodObject} implements sep as '#' or '.' (depending on if the # method is instance or class respectively). {#path} depends on this # value to generate the full path in the form: namespace.path + sep + name # # @return [String] the component that separates the namespace path # and the name (default is {NSEP}) def sep; NSEP end protected # Override this method if your code object subclass does not allow # copying of certain attributes. # # @return [Array] the list of instance variable names (without # "@" prefix) that should be copied when {#copy_to} is called # @see #copy_to # @since 0.8.0 def copyable_attributes vars = instance_variables.map {|ivar| ivar.to_s[1..-1] } vars -= %w(docstring docstrings namespace name path) vars end private # Formats source code by removing leading indentation # # @param [String] source the source code to format # @return [String] formatted source def format_source(source) source.chomp! last = source.split(/\r?\n/).last indent = last ? last[/^([ \t]*)/, 1].length : 0 source.gsub(/^[ \t]{#{indent}}/, '') end def translate_docstring(locale) @docstring.resolve_reference return @docstring if locale.nil? text = I18n::Text.new(@docstring) localized_text = text.translate(locale) docstring = Docstring.new(localized_text, self) docstring.add_tag(*@docstring.tags) docstring end end end end yard-master/lib/yard/code_objects/class_object.rb000066400000000000000000000117331265676644000224430ustar00rootroot00000000000000module YARD::CodeObjects # A ClassObject represents a Ruby class in source code. It is a {ModuleObject} # with extra inheritance semantics through the superclass. class ClassObject < NamespaceObject # The {ClassObject} that this class object inherits from in Ruby source. # @return [ClassObject] a class object that is the superclass of this one attr_reader :superclass # Creates a new class object in +namespace+ with +name+ # # @see Base.new def initialize(namespace, name, *args, &block) super if is_exception? self.superclass ||= "::Exception" unless P(namespace, name) == P(:Exception) else case P(namespace, name).path when "BasicObject" nil when "Object" self.superclass ||= "::BasicObject" else self.superclass ||= "::Object" end end end # Whether or not the class is a Ruby Exception # # @return [Boolean] whether the object represents a Ruby exception def is_exception? inheritance_tree.reverse.any? {|o| BUILTIN_EXCEPTIONS_HASH.has_key? o.path } end # Returns the inheritance tree of the object including self. # # @param [Boolean] include_mods whether or not to include mixins in the # inheritance tree. # @return [Array] the list of code objects that make up # the inheritance tree. def inheritance_tree(include_mods = false) list = (include_mods ? mixins(:instance, :class) : []) if superclass.is_a?(Proxy) || superclass.respond_to?(:inheritance_tree) list += [superclass] unless superclass == P(:Object) || superclass == P(:BasicObject) end [self] + list.map do |m| next m if m == self next m unless m.respond_to?(:inheritance_tree) m.inheritance_tree(include_mods) end.flatten.uniq end # Returns the list of methods matching the options hash. Returns # all methods if hash is empty. # # @param [Hash] opts the options hash to match # @option opts [Boolean] :inherited (true) whether inherited methods should be # included in the list # @option opts [Boolean] :included (true) whether mixed in methods should be # included in the list # @return [Array] the list of methods that matched def meths(opts = {}) opts = SymbolHash[:inherited => true].update(opts) list = super(opts) list += inherited_meths(opts).reject do |o| next(false) if opts[:all] list.find {|o2| o2.name == o.name && o2.scope == o.scope } end if opts[:inherited] list end # Returns only the methods that were inherited. # # @return [Array] the list of inherited method objects def inherited_meths(opts = {}) inheritance_tree[1..-1].inject([]) do |list, superclass| if superclass.is_a?(Proxy) list else list += superclass.meths(opts).reject do |o| next(false) if opts[:all] child(:name => o.name, :scope => o.scope) || list.find {|o2| o2.name == o.name && o2.scope == o.scope } end end end end # Returns the list of constants matching the options hash. # # @param [Hash] opts the options hash to match # @option opts [Boolean] :inherited (true) whether inherited constant should be # included in the list # @option opts [Boolean] :included (true) whether mixed in constant should be # included in the list # @return [Array] the list of constant that matched def constants(opts = {}) opts = SymbolHash[:inherited => true].update(opts) super(opts) + (opts[:inherited] ? inherited_constants : []) end # Returns only the constants that were inherited. # # @return [Array] the list of inherited constant objects def inherited_constants inheritance_tree[1..-1].inject([]) do |list, superclass| if superclass.is_a?(Proxy) list else list += superclass.constants.reject do |o| child(:name => o.name) || list.find {|o2| o2.name == o.name } end end end end # Sets the superclass of the object # # @param [Base, Proxy, String, Symbol, nil] object the superclass value # @return [void] def superclass=(object) case object when Base, Proxy, NilClass @superclass = object when String, Symbol @superclass = Proxy.new(namespace, object) else raise ArgumentError, "superclass must be CodeObject, Proxy, String or Symbol" end if name == @superclass.name && namespace != YARD::Registry.root && !object.is_a?(Base) @superclass = Proxy.new(namespace.namespace, object) end if @superclass == self msg = "superclass #{@superclass.inspect} cannot be the same as the declared class #{self.inspect}" @superclass = P("::Object") raise ArgumentError, msg end end end end yard-master/lib/yard/code_objects/class_variable_object.rb000066400000000000000000000004021265676644000242770ustar00rootroot00000000000000module YARD::CodeObjects # Represents a class variable inside a namespace. The path is expressed # in the form "A::B::@@classvariable" class ClassVariableObject < Base # @return [String] the class variable's value attr_accessor :value end endyard-master/lib/yard/code_objects/constant_object.rb000066400000000000000000000006251265676644000231650ustar00rootroot00000000000000module YARD::CodeObjects # A +ConstantObject+ represents a Ruby constant (not a module or class). # To access the constant's (source code) value, use {#value}. class ConstantObject < Base # The source code representing the constant's value # @return [String] the value the constant is set to attr_reader :value def value=(value) @value = format_source(value) end end endyard-master/lib/yard/code_objects/extended_method_object.rb000066400000000000000000000014021265676644000244660ustar00rootroot00000000000000module YARD::CodeObjects # Represents an instance method of a module that was mixed into the class # scope of another namespace. # # @see MethodObject class ExtendedMethodObject instance_methods.each {|m| undef_method(m) unless m =~ /^__/ || m.to_sym == :object_id } # @return [Symbol] always +:class+ def scope; :class end # Sets up a delegate for {MethodObject} obj. # # @param [MethodObject] obj the instance method to treat as a mixed in # class method on another namespace. def initialize(obj) @del = obj end # Sends all methods to the {MethodObject} assigned in {#initialize} # @see #initialize # @see MethodObject def method_missing(sym, *args, &block) @del.__send__(sym, *args, &block) end end endyard-master/lib/yard/code_objects/extra_file_object.rb000066400000000000000000000065141265676644000234610ustar00rootroot00000000000000module YARD::CodeObjects # An ExtraFileObject represents an extra documentation file (README or other # file). It is not strictly a CodeObject (does not inherit from `Base`) although # it implements `path`, `name` and `type`, and therefore should be structurally # compatible with most CodeObject interfaces. class ExtraFileObject attr_accessor :filename attr_writer :attributes attr_accessor :name # @since 0.8.3 attr_reader :locale # Creates a new extra file object. # @param [String] filename the location on disk of the file # @param [String] contents the file contents. If not set, the contents # will be read from disk using the +filename+. def initialize(filename, contents = nil) self.filename = filename self.name = File.basename(filename).gsub(/\.[^.]+$/, '') self.attributes = SymbolHash.new(false) @original_contents = contents @parsed = false @locale = nil ensure_parsed end alias path name def attributes ensure_parsed @attributes end def title attributes[:title] || name end def contents ensure_parsed @contents end def contents=(contents) @original_contents = contents @parsed = false end # @param [String] locale the locale name to be translated. # @return [void] # @since 0.8.3 def locale=(locale) @locale = locale @parsed = false end def inspect "#" end alias to_s inspect def type; :extra_file end def ==(other) return false unless self.class === other other.filename == filename end alias eql? == alias equal? == def hash; filename.hash end private def ensure_parsed return if @parsed @parsed = true @contents = parse_contents(@original_contents || File.read(@filename)) end # @param [String] data the file contents def parse_contents(data) retried = false cut_index = 0 data = translate(data) data = data.split("\n") data.each_with_index do |line, index| case line when /^#!(\S+)\s*$/ if index == 0 attributes[:markup] = $1 else cut_index = index break end when /^\s*#\s*@(\S+)\s*(.+?)\s*$/ attributes[$1] = $2 else cut_index = index break end end data = data[cut_index..-1] if cut_index > 0 contents = data.join("\n") if contents.respond_to?(:force_encoding) && attributes[:encoding] begin contents.force_encoding(attributes[:encoding]) rescue ArgumentError log.warn "Invalid encoding `#{attributes[:encoding]}' in #{filename}" end end contents rescue ArgumentError => e if retried && e.message =~ /invalid byte sequence/ # This should never happen. log.warn "Could not read #{filename}, #{e.message}. You probably want to set `--charset`." return '' end data.force_encoding('binary') if data.respond_to?(:force_encoding) retried = true retry end def translate(data) text = YARD::I18n::Text.new(data, :have_header => true) text.translate(YARD::Registry.locale(locale)) end end endyard-master/lib/yard/code_objects/macro_object.rb000066400000000000000000000163171265676644000224420ustar00rootroot00000000000000require 'ostruct' module YARD module CodeObjects # A MacroObject represents a docstring defined through +@!macro NAME+ and can be # reused by specifying the tag +@!macro NAME+. You can also provide the # +attached+ type flag to the macro definition to have it attached to the # specific DSL method so it will be implicitly reused. # # Macros are fully described in the {file:docs/Tags.md#macro Tags Overview} # document. # # @example Creating a basic named macro # # @!macro prop # # @!method $1(${3-}) # # @return [$2] the value of the $0 # property :foo, String, :a, :b # # # @!macro prop # property :bar, Numeric, :value # # @example Creating a macro that is attached to the method call # # @!macro [attach] prop2 # # @!method $1(value) # property :foo # # # Extra data added to docstring # property :bar class MacroObject < Base MACRO_MATCH = /(\\)?\$(?:\{(-?\d+|\*)(-)?(-?\d+)?\}|(-?\d+|\*))/ class << self # Creates a new macro and fills in the relevant properties. # @param [String] macro_name the name of the macro, must be unique. # @param [String] data the data the macro should expand when re-used # @param [CodeObjects::Base] method_object an object to attach this # macro to. If supplied, {#attached?} will be true # @return [MacroObject] the newly created object def create(macro_name, data, method_object = nil) obj = new(:root, macro_name) obj.macro_data = data obj.method_object = method_object obj end # Finds a macro using +macro_name+ # @param [#to_s] macro_name the name of the macro # @return [MacroObject] if a macro is found # @return [nil] if there is no registered macro by that name def find(macro_name) Registry.at('.macro.' + macro_name.to_s) end # Parses a given docstring and determines if the macro is "new" or # not. If the macro has $variable names or if it has a @!macro tag # with the [new] or [attached] flag, it is considered new. # # If a new macro is found, the macro is created and registered. Otherwise # the macro name is searched and returned. If a macro is not found, # nil is returned. # # @param [#to_s] macro_name the name of the macro # @param [CodeObjects::Base] method_object an optional method to attach # the macro to. Only used if the macro is being created, otherwise # this argument is ignored. # @return [MacroObject] the newly created or existing macro, depending # on whether the @!macro tag was a new tag or not. # @return [nil] if the +data+ has no macro tag or if the macro is # not new and no macro by the macro name is found. def find_or_create(macro_name, data, method_object = nil) if macro = find(name) macro else create(macro_name, data, method_object) end end alias create_docstring find_or_create # Expands +macro_data+ using the interpolation parameters. # # Interpolation rules: # * $0, $1, $2, ... = the Nth parameter in +call_params+ # * $* = the full statement source (excluding block) # * Also supports $!{N-M} ranges, as well as negative indexes on N or M # * Use \$ to escape the variable name in a macro. # # @!macro [new] macro.expand # @param [Array] call_params the method name and parameters # to the method call. These arguments will fill \$0-N # @param [String] full_source the full source line (excluding block) # interpolated as \$* # @param [String] block_source Currently unused. Will support # interpolating the block data as a variable. # @return [String] the expanded macro data # @param [String] macro_data the macro data to expand (taken from {#macro_data}) def expand(macro_data, call_params = [], full_source = '', block_source = '') macro_data = macro_data.all if macro_data.is_a?(Docstring) macro_data.gsub(MACRO_MATCH) do escape, first, last, rng = $1, $2 || $5, $4, $3 ? true : false next $&[1..-1] if escape if first == '*' last ? $& : full_source else first_i = first.to_i last_i = (last ? last.to_i : call_params.size) last_i = first_i unless rng params = call_params[first_i..last_i] params ? params.join(", ") : '' end end end # Applies a macro on a docstring by creating any macro data inside of # the docstring first. Equivalent to calling {find_or_create} and {apply_macro} # on the new macro object. # # @param [Docstring] docstring the docstring to create a macro out of # @!macro macro.expand # @see find_or_create def apply(docstring, call_params = [], full_source = '', block_source = '', method_object = nil) docstring = docstring.all if Docstring === docstring parser = Docstring.parser handler = OpenStruct.new handler.call_params = call_params[1..-1] handler.caller_method = call_params.first handler.statement = OpenStruct.new(:source => full_source) parser.parse(docstring, nil, handler).to_docstring.to_raw end # Applies a macro to a docstring, interpolating the macro's data on the # docstring and appending any extra local docstring data that was in # the original +docstring+ object. # # @param [MacroObject] macro the macro object # @!macro macro.expand def apply_macro(macro, docstring, call_params = [], full_source = '', block_source = '') apply(docstring, call_params, full_source, block_source) end end # @return [String] the macro data stored on the object attr_accessor :macro_data # @return [CodeObjects::Base] the method object that this macro is # attached to. attr_accessor :method_object # @return [Boolean] whether this macro is attached to a method def attached?; method_object ? true : false end # Overrides {Base#path} so the macro path is ".macro.MACRONAME" def path; '.macro.' + name.to_s end # Overrides the separator to be '.' def sep; '.' end # Expands the macro using # @param [Array] call_params a list of tokens that are passed # to the method call # @param [String] full_source the full method call (not including the block) # @param [String] block_source the source passed in the block of the method # call, if there is a block. # @example Expanding a Macro # macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=> # "...macro data interpolating this line of code..." # @see expand def expand(call_params = [], full_source = '', block_source = '') self.class.expand(macro_data, call_params, full_source, block_source) end end end endyard-master/lib/yard/code_objects/method_object.rb000066400000000000000000000135331265676644000226160ustar00rootroot00000000000000module YARD::CodeObjects # Represents a Ruby method in source class MethodObject < Base # The scope of the method (+:class+ or +:instance+) # # @return [Symbol] the scope attr_reader :scope # Whether the object is explicitly defined in source or whether it was # inferred by a handler. For instance, attribute methods are generally # inferred and therefore not explicitly defined in source. # # @return [Boolean] whether the object is explicitly defined in source. attr_accessor :explicit # Returns the list of parameters parsed out of the method signature # with their default values. # # @return [Array] a list of parameter names followed # by their default values (or nil) attr_accessor :parameters # Creates a new method object in +namespace+ with +name+ and an instance # or class +scope+ # # If scope is +:module+, this object is instantiated as a public # method in +:class+ scope, but also creates a new (empty) method # as a private +:instance+ method on the same class or module. # # @param [NamespaceObject] namespace the namespace # @param [String, Symbol] name the method name # @param [Symbol] scope +:instance+, +:class+, or +:module+ def initialize(namespace, name, scope = :instance, &block) @module_function = false @scope = nil # handle module function if scope == :module other = self.class.new(namespace, name, &block) other.visibility = :private scope = :class @module_function = true end @visibility = :public self.scope = scope self.parameters = [] super end # Changes the scope of an object from :instance or :class # @param [Symbol] v the new scope def scope=(v) reregister = @scope ? true : false # handle module function if v == :module other = self.class.new(namespace, name) other.visibility = :private @visibility = :public @module_function = true @path = nil end YARD::Registry.delete(self) @path = nil @scope = v.to_sym if @scope == :module @scope = :class end YARD::Registry.register(self) if reregister end # @return whether or not the method is the #initialize constructor method def constructor? name == :initialize && scope == :instance && namespace.is_a?(ClassObject) end # @return [Boolean] whether or not this method was created as a module # function # @since 0.8.0 def module_function? @module_function end # Returns the read/writer info for the attribute if it is one # @return [SymbolHash] if there is information about the attribute # @return [nil] if the method is not an attribute # @since 0.5.3 def attr_info return nil unless namespace.is_a?(NamespaceObject) namespace.attributes[scope][name.to_s.gsub(/=$/, '')] end # @return [Boolean] whether the method is a writer attribute # @since 0.5.3 def writer? !!((info = attr_info) && info[:write] == self) end # @return [Boolean] whether the method is a reader attribute # @since 0.5.3 def reader? !!((info = attr_info) && info[:read] == self) end # Tests if the object is defined as an attribute in the namespace # @return [Boolean] whether the object is an attribute def is_attribute? return false unless info = attr_info info[name.to_s =~ /=$/ ? :write : :read] ? true : false end # Tests if the object is defined as an alias of another method # @return [Boolean] whether the object is an alias def is_alias? return false unless namespace.is_a?(NamespaceObject) namespace.aliases.has_key? self end # Tests boolean {#explicit} value. # # @return [Boolean] whether the method is explicitly defined in source def is_explicit? explicit ? true : false end # @return [MethodObject] the object that this method overrides # @return [nil] if it does not override a method # @since 0.6.0 def overridden_method return nil if namespace.is_a?(Proxy) meths = namespace.meths(:all => true) meths.find {|m| m.path != path && m.name == name && m.scope == scope } end # Returns all alias names of the object # @return [Array] the alias names def aliases list = [] return list unless namespace.is_a?(NamespaceObject) namespace.aliases.each do |o, aname| list << o if aname == name && o.scope == scope end list end # Override path handling for instance methods in the root namespace # (they should still have a separator as a prefix). # @return [String] the path of a method def path @path ||= if !namespace || namespace.path == "" sep + super else super end end # Returns the name of the object. # # @example The name of an instance method (with prefix) # an_instance_method.name(true) # => "#mymethod" # @example The name of a class method (with prefix) # a_class_method.name(true) # => "mymethod" # @param [Boolean] prefix whether or not to show the prefix # @return [String] returns {#sep} + +name+ for an instance method if # prefix is true # @return [Symbol] the name without {#sep} if prefix is set to false def name(prefix = false) prefix ? (sep == ISEP ? "#{sep}#{super}" : super.to_s) : super end # Override separator to differentiate between class and instance # methods. # @return [String] "#" for an instance method, "." for class def sep if scope == :class namespace && namespace != YARD::Registry.root ? CSEP : NSEP else ISEP end end protected def copyable_attributes super - %w(scope module_function) end end end yard-master/lib/yard/code_objects/module_object.rb000066400000000000000000000011701265676644000226150ustar00rootroot00000000000000module YARD::CodeObjects # Represents a Ruby module. class ModuleObject < NamespaceObject # Returns the inheritance tree of mixins. # # @param [Boolean] include_mods if true, will include mixed in # modules (which is likely what is wanted). # @return [Array] a list of namespace objects def inheritance_tree(include_mods = false) return [self] unless include_mods [self] + mixins(:instance, :class).map do |m| next if m == self next m unless m.respond_to?(:inheritance_tree) m.inheritance_tree(true) end.compact.flatten.uniq end end end yard-master/lib/yard/code_objects/namespace_object.rb000066400000000000000000000164701265676644000232750ustar00rootroot00000000000000module YARD::CodeObjects # A "namespace" is any object that can store other objects within itself. # The two main Ruby objects that can act as namespaces are modules # ({ModuleObject}) and classes ({ClassObject}). class NamespaceObject < Base attr_writer :constants, :cvars, :mixins, :child, :meths attr_writer :class_attributes, :instance_attributes attr_writer :included_constants, :included_meths # @return [Array] a list of ordered group names inside the namespace # @since 0.6.0 attr_accessor :groups # The list of objects defined in this namespace # @return [Array] a list of objects attr_reader :children # A hash containing two keys, class and instance, each containing # the attribute name with a { :read, :write } hash for the read and # write objects respectively. # # @example The attributes of an object # >> Registry.at('YARD::Docstring').attributes # => { # :class => { }, # :instance => { # :ref_tags => { # :read => #, # :write => nil # }, # :object => { # :read => #, # :write => # # }, # ... # } # } # @return [Hash] a list of methods attr_reader :attributes # A hash containing two keys, :class and :instance, each containing # a hash of objects and their alias names. # @return [Hash] a list of methods attr_reader :aliases # Class mixins # @return [Array] a list of mixins attr_reader :class_mixins # Instance mixins # @return [Array] a list of mixins attr_reader :instance_mixins # Creates a new namespace object inside +namespace+ with +name+. # @see Base#initialize def initialize(namespace, name, *args, &block) @children = CodeObjectList.new(self) @class_mixins = CodeObjectList.new(self) @instance_mixins = CodeObjectList.new(self) @attributes = SymbolHash[:class => SymbolHash.new, :instance => SymbolHash.new] @aliases = {} @groups = [] super end # Only the class attributes # @return [Hash] a list of method names and their read/write objects # @see #attributes def class_attributes attributes[:class] end # Only the instance attributes # @return [Hash] a list of method names and their read/write objects # @see #attributes def instance_attributes attributes[:instance] end # Looks for a child that matches the attributes specified by +opts+. # # @example Finds a child by name and scope # namespace.child(:name => :to_s, :scope => :instance) # # => # # @return [Base, nil] the first matched child object, or nil def child(opts = {}) if !opts.is_a?(Hash) children.find {|o| o.name == opts.to_sym } else opts = SymbolHash[opts] children.find do |obj| opts.each do |meth, value| break false if !(value.is_a?(Array) ? value.include?(obj[meth]) : obj[meth] == value) end end end end # Returns all methods that match the attributes specified by +opts+. If # no options are provided, returns all methods. # # @example Finds all private and protected class methods # namespace.meths(:visibility => [:private, :protected], :scope => :class) # # => [#, #] # @option opts [Array, Symbol] :visibility ([:public, :private, # :protected]) the visibility of the methods to list. Can be an array or # single value. # @option opts [Array, Symbol] :scope ([:class, :instance]) the # scope of the methods to list. Can be an array or single value. # @option opts [Boolean] :included (true) whether to include mixed in # methods in the list. # @return [Array] a list of method objects def meths(opts = {}) opts = SymbolHash[ :visibility => [:public, :private, :protected], :scope => [:class, :instance], :included => true ].update(opts) opts[:visibility] = [opts[:visibility]].flatten opts[:scope] = [opts[:scope]].flatten ourmeths = children.select do |o| o.is_a?(MethodObject) && opts[:visibility].include?(o.visibility) && opts[:scope].include?(o.scope) end ourmeths + (opts[:included] ? included_meths(opts) : []) end # Returns methods included from any mixins that match the attributes # specified by +opts+. If no options are specified, returns all included # methods. # # @option opts [Array, Symbol] :visibility ([:public, :private, # :protected]) the visibility of the methods to list. Can be an array or # single value. # @option opts [Array, Symbol] :scope ([:class, :instance]) the # scope of the methods to list. Can be an array or single value. # @option opts [Boolean] :included (true) whether to include mixed in # methods in the list. # @see #meths def included_meths(opts = {}) opts = SymbolHash[:scope => [:instance, :class]].update(opts) [opts[:scope]].flatten.map do |scope| mixins(scope).inject([]) do |list, mixin| next list if mixin.is_a?(Proxy) arr = mixin.meths(opts.merge(:scope => :instance)).reject do |o| next false if opts[:all] child(:name => o.name, :scope => scope) || list.find {|o2| o2.name == o.name } end arr.map! {|o| ExtendedMethodObject.new(o) } if scope == :class list + arr end end.flatten end # Returns all constants in the namespace # # @option opts [Boolean] :included (true) whether or not to include # mixed in constants in list # @return [Array] a list of constant objects def constants(opts = {}) opts = SymbolHash[:included => true].update(opts) consts = children.select {|o| o.is_a? ConstantObject } consts + (opts[:included] ? included_constants : []) end # Returns constants included from any mixins # @return [Array] a list of constant objects def included_constants instance_mixins.inject([]) do |list, mixin| if mixin.respond_to? :constants list += mixin.constants.reject do |o| child(:name => o.name) || list.find {|o2| o2.name == o.name } end else list end end end # Returns class variables defined in this namespace. # @return [Array] a list of class variable objects def cvars children.select {|o| o.is_a? ClassVariableObject } end # Returns for specific scopes. If no scopes are provided, returns all mixins. # @param [Array] scopes a list of scopes (:class, :instance) to # return mixins for. If this is empty, all scopes will be returned. # @return [Array] a list of mixins def mixins(*scopes) return class_mixins if scopes == [:class] return instance_mixins if scopes == [:instance] class_mixins | instance_mixins end end end yard-master/lib/yard/code_objects/proxy.rb000066400000000000000000000171771265676644000212010ustar00rootroot00000000000000module YARD module CodeObjects # A special type of +NoMethodError+ when raised from a {Proxy} class ProxyMethodError < NoMethodError; end # The Proxy class is a way to lazily resolve code objects in # cases where the object may not yet exist. A proxy simply stores # an unresolved path until a method is called on the object, at which # point it does a lookup using {Registry.resolve}. If the object is # not found, a warning is raised and {ProxyMethodError} might be raised. # # @example Creates a Proxy to the String class from a module # # When the String class is parsed this method will # # begin to act like the String ClassObject. # Proxy.new(mymoduleobj, "String") # @see Registry.resolve # @see ProxyMethodError class Proxy def self.===(other) other.is_a?(self) end attr_reader :namespace alias_method :parent, :namespace # Creates a new Proxy # # @raise [ArgumentError] if namespace is not a NamespaceObject # @return [Proxy] self def initialize(namespace, name, type = nil) namespace = Registry.root if !namespace || namespace == :root if name =~ /^#{NSEPQ}/ namespace = Registry.root name = name[2..-1] end if name =~ /(?:#{NSEPQ}|#{ISEPQ}|#{CSEPQ})([^#{NSEPQ}#{ISEPQ}#{CSEPQ}]+)$/ @orignamespace, @origname = namespace, name @imethod = true if name.include? ISEP namespace = Proxy.new(namespace, $`) unless $`.empty? name = $1 else @orignamespace, @origname, @imethod = nil, nil, nil end @name = name.to_sym @namespace = namespace @obj = nil @imethod ||= nil self.type = type if @namespace.is_a?(ConstantObject) @origname = nil # forget these for a constant @orignamespace = nil @namespace = Proxy.new(@namespace.namespace, @namespace.value) end unless @namespace.is_a?(NamespaceObject) or @namespace.is_a?(Proxy) raise ArgumentError, "Invalid namespace object: #{namespace}" end # If the name begins with "::" (like "::String") # this is definitely a root level object, so # remove the namespace and attach it to the root if @name =~ /^#{NSEPQ}/ @name.gsub!(/^#{NSEPQ}/, '') @namespace = Registry.root end end # (see Base#name) def name(prefix = false) prefix ? (@imethod ? ISEP : '') + @name.to_s : @name end # Returns a text representation of the Proxy # @return [String] the object's #inspect method or P(OBJECTPATH) def inspect if obj = to_obj obj.inspect else "P(#{path})" end end # If the proxy resolves to an object, returns its path, otherwise # guesses at the correct path using the original namespace and name. # # @return [String] the assumed path of the proxy (or the real path # of the resolved object) def path if obj = to_obj obj.path else proxy_path end end alias to_s path alias to_str path alias title path # @return [Boolean] def is_a?(klass) if obj = to_obj obj.is_a?(klass) else self.class <= klass end end # @return [Boolean] def ===(other) if obj = to_obj obj === other else self.class <= other.class end end # @return [Boolean] def <=>(other) if other.respond_to? :path path <=> other.path else false end end # @return [Boolean] def equal?(other) if other.respond_to? :path path == other.path else false end end alias == equal? # @return [Integer] the object's hash value (for equality checking) def hash; path.hash end # Returns the class name of the object the proxy is mimicking, if # resolved. Otherwise returns +Proxy+. # @return [Class] the resolved object's class or +Proxy+ def class if obj = to_obj obj.class else Proxy end end # Returns the type of the proxy. If it cannot be resolved at the # time of the call, it will either return the inferred proxy type # (see {#type=}) or +:proxy+ # @return [Symbol] the Proxy's type # @see #type= def type if obj = to_obj obj.type else @type || :proxy end end # Allows a parser to infer the type of the proxy by its path. # @param [#to_sym] type the proxy's inferred type # @return [void] def type=(type) @type = type ? type.to_sym : nil end # @return [Boolean] def instance_of?(klass) self.class == klass end # @return [Boolean] def kind_of?(klass) self.class <= klass end # @return [Boolean] def respond_to?(meth, include_private = false) if obj = to_obj obj.respond_to?(meth, include_private) else super end end # Dispatches the method to the resolved object. # # @raise [ProxyMethodError] if the proxy cannot find the real object def method_missing(meth, *args, &block) if obj = to_obj obj.__send__(meth, *args, &block) else log.warn "Load Order / Name Resolution Problem on #{path}:" log.warn "-" log.warn "Something is trying to call #{meth} on object #{path} before it has been recognized." log.warn "This error usually means that you need to modify the order in which you parse files" log.warn "so that #{path} is parsed before methods or other objects attempt to access it." log.warn "-" log.warn "YARD will recover from this error and continue to parse but you *may* have problems" log.warn "with your generated documentation. You should probably fix this." log.warn "-" begin super rescue NoMethodError raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'" end end end # This class is never a root object def root?; false end private # @note this method fixes a bug in 1.9.2: http://gist.github.com/437136 def to_ary; nil end # Attempts to find the object that this unresolved object # references by checking if any objects by this name are # registered all the way up the namespace tree. # # @return [Base, nil] the registered code object or nil def to_obj return @obj if @obj if @obj = Registry.resolve(@namespace, (@imethod ? ISEP : '') + @name.to_s, false, false, @type) if @origname && @origname.include?("::") && !@obj.path.include?(@origname) # the object's path should include the original proxy namespace, # otherwise it's (probably) not the right object. @obj = nil else @namespace = @obj.namespace @name = @obj.name end end @obj end def proxy_path if @namespace.root? (@imethod ? ISEP : "") + name.to_s elsif @origname if @origname =~ CONSTANTSTART @origname else [namespace.path, @origname].join end elsif name.to_s =~ CONSTANTSTART name.to_s else # class meth? [namespace.path, name.to_s].join(CSEP) end end end end end yard-master/lib/yard/code_objects/root_object.rb000066400000000000000000000007501265676644000223160ustar00rootroot00000000000000module YARD module CodeObjects # Represents the root namespace object (the invisible Ruby module that # holds all top level modules, class and other objects). class RootObject < ModuleObject def path; @path ||= "" end def inspect; @inspect ||= "#" end def root?; true end def title; 'Top Level Namespace' end def equal?(other) other == :root ? true : super(other) end def hash; :root.hash end end end endyard-master/lib/yard/config.rb000066400000000000000000000224221265676644000166270ustar00rootroot00000000000000module YARD # This class maintains all system-wide configuration for YARD and handles # the loading of plugins. To access options call {options}, and to load # a plugin use {load_plugin}. All other public methods are used by YARD # during load time. # # == User Configuration Files # # Persistent user configuration files can be stored in the file # +~/.yard/config+, which is read when YARD first loads. The file should # be formatted as YAML, and should contain a map of keys and values. # # Although you can specify any key-value mapping in the configuration file, # YARD defines special keys specified in {DEFAULT_CONFIG_OPTIONS}. # # An example of a configuration file is listed below: # # !!!yaml # load_plugins: true # Auto-load plugins when YARD starts # ignored_plugins: # - yard-broken # - broken2 # yard- prefix not necessary # autoload_plugins: # - yard-rspec # # == Automatic Loading of Plugins # # YARD 0.6.2 will no longer automatically load all plugins by default. This # option can be reset by setting 'load_plugins' to true in the configuration # file. In addition, you can specify a set of specific plugins to load on # load through the 'autoload_plugins' list setting. This setting is # independent of the 'load_plugins' value and will always be processed. # # == Ignored Plugins File # # YARD 0.5 and below used a +~/.yard/ignored_plugins+ file to specify # plugins to be ignored at load time. Ignored plugins in 0.6.2 and above # should now be specified in the main configuration file, though YARD # will support the +ignored_plugins+ file until 0.7.x. # # == Safe Mode # # YARD supports running in safe-mode. By doing this, it will avoid executing # any user code such as require files or queries. Plugins will still be # loaded with safe mode on, because plugins are properly namespaced with # a 'yard-' prefix, must be installed as a gem, and therefore cannot be # touched by the user. To specify safe mode, use the +safe_mode+ key. # # == Plugin Specific Configuration # # Additional settings can be defined within the configuration file # specifically to provide configuration for a plugin. A plugin that utilizes # the YARD configuration is strongly encouraged to utilize namespacing of # their configuration content. # # !!!yaml # load_plugins: true # Auto-load plugins when YARD starts # ignored_plugins: # - yard-broken # - broken2 # yard- prefix not necessary # autoload_plugins: # - yard-rspec # # Plugin Specific Configuration # yard-sample-plugin: # show-results-inline: true # # As the configuration is available system wide, it can be # accessed within the plugin code. # # # if YARD::Config.options['yard-sample-plugin'] and # YARD::Config.options['yard-sample-plugin']['show-results-inline'] # # ... perform the action that places the results inline ... # else # # ... do the default behavior of not showing the results inline ... # end # # When accessing the configuration, be aware that this file is user managed # so configuration keys and values may not be present. Make no assumptions and # instead ensure that you check for the existence of keys before proceeding to # retrieve values. # # @since 0.6.2 # @see options class Config class << self # The system-wide configuration options for YARD # @return [SymbolHash] a map a key-value pair settings. # @see DEFAULT_CONFIG_OPTIONS attr_accessor :options end # The location where YARD stores user-specific settings CONFIG_DIR = File.expand_path('~/.yard') # The main configuration YAML file. CONFIG_FILE = File.join(CONFIG_DIR, 'config') # File listing all ignored plugins # @deprecated Set `ignored_plugins` in the {CONFIG_FILE} instead. IGNORED_PLUGINS = File.join(CONFIG_DIR, 'ignored_plugins') # Default configuration options DEFAULT_CONFIG_OPTIONS = { :load_plugins => false, # Whether to load plugins automatically with YARD :ignored_plugins => [], # A list of ignored plugins by name :autoload_plugins => [], # A list of plugins to be automatically loaded :safe_mode => false # Does not execute or eval any user-level code } # The prefix used for YARD plugins. Name your gem with this prefix # to allow it to be used as a plugin. YARD_PLUGIN_PREFIX = /^yard[-_]/ # Loads settings from {CONFIG_FILE}. This method is called by YARD at # load time and should not be called by the user. # @return [void] def self.load self.options = SymbolHash.new(false) options.update(DEFAULT_CONFIG_OPTIONS) options.update(read_config_file) load_commandline_safemode add_ignored_plugins_file translate_plugin_names load_plugins rescue => e log.error "Invalid configuration file, using default options." log.backtrace(e) options.update(DEFAULT_CONFIG_OPTIONS) end # Saves settings to {CONFIG_FILE}. # @return [void] def self.save require 'yaml' Dir.mkdir(CONFIG_DIR) unless File.directory?(CONFIG_DIR) File.open(CONFIG_FILE, 'w') {|f| f.write(YAML.dump(options)) } end # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except # those listed in +~/.yard/ignored_plugins+. This is called immediately # after YARD is loaded to allow plugin support. # # @return [Boolean] true if all plugins loaded successfully, false otherwise. def self.load_plugins load_gem_plugins && load_autoload_plugins && load_commandline_plugins ? true : false end # Loads an individual plugin by name. It is not necessary to include the # +yard-+ plugin prefix here. # # @param [String] name the name of the plugin (with or without +yard-+ prefix) # @return [Boolean] whether the plugin was successfully loaded def self.load_plugin(name) name = translate_plugin_name(name) return false if options[:ignored_plugins].include?(name) return false if name =~ /^yard-doc-/ log.debug "Loading plugin '#{name}'..." require name true rescue LoadError => e load_plugin_failed(name, e) end private # Load gem plugins if :load_plugins is true def self.load_gem_plugins return true unless options[:load_plugins] require 'rubygems' result = true Gem.source_index.find_name('').each do |gem| begin next true unless gem.name =~ YARD_PLUGIN_PREFIX load_plugin(gem.name) rescue Gem::LoadError => e tmp = load_plugin_failed(gem.name, e) result = tmp if !tmp end end result rescue LoadError log.debug "RubyGems is not present, skipping plugin loading" false end # Load plugins set in :autoload_plugins def self.load_autoload_plugins options[:autoload_plugins].each {|name| load_plugin(name) } end # Load plugins from {#arguments} def self.load_commandline_plugins with_yardopts do arguments.each_with_index do |arg, i| next unless arg == '--plugin' load_plugin(arguments[i+1]) end end end # Check for command-line safe_mode switch in {#arguments} def self.load_commandline_safemode with_yardopts do arguments.each_with_index do |arg, i| options[:safe_mode] = true if arg == '--safe' end end end # Print a warning if the plugin failed to load # @return [false] def self.load_plugin_failed(name, exception) log.warn "Error loading plugin '#{name}'" log.backtrace(exception) if $DEBUG false end # Legacy support for {IGNORED_PLUGINS} def self.add_ignored_plugins_file if File.file?(IGNORED_PLUGINS) options[:ignored_plugins] += File.read(IGNORED_PLUGINS).split(/\s+/) end end # Translates plugin names to add yard- prefix. def self.translate_plugin_names options[:ignored_plugins].map! {|name| translate_plugin_name(name) } options[:autoload_plugins].map! {|name| translate_plugin_name(name) } end # Loads the YAML configuration file into memory # @return [Hash] the contents of the YAML file from disk # @see CONFIG_FILE def self.read_config_file if File.file?(CONFIG_FILE) require 'yaml' YAML.load_file(CONFIG_FILE) else {} end end # Sanitizes and normalizes a plugin name to include the 'yard-' prefix. # @param [String] name the plugin name # @return [String] the sanitized and normalized plugin name. def self.translate_plugin_name(name) name = name.gsub('/', '') # Security sanitization name = "yard-" + name unless name =~ YARD_PLUGIN_PREFIX name end # Temporarily loads .yardopts file into @yardopts def self.with_yardopts(&block) yfile = CLI::Yardoc::DEFAULT_YARDOPTS_FILE @yardopts = File.file?(yfile) ? File.read_binary(yfile).shell_split : [] result = yield @yardopts = nil result end # @return [Array] arguments from commandline and yardopts file def self.arguments ARGV + @yardopts end end Config.options = Config::DEFAULT_CONFIG_OPTIONS end yard-master/lib/yard/core_ext/000077500000000000000000000000001265676644000166435ustar00rootroot00000000000000yard-master/lib/yard/core_ext/array.rb000066400000000000000000000011001265676644000202760ustar00rootroot00000000000000class Array # Places values before or after another object (by value) in # an array. This is used in tandem with the before and after # methods of the {Insertion} class. # # @example Places an item before another # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] # @example Places an item after another # [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c] # @param [Array] values value to insert # @return [Insertion] an insertion object to # @see Insertion#before # @see Insertion#after def place(*values) Insertion.new(self, values) end end yard-master/lib/yard/core_ext/file.rb000066400000000000000000000036021265676644000201100ustar00rootroot00000000000000require 'fileutils' class File RELATIVE_PARENTDIR = '..' RELATIVE_SAMEDIR = '.' # @group Manipulating Paths # Turns a path +to+ into a relative path from starting # point +from+. The argument +from+ is assumed to be # a filename. To treat it as a directory, make sure it # ends in +File::SEPARATOR+ ('/' on UNIX filesystems). # # @param [String] from the starting filename # (or directory with +from_isdir+ set to +true+). # @param [String] to the final path that should be made relative. # @return [String] the relative path from +from+ to +to+. def self.relative_path(from, to) from = expand_path(from).split(SEPARATOR) to = expand_path(to).split(SEPARATOR) from.length.times do break if from[0] != to[0] from.shift; to.shift end from.pop join(*(from.map { RELATIVE_PARENTDIR } + to)) end # Cleans a path by removing extraneous '..', '.' and '/' characters # # @example Clean a path # File.cleanpath('a/b//./c/../e') # => "a/b/e" # @param [String] path the path to clean # @return [String] the sanitized path def self.cleanpath(path) path = path.split(SEPARATOR) path = path.inject([]) do |acc, comp| next acc if comp == RELATIVE_SAMEDIR if comp == RELATIVE_PARENTDIR && acc.size > 0 && acc.last != RELATIVE_PARENTDIR acc.pop next acc end acc << comp end File.join(*path) end # @group Reading Files # Forces opening a file (for writing) by first creating the file's directory # @param [String] file the filename to open # @since 0.5.2 def self.open!(file, *args, &block) dir = dirname(file) FileUtils.mkdir_p(dir) unless directory?(dir) open(file, *args, &block) end # Reads a file with binary encoding # @return [String] the ascii-8bit encoded data # @since 0.5.3 def self.read_binary(file) File.open(file, 'rb') {|f| f.read } end endyard-master/lib/yard/core_ext/hash.rb000066400000000000000000000004721265676644000201160ustar00rootroot00000000000000class Hash class << self def create(*args) if args.first.is_a?(Array) && args.size == 1 obj = new args.first.each {|k, v| obj[k] = v } obj else create_186(*args) end end alias :create_186 :[] alias :[] :create end end if RUBY_VERSION < "1.8.7" yard-master/lib/yard/core_ext/insertion.rb000066400000000000000000000037101265676644000212030ustar00rootroot00000000000000# The Insertion class inserts a value before or after another # value in a list. # # @example # Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3] class Insertion # Creates an insertion object on a list with a value to be # inserted. To finalize the insertion, call {#before} or # {#after} on the object. # # @param [Array] list the list to perform the insertion on # @param [Object] value the value to insert def initialize(list, value) @list, @values = list, (Array === value ? value : [value]) end # Inserts the value before +val+ # @param [Object] val the object the value will be inserted before # @param [Boolean] recursive look inside sublists def before(val, recursive = false) insertion(val, 0, recursive) end # Inserts the value after +val+. # # @example If subsections are ignored # Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3] # @param [Object] val the object the value will be inserted after # @param [Boolean] recursive look inside sublists def after(val, recursive = false) insertion(val, 1, recursive) end # Alias for {#before} with +recursive+ set to true # @since 0.6.0 def before_any(val) insertion(val, 0, true) end # Alias for {#after} with +recursive+ set to true # @since 0.6.0 def after_any(val) insertion(val, 1, true) end private # This method performs the actual insertion # # @param [Object] val the value to insert # @param [Fixnum] rel the relative index (0 or 1) of where the object # should be placed # @param [Boolean] recursive look inside sublists # @param [Array] list the list to place objects into def insertion(val, rel, recursive = false, list = @list) if recursive list.each do |item| next unless item.is_a?(Array) tmp = item.dup insertion(val, rel, recursive, item) return(list) unless item == tmp end end if index = list.index(val) list[index+rel,0] = @values end list end end yard-master/lib/yard/core_ext/module.rb000066400000000000000000000007711265676644000204620ustar00rootroot00000000000000class Module # Returns the class name of a full module namespace path # # @example # module A::B::C; class_name end # => "C" # @return [String] the last part of a module path def class_name name.split("::").last end # Returns the module namespace path minus the class/module name # # @example # module A::B::C; namespace_name end # => "A::B" # @return [String] the namespace minus the class/module name def namespace_name name.split("::")[0..-2].join("::") end endyard-master/lib/yard/core_ext/string.rb000066400000000000000000000030201265676644000204710ustar00rootroot00000000000000class String # Splits text into tokens the way a shell would, handling quoted # text as a single token. Use '\"' and "\'" to escape quotes and # '\\' to escape a backslash. # # @return [Array] an array representing the tokens def shell_split out = [""] state = :none escape_next = false quote = "" strip.split(//).each do |char| case state when :none, :space case char when /\s/ out << "" unless state == :space state = :space escape_next = false when "\\" if escape_next out.last << char escape_next = false else escape_next = true end when '"', "'" if escape_next out.last << char escape_next = false else state = char quote = "" end else state = :none out.last << char escape_next = false end when '"', "'" case char when '"', "'" if escape_next quote << char escape_next = false elsif char == state out.last << quote state = :none else quote << char end when '\\' if escape_next quote << char escape_next = false else escape_next = true end else quote << char escape_next = false end end end out end end yard-master/lib/yard/core_ext/symbol_hash.rb000066400000000000000000000047231265676644000215060ustar00rootroot00000000000000# A subclass of Hash where all keys are converted into Symbols, and # optionally, all String values are converted into Symbols. class SymbolHash < Hash # Creates a new SymbolHash object # # @param [Boolean] symbolize_value converts any String values into Symbols # if this is set to +true+. def initialize(symbolize_value = true) @symbolize_value = symbolize_value end # @overload [](hash) # Creates a SymbolHash object from an existing Hash # # @example # SymbolHash['x' => 1, :y => 2] # => # # @param [Hash] hash the hash object # @return [SymbolHash] a new SymbolHash from a hash object # # @overload [](*list) # Creates a SymbolHash from an even list of keys and values # # @example # SymbolHash[key1, value1, key2, value2, ...] # @param [Array] list an even list of key followed by value # @return [SymbolHash] a new SymbolHash object def self.[](*hsh) obj = new; if hsh.size == 1 && hsh.first.is_a?(Hash) hsh.first.each {|k,v| obj[k] = v } else 0.step(hsh.size, 2) {|n| obj[hsh[n]] = hsh[n+1] } end obj end # Assigns a value to a symbolized key # @param [#to_sym] key the key # @param [Object] value the value to be assigned. If this is a String and # values are set to be symbolized, it will be converted into a Symbol. def []=(key, value) super(key.to_sym, value.instance_of?(String) && @symbolize_value ? value.to_sym : value) end # Accessed a symbolized key # @param [#to_sym] key the key to access # @return [Object] the value associated with the key def [](key) super(key.to_sym) end # Deleted a key and value associated with it # @param [#to_sym] key the key to delete # @return [void] def delete(key) super(key.to_sym) end # Tests if a symbolized key exists # @param [#to_sym] key the key to test # @return [Boolean] whether the key exists def has_key?(key) super(key.to_sym) end # Updates the object with the contents of another Hash object. # This method modifies the original SymbolHash object # # @param [Hash] hash the hash object to copy the values from # @return [SymbolHash] self def update(hash) hash.each {|k,v| self[k] = v }; self end alias_method :merge!, :update # Merges the contents of another hash into a new SymbolHash object # # @param [Hash] hash the hash of objects to copy # @return [SymbolHash] a new SymbolHash containing the merged data def merge(hash) dup.merge!(hash) end end yard-master/lib/yard/docstring.rb000066400000000000000000000313211265676644000173540ustar00rootroot00000000000000module YARD # A documentation string, or "docstring" for short, encapsulates the # comments and metadata, or "tags", of an object. Meta-data is expressed # in the form +@tag VALUE+, where VALUE can span over multiple lines as # long as they are indented. The following +@example+ tag shows how tags # can be indented: # # # @example My example # # a = "hello world" # # a.reverse # # @version 1.0 # # Tags can be nested in a documentation string, though the {Tags::Tag} # itself is responsible for parsing the inner tags. class Docstring < String class << self # @note Plugin developers should make sure to reset this value # after parsing finishes. This can be done via the # {Parser::SourceParser.after_parse_list} callback. This will # ensure that YARD can properly parse multiple projects in # the same process. # @return [Class] the parser class used to parse # text and optional meta-data from docstrings. Defaults to # {DocstringParser}. # @see DocstringParser # @see Parser::SourceParser.after_parse_list attr_accessor :default_parser # Creates a parser object using the current {default_parser}. # Equivalent to: # Docstring.default_parser.new(*args) # @param args arguments are passed to the {DocstringParser} # class. See {DocstringParser#initialize} for details on # arguments. # @return [DocstringParser] the parser object used to parse a # docstring. def parser(*args) default_parser.new(*args) end end self.default_parser = DocstringParser # @return [Array] the list of reference tags attr_reader :ref_tags # @return [CodeObjects::Base] the object that owns the docstring. attr_accessor :object # @return [Range] line range in the {#object}'s file where the docstring was parsed from attr_accessor :line_range # @return [String] the raw documentation (including raw tag text) attr_reader :all # @return [Boolean] whether the docstring was started with "##" attr_reader :hash_flag def hash_flag=(v) @hash_flag = v == nil ? false : v end # Matches a tag at the start of a comment line # @deprecated Use {DocstringParser::META_MATCH} META_MATCH = DocstringParser::META_MATCH # @group Creating a Docstring Object # Creates a new docstring without performing any parsing through # a {DocstringParser}. This method is called by +DocstringParser+ # when creating the new docstring object. # # @param [String] text the textual portion of the docstring # @param [Array] tags the list of tag objects in the docstring # @param [CodeObjects::Base, nil] object the object associated with the # docstring. May be nil. # @param [String] raw_data the complete docstring, including all # original formatting and any unparsed tags/directives. # @param [CodeObjects::Base, nil] ref_object a reference object used for # the base set of documentation / tag information. def self.new!(text, tags = [], object = nil, raw_data = nil, ref_object = nil) docstring = allocate docstring.replace(text, false) docstring.object = object docstring.add_tag(*tags) docstring.instance_variable_set("@unresolved_reference", ref_object) docstring.instance_variable_set("@all", raw_data) if raw_data docstring end # Creates a new docstring with the raw contents attached to an optional # object. Parsing will be done by the {DocstringParser} class. # # @note To properly parse directives with proper parser context within # handlers, you should not use this method to create a Docstring. # Instead, use the {parser}, which takes a handler object that # can pass parser state onto directives. If a Docstring is created # with this method, directives do not have access to any parser # state, and may not function as expected. # @example # Docstring.new("hello world\n@return Object return", someobj) # # @param [String] content the raw comments to be parsed into a docstring # and associated meta-data. # @param [CodeObjects::Base] object an object to associate the docstring # with. def initialize(content = '', object = nil) @object = object @summary = nil @hash_flag = false self.all = content end # Adds another {Docstring}, copying over tags. # # @param [Docstring, String] other the other docstring (or string) to # add. # @return [Docstring] a new docstring with both docstrings combines def +(other) case other when Docstring Docstring.new([all, other.all].join("\n"), object) else super end end def to_s resolve_reference super end # Replaces the docstring with new raw content. Called by {#all=}. # @param [String] content the raw comments to be parsed def replace(content, parse = true) content = content.join("\n") if content.is_a?(Array) @tags, @ref_tags = [], [] if parse super(parse_comments(content)) else @all = content @unresolved_reference = nil super(content) end end alias all= replace # Deep-copies a docstring # # @note This method creates a new docstring with new tag lists, but does # not create new individual tags. Modifying the tag objects will still # affect the original tags. # @return [Docstring] a new copied docstring # @since 0.7.0 def dup resolve_reference obj = super %w(all summary tags ref_tags).each do |name| val = instance_variable_get("@#{name}") obj.instance_variable_set("@#{name}", val ? val.dup : nil) end obj end # @endgroup # @return [Fixnum] the first line of the {#line_range} # @return [nil] if there is no associated {#line_range} def line line_range ? line_range.first : nil end # Gets the first line of a docstring to the period or the first paragraph. # @return [String] The first line or paragraph of the docstring; always ends with a period. def summary resolve_reference return @summary if @summary stripped = self.gsub(/<.+?>/m, '').gsub(/[\r\n](?![\r\n])/, ' ').strip num_parens = 0 idx = length.times do |index| case stripped[index, 1] when "." next_char = stripped[index + 1, 1].to_s break index - 1 if num_parens <= 0 && next_char =~ /^\s*$/ when "\r", "\n" next_char = stripped[index + 1, 1].to_s if next_char =~ /^\s*$/ if stripped[index - 1, 1] == '.' break index - 2 else break index - 1 end end when "{", "(", "[" num_parens += 1 when "}", ")", "]" num_parens -= 1 end end @summary = stripped[0..idx] if !@summary.empty? && @summary !~ /\A\s*\{include:.+\}\s*\Z/ @summary += '.' end @summary end # Reformats and returns a raw representation of the tag data using the # current tag and docstring data, not the original text. # # @return [String] the updated raw formatted docstring data # @since 0.7.0 # @todo Add Tags::Tag#to_raw and refactor def to_raw tag_data = tags.sort_by {|t| t.tag_name }.map do |tag| case tag when Tags::OverloadTag tag_text = "@#{tag.tag_name} #{tag.signature}\n" unless tag.docstring.blank? tag_text += "\n " + tag.docstring.all.gsub(/\r?\n/, "\n ") end when Tags::OptionTag tag_text = "@#{tag.tag_name} #{tag.name}" tag_text += ' [' + tag.pair.types.join(', ') + ']' if tag.pair.types tag_text += ' ' + tag.pair.name.to_s if tag.pair.name tag_text += "\n " if tag.name && tag.text tag_text += ' (' + tag.pair.defaults.join(', ') + ')' if tag.pair.defaults tag_text += " " + tag.pair.text.strip.gsub(/\n/, "\n ") if tag.pair.text else tag_text = '@' + tag.tag_name tag_text += ' [' + tag.types.join(', ') + ']' if tag.types tag_text += ' ' + tag.name.to_s if tag.name tag_text += "\n " if tag.name && tag.text tag_text += ' ' + tag.text.strip.gsub(/\n/, "\n ") if tag.text end tag_text end [strip, tag_data.join("\n")].reject {|l| l.empty? }.compact.join("\n") end # @group Creating and Accessing Meta-data # Adds a tag or reftag object to the tag list. If you want to parse # tag data based on the {Tags::DefaultFactory} tag factory, use # {DocstringParser} instead. # # @param [Tags::Tag, Tags::RefTag] tags list of tag objects to add # @return [void] def add_tag(*tags) tags.each_with_index do |tag, i| case tag when Tags::Tag tag.object = object @tags << tag when Tags::RefTag, Tags::RefTagList @ref_tags << tag else raise ArgumentError, "expected Tag or RefTag, got #{tag.class} (at index #{i})" end end end # Convenience method to return the first tag # object in the list of tag objects of that name # # @example # doc = Docstring.new("@return zero when nil") # doc.tag(:return).text # => "zero when nil" # # @param [#to_s] name the tag name to return data for # @return [Tags::Tag] the first tag in the list of {#tags} def tag(name) tags.find {|tag| tag.tag_name.to_s == name.to_s } end # Returns a list of tags specified by +name+ or all tags if +name+ is not specified. # # @param [#to_s] name the tag name to return data for, or nil for all tags # @return [Array] the list of tags by the specified tag name def tags(name = nil) list = @tags + convert_ref_tags return list unless name list.select {|tag| tag.tag_name.to_s == name.to_s } end # Returns true if at least one tag by the name +name+ was declared # # @param [String] name the tag name to search for # @return [Boolean] whether or not the tag +name+ was declared def has_tag?(name) tags.any? {|tag| tag.tag_name.to_s == name.to_s } end # Delete all tags with +name+ # @param [String] name the tag name # @return [void] # @since 0.7.0 def delete_tags(name) delete_tag_if {|tag| tag.tag_name.to_s == name.to_s } end # Deletes all tags where the block returns true # @yieldparam [Tags::Tag] tag the tag that is being tested # @yieldreturn [Boolean] true if the tag should be deleted # @return [void] # @since 0.7.0 def delete_tag_if(&block) @tags.delete_if(&block) @ref_tags.delete_if(&block) end # Returns true if the docstring has no content that is visible to a template. # # @param [Boolean] only_visible_tags whether only {Tags::Library.visible_tags} # should be checked, or if all tags should be considered. # @return [Boolean] whether or not the docstring has content def blank?(only_visible_tags = true) if only_visible_tags empty? && !tags.any? {|tag| Tags::Library.visible_tags.include?(tag.tag_name.to_sym) } else empty? && @tags.empty? && @ref_tags.empty? end end # @endgroup # Resolves unresolved other docstring reference if there is # unresolved reference. Does nothing if there is no unresolved # reference. # # Normally, you don't need to call this method # explicitly. Resolving unresolved reference is done implicitly. # # @return [void] def resolve_reference loop do return if @unresolved_reference.nil? return if CodeObjects::Proxy === @unresolved_reference reference, @unresolved_reference = @unresolved_reference, nil self.all = [reference.docstring.all, @all].join("\n") end end private # Maps valid reference tags # # @return [Array] the list of valid reference tags def convert_ref_tags list = @ref_tags.reject {|t| CodeObjects::Proxy === t.owner } list.map {|t| t.tags }.flatten end # Parses out comments split by newlines into a new code object # # @param [String] comments # the newline delimited array of comments. If the comments # are passed as a String, they will be split by newlines. # # @return [String] the non-metadata portion of the comments to # be used as a docstring def parse_comments(comments) parser = self.class.parser parser.parse(comments, object) @all = parser.raw_text @unresolved_reference = parser.reference add_tag(*parser.tags) parser.text end end end yard-master/lib/yard/docstring_parser.rb000066400000000000000000000246511265676644000207400ustar00rootroot00000000000000require 'ostruct' module YARD # Parses text and creates a {Docstring} object to represent documentation # for a {CodeObjects::Base}. To create a new docstring, you should initialize # the parser and call {#parse} followed by {#to_docstring}. # # == Subclassing Notes # # The DocstringParser can be subclassed and subtituted during parsing by # setting the {Docstring.default_parser} attribute with the name of the # subclass. This allows developers to change the way docstrings are # parsed, allowing for completely different docstring syntaxes. # # @example Creating a Docstring with a DocstringParser # DocstringParser.new.parse("text here").to_docstring # @example Creating a Custom DocstringParser # # Parses docstrings backwards! # class ReverseDocstringParser # def parse_content(content) # super(content.reverse) # end # end # # # Set the parser as default when parsing # YARD::Docstring.default_parser = ReverseDocstringParser # @see #parse_content # @since 0.8.0 class DocstringParser # @return [String] the parsed text portion of the docstring, # with tags removed. attr_accessor :text # @return [String] the complete input string to the parser. attr_accessor :raw_text # @return [Array] the list of meta-data tags identified # by the parser attr_accessor :tags # @return [Array] a list of directives identified # by the parser. This list will not be passed on to the # Docstring object. attr_accessor :directives # @return [OpenStruct] any arbitrary state to be passed between # tags during parsing. Mainly used by directives to coordinate # behaviour (so that directives can be aware of other directives # used in a docstring). attr_accessor :state # @return [CodeObjects::Base, nil] the object associated with # the docstring being parsed. May be nil if the docstring is # not attached to any object. attr_accessor :object # @return [CodeObjects::Base, nil] the object referenced by # the docstring being parsed. May be nil if the docstring doesn't # refer to any object. attr_accessor :reference # @return [Handlers::Base, nil] the handler parsing this # docstring. May be nil if this docstring parser is not # initialized through attr_accessor :handler # @return [Tags::Library] the tag library being used to # identify registered tags in the docstring. attr_accessor :library # The regular expression to match the tag syntax META_MATCH = /^@(!)?((?:\w\.?)+)(?:\s+(.*))?$/i # @!group Creation and Conversion Methods # Creates a new parser to parse docstring data # # @param [Tags::Library] library a tag library for recognizing # tags. def initialize(library = Tags::Library.instance) @text = "" @raw_text = "" @tags = [] @directives = [] @library = library @object = nil @reference = nil @handler = nil @state = OpenStruct.new end # @return [Docstring] translates parsed text into # a Docstring object. def to_docstring Docstring.new!(text, tags, object, raw_text, reference) end # @!group Parsing Methods # Parses all content and returns itself. # # @param [String] content the docstring text to parse # @param [CodeObjects::Base] object the object that the docstring # is attached to. Will be passed to directives to act on # this object. # @param [Handlers::Base, nil] handler the handler object that is # parsing this object. May be nil if this parser is not being # called from a {Parser::SourceParser} context. # @return [self] the parser object. To get the docstring, # call {#to_docstring}. # @see #to_docstring def parse(content, object = nil, handler = nil) @object = object @handler = handler @reference, @raw_text = detect_reference(content) text = parse_content(@raw_text) # Remove trailing/leading whitespace / newlines @text = text.gsub(/\A[\r\n\s]+|[\r\n\s]+\Z/, '') call_directives_after_parse call_after_parse_callbacks self end # Parses a given block of text. # # @param [String] content the content to parse # @note Subclasses can override this method to perform custom # parsing of content data. def parse_content(content) content = content.split(/\r?\n/) if content.is_a?(String) return '' if !content || content.empty? docstring = "" indent, last_indent = content.first[/^\s*/].length, 0 orig_indent = 0 directive = false last_line = "" tag_name, tag_klass, tag_buf = nil, nil, [] (content+['']).each_with_index do |line, index| indent = line[/^\s*/].length empty = (line =~ /^\s*$/ ? true : false) done = content.size == index if tag_name && (((indent < orig_indent && !empty) || done || (indent == 0 && !empty)) || (indent <= last_indent && line =~ META_MATCH)) buf = tag_buf.join("\n") if directive || tag_is_directive?(tag_name) directive = create_directive(tag_name, buf) if directive docstring << parse_content(directive.expanded_text).chomp end else create_tag(tag_name, buf) end tag_name, tag_buf, directive = nil, [], false orig_indent = 0 end # Found a meta tag if line =~ META_MATCH directive, tag_name, tag_buf = $1, $2, [($3 || '')] elsif tag_name && indent >= orig_indent && !empty orig_indent = indent if orig_indent == 0 # Extra data added to the tag on the next line last_empty = last_line =~ /^[ \t]*$/ ? true : false tag_buf << '' if last_empty tag_buf << line.gsub(/^[ \t]{#{orig_indent}}/, '') elsif !tag_name # Regular docstring text docstring << line << "\n" end last_indent = indent last_line = line end docstring end # @!group Tag Manipulation Methods # Creates a tag from the {Tags::DefaultFactory tag factory}. # # To add an already created tag object, append it to {#tags}. # # @param [String] tag_name the tag name # @param [String] tag_buf the text attached to the tag with newlines removed. # @return [Tags::Tag, Tags::RefTag] a tag def create_tag(tag_name, tag_buf = '') if tag_buf =~ /\A\s*(?:(\S+)\s+)?\(\s*see\s+(\S+)\s*\)\s*\Z/ return create_ref_tag(tag_name, $1, $2) end if library.has_tag?(tag_name) @tags += [library.tag_create(tag_name, tag_buf)].flatten else log.warn "Unknown tag @#{tag_name}" + (object ? " in file `#{object.file}` near line #{object.line}" : "") end rescue Tags::TagFormatError log.warn "Invalid tag format for @#{tag_name}" + (object ? " in file `#{object.file}` near line #{object.line}" : "") end # Creates a {Tags::RefTag} def create_ref_tag(tag_name, name, object_name) @tags << Tags::RefTagList.new(tag_name, P(object, object_name), name) end # Creates a new directive using the registered {#library} # @return [Directive] the directive object that is created def create_directive(tag_name, tag_buf) if library.has_directive?(tag_name) dir = library.directive_create(tag_name, tag_buf, self) if dir.is_a?(Tags::Directive) @directives << dir dir end else log.warn "Unknown directive @!#{tag_name}" + (object ? " in file `#{object.file}` near line #{object.line}" : "") nil end rescue Tags::TagFormatError log.warn "Invalid directive format for @!#{tag_name}" + (object ? " in file `#{object.file}` near line #{object.line}" : "") nil end # Backward compatibility to detect old tags that should be specified # as directives in 0.8 and onward. def tag_is_directive?(tag_name) list = %w(attribute endgroup group macro method scope visibility) list.include?(tag_name) end private def namespace if object object.namespace else nil end end def detect_reference(content) if content =~ /\A\s*\(see (\S+)\s*\)(?:\s|$)/ path, extra = $1, $' [CodeObjects::Proxy.new(namespace, path), extra] else [nil, content] end end # @!group Parser Callback Methods # Calls the {Directive#after_parse} callback on all the # created directives. def call_directives_after_parse directives.each do |dir| dir.after_parse end end # Calls all {after_parse} callbacks def call_after_parse_callbacks self.class.after_parse_callbacks.each do |cb| cb.call(self) end end public # Creates a callback that is called after a docstring is successfully # parsed. Use this method to perform sanity checks on a docstring's # tag data, or add any extra tags automatically to a docstring. # # @yield [parser] a block to be called after a docstring is parsed # @yieldparam [DocstringParser] parser the docstring parser object # with all directives and tags created. # @yieldreturn [void] # @return [void] def self.after_parse(&block) self.after_parse_callbacks << block end # @return [Array] the {after_parse} callback proc objects def self.after_parse_callbacks @after_parse_callbacks ||= [] end # Define a callback to check that @param tags are properly named after_parse do |parser| next unless parser.object next unless parser.object.is_a?(CodeObjects::MethodObject) names = parser.object.parameters.map {|l| l.first.gsub(/\W/, '') } seen_names = [] infile_info = "\n in file `#{parser.object.file}' " + "near line #{parser.object.line}" parser.tags.each do |tag| next if tag.is_a?(Tags::RefTagList) # we don't handle this yet next unless tag.tag_name == "param" if seen_names.include?(tag.name) log.warn "@param tag has duplicate parameter name: " + "#{tag.name} #{infile_info}" elsif names.include?(tag.name) seen_names << tag.name else log.warn "@param tag has unknown parameter name: " + "#{tag.name} #{infile_info}" end end end end end yard-master/lib/yard/globals.rb000066400000000000000000000007311265676644000170040ustar00rootroot00000000000000# @group Global Convenience Methods # Shortcut for creating a YARD::CodeObjects::Proxy via a path # # @see YARD::CodeObjects::Proxy # @see YARD::Registry.resolve def P(namespace, name = nil, type = nil) namespace, name = nil, namespace if name.nil? YARD::Registry.resolve(namespace, name, false, true, type) end # The global {YARD::Logger} instance # # @return [YARD::Logger] the global {YARD::Logger} instance # @see YARD::Logger def log YARD::Logger.instance end yard-master/lib/yard/handlers/000077500000000000000000000000001265676644000166335ustar00rootroot00000000000000yard-master/lib/yard/handlers/base.rb000066400000000000000000000547001265676644000201000ustar00rootroot00000000000000module YARD module Handlers # Raise this error when a handler should exit before completing. # The exception will be silenced, allowing the next handler(s) in the # queue to be executed. # @since 0.8.4 class HandlerAborted < ::RuntimeError; end # Raised during processing phase when a handler needs to perform # an operation on an object's namespace but the namespace could # not be resolved. class NamespaceMissingError < Parser::UndocumentableError # The object the error occurred on # @return [CodeObjects::Base] a code object attr_accessor :object def initialize(object) @object = object end end # Handlers are pluggable semantic parsers for YARD's code generation # phase. They allow developers to control what information gets # generated by YARD, giving them the ability to, for instance, document # any Ruby DSLs that a customized framework may use. A good example # of this would be the ability to document and generate meta data for # the 'describe' declaration of the RSpec testing framework by simply # adding a handler for such a keyword. Similarly, any Ruby API that # takes advantage of class level declarations could add these to the # documentation in a very explicit format by treating them as first- # class objects in any outputted documentation. # # == Overview of a Typical Handler Scenario # # Generally, a handler class will declare a set of statements which # it will handle using the {handles} class declaration. It will then # implement the {#process} method to do the work. The processing would # usually involve the manipulation of the {#namespace}, {#owner} # {CodeObjects::Base code objects} or the creation of new ones, in # which case they should be registered by {#register}, a method that # sets some basic attributes for the new objects. # # Handlers are usually simple and take up to a page of code to process # and register a new object or add new attributes to the current +namespace+. # # == Setting up a Handler for Use # # A Handler is automatically registered when it is subclassed from the # base class. The only other thing that needs to be done is to specify # which statement the handler will process. This is done with the +handles+ # declaration, taking either a {Parser::Ruby::Legacy::RubyToken}, {String} or `Regexp`. # Here is a simple example which processes module statements. # # class MyModuleHandler < YARD::Handlers::Base # handles TkMODULE # # def process # # do something # end # end # # == Processing Handler Data # # The goal of a specific handler is really up to the developer, and as # such there is no real guideline on how to process the data. However, # it is important to know where the data is coming from to be able to use # it. # # === +statement+ Attribute # # The +statement+ attribute pertains to the {Parser::Ruby::Legacy::Statement} object # containing a set of tokens parsed in by the parser. This is the main set # of data to be analyzed and processed. The comments attached to the statement # can be accessed by the {Parser::Ruby::Legacy::Statement#comments} method, but generally # the data to be processed will live in the +tokens+ attribute. This list # can be converted to a +String+ using +#to_s+ to parse the data with # regular expressions (or other text processing mechanisms), if needed. # # === +namespace+ Attribute # # The +namespace+ attribute is a {CodeObjects::NamespaceObject namespace object} # which represents the current namespace that the parser is in. For instance: # # module SomeModule # class MyClass # def mymethod; end # end # end # # If a handler was to parse the 'class MyClass' statement, it would # be necessary to know that it belonged inside the SomeModule module. # This is the value that +namespace+ would return when processing such # a statement. If the class was then entered and another handler was # called on the method, the +namespace+ would be set to the 'MyClass' # code object. # # === +owner+ Attribute # # The +owner+ attribute is similar to the +namespace+ attribute in that # it also follows the scope of the code during parsing. However, a namespace # object is loosely defined as a module or class and YARD has the ability # to parse beyond module and class blocks (inside methods, for instance), # so the +owner+ attribute would not be limited to modules and classes. # # To put this into context, the example from above will be used. If a method # handler was added to the mix and decided to parse inside the method body, # the +owner+ would be set to the method object but the namespace would remain # set to the class. This would allow the developer to process any method # definitions set inside a method (def x; def y; 2 end end) by adding them # to the correct namespace (the class, not the method). # # In summary, the distinction between +namespace+ and +owner+ can be thought # of as the difference between first-class Ruby objects (namespaces) and # second-class Ruby objects (methods). # # === +visibility+ and +scope+ Attributes # # Mainly needed for parsing methods, the +visibility+ and +scope+ attributes # refer to the public/protected/private and class/instance values (respectively) # of the current parsing position. # # == Parsing Blocks in Statements # # In addition to parsing a statement and creating new objects, some # handlers may wish to continue parsing the code inside the statement's # block (if there is one). In this context, a block means the inside # of any statement, be it class definition, module definition, if # statement or classic 'Ruby block'. # # For example, a class statement would be "class MyClass" and the block # would be a list of statements including the method definitions inside # the class. For a class handler, the programmer would execute the # {#parse_block} method to continue parsing code inside the block, with # the +namespace+ now pointing to the class object the handler created. # # YARD has the ability to continue into any block: class, module, method, # even if statements. For this reason, the block parsing method must be # invoked explicitly out of efficiency sake. # # @abstract Subclass this class to provide a handler for YARD to use # during the processing phase. # # @see CodeObjects::Base # @see CodeObjects::NamespaceObject # @see handles # @see #namespace # @see #owner # @see #register # @see #parse_block class Base # For accessing convenience, eg. "MethodObject" # instead of the full qualified namespace include YARD::CodeObjects include Parser class << self # Clear all registered subclasses. Testing purposes only # @return [void] def clear_subclasses @@subclasses = [] end # Returns all registered handler subclasses. # @return [Array] a list of handlers def subclasses @@subclasses ||= [] end def inherited(subclass) @@subclasses ||= [] @@subclasses << subclass end # Declares the statement type which will be processed # by this handler. # # A match need not be unique to a handler. Multiple # handlers can process the same statement. However, # in this case, care should be taken to make sure that # {#parse_block} would only be executed by one of # the handlers, otherwise the same code will be parsed # multiple times and slow YARD down. # # @param [Parser::RubyToken, Symbol, String, Regexp] matches # statements that match the declaration will be # processed by this handler. A {String} match is # equivalent to a +/\Astring/+ regular expression # (match from the beginning of the line), and all # token matches match only the first token of the # statement. # def handles(*matches) (@handlers ||= []).push(*matches) end # This class is implemented by {Ruby::Base} and {Ruby::Legacy::Base}. # To implement a base handler class for another language, implement # this method to return true if the handler should process the given # statement object. Use {handlers} to enumerate the matchers declared # for the handler class. # # @param statement a statement object or node (depends on language type) # @return [Boolean] whether or not this handler object should process # the given statement def handles?(statement) raise NotImplementedError, "override #handles? in a subclass" end # @return [Array] a list of matchers for the handler object. # @see handles? def handlers @handlers ||= [] end # Declares that the handler should only be called when inside a # {CodeObjects::NamespaceObject}, not a method body. # # @return [void] def namespace_only @namespace_only = true end # @return [Boolean] whether the handler should only be processed inside # a namespace. def namespace_only? (@namespace_only ||= false) ? true : false end # Declares that a handler should only be called when inside a filename # by its basename or a regex match for the full path. # # @param [String, Regexp] filename a matching filename or regex # @return [void] # @since 0.6.2 def in_file(filename) (@in_files ||= []) << filename end # @return [Boolean] whether the filename matches the declared file # match for a handler. If no file match is specified, returns true. # @since 0.6.2 def matches_file?(filename) @in_files ||= nil # avoid ruby warnings return true unless @in_files @in_files.any? do |in_file| case in_file when String File.basename(filename) == in_file when Regexp filename =~ in_file else true end end end # Generates a +process+ method, equivalent to +def process; ... end+. # Blocks defined with this syntax will be wrapped inside an anonymous # module so that the handler class can be extended with mixins that # override the +process+ method without alias chaining. # # @!macro yard.handlers.process # @!method process # Main processing callback # @return [void] # @see #process # @return [void] # @since 0.5.4 def process(&block) mod = Module.new mod.send(:define_method, :process, &block) include mod end end def initialize(source_parser, stmt) @parser = source_parser @statement = stmt end # The main handler method called by the parser on a statement # that matches the {handles} declaration. # # Subclasses should override this method to provide the handling # functionality for the class. # # @return [Array, CodeObjects::Base, Object] # If this method returns a code object (or a list of them), # they are passed to the +#register+ method which adds basic # attributes. It is not necessary to return any objects and in # some cases you may want to explicitly avoid the returning of # any objects for post-processing by the register method. # # @see handles # @see #register # def process raise NotImplementedError, "#{self} did not implement a #process method for handling." end # Parses the semantic "block" contained in the statement node. # # @abstract Subclasses should call {Processor#process parser.process} def parse_block(*args) raise NotImplementedError, "#{self} did not implement a #parse_block method for handling" end # @return [Processor] the processor object that manages all global state # during handling. attr_reader :parser # @return [Object] the statement object currently being processed. Usually # refers to one semantic language statement, though the strict definition # depends on the parser used. attr_reader :statement # (see Processor#owner) attr_accessor :owner # (see Processor#namespace) attr_accessor :namespace # (see Processor#visibility) attr_accessor :visibility # (see Processor#scope) attr_accessor :scope # (see Processor#globals) attr_reader :globals # (see Processor#extra_state) attr_reader :extra_state undef owner, owner=, namespace, namespace= undef visibility, visibility=, scope, scope= undef globals, extra_state def owner; parser.owner end def owner=(v) parser.owner=(v) end def namespace; parser.namespace end def namespace=(v); parser.namespace=(v) end def visibility; parser.visibility end def visibility=(v); parser.visibility=(v) end def scope; parser.scope end def scope=(v); parser.scope=(v) end def globals; parser.globals end def extra_state; parser.extra_state end # Aborts a handler by raising {Handlers::HandlerAborted}. # An exception will only be logged in debugging mode for # this kind of handler exit. # # @since 0.8.4 def abort! raise Handlers::HandlerAborted end # Executes a given block with specific state values for {#owner}, # {#namespace} and {#scope}. # # @param [Proc] block the block to execute with specific state # @option opts [CodeObjects::NamespaceObject] :namespace (value of #namespace) # the namespace object that {#namespace} will be equal to for the # duration of the block. # @option opts [Symbol] :scope (:instance) # the scope for the duration of the block. # @option opts [CodeObjects::Base] :owner (value of #owner) # the owner object (method) for the duration of the block # @yield a block to execute with the given state values. def push_state(opts = {}, &block) opts = { :namespace => namespace, :scope => :instance, :owner => owner || namespace, :visibility => nil }.update(opts) ns, vis, sc, oo = namespace, visibility, scope, owner self.namespace = opts[:namespace] self.visibility = opts[:visibility] || :public self.scope = opts[:scope] self.owner = opts[:owner] yield self.namespace = ns self.visibility = vis self.scope = sc self.owner = oo end # Do some post processing on a list of code objects. # Adds basic attributes to the list of objects like # the filename, line number, {CodeObjects::Base#dynamic}, # source code and {CodeObjects::Base#docstring}, # but only if they don't exist. # # @param [Array] objects # the list of objects to post-process. # # @return [CodeObjects::Base, Array] # returns whatever is passed in, for chainability. # def register(*objects) objects.flatten.each do |object| next unless object.is_a?(CodeObjects::Base) register_ensure_loaded(object) yield(object) if block_given? register_file_info(object) register_source(object) register_visibility(object) register_docstring(object) register_group(object) register_dynamic(object) register_module_function(object) end objects.size == 1 ? objects.first : objects end # Ensures that the object's namespace is loaded before attaching it # to the namespace. # # @param [CodeObjects::Base] object the object to register # @return [void] # @since 0.8.0 def register_ensure_loaded(object) begin ensure_loaded!(object.namespace) object.namespace.children << object rescue NamespaceMissingError end end # Registers the file/line of the declaration with the object # # @param [CodeObjects::Base] object the object to register # @return [void] # @since 0.8.0 def register_file_info(object, file = parser.file, line = statement.line, comments = statement.comments) object.add_file(file, line, comments) end # Registers any docstring found for the object and expands macros # # @param [CodeObjects::Base] object the object to register # @return [void] # @since 0.8.0 def register_docstring(object, docstring = statement.comments, stmt = statement) docstring = docstring.join("\n") if Array === docstring parser = Docstring.parser parser.parse(docstring || "", object, self) if object && docstring object.docstring = parser.to_docstring # Add hash_flag/line_range if stmt object.docstring.hash_flag = stmt.comments_hash_flag object.docstring.line_range = stmt.comments_range end end register_transitive_tags(object) end # Registers the object as being inside a specific group # # @param [CodeObjects::Base] object the object to register # @return [void] # @since 0.8.0 def register_group(object, group = extra_state.group) if group unless object.namespace.is_a?(Proxy) object.namespace.groups |= [group] end object.group = group end end # Registers any transitive tags from the namespace on the object # # @param [CodeObjects::Base, nil] object the object to register # @return [void] # @since 0.8.0 def register_transitive_tags(object) return unless object Tags::Library.transitive_tags.each do |tag| next if object.namespace.is_a?(Proxy) next unless object.namespace.has_tag?(tag) next if object.has_tag?(tag) object.add_tag(*object.namespace.tags(tag)) end end # @param [CodeObjects::Base] object the object to register # @return [void] # @since 0.8.0 def register_source(object, source = statement, type = parser.parser_type) return unless object.is_a?(MethodObject) object.source ||= source object.source_type = type end # Registers visibility on a method object. If the object does not # respond to setting visibility, nothing is done. # # @param [#visibility=] object the object to register # @param [Symbol] visibility the visibility to set on the object # @since 0.8.0 def register_visibility(object, visibility = self.visibility) return unless object.respond_to?(:visibility=) return if object.is_a?(NamespaceObject) object.visibility = visibility end # Registers the same method information on the module function, if # the object was defined as a module function. # # @param [CodeObjects::Base] object the possible module function object # to copy data for # @since 0.8.0 def register_module_function(object) return unless object.is_a?(MethodObject) return unless object.module_function? modobj = MethodObject.new(object.namespace, object.name) object.copy_to(modobj) modobj.visibility = :private end # Registers the object as dynamic if the object is defined inside # a method or block (owner != namespace) # # @param [CodeObjects::Base] object the object to register # @return [void] # @since 0.8.0 def register_dynamic(object) object.dynamic = true if owner != namespace end # Ensures that a specific +object+ has been parsed and loaded into the # registry. This is necessary when adding data to a namespace, for instance, # since the namespace may not have been processed yet (it can be located # in a file that has not been handled). # # Calling this method defers the handler until all other files have been # processed. If the object gets resolved, the rest of the handler continues, # otherwise an exception is raised. # # @example Adding a mixin to the String class programmatically # ensure_loaded! P('String') # # "String" is now guaranteed to be loaded # P('String').mixins << P('MyMixin') # # @param [Proxy, CodeObjects::Base] object the object to resolve. # @param [Integer] max_retries the number of times to defer the handler # before raising a +NamespaceMissingError+. # @raise [NamespaceMissingError] if the object is not resolved within # +max_retries+ attempts, this exception is raised and the handler # finishes processing. def ensure_loaded!(object, max_retries = 1) return if object.root? return object unless object.is_a?(Proxy) retries = 0 while object.is_a?(Proxy) if retries <= max_retries log.debug "Missing object #{object} in file `#{parser.file}', moving it to the back of the line." parser.parse_remaining_files else raise NamespaceMissingError, object end retries += 1 end object end # @group Macro Support # @abstract Implement this method to return the parameters in a method call # statement. It should return an empty list if the statement is not a # method call. # @return [Array] a list of argument names def call_params raise NotImplementedError end # @abstract Implement this method to return the method being called in # a method call. It should return nil if the statement is not a method # call. # @return [String] the method name being called # @return [nil] if the statement is not a method call def caller_method raise NotImplementedError end end end end yard-master/lib/yard/handlers/c/000077500000000000000000000000001265676644000170555ustar00rootroot00000000000000yard-master/lib/yard/handlers/c/alias_handler.rb000066400000000000000000000006701265676644000221730ustar00rootroot00000000000000class YARD::Handlers::C::AliasHandler < YARD::Handlers::C::Base MATCH = %r{rb_define_alias \s*\(\s*([\w\.]+), \s*"([^"]+)", \s*"([^"]+)"\s*\)}xm handles MATCH statement_class BodyStatement process do statement.source.scan(MATCH) do |var_name, new_name, old_name| var_name = "rb_cObject" if var_name == "rb_mKernel" handle_alias(var_name, new_name, old_name) end end end yard-master/lib/yard/handlers/c/attribute_handler.rb000066400000000000000000000006551265676644000231100ustar00rootroot00000000000000class YARD::Handlers::C::AttributeHandler < YARD::Handlers::C::Base MATCH = %r{rb_define_attr\s*\(\s*([\w\.]+),\s*"([^"]+)",\s*(0|1)\s*,\s*(0|1)\s*\)} handles MATCH process do return if ToplevelStatement == statement return if Comment === statement && statement.type != :multi statement.source.scan(MATCH) do |var_name, name, read, write| handle_attribute(var_name, name, read, write) end end end yard-master/lib/yard/handlers/c/base.rb000066400000000000000000000070471265676644000203240ustar00rootroot00000000000000module YARD module Handlers module C class Base < Handlers::Base include YARD::Parser::C include HandlerMethods # @return [Boolean] whether the handler handles this statement def self.handles?(statement, processor) processor.globals.cruby_processed_files ||= {} processor.globals.cruby_processed_files[processor.file] = true if statement.respond_to? :declaration src = statement.declaration else src = statement.source end handlers.any? do |a_handler| statement_class >= statement.class && case a_handler when String src == a_handler when Regexp src =~ a_handler end end end def self.statement_class(type = nil) type ? @statement_class = type : (@statement_class || Statement) end # @group Registering objects def register_docstring(object, docstring = nil, stmt = nil) super(object, docstring, stmt) if docstring end def register_file_info(object, file = nil, line = nil, comments = nil) super(object, file, line, comments) if file end def register_source(object, source = nil, type = nil) super(object, source, type) if source end def register_visibility(object, visibility = nil) super(object, visibility) if visibility end # @group Looking up Symbol and Var Values def symbols globals.cruby_symbols ||= {} end def override_comments globals.cruby_override_comments ||= [] end def namespace_for_variable(var) return namespaces[var] if namespaces[var] var = remove_var_prefix(var) var.empty? ? nil : P(var) end def ensure_variable_defined!(var, max_retries = 1) retries, object = 0, nil loop do object = namespace_for_variable(var) break unless object.is_a?(Proxy) if retries <= max_retries log.debug "Missing namespace variable #{var} in file `#{parser.file}', moving it to the back of the line." parser.parse_remaining_files else raise NamespaceMissingError, object end retries += 1 end object end def namespaces globals.cruby_namespaces ||= {} end def processed_files globals.cruby_processed_files ||= {} end # @group Parsing an Inner Block def parse_block(opts = {}) return if !statement.block || statement.block.empty? push_state(opts) do parser.process(statement.block) end end # @group Processing other files def process_file(file, object) file = File.cleanpath(file) return if processed_files[file] processed_files[file] = file begin log.debug "Processing embedded call to C source #{file}..." globals.ordered_parser.files.delete(file) if globals.ordered_parser parser.process(Parser::C::CParser.new(File.read(file), file).parse) rescue Errno::ENOENT log.warn "Missing source file `#{file}' when parsing #{object}" end end # @endgroup private def remove_var_prefix(var) var.gsub(/^rb_[mc]|^[a-z_]+/, '') end end end end end yard-master/lib/yard/handlers/c/class_handler.rb000066400000000000000000000014241265676644000222050ustar00rootroot00000000000000class YARD::Handlers::C::ClassHandler < YARD::Handlers::C::Base MATCH1 = /([\w\.]+)\s* = \s*(?:rb_define_class|boot_defclass)\s* \( \s*"([\w:]+)", \s*(\w+|0)\s* \)/mx MATCH2 = /([\w\.]+)\s* = \s*rb_define_class_under\s* \( \s*(\w+), \s*"(\w+)"(?:, \s*([\w\*\s\(\)\.\->]+)\s*)? # for SWIG \s*\)/mx handles MATCH1 handles MATCH2 statement_class BodyStatement process do statement.source.scan(MATCH1) do |var_name, class_name, parent| handle_class(var_name, class_name, parent) end statement.source.scan(MATCH2) do |var_name, in_module, class_name, parent| handle_class(var_name, class_name, parent, in_module) end end end yard-master/lib/yard/handlers/c/constant_handler.rb000066400000000000000000000006341265676644000227330ustar00rootroot00000000000000class YARD::Handlers::C::ConstantHandler < YARD::Handlers::C::Base MATCH = %r{\brb_define_((?:readonly_)?variable|(?:global_)?const) \s*\((?:\s*(\w+),)?\s*"(\w+)",\s*(.*?)\s*\)\s*;}xm handles MATCH statement_class BodyStatement process do statement.source.scan(MATCH) do |type, var_name, const_name, value| handle_constants(type, var_name, const_name, value) end end end yard-master/lib/yard/handlers/c/handler_methods.rb000066400000000000000000000201421265676644000225410ustar00rootroot00000000000000module YARD module Handlers module C module HandlerMethods include Parser::C include CodeObjects def handle_class(var_name, class_name, parent, in_module = nil) parent = nil if parent == "0" namespace = in_module ? ensure_variable_defined!(in_module) : Registry.root if namespace.nil? raise Parser::UndocumentableError, "class #{class_name}. " + "Cannot find definition for parent namespace." end register ClassObject.new(namespace, class_name) do |obj| if parent parent_class = namespace_for_variable(parent) if parent_class.is_a?(Proxy) obj.superclass = "::#{parent_class.path}" obj.superclass.type = :class else obj.superclass = parent_class end end namespaces[var_name] = obj register_file_info(obj, statement.file, statement.line) end end def handle_module(var_name, module_name, in_module = nil) namespace = in_module ? ensure_variable_defined!(in_module) : Registry.root if namespace.nil? raise Parser::UndocumentableError, "module #{module_name}. " + "Cannot find definition for parent namespace." end register ModuleObject.new(namespace, module_name) do |obj| namespaces[var_name] = obj register_file_info(obj, statement.file, statement.line) end end def handle_method(scope, var_name, name, func_name, source_file = nil) visibility = :public case scope when "singleton_method"; scope = :class when "module_function"; scope = :module when "private_method"; scope = :instance; visibility = :private else; scope = :instance end namespace = namespace_for_variable(var_name) # Is this method being defined on a core Ruby class or module? if namespace.is_a?(Proxy) if var_name =~ /^rb_c(\w+)/ && YARD::CodeObjects::BUILTIN_CLASSES.include?($1) namespace = namespaces[var_name] = YARD::CodeObjects::ClassObject.new(:root, $1) elsif var_name =~ /^rb_m(\w+)/ && YARD::CodeObjects::BUILTIN_MODULES.include?($1) namespace = namespaces[var_name] = YARD::CodeObjects::ModuleObject.new(:root, $1) end end return if namespace.nil? # XXX: raise UndocumentableError might be too noisy. register MethodObject.new(namespace, name, scope) do |obj| register_visibility(obj, visibility) find_method_body(obj, func_name) obj.explicit = true obj.add_tag(Tags::Tag.new(:return, '', 'Boolean')) if name =~ /\?$/ end end def handle_attribute(var_name, name, read, write) values = {:read => read.to_i, :write => write.to_i} {:read => name, :write => "#{name}="}.each do |type, meth_name| next unless values[type] > 0 obj = handle_method(:instance, var_name, meth_name, nil) obj.namespace.attributes[:instance][name] ||= SymbolHash[:read => nil, :write => nil] obj.namespace.attributes[:instance][name][type] = obj end end def handle_alias(var_name, new_name, old_name) namespace = namespace_for_variable(var_name) return if namespace.nil? new_meth, old_meth = new_name.to_sym, old_name.to_sym old_obj = namespace.child(:name => old_meth, :scope => :instance) new_obj = register MethodObject.new(namespace, new_meth, :instance) do |o| register_visibility(o, visibility) register_file_info(o, statement.file, statement.line) end if old_obj new_obj.signature = old_obj.signature new_obj.source = old_obj.source new_obj.docstring = old_obj.docstring new_obj.docstring.object = new_obj else new_obj.signature = "def #{new_meth}" # this is all we know. end namespace.aliases[new_obj] = old_meth end def handle_constants(type, var_name, const_name, value) return unless type == 'const' namespace = namespace_for_variable(var_name) register ConstantObject.new(namespace, const_name) do |obj| obj.source_type = :c obj.value = value register_file_info(obj, statement.file, statement.line) find_constant_docstring(obj) end end private def find_constant_docstring(object) comment = nil # look inside overrides for declaration value override_comments.each do |name, override_comment| next unless override_comment.file == statement.file just_const_name = name.gsub(/\A.+::/, '') if object.path == name || object.name.to_s == just_const_name comment = override_comment.source stmt = override_comment break end end # use any comments on this statement as a last resort if comment.nil? && statement.comments && statement.comments.source =~ /\S/ comment = statement.comments.source stmt = statement.comments end # In the case of rb_define_const, the definition and comment are in # "/* definition: comment */" form. The literal ':' and '\' characters # can be escaped with a backslash. if comment comment.scan(/\A\s*(.*?[^\s\\]):\s*(.+)/m) do |new_value, new_comment| object.value = new_value.gsub(/\\:/, ':') comment = new_comment end register_docstring(object, comment, stmt) end end def find_method_body(object, symbol) file, in_file = statement.file, false if statement.comments && statement.comments.source =~ /\A\s*in (\S+)\Z/ file, in_file = $1, true process_file(file, object) end if src_stmt = symbols[symbol] register_file_info(object, src_stmt.file, src_stmt.line, true) register_source(object, src_stmt) record_parameters(object, symbol, src_stmt) unless src_stmt.comments.nil? || src_stmt.comments.source.empty? register_docstring(object, src_stmt.comments.source, src_stmt) return # found docstring end end # found source (possibly) but no docstring # so look in overrides override_comments.each do |name, override_comment| next unless override_comment.file == file name = name.gsub(/::([^:\.#]+?)\Z/, '.\1') path = if name =~ /\.|#/ # explicit namespace in override comment object.path else object.name.to_s end if path == name || path == name.sub(/new$/, 'initialize') || path == name.sub('.', '#') register_docstring(object, override_comment.source, override_comment) return end end # use any comments on this statement as a last resort if !in_file && statement.comments && statement.comments.source =~ /\S/ register_docstring(object, statement.comments.source, statement) end end def record_parameters(object, symbol, src) # use regex to extract comma-delimited list of parameters from cfunc definition if src.source =~ /VALUE\s+#{symbol}\(([^)]*)\)\s*\{/m params = $~[1].split(/\s*,\s*/) # cfunc for a "varargs" method has params "int argc, VALUE *argv" if params[0] =~ /int\s+argc/ && params[1] =~ /VALUE\s*\*\s*argv/ object.parameters = [['*args', nil]] else # the first cfunc argument is the 'self' argument, we don't need that object.parameters = params.drop(1).map { |s| [s[/VALUE\s+(\S+)/, 1], nil] } end end end end end end end yard-master/lib/yard/handlers/c/init_handler.rb000066400000000000000000000010431265676644000220400ustar00rootroot00000000000000# Handles the Init_Libname() method class YARD::Handlers::C::InitHandler < YARD::Handlers::C::Base MATCH = %r{\A\s*(?:static\s+)?void\s+(?:[Ii]nit_)?(\w+)\s*} handles MATCH statement_class ToplevelStatement process do parse_block if decl = statement.declaration[MATCH, 1] ns = namespace_for_variable(decl) if ns.is_a?(YARD::CodeObjects::NamespaceObject) && ns.docstring.blank? if statement.comments register_docstring(ns, statement.comments.source, statement) end end end end end yard-master/lib/yard/handlers/c/method_handler.rb000066400000000000000000000022561265676644000223640ustar00rootroot00000000000000class YARD::Handlers::C::MethodHandler < YARD::Handlers::C::Base MATCH1 = %r{rb_define_ ( singleton_method | method | module_function | private_method ) \s*\(\s*([\w\.]+)\s*, \s*"([^"]+)"\s*, \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\(|\(\w+\))?(\w+)\)?\s*, \s*(-?\w+)\s*\)}xm MATCH2 = %r{rb_define_global_function\s*\( \s*"([^"]+)", \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\(|\(\w+\))?(\w+)\)?, \s*(-?\w+)\s*\)}xm handles MATCH1 handles MATCH2 statement_class BodyStatement process do statement.source.scan(MATCH1) do |type, var_name, name, func_name, param_count| break if var_name == "ruby_top_self" break if var_name == "nstr" break if var_name == "envtbl" var_name = "rb_cObject" if var_name == "rb_mKernel" handle_method(type, var_name, name, func_name) end statement.source.scan(MATCH2) do |name, func_name, param_count| handle_method("method", "rb_mKernel", name, func_name) end end end yard-master/lib/yard/handlers/c/mixin_handler.rb000066400000000000000000000006411265676644000222240ustar00rootroot00000000000000class YARD::Handlers::C::MixinHandler < YARD::Handlers::C::Base MATCH = /rb_include_module\s*\(\s*(\w+?),\s*(\w+?)\s*\)/ handles MATCH statement_class BodyStatement process do statement.source.scan(MATCH) do |klass_var, mixin_var| namespace = namespace_for_variable(klass_var) ensure_loaded!(namespace) namespace.mixins(:instance) << namespace_for_variable(mixin_var) end end end yard-master/lib/yard/handlers/c/module_handler.rb000066400000000000000000000010571265676644000223670ustar00rootroot00000000000000class YARD::Handlers::C::ModuleHandler < YARD::Handlers::C::Base MATCH1 = /([\w\.]+)\s* = \s*rb_define_module\s*\(\s*"([\w:]+)"\s*\)/mx MATCH2 = /([\w\.]+)\s* = \s*rb_define_module_under\s*\(\s*(\w+),\s*"(\w+)"\s*\)/mx handles MATCH1 handles MATCH2 statement_class BodyStatement process do statement.source.scan(MATCH1) do |var_name, module_name| handle_module(var_name, module_name) end statement.source.scan(MATCH2) do |var_name, in_module, module_name| handle_module(var_name, module_name, in_module) end end end yard-master/lib/yard/handlers/c/override_comment_handler.rb000066400000000000000000000015221265676644000244400ustar00rootroot00000000000000# Parses comments class YARD::Handlers::C::OverrideCommentHandler < YARD::Handlers::C::Base handles %r{.} statement_class Comment process do return if statement.overrides.empty? statement.overrides.each do |type, name| override_comments << [name, statement] obj = nil case type when :class name, superclass = *name.split(/\s*<\s*/) obj = YARD::CodeObjects::ClassObject.new(:root, name) obj.superclass = "::#{superclass}" if superclass when :module obj = YARD::CodeObjects::ModuleObject.new(:root, name) end register(obj) end end def register_docstring(object, docstring = statement.source, stmt = statement) super end def register_file_info(object, file = parser.file, line = statement.line, comments = statement.comments) super end end yard-master/lib/yard/handlers/c/path_handler.rb000066400000000000000000000004131265676644000220310ustar00rootroot00000000000000class YARD::Handlers::C::PathHandler < YARD::Handlers::C::Base MATCH = /([\w\.]+)\s* = \s*rb_path2class\s*\(\s*"([\w:]+)"\)/mx handles MATCH process do statement.source.scan(MATCH) do |var_name, path| namespaces[var_name] = P(path) end end end yard-master/lib/yard/handlers/c/struct_handler.rb000066400000000000000000000005661265676644000224320ustar00rootroot00000000000000class YARD::Handlers::C::StructHandler < YARD::Handlers::C::Base MATCH = /([\w\.]+)\s*=\s*(?:rb_struct_define_without_accessor)\s* \(\s*"([\w:]+)"\s*,\s*(\w+)\s*/mx handles MATCH statement_class BodyStatement process do statement.source.scan(MATCH) do |var_name, class_name, parent| handle_class(var_name, class_name, parent) end end end yard-master/lib/yard/handlers/c/symbol_handler.rb000066400000000000000000000005151265676644000224050ustar00rootroot00000000000000# Keeps track of function bodies for symbol lookup during Ruby method declarations class YARD::Handlers::C::SymbolHandler < YARD::Handlers::C::Base MATCH = %r{\A\s*(?:(?:\w+)\s+)?(?:intern\s+)?VALUE\s+(\w+)\s*\(} handles MATCH statement_class ToplevelStatement process { symbols[statement.source[MATCH, 1]] = statement } end yard-master/lib/yard/handlers/processor.rb000066400000000000000000000172571265676644000212130ustar00rootroot00000000000000require 'ostruct' module YARD module Handlers # Iterates over all statements in a file and delegates them to the # {Handlers::Base} objects that are registered to handle the statement. # # This class is passed to each handler and keeps overall processing state. # For example, if the {#visibility} is set in a handler, all following # statements will have access to this state. This allows "public", # "protected" and "private" statements to be handled in classes and modules. # In addition, the {#namespace} can be set during parsing to control # where objects are being created from. You can also access extra stateful # properties that any handler can set during the duration of the post # processing of a file from {#extra_state}. If you need to access state # across different files, look at {#globals}. # # @see Handlers::Base class Processor class << self # Registers a new namespace for handlers of the given type. # @since 0.6.0 def register_handler_namespace(type, ns) namespace_for_handler[type] = ns end # @return [Hash] a list of registered parser type extensions # @private # @since 0.6.0 attr_reader :namespace_for_handler undef namespace_for_handler def namespace_for_handler; @@parser_type_extensions ||= {} end end register_handler_namespace :ruby, Ruby register_handler_namespace :ruby18, Ruby::Legacy register_handler_namespace :c, C # @return [String] the filename attr_accessor :file # @return [CodeObjects::NamespaceObject] the current namespace attr_accessor :namespace # @return [Symbol] the current visibility (public, private, protected) attr_accessor :visibility # @return [Symbol] the current scope (class, instance) attr_accessor :scope # @return [CodeObjects::Base, nil] unlike the namespace, the owner # is a non-namespace object that should be stored between statements. # For instance, when parsing a method body, the {CodeObjects::MethodObject} # is set as the owner, in case any extra method information is processed. attr_accessor :owner # @return [Symbol] the parser type (:ruby, :ruby18, :c) attr_accessor :parser_type # Handlers can share state for the entire post processing stage through # this attribute. Note that post processing stage spans multiple files. # To share state only within a single file, use {#extra_state} # # @example Sharing state among two handlers # class Handler1 < YARD::Handlers::Ruby::Base # handles :class # process { globals.foo = :bar } # end # # class Handler2 < YARD::Handlers::Ruby::Base # handles :method # process { puts globals.foo } # end # @return [OpenStruct] global shared state for post-processing stage # @see #extra_state attr_accessor :globals # Share state across different handlers inside of a file. # This attribute is similar to {#visibility}, {#scope}, {#namespace} # and {#owner}, in that they all maintain state across all handlers # for the entire source file. Use this attribute to store any data # your handler might need to save during the parsing of a file. If # you need to save state across files, see {#globals}. # # @return [OpenStruct] an open structure that can store arbitrary data # @see #globals attr_accessor :extra_state # Creates a new Processor for a +file+. # @param [SourceParser] parser the parser used to initialize the processor def initialize(parser) @file = parser.file || "(stdin)" @namespace = YARD::Registry.root @visibility = :public @scope = :instance @owner = @namespace @parser_type = parser.parser_type @handlers_loaded = {} @globals = parser.globals || OpenStruct.new @extra_state = OpenStruct.new load_handlers end # Processes a list of statements by finding handlers to process each # one. # # @param [Array] statements a list of statements # @return [void] def process(statements) statements.each_with_index do |stmt, index| find_handlers(stmt).each do |handler| begin handler.new(self, stmt).process rescue HandlerAborted => abort log.debug "#{handler.to_s} cancelled from #{caller.last}" log.debug "\tin file '#{file}':#{stmt.line}:\n\n" + stmt.show + "\n" rescue NamespaceMissingError => missingerr log.warn "The #{missingerr.object.type} #{missingerr.object.path} has not yet been recognized." log.warn "If this class/method is part of your source tree, this will affect your documentation results." log.warn "You can correct this issue by loading the source file for this object before `#{file}'" log.warn rescue Parser::UndocumentableError => undocerr log.warn "in #{handler.to_s}: Undocumentable #{undocerr.message}" log.warn "\tin file '#{file}':#{stmt.line}:\n\n" + stmt.show + "\n" rescue => e log.error "Unhandled exception in #{handler.to_s}:" log.error " in `#{file}`:#{stmt.line}:\n\n#{stmt.show}\n" log.backtrace(e) end end end end # Continue parsing the remainder of the files in the +globals.ordered_parser+ # object. After the remainder of files are parsed, processing will continue # on the current file. # # @return [void] # @see Parser::OrderedParser def parse_remaining_files if globals.ordered_parser globals.ordered_parser.parse log.debug("Re-processing #{@file}...") end end # Searches for all handlers in {Base.subclasses} that match the +statement+ # # @param statement the statement object to match. # @return [Array] a list of handlers to process the statement with. def find_handlers(statement) Base.subclasses.find_all do |handler| handler_base_class > handler && (handler.namespace_only? ? owner.is_a?(CodeObjects::NamespaceObject) : true) && handles?(handler, statement) end end private def handles?(handler, statement) return false unless handler.matches_file?(file) if handler.method(:handles?).arity == 1 handler.handles?(statement) elsif [-1, 2].include?(handler.method(:handles?).arity) handler.handles?(statement, self) end end # Returns the handler base class # @return [Base] the base class def handler_base_class handler_base_namespace.const_get(:Base) end # The module holding the handlers to be loaded # # @return [Module] the module containing the handlers depending on # {#parser_type}. def handler_base_namespace self.class.namespace_for_handler[parser_type] end # Loads handlers from {#handler_base_namespace}. This ensures that # Ruby1.9 handlers are never loaded into 1.8; also lowers the amount # of modules that are loaded # @return [void] def load_handlers return if @handlers_loaded[parser_type] handler_base_namespace.constants.each do |c| const = handler_base_namespace.const_get(c) unless Handlers::Base.subclasses.include?(const) Handlers::Base.subclasses << const end end @handlers_loaded[parser_type] = true end end end endyard-master/lib/yard/handlers/ruby/000077500000000000000000000000001265676644000176145ustar00rootroot00000000000000yard-master/lib/yard/handlers/ruby/alias_handler.rb000066400000000000000000000026451265676644000227360ustar00rootroot00000000000000# Handles alias and alias_method calls class YARD::Handlers::Ruby::AliasHandler < YARD::Handlers::Ruby::Base handles :alias, method_call(:alias_method) namespace_only process do names = [] if statement.type == :alias names = statement.map {|o| o.jump(:ident, :op, :kw, :const).source } elsif statement.call? statement.parameters(false).each do |obj| case obj.type when :symbol_literal, :dyna_symbol names << obj.jump(:ident, :op, :kw, :const).source when :string_literal names << obj.jump(:string_content).source end end end raise YARD::Parser::UndocumentableError, "alias/alias_method" if names.size != 2 new_meth, old_meth = names[0].to_sym, names[1].to_sym old_obj = namespace.child(:name => old_meth, :scope => scope) new_obj = register MethodObject.new(namespace, new_meth, scope) do |o| o.add_file(parser.file, statement.line) end if old_obj new_obj.signature = old_obj.signature new_obj.source = old_obj.source new_obj.docstring = old_obj.docstring + YARD::Docstring.new(statement.comments) new_obj.docstring.line_range = statement.comments_range new_obj.docstring.hash_flag = statement.comments_hash_flag new_obj.docstring.object = new_obj else new_obj.signature = "def #{new_meth}" # this is all we know. end namespace.aliases[new_obj] = old_meth end endyard-master/lib/yard/handlers/ruby/attribute_handler.rb000066400000000000000000000053631265676644000236500ustar00rootroot00000000000000# Handles +attr_*+ statements in modules/classes class YARD::Handlers::Ruby::AttributeHandler < YARD::Handlers::Ruby::Base handles method_call(:attr) handles method_call(:attr_reader) handles method_call(:attr_writer) handles method_call(:attr_accessor) namespace_only process do return if statement.type == :var_ref || statement.type == :vcall read, write = true, false params = statement.parameters(false).dup # Change read/write based on attr_reader/writer/accessor case statement.method_name(true) when :attr # In the case of 'attr', the second parameter (if given) isn't a symbol. if params.size == 2 write = true if params.pop == s(:var_ref, s(:kw, "true")) end when :attr_accessor write = true when :attr_reader # change nothing when :attr_writer read, write = false, true end # Add all attributes validated_attribute_names(params).each do |name| namespace.attributes[scope][name] ||= SymbolHash[:read => nil, :write => nil] # Show their methods as well {:read => name, :write => "#{name}="}.each do |type, meth| if (type == :read ? read : write) o = MethodObject.new(namespace, meth, scope) if type == :write o.parameters = [['value', nil]] src = "def #{meth}(value)" full_src = "#{src}\n @#{name} = value\nend" doc = "Sets the attribute #{name}\n@param value the value to set the attribute #{name} to." else src = "def #{meth}" full_src = "#{src}\n @#{name}\nend" doc = "Returns the value of attribute #{name}" end o.source ||= full_src o.signature ||= src register(o) o.docstring = doc if o.docstring.blank?(false) # Regsiter the object explicitly namespace.attributes[scope][name][type] = o elsif obj = namespace.children.find {|o| o.name == meth.to_sym && o.scope == scope } # register an existing method as attribute namespace.attributes[scope][name][type] = obj end end end end protected # Strips out any non-essential arguments from the attr statement. # # @param [Array] params a list of the parameters # in the attr call. # @return [Array] the validated attribute names # @raise [Parser::UndocumentableError] if the arguments are not valid. def validated_attribute_names(params) params.map do |obj| case obj.type when :symbol_literal obj.jump(:ident, :op, :kw, :const).source when :string_literal obj.jump(:string_content).source else raise YARD::Parser::UndocumentableError, obj.source end end end endyard-master/lib/yard/handlers/ruby/base.rb000066400000000000000000000132621265676644000210570ustar00rootroot00000000000000module YARD module Handlers module Ruby # To implement a custom handler matcher, subclass this class and implement # {#matches?} to return whether a node matches the handler. # # @example A Custom Handler Matcher Extension # # Implements a handler that checks for a specific string # # in the node's source. # class MyExtension < HandlesExtension # def matches?(node) node.source.include?(name) end # end # # # This handler will handle any node where the source includes 'foo' # class MyHandler < Handlers::Ruby::Base # handles MyExtension.new('foo') # end class HandlesExtension # Creates a new extension with a specific matcher value +name+ # @param [Object] name the matcher value to check against {#matches?} def initialize(name) @name = name end # Tests if the node matches the handler # @param [Parser::Ruby::AstNode] node a Ruby node # @return [Boolean] whether the +node+ matches the handler def matches?(node) raise NotImplementedError end protected # @return [String] the extension matcher value attr_reader :name end class MethodCallWrapper < HandlesExtension def matches?(node) case node.type when :var_ref if !node.parent || node.parent.type == :list return true if node[0].type == :ident && (name.nil? || node[0][0] == name) end when :fcall, :command, :vcall return true if name.nil? || node[0][0] == name when :call, :command_call return true if name.nil? || node[2][0] == name end false end end class TestNodeWrapper < HandlesExtension def matches?(node) !node.send(name).is_a?(FalseClass) end end # This is the base handler class for the new-style (1.9) Ruby parser. # All handlers that subclass this base class will be used when the # new-style parser is used. For implementing legacy handlers, see # {Legacy::Base}. # # @abstract See {Handlers::Base} for subclassing information. # @see Handlers::Base # @see Legacy::Base class Base < Handlers::Base class << self include Parser::Ruby # @group Statement Matcher Extensions # Matcher for handling any type of method call. Method calls can # be expressed by many {AstNode} types depending on the syntax # with which it is called, so YARD allows you to use this matcher # to simplify matching a method call. # # @example Match the "describe" method call # handles method_call(:describe) # # # The following will be matched: # # describe(...) # # object.describe(...) # # describe "argument" do ... end # # @param [#to_s] name matches the method call of this name # @return [void] def method_call(name = nil) MethodCallWrapper.new(name ? name.to_s : nil) end # Matcher for handling a node with a specific meta-type. An {AstNode} # has a {AstNode#type} to define its type but can also be associated # with a set of types. For instance, +:if+ and +:unless+ are both # of the meta-type +:condition+. # # A meta-type is any method on the {AstNode} class ending in "?", # though you should not include the "?" suffix in your declaration. # Some examples are: "condition", "call", "literal", "kw", "token", # "ref". # # @example Handling any conditional statement (if, unless) # handles meta_type(:condition) # @param [Symbol] type the meta-type to match. A meta-type can be # any method name + "?" that {AstNode} responds to. # @return [void] def meta_type(type) TestNodeWrapper.new(type.to_s + "?") end # @group Testing for a Handler # @return [Boolean] whether or not an {AstNode} object should be # handled by this handler def handles?(node) handlers.any? do |a_handler| case a_handler when Symbol a_handler == node.type when String node.source == a_handler when Regexp node.source =~ a_handler when Parser::Ruby::AstNode a_handler == node when HandlesExtension a_handler.matches?(node) end end end end include Parser::Ruby # @group Parsing an Inner Block def parse_block(inner_node, opts = {}) push_state(opts) do nodes = inner_node.type == :list ? inner_node.children : [inner_node] parser.process(nodes) end end # @group Macro Handling def call_params return [] unless statement.respond_to?(:parameters) statement.parameters(false).compact.map do |param| if param.type == :list param.map {|n| n.jump(:ident, :kw, :tstring_content).source } else param.jump(:ident, :kw, :tstring_content).source end end.flatten end def caller_method if statement.call? || statement.def? statement.method_name(true).to_s elsif statement.type == :var_ref || statement.type == :vcall statement[0].jump(:ident, :kw).source else nil end end end end end endyard-master/lib/yard/handlers/ruby/class_condition_handler.rb000066400000000000000000000045651265676644000250230ustar00rootroot00000000000000# Matches if/unless conditions inside classes and attempts to process only # one branch (by evaluating the condition if possible). # # @example A simple class conditional # class Foo # if 0 # # This method is ignored # def xyz; end # end # end class YARD::Handlers::Ruby::ClassConditionHandler < YARD::Handlers::Ruby::Base handles meta_type(:condition) namespace_only process do condition = parse_condition if condition == nil # Parse both blocks if we're unsure of the condition parse_then_block parse_else_block elsif condition parse_then_block else parse_else_block end end protected # Parses the condition part of the if/unless statement # # @return [true, false, nil] true if the condition can be definitely # parsed to true, false if not, and nil if the condition cannot be # parsed with certainty (it's dynamic) def parse_condition condition = nil # Right now we can handle very simple unary conditions like: # if true # if false # if 0 # if 100 (not 0) # if defined? SOME_CONSTANT # # The last case will do a lookup in the registry and then one # in the Ruby world (using eval). case statement.condition.type when :int condition = statement.condition[0] != "0" when :defined # defined? keyword used, let's see if we can look up the name # in the registry, then we'll try using Ruby's powers. eval() is not # *too* dangerous here since code is not actually executed. name = statement.condition[0].source obj = YARD::Registry.resolve(namespace, name, true) begin condition = true if obj || Object.instance_eval("defined? #{name}") rescue SyntaxError, NameError condition = false end when :var_ref var = statement.condition[0] if var == s(:kw, "true") condition = true elsif var == s(:kw, "false") condition = false end end # Invert an unless condition if statement.type == :unless || statement.type == :unless_mod condition = !condition if condition != nil end condition end def parse_then_block parse_block(statement.then_block, :visibility => visibility) end def parse_else_block if statement.else_block parse_block(statement.else_block, :visibility => visibility) end end endyard-master/lib/yard/handlers/ruby/class_handler.rb000066400000000000000000000101651265676644000227460ustar00rootroot00000000000000# Handles class declarations class YARD::Handlers::Ruby::ClassHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::StructHandlerMethods handles :class, :sclass namespace_only process do classname = statement[0].source.gsub(/\s/, '') if statement.type == :class superclass = parse_superclass(statement[1]) if superclass == "Struct" is_a_struct = true superclass = struct_superclass_name(statement[1]) # refine the superclass if possible create_struct_superclass(superclass, statement[1]) end undocsuper = statement[1] && superclass.nil? klass = register ClassObject.new(namespace, classname) do |o| o.superclass = superclass if superclass o.superclass.type = :class if o.superclass.is_a?(Proxy) end if is_a_struct parse_struct_superclass(klass, statement[1]) elsif klass create_attributes(klass, members_from_tags(klass)) end parse_block(statement[2], :namespace => klass) if undocsuper raise YARD::Parser::UndocumentableError, 'superclass (class was added without superclass)' end elsif statement.type == :sclass if statement[0] == s(:var_ref, s(:kw, "self")) parse_block(statement[1], :namespace => namespace, :scope => :class) else proxy = Proxy.new(namespace, classname) # Allow constants to reference class names if ConstantObject === proxy if proxy.value =~ /\A#{NAMESPACEMATCH}\Z/ proxy = Proxy.new(namespace, proxy.value) else raise YARD::Parser::UndocumentableError, "constant class reference '#{classname}'" end end if classname[0,1] =~ /[A-Z]/ register ClassObject.new(namespace, classname) if Proxy === proxy parse_block(statement[1], :namespace => proxy, :scope => :class) else raise YARD::Parser::UndocumentableError, "class '#{classname}'" end end else sig_end = (statement[1] ? statement[1].source_end : statement[0].source_end) - statement.source_start raise YARD::Parser::UndocumentableError, "class: #{statement.source[0..sig_end]}" end end private # Extract the parameters from the Struct.new AST node, returning them as a list # of strings # # @param [MethodCallNode] superclass the AST node for the Struct.new call # @return [Array] the member names to generate methods for def extract_parameters(superclass) members = superclass.parameters.select {|x| x && x.type == :symbol_literal} members.map! {|x| x.source.strip[1..-1]} members end def create_struct_superclass(superclass, superclass_def) return if superclass == "Struct" the_super = register ClassObject.new(P("Struct"), superclass[8..-1]) do |o| o.superclass = "Struct" end parse_struct_superclass(the_super, superclass_def) the_super end def struct_superclass_name(superclass) if superclass.call? first = superclass.parameters.first if first.type == :string_literal && first[0].type == :string_content && first[0].size == 1 return "Struct::#{first[0][0][0]}" end end "Struct" end def parse_struct_superclass(klass, superclass) return unless superclass.call? && superclass.parameters members = extract_parameters(superclass) create_attributes(klass, members) end def parse_superclass(superclass) return nil unless superclass case superclass.type when :var_ref return namespace.path if superclass.first == s(:kw, "self") return superclass.source if superclass.first.type == :const when :const, :const_ref, :const_path_ref, :top_const_ref return superclass.source when :fcall, :command methname = superclass.method_name.source if methname == "DelegateClass" return superclass.parameters.first.source elsif superclass.method_name.type == :const return methname end when :call, :command_call cname = superclass.namespace.source if cname =~ /^O?Struct$/ && superclass.method_name(true) == :new return cname end end nil end endyard-master/lib/yard/handlers/ruby/class_variable_handler.rb000066400000000000000000000007001265676644000246050ustar00rootroot00000000000000# Handles a class variable (@@variable) class YARD::Handlers::Ruby::ClassVariableHandler < YARD::Handlers::Ruby::Base handles :assign namespace_only process do if statement[0].type == :var_field && statement[0][0].type == :cvar name = statement[0][0][0] value = statement[1].source register ClassVariableObject.new(namespace, name) do |o| o.source = statement o.value = value end end end endyard-master/lib/yard/handlers/ruby/comment_handler.rb000066400000000000000000000003401265676644000232750ustar00rootroot00000000000000# Handles any lone comment statement in a Ruby file class YARD::Handlers::Ruby::CommentHandler < YARD::Handlers::Ruby::Base handles :comment, :void_stmt namespace_only process do register_docstring(nil) end end yard-master/lib/yard/handlers/ruby/constant_handler.rb000066400000000000000000000027261265676644000234760ustar00rootroot00000000000000# Handles any constant assignment class YARD::Handlers::Ruby::ConstantHandler < YARD::Handlers::Ruby::Base include YARD::Handlers::Ruby::StructHandlerMethods handles :assign namespace_only process do if statement[1].call? && statement[1][0][0] == s(:const, "Struct") && statement[1][2] == s(:ident, "new") process_structclass(statement) elsif statement[0].type == :var_field && statement[0][0].type == :const process_constant(statement) end end private def process_constant(statement) name = statement[0][0][0] value = statement[1].source register ConstantObject.new(namespace, name) {|o| o.source = statement; o.value = value.strip } end def process_structclass(statement) lhs = statement[0][0] if lhs.type == :const klass = create_class(lhs[0], P(:Struct)) create_attributes(klass, extract_parameters(statement[1])) else raise YARD::Parser::UndocumentableError, "Struct assignment to #{statement[0].source}" end end # Extract the parameters from the Struct.new AST node, returning them as a list # of strings # # @param [MethodCallNode] superclass the AST node for the Struct.new call # @return [Array] the member names to generate methods for def extract_parameters(superclass) return [] unless superclass.parameters members = superclass.parameters.select {|x| x && x.type == :symbol_literal} members.map! {|x| x.source.strip[1..-1]} members end end yard-master/lib/yard/handlers/ruby/dsl_handler.rb000066400000000000000000000004661265676644000224260ustar00rootroot00000000000000module YARD module Handlers module Ruby # Handles automatic detection of dsl-style methods class DSLHandler < Base include CodeObjects include DSLHandlerMethods handles method_call namespace_only process { handle_comments } end end end end yard-master/lib/yard/handlers/ruby/dsl_handler_methods.rb000066400000000000000000000044431265676644000241500ustar00rootroot00000000000000module YARD module Handlers module Ruby module DSLHandlerMethods include CodeObjects include Parser IGNORE_METHODS = Hash[*%w(alias alias_method autoload attr attr_accessor attr_reader attr_writer extend include public private protected private_constant).map {|n| [n, true] }.flatten] def handle_comments return if IGNORE_METHODS[caller_method] @docstring = statement.comments || "" @docstring = @docstring.join("\n") if @docstring.is_a?(Array) if @docstring =~ /^@!?macro\s+\[[^\]]*attach/ register_docstring(nil) @docstring = "" end if macro = find_attached_macro @docstring += "\n" + macro.expand([caller_method, *call_params], statement.source) elsif !statement.comments_hash_flag && !implicit_docstring? return register_docstring(nil) end # ignore DSL definitions if @method/@attribute directive is used if @docstring =~ /^@!?(method|attribute)\b/ return register_docstring(nil) end object = MethodObject.new(namespace, method_name, scope) object.signature = method_signature register(object) end def register_docstring(object, docstring = @docstring, stmt = statement) super end private def implicit_docstring? tags = %w(method attribute overload visibility scope return) tags.any? {|tag| @docstring =~ /^@!?#{tag}\b/ } end def method_name name = call_params.first || "" if name =~ /^#{CodeObjects::METHODNAMEMATCH}$/ name else raise UndocumentableError, "method, missing name" end end def method_signature "def #{method_name}" end def find_attached_macro Registry.all(:macro).each do |macro| next unless macro.method_object next unless macro.method_object.name.to_s == caller_method.to_s (namespace.inheritance_tree(true) + [P('Object')]).each do |obj| return macro if obj == macro.method_object.namespace end end nil end end end end endyard-master/lib/yard/handlers/ruby/exception_handler.rb000066400000000000000000000014731265676644000236410ustar00rootroot00000000000000# Handles 'raise' calls inside methods class YARD::Handlers::Ruby::ExceptionHandler < YARD::Handlers::Ruby::Base handles method_call(:raise) process do return unless owner.is_a?(MethodObject) # Only methods yield return if [:command_call, :call].include? statement.type return if owner.has_tag?(:raise) klass = nil if statement.call? params = statement.parameters(false) if params.size == 1 if params.first.ref? && params.first.first.type != :ident klass = params.first.source elsif params.first.call? && params.first.method_name(true) == :new klass = params.first.namespace.source end elsif params.size > 1 klass = params.first.source end end owner.add_tag YARD::Tags::Tag.new(:raise, '', klass) if klass end end yard-master/lib/yard/handlers/ruby/extend_handler.rb000066400000000000000000000010211265676644000231170ustar00rootroot00000000000000# Handles 'extend' call to include modules into the class scope of another # @see MixinHandler class YARD::Handlers::Ruby::ExtendHandler < YARD::Handlers::Ruby::MixinHandler handles method_call(:extend) namespace_only def scope; :class end private def process_mixin(mixin) if mixin == s(:var_ref, s(:kw, "self")) if namespace.is_a?(ClassObject) raise UndocumentableError, "extend(self) statement on class" end namespace.mixins(scope) << namespace else super end end end yard-master/lib/yard/handlers/ruby/legacy/000077500000000000000000000000001265676644000210605ustar00rootroot00000000000000yard-master/lib/yard/handlers/ruby/legacy/alias_handler.rb000066400000000000000000000025521265676644000241770ustar00rootroot00000000000000# (see Ruby::AliasHandler) class YARD::Handlers::Ruby::Legacy::AliasHandler < YARD::Handlers::Ruby::Legacy::Base handles /\Aalias(_method)?(\s|\()/ namespace_only process do if TkALIAS === statement.tokens.first tokens = statement.tokens[2..-1].to_s.split(/\s+/) names = [tokens[0], tokens[1]].map {|t| t.gsub(/^:(['"])?(.+?)\1?$|^(:)(.+)/, '\2') } else names = tokval_list(statement.tokens[2..-1], :attr) end raise YARD::Parser::UndocumentableError, statement.tokens.first.text if names.size != 2 names = names.map {|n| Symbol === n ? n.to_s.gsub('"', '') : n } new_meth, old_meth = names[0].to_sym, names[1].to_sym old_obj = namespace.child(:name => old_meth, :scope => scope) new_obj = register MethodObject.new(namespace, new_meth, scope) do |o| o.add_file(parser.file, statement.tokens.first.line_no, statement.comments) end if old_obj new_obj.signature = old_obj.signature new_obj.source = old_obj.source new_obj.docstring = old_obj.docstring + YARD::Docstring.new(statement.comments) new_obj.docstring.line_range = statement.comments_range new_obj.docstring.hash_flag = statement.comments_hash_flag new_obj.docstring.object = new_obj else new_obj.signature = "def #{new_meth}" # this is all we know. end namespace.aliases[new_obj] = old_meth end endyard-master/lib/yard/handlers/ruby/legacy/attribute_handler.rb000066400000000000000000000040671265676644000251140ustar00rootroot00000000000000# (see Ruby::AttributeHandler) class YARD::Handlers::Ruby::Legacy::AttributeHandler < YARD::Handlers::Ruby::Legacy::Base handles /\Aattr(?:_(?:reader|writer|accessor))?(?:\s|\()/ namespace_only process do begin attr_type = statement.tokens.first.text.to_sym symbols = tokval_list statement.tokens[2..-1], :attr, TkTRUE, TkFALSE read, write = true, false rescue SyntaxError raise YARD::Parser::UndocumentableError, attr_type end # Change read/write based on attr_reader/writer/accessor case attr_type when :attr # In the case of 'attr', the second parameter (if given) isn't a symbol. write = symbols.pop if symbols.size == 2 when :attr_accessor write = true when :attr_reader # change nothing when :attr_writer read, write = false, true end # Add all attributes symbols.each do |name| namespace.attributes[scope][name] = SymbolHash[:read => nil, :write => nil] # Show their methods as well {:read => name, :write => "#{name}="}.each do |type, meth| if (type == :read ? read : write) o = MethodObject.new(namespace, meth, scope) if type == :write o.parameters = [['value', nil]] src = "def #{meth}(value)" full_src = "#{src}\n @#{name} = value\nend" doc = "Sets the attribute #{name}\n@param value the value to set the attribute #{name} to." else src = "def #{meth}" full_src = "#{src}\n @#{name}\nend" doc = "Returns the value of attribute #{name}" end o.source ||= full_src o.signature ||= src register(o) o.docstring = doc if o.docstring.blank?(false) # Regsiter the object explicitly namespace.attributes[scope][name][type] = o elsif obj = namespace.children.find {|o| o.name == meth.to_sym && o.scope == scope } # register an existing method as attribute namespace.attributes[scope][name][type] = obj end end end end endyard-master/lib/yard/handlers/ruby/legacy/base.rb000066400000000000000000000224521265676644000223240ustar00rootroot00000000000000module YARD module Handlers module Ruby::Legacy # This is the base handler for the legacy parser. To implement a legacy # handler, subclass this class. # # @abstract (see Ruby::Base) class Base < Handlers::Base # For tokens like TkDEF, TkCLASS, etc. include YARD::Parser::Ruby::Legacy::RubyToken # @return [Boolean] whether or not a {Parser::Ruby::Legacy::Statement} object should be handled # by this handler. def self.handles?(stmt) handlers.any? do |a_handler| case a_handler when String stmt.tokens.first.text == a_handler when Regexp stmt.tokens.to_s =~ a_handler else a_handler == stmt.tokens.first.class end end end # Parses a statement's block with a set of state values. If the # statement has no block, nothing happens. A description of state # values can be found at {Handlers::Base#push_state} # # @param [Hash] opts State options # @option opts (see Handlers::Base#push_state) # @see Handlers::Base#push_state #push_state def parse_block(opts = {}) push_state(opts) do if statement.block blk = Parser::Ruby::Legacy::StatementList.new(statement.block) parser.process(blk) end end end def call_params if statement.tokens.first.is_a?(TkDEF) extract_method_details.last.map {|param| param.first } else tokens = statement.tokens[1..-1] tokval_list(tokens, :attr, :identifier, TkId).map do |value| value.to_s end end end def caller_method if statement.tokens.first.is_a?(TkIDENTIFIER) statement.tokens.first.text elsif statement.tokens.first.is_a?(TkDEF) extract_method_details.first else nil end end private # Extracts method information for macro expansion only # # @todo This is a duplicate implementation of {MethodHandler}. Refactor. # @return [Array>>] the method name followed by method # arguments (name and optional value) def extract_method_details if statement.tokens.to_s =~ /^def\s+(#{METHODMATCH})(?:(?:\s+|\s*\()(.*)(?:\)\s*$)?)?/m meth, args = $1, $2 meth.gsub!(/\s+/,'') args = tokval_list(Parser::Ruby::Legacy::TokenList.new(args), :all) args.map! {|a| k, v = *a.split('=', 2); [k.strip, (v ? v.strip : nil)] } if args if meth =~ /(?:#{NSEPQ}|#{CSEPQ})([^#{NSEP}#{CSEPQ}]+)$/ meth = $` end return meth, args end end # The string value of a token. For example, the return value for the symbol :sym # would be :sym. The return value for a string +"foo #{ bar}"+ would be the literal # +"foo #{ bar}"+ without any interpolation. The return value of the identifier # 'test' would be the same value: 'test'. Here is a list of common types and # their return values: # # @example # tokval(TokenList.new('"foo"').first) => "foo" # tokval(TokenList.new(':foo').first) => :foo # tokval(TokenList.new('CONSTANT').first, RubyToken::TkId) => "CONSTANT" # tokval(TokenList.new('identifier').first, RubyToken::TkId) => "identifier" # tokval(TokenList.new('3.25').first) => 3.25 # tokval(TokenList.new('/xyz/i').first) => /xyz/i # # @param [Token] token The token of the class # # @param [Array>, Symbol] accepted_types # The allowed token types that this token can be. Defaults to [{TkVal}]. # A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return # the token's value if it is either of those types. If +TkVal+ is accepted, # +TkNode+ is also accepted. # # Certain symbol keys are allowed to specify multiple types in one fell swoop. # These symbols are: # :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+ # :attr => +TkSYMBOL+ and +TkSTRING+ # :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+. # :number => +TkFLOAT+, +TkINTEGER+ # # @return [Object] if the token is one of the accepted types, in its real value form. # It should be noted that identifiers and constants are kept in String form. # @return [nil] if the token is not any of the specified accepted types def tokval(token, *accepted_types) accepted_types = [TkVal] if accepted_types.empty? accepted_types.push(TkNode) if accepted_types.include? TkVal if accepted_types.include?(:attr) accepted_types.push(TkSTRING, TkSYMBOL) end if accepted_types.include?(:string) accepted_types.push(TkSTRING, TkDSTRING, TkXSTRING, TkDXSTRING) end if accepted_types.include?(:identifier) accepted_types.push(TkIDENTIFIER, TkFID, TkGVAR) end if accepted_types.include?(:number) accepted_types.push(TkFLOAT, TkINTEGER) end return unless accepted_types.any? {|t| t === token } case token when TkSTRING, TkDSTRING, TkXSTRING, TkDXSTRING token.text[1..-2] when TkSYMBOL token.text[1..-1].to_sym when TkFLOAT token.text.to_f when TkINTEGER token.text.to_i when TkREGEXP token.text =~ /\A\/(.+)\/([^\/])\Z/ Regexp.new($1, $2) when TkTRUE true when TkFALSE false when TkNIL nil else token.text end end # Returns a list of symbols or string values from a statement. # The list must be a valid comma delimited list, and values # will only be returned to the end of the list only. # # Example: # attr_accessor :a, 'b', :c, :d => ['a', 'b', 'c', 'd'] # attr_accessor 'a', UNACCEPTED_TYPE, 'c' => ['a', 'c'] # # The tokval list of a {Parser::Ruby::Legacy::TokenList} of the above # code would be the {#tokval} value of :a, 'b', # :c and :d. # # It should also be noted that this function stops immediately at # any ruby keyword encountered: # "attr_accessor :a, :b, :c if x == 5" => ['a', 'b', 'c'] # # @param [TokenList] tokenlist The list of tokens to process. # @param [Array>] accepted_types passed to {#tokval} # @return [Array] the list of tokvalues in the list. # @return [Array] if there are no symbols or Strings in the list # @see #tokval def tokval_list(tokenlist, *accepted_types) return [] unless tokenlist out = [[]] parencount, beforeparen = 0, 0 needcomma = false seen_comma = true tokenlist.each do |token| tokval = accepted_types == [:all] ? token.text : tokval(token, *accepted_types) parencond = !out.last.empty? && tokval != nil #puts "#{seen_comma.inspect} #{parencount} #{token.class.class_name} #{out.inspect}" case token when TkCOMMA if parencount == 0 out << [] unless out.last.empty? needcomma = false seen_comma = true else out.last << token.text if parencond end when TkLPAREN if seen_comma beforeparen += 1 else parencount += 1 out.last << token.text if parencond end when TkRPAREN if beforeparen > 0 beforeparen -= 1 else out.last << token.text if parencount > 0 && tokval != nil parencount -= 1 end when TkLBRACE, TkLBRACK, TkDO parencount += 1 out.last << token.text if tokval != nil when TkRBRACE, TkRBRACK, TkEND out.last << token.text if tokval != nil parencount -= 1 else break if TkKW === token && ![TkTRUE, TkFALSE, TkSUPER, TkSELF, TkNIL].include?(token.class) seen_comma = false unless TkWhitespace === token if parencount == 0 next if needcomma next if TkWhitespace === token if tokval != nil out.last << tokval else out.last.clear needcomma = true end elsif parencond needcomma = true out.last << token.text end end if beforeparen == 0 && parencount < 0 break end end # Flatten any single element lists out.map {|e| e.empty? ? nil : (e.size == 1 ? e.pop : e.flatten.join) }.compact end end end end endyard-master/lib/yard/handlers/ruby/legacy/class_condition_handler.rb000066400000000000000000000043571265676644000262660ustar00rootroot00000000000000# (see Ruby::ClassConditionHandler) # @since 0.5.4 class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < YARD::Handlers::Ruby::Legacy::Base namespace_only handles TkIF, TkELSIF, TkUNLESS process do condition = parse_condition if condition == nil # Parse both blocks if we're unsure of the condition parse_then_block parse_else_block elsif condition parse_then_block else parse_else_block end end protected # Parses the condition part of the if/unless statement # # @return [true, false, nil] true if the condition can be definitely # parsed to true, false if not, and nil if the condition cannot be # parsed with certainty (it's dynamic) # @since 0.5.5 def parse_condition condition = nil # Right now we can handle very simple unary conditions like: # if true # if false # if 0 # if 100 (not 0) # if defined? SOME_CONSTANT # # The last case will do a lookup in the registry and then one # in the Ruby world (using eval). case statement.tokens[1..-1].to_s.strip when /^(\d+)$/ condition = $1 != "0" when /^defined\?\s*\(?(.+?)\)?$/ # defined? keyword used, let's see if we can look up the name # in the registry, then we'll try using Ruby's powers. eval() is not # *too* dangerous here since code is not actually executed. name = $1 obj = YARD::Registry.resolve(namespace, name, true) begin condition = true if obj || Object.instance_eval("defined? #{name}") rescue SyntaxError, NameError condition = false end when "true" condition = true when "false" condition = false end if TkUNLESS === statement.tokens.first condition = !condition if condition != nil end condition end # @since 0.5.5 def parse_then_block parse_block(:visibility => visibility) end # @since 0.5.5 def parse_else_block return unless statement.block stmtlist = YARD::Parser::Ruby::Legacy::StatementList stmtlist.new(statement.block).each do |stmt| if TkELSE === stmt.tokens.first push_state(:visibility => visibility) do parser.process(stmtlist.new(stmt.block)) end end end end endyard-master/lib/yard/handlers/ruby/legacy/class_handler.rb000066400000000000000000000073351265676644000242170ustar00rootroot00000000000000# (see Ruby::ClassHandler) class YARD::Handlers::Ruby::Legacy::ClassHandler < YARD::Handlers::Ruby::Legacy::Base include YARD::Handlers::Ruby::StructHandlerMethods handles TkCLASS namespace_only process do if statement.tokens.to_s =~ /^class\s+(#{NAMESPACEMATCH})\s*(?:<\s*(.+)|\Z)/m classname = $1 superclass_def = $2 superclass = parse_superclass($2) classname = classname.gsub(/\s/, '') if superclass == "Struct" is_a_struct = true superclass = struct_superclass_name(superclass_def) create_struct_superclass(superclass, superclass_def) end undocsuper = superclass_def && superclass.nil? klass = register ClassObject.new(namespace, classname) do |o| o.superclass = superclass if superclass o.superclass.type = :class if o.superclass.is_a?(Proxy) end if is_a_struct parse_struct_subclass(klass, superclass_def) elsif klass create_attributes(klass, members_from_tags(klass)) end parse_block(:namespace => klass) if undocsuper raise YARD::Parser::UndocumentableError, 'superclass (class was added without superclass)' end elsif statement.tokens.to_s =~ /^class\s*<<\s*([\w\:\s]+)/ classname = $1.gsub(/\s/, '') proxy = Proxy.new(namespace, classname) # Allow constants to reference class names if ConstantObject === proxy if proxy.value =~ /\A#{NAMESPACEMATCH}\Z/ proxy = Proxy.new(namespace, proxy.value) else raise YARD::Parser::UndocumentableError, "constant class reference '#{classname}'" end end if classname == "self" parse_block(:namespace => namespace, :scope => :class) elsif classname[0,1] =~ /[A-Z]/ register ClassObject.new(namespace, classname) if Proxy === proxy parse_block(:namespace => proxy, :scope => :class) else raise YARD::Parser::UndocumentableError, "class '#{classname}'" end else raise YARD::Parser::UndocumentableError, "class: #{statement.tokens}" end end private # Extracts the parameter list from the Struct.new declaration and returns it # formatted as a list of member names. Expects the user will have used symbols # to define the struct member names # # @param [String] superstring the string declaring the superclass # @return [Array] a list of member names def extract_parameters(superstring) paramstring = superstring.match(/\A(O?Struct)\.new\((.*?)\)/)[2] paramstring.split(",").select {|x| x.strip[0,1] == ":"}.map {|x| x.strip[1..-1] } # the 1..-1 chops the leading : end def create_struct_superclass(superclass, superclass_def) return if superclass == "Struct" the_super = register ClassObject.new(P("Struct"), superclass[8..-1]) do |o| o.superclass = "Struct" end parse_struct_subclass(the_super, superclass_def) the_super end def struct_superclass_name(superclass) if match = superclass.match(/\A(Struct)\.new\((.*?)\)/) paramstring = match[2].split(",") first = paramstring.first.strip if first[0,1] =~ /['"]/ && first[-1,1] =~ /['"]/ && first !~ /\#\{/ return "Struct::#{first[1..-2]}" end end "Struct" end def parse_struct_subclass(klass, superclass_def) # Bounce if there's no parens return unless superclass_def =~ /O?Struct\.new\((.*?)\)/ members = extract_parameters(superclass_def) create_attributes(klass, members) end def parse_superclass(superclass) case superclass when /\A(#{NAMESPACEMATCH})(?:\s|\Z)/, /\A(Struct|OStruct)\.new/, /\ADelegateClass\((.+?)\)\s*\Z/, /\A(#{NAMESPACEMATCH})\(/ $1 when "self" namespace.path end end endyard-master/lib/yard/handlers/ruby/legacy/class_variable_handler.rb000066400000000000000000000006361265676644000260610ustar00rootroot00000000000000# (see Ruby::ClassVariableHandler) class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < YARD::Handlers::Ruby::Legacy::Base HANDLER_MATCH = /\A@@\w+\s*=\s*/m handles HANDLER_MATCH namespace_only process do name, value = *statement.tokens.to_s.split(/\s*=\s*/, 2) register ClassVariableObject.new(namespace, name) do |o| o.source = statement o.value = value.strip end end endyard-master/lib/yard/handlers/ruby/legacy/comment_handler.rb000066400000000000000000000003161265676644000245440ustar00rootroot00000000000000# (see Ruby::CommentHandler) class YARD::Handlers::Ruby::Legacy::CommentHandler < YARD::Handlers::Ruby::Legacy::Base handles TkCOMMENT namespace_only process do register_docstring(nil) end end yard-master/lib/yard/handlers/ruby/legacy/constant_handler.rb000066400000000000000000000015641265676644000247410ustar00rootroot00000000000000# (see Ruby::ConstantHandler) class YARD::Handlers::Ruby::Legacy::ConstantHandler < YARD::Handlers::Ruby::Legacy::Base include YARD::Handlers::Ruby::StructHandlerMethods HANDLER_MATCH = /\A[A-Z]\w*\s*=[^=]\s*/m handles HANDLER_MATCH namespace_only process do name, value = *statement.tokens.to_s.split(/\s*=\s*/, 2) if value =~ /\A\s*Struct.new(?:\s*\(?|\b)/ process_structclass(name, $') else register ConstantObject.new(namespace, name) {|o| o.source = statement; o.value = value.strip } end end private def process_structclass(classname, parameters) klass = create_class(classname, P(:Struct)) create_attributes(klass, extract_parameters(parameters)) end def extract_parameters(parameters) members = tokval_list(YARD::Parser::Ruby::Legacy::TokenList.new(parameters), TkSYMBOL) members.map {|m| m.to_s } end end yard-master/lib/yard/handlers/ruby/legacy/dsl_handler.rb000066400000000000000000000005131265676644000236630ustar00rootroot00000000000000module YARD module Handlers module Ruby module Legacy # (see Ruby::DSLHandler) class DSLHandler < Base include CodeObjects include DSLHandlerMethods handles TkIDENTIFIER namespace_only process { handle_comments } end end end end end yard-master/lib/yard/handlers/ruby/legacy/exception_handler.rb000066400000000000000000000007351265676644000251050ustar00rootroot00000000000000# (see Ruby::ExceptionHandler) class YARD::Handlers::Ruby::Legacy::ExceptionHandler < YARD::Handlers::Ruby::Legacy::Base handles /\Araise(\s|\(|\Z)/ process do return unless owner.is_a?(MethodObject) # Only methods yield return if owner.has_tag?(:raise) klass = statement.tokens.to_s[/^raise[\(\s]*(#{NAMESPACEMATCH})\s*(?:\)|,|\s(?:if|unless|until)|;|(?:(?:\.|\:\:)\s*)?new|$)/, 1] owner.add_tag YARD::Tags::Tag.new(:raise, '', klass) if klass end end yard-master/lib/yard/handlers/ruby/legacy/extend_handler.rb000066400000000000000000000007061265676644000243740ustar00rootroot00000000000000# (see Ruby::ExtendHandler) class YARD::Handlers::Ruby::Legacy::ExtendHandler < YARD::Handlers::Ruby::Legacy::MixinHandler handles /\Aextend(\s|\()/ namespace_only def scope; :class end private def process_mixin(mixin) if mixin == "self" if namespace.is_a?(ClassObject) raise UndocumentableError, "extend(self) statement on class" end namespace.mixins(scope) << namespace else super end end end yard-master/lib/yard/handlers/ruby/legacy/method_handler.rb000066400000000000000000000054411265676644000243660ustar00rootroot00000000000000# (see Ruby::MethodHandler) class YARD::Handlers::Ruby::Legacy::MethodHandler < YARD::Handlers::Ruby::Legacy::Base handles TkDEF process do nobj = namespace mscope = scope if statement.tokens.to_s =~ /^def\s+(#{METHODMATCH})(?:(?:\s+|\s*\()(.*)(?:\)\s*$)?)?/m meth, args = $1, $2 meth.gsub!(/\s+/,'') args = tokval_list(YARD::Parser::Ruby::Legacy::TokenList.new(args), :all) args.map! do |a| k, v, r = *a.split(/(:)|=/, 2) if r k += v v = r end [k.strip, (v ? v.strip : nil)] end if args else raise YARD::Parser::UndocumentableError, "method: invalid name" end # Class method if prefixed by self(::|.) or Module(::|.) if meth =~ /(?:#{NSEPQ}|#{CSEPQ})([^#{NSEP}#{CSEPQ}]+)$/ mscope, meth, prefix = :class, $1, $` if prefix =~ /^[a-z]/ && prefix != "self" raise YARD::Parser::UndocumentableError, 'method defined on object instance' end nobj = P(namespace, prefix) unless prefix == "self" end nobj = P(namespace, nobj.value) while nobj.type == :constant obj = register MethodObject.new(nobj, meth, mscope) do |o| o.explicit = true o.parameters = args end # delete any aliases referencing old method nobj.aliases.each do |aobj, name| next unless name == obj.name nobj.aliases.delete(aobj) end if nobj.is_a?(NamespaceObject) if mscope == :instance && meth == "initialize" unless obj.has_tag?(:return) obj.add_tag(YARD::Tags::Tag.new(:return, "a new instance of #{namespace.name}", namespace.name.to_s)) end elsif mscope == :class && obj.docstring.blank? && %w(inherited included extended method_added method_removed method_undefined).include?(meth) obj.add_tag(YARD::Tags::Tag.new(:private, nil)) elsif meth.to_s =~ /\?$/ if obj.tag(:return) && (obj.tag(:return).types || []).empty? obj.tag(:return).types = ['Boolean'] elsif obj.tag(:return).nil? unless obj.tags(:overload).any? {|overload| overload.tag(:return) } obj.add_tag(YARD::Tags::Tag.new(:return, "", "Boolean")) end end end if obj.has_tag?(:option) # create the options parameter if its missing obj.tags(:option).each do |option| expected_param = option.name unless obj.tags(:param).find {|x| x.name == expected_param } new_tag = YARD::Tags::Tag.new(:param, "a customizable set of options", "Hash", expected_param) obj.add_tag(new_tag) end end end if info = obj.attr_info if meth.to_s =~ /=$/ # writer info[:write] = obj if info[:read] else info[:read] = obj if info[:write] end end parse_block(:owner => obj) # mainly for yield/exceptions end end yard-master/lib/yard/handlers/ruby/legacy/mixin_handler.rb000066400000000000000000000021601265676644000242250ustar00rootroot00000000000000# (see Ruby::MixinHandler) class YARD::Handlers::Ruby::Legacy::MixinHandler < YARD::Handlers::Ruby::Legacy::Base handles /\Ainclude(\s|\()/ namespace_only process do errors = [] statement.tokens[1..-1].to_s.split(/\s*,\s*/).reverse.each do |mixin| mixin = mixin.strip begin process_mixin(mixin) rescue YARD::Parser::UndocumentableError => err errors << err.message end end if errors.size > 0 msg = errors.size == 1 ? ": #{errors[0]}" : "s: #{errors.join(", ")}" raise YARD::Parser::UndocumentableError, "mixin#{msg} for class #{namespace.path}" end end private def process_mixin(mixin) unless mixmatch = mixin[/\A(#{NAMESPACEMATCH})/, 1] raise YARD::Parser::UndocumentableError end case obj = Proxy.new(namespace, mixmatch) when ConstantObject # If a constant is included, use its value as the real object obj = Proxy.new(namespace, obj.value, :module) else obj = Proxy.new(namespace, mixmatch, :module) end namespace.mixins(scope).unshift(obj) unless namespace.mixins(scope).include?(obj) end end yard-master/lib/yard/handlers/ruby/legacy/module_function_handler.rb000066400000000000000000000011041265676644000262700ustar00rootroot00000000000000# (see Ruby::ModuleFunctionHandler) class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < YARD::Handlers::Ruby::Legacy::Base handles /\A(module_function)(\s|\(|$)/ namespace_only process do if statement.tokens.size == 1 self.scope = :module else tokval_list(statement.tokens[2..-1], :attr).each do |name| instance_method = MethodObject.new(namespace, name) class_method = MethodObject.new(namespace, name, :module) instance_method.copy_to(class_method) class_method.visibility = :public end end end end yard-master/lib/yard/handlers/ruby/legacy/module_handler.rb000066400000000000000000000005211265676644000243650ustar00rootroot00000000000000# (see Ruby::ModuleHandler) class YARD::Handlers::Ruby::Legacy::ModuleHandler < YARD::Handlers::Ruby::Legacy::Base handles TkMODULE namespace_only process do modname = statement.tokens.to_s[/^module\s+(#{NAMESPACEMATCH})/, 1] mod = register ModuleObject.new(namespace, modname) parse_block(:namespace => mod) end endyard-master/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb000066400000000000000000000011511265676644000272770ustar00rootroot00000000000000# (see Ruby::PrivateClassMethodHandler) class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < YARD::Handlers::Ruby::Legacy::Base handles /\Aprivate_class_method(\s|\(|$)/ namespace_only process do tokval_list(statement.tokens[2..-1], :attr).each do |name| privatize_class_method name end end private def privatize_class_method(name) method = Proxy.new(namespace, name) ensure_loaded!(method) method.visibility = :private rescue YARD::Handlers::NamespaceMissingError raise UndocumentableError, "private visibility set on unrecognized method: #{name}" end end yard-master/lib/yard/handlers/ruby/legacy/private_constant_handler.rb000066400000000000000000000011221265676644000264610ustar00rootroot00000000000000# (see Ruby::PrivateConstantHandler) class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < YARD::Handlers::Ruby::Legacy::Base handles /\Aprivate_constant(\s|\(|$)/ namespace_only process do tokval_list(statement.tokens[2..-1], :attr, TkCONSTANT).each do |name| privatize_constant name end end private def privatize_constant(name) const = Proxy.new(namespace, name) ensure_loaded!(const) const.visibility = :private rescue NamespaceMissingError raise UndocumentableError, "private visibility set on unrecognized constant: #{name}" end end yard-master/lib/yard/handlers/ruby/legacy/visibility_handler.rb000066400000000000000000000007401265676644000252720ustar00rootroot00000000000000# (see Ruby::VisibilityHandler) class YARD::Handlers::Ruby::Legacy::VisibilityHandler < YARD::Handlers::Ruby::Legacy::Base handles /\A(protected|private|public)(\s|\(|$)/ namespace_only process do vis = statement.tokens.first.text if statement.tokens.size == 1 self.visibility = vis else tokval_list(statement.tokens[2..-1], :attr).each do |name| MethodObject.new(namespace, name, scope) {|o| o.visibility = vis } end end end endyard-master/lib/yard/handlers/ruby/legacy/yield_handler.rb000066400000000000000000000020001265676644000242000ustar00rootroot00000000000000# (see Ruby::YieldHandler) class YARD::Handlers::Ruby::Legacy::YieldHandler < YARD::Handlers::Ruby::Legacy::Base handles TkYIELD process do return unless owner.is_a?(MethodObject) # Only methods yield return if owner.has_tag? :yield # Don't override yield tags return if owner.has_tag? :yieldparam # Same thing. yieldtag = YARD::Tags::Tag.new(:yield, "", []) tokval_list(statement.tokens[2..-1], Token).each do |item| item = item.inspect unless item.is_a?(String) if item == "self" yieldtag.types << '_self' owner.add_tag YARD::Tags::Tag.new(:yieldparam, "the object that the method was called on", owner.namespace.path, '_self') elsif item == "super" yieldtag.types << '_super' owner.add_tag YARD::Tags::Tag.new(:yieldparam, "the result of the method from the superclass", nil, '_super') else yieldtag.types << item end end owner.add_tag(yieldtag) unless yieldtag.types.empty? end end yard-master/lib/yard/handlers/ruby/method_condition_handler.rb000066400000000000000000000003451265676644000251660ustar00rootroot00000000000000# Handles a conditional inside a method class YARD::Handlers::Ruby::MethodConditionHandler < YARD::Handlers::Ruby::Base handles :if_mod, :unless_mod process do parse_block(statement.then_block, :owner => owner) end endyard-master/lib/yard/handlers/ruby/method_handler.rb000066400000000000000000000065711265676644000231270ustar00rootroot00000000000000# Handles a method definition class YARD::Handlers::Ruby::MethodHandler < YARD::Handlers::Ruby::Base handles :def, :defs process do meth = statement.method_name(true).to_s args = format_args blk = statement.block nobj = namespace mscope = scope if statement.type == :defs if statement[0][0].type == :ident raise YARD::Parser::UndocumentableError, 'method defined on object instance' end nobj = P(namespace, statement[0].source) if statement[0][0].type == :const mscope = :class end nobj = P(namespace, nobj.value) while nobj.type == :constant obj = register MethodObject.new(nobj, meth, mscope) do |o| o.signature = method_signature o.explicit = true o.parameters = args end # delete any aliases referencing old method nobj.aliases.each do |aobj, name| next unless name == obj.name nobj.aliases.delete(aobj) end if nobj.is_a?(NamespaceObject) if obj.constructor? unless obj.has_tag?(:return) obj.add_tag(YARD::Tags::Tag.new(:return, "a new instance of #{namespace.name}", namespace.name.to_s)) end elsif mscope == :class && obj.docstring.blank? && %w(inherited included extended method_added method_removed method_undefined).include?(meth) obj.add_tag(YARD::Tags::Tag.new(:private, nil)) elsif meth.to_s =~ /\?$/ if obj.tag(:return) && (obj.tag(:return).types || []).empty? obj.tag(:return).types = ['Boolean'] elsif obj.tag(:return).nil? unless obj.tags(:overload).any? {|overload| overload.tag(:return) } obj.add_tag(YARD::Tags::Tag.new(:return, "", "Boolean")) end end end if obj.has_tag?(:option) # create the options parameter if its missing obj.tags(:option).each do |option| expected_param = option.name unless obj.tags(:param).find {|x| x.name == expected_param } new_tag = YARD::Tags::Tag.new(:param, "a customizable set of options", "Hash", expected_param) obj.add_tag(new_tag) end end end if info = obj.attr_info if meth.to_s =~ /=$/ # writer info[:write] = obj if info[:read] else info[:read] = obj if info[:write] end end parse_block(blk, :owner => obj) # mainly for yield/exceptions end def format_args args = statement.parameters params = [] if args.unnamed_required_params params += args.unnamed_required_params.map { |a| [a.source, nil] } end if args.unnamed_optional_params params += args.unnamed_optional_params.map do |a| [a[0].source, a[1].source] end end if args.splat_param params << ['*' + args.splat_param.source, nil] end if args.unnamed_end_params params += args.unnamed_end_params.map { |a| [a.source, nil] } end if args.named_params params += args.named_params.map do |a| [a[0].source, a[1] ? a[1].source : nil] end end if args.double_splat_param params << ['**' + args.double_splat_param.source, nil] end if args.block_param params << ['&' + args.block_param.source, nil] end params end def method_signature method_name = statement.method_name(true) if statement.parameters.any? {|e| e } "def #{method_name}(#{statement.parameters.source})" else "def #{method_name}" end end end yard-master/lib/yard/handlers/ruby/mixin_handler.rb000066400000000000000000000022111265676644000227560ustar00rootroot00000000000000# Handles the 'include' statement to mixin a module in the instance scope class YARD::Handlers::Ruby::MixinHandler < YARD::Handlers::Ruby::Base handles method_call(:include) namespace_only process do errors = [] statement.parameters(false).reverse.each do |mixin| begin process_mixin(mixin) rescue YARD::Parser::UndocumentableError => err errors << err.message end end if errors.size > 0 msg = errors.size == 1 ? ": #{errors[0]}" : "s: #{errors.join(", ")}" raise YARD::Parser::UndocumentableError, "mixin#{msg} for class #{namespace.path}" end end protected def process_mixin(mixin) raise YARD::Parser::UndocumentableError unless mixin.ref? raise YARD::Parser::UndocumentableError if mixin.first.type == :ident case obj = Proxy.new(namespace, mixin.source) when ConstantObject # If a constant is included, use its value as the real object obj = Proxy.new(namespace, obj.value, :module) else obj = Proxy.new(namespace, mixin.source, :module) end namespace.mixins(scope).unshift(obj) unless namespace.mixins(scope).include?(obj) end end yard-master/lib/yard/handlers/ruby/module_function_handler.rb000066400000000000000000000015471265676644000250370ustar00rootroot00000000000000# Handles module_function calls to turn methods into public class methods. # Also creates a private instance copy of the method. class YARD::Handlers::Ruby::ModuleFunctionHandler < YARD::Handlers::Ruby::Base handles method_call(:module_function) namespace_only process do return if (ident = statement.jump(:ident)) == statement case statement.type when :var_ref, :vcall self.scope = :module when :fcall, :command statement[1].traverse do |node| case node.type when :symbol; name = node.first.source when :string_content; name = node.source else next end instance_method = MethodObject.new(namespace, name) class_method = MethodObject.new(namespace, name, :module) instance_method.copy_to(class_method) class_method.visibility = :public end end end end yard-master/lib/yard/handlers/ruby/module_handler.rb000066400000000000000000000004621265676644000231250ustar00rootroot00000000000000# Handles the declaration of a module class YARD::Handlers::Ruby::ModuleHandler < YARD::Handlers::Ruby::Base handles :module namespace_only process do modname = statement[0].source mod = register ModuleObject.new(namespace, modname) parse_block(statement[1], :namespace => mod) end endyard-master/lib/yard/handlers/ruby/private_class_method_handler.rb000066400000000000000000000033551265676644000260430ustar00rootroot00000000000000# Sets visibility of a class method class YARD::Handlers::Ruby::PrivateClassMethodHandler < YARD::Handlers::Ruby::Base handles method_call(:private_class_method) namespace_only process do errors = [] statement.parameters.each do |param| next unless AstNode === param begin privatize_class_method(param) rescue UndocumentableError => err errors << err.message end end if errors.size > 0 msg = errors.size == 1 ? ": #{errors[0]}" : "s: #{errors.join(", ")}" raise UndocumentableError, "private class_method#{msg} for #{namespace.path}" end end private def privatize_class_method(node) if node.literal? method = Proxy.new(namespace, node[0][0][0], :method) # Proxy will not have a #visibility method when handling inherited class methods # like :new, yet "private_class_method :new" is valid Ruby syntax. Therefore # if Proxy doesn't respond to #visibility, the object should be skipped. # # However, it is important to note that classes can be reopened, and # private_class_method can be called inside these reopened classes. # Therefore when encountering private_class_method, all of the files need # to be parsed before checking if Proxy responds to #visibility. If this # is not done, it is possible that class methods may be incorrectly marked # public/private. parser.parse_remaining_files method.visibility = :private if method.respond_to? :visibility else raise UndocumentableError, "invalid argument to private_class_method: #{node.source}" end rescue NamespaceMissingError raise UndocumentableError, "private visibility set on unrecognized method: #{node[0]}" end endyard-master/lib/yard/handlers/ruby/private_constant_handler.rb000066400000000000000000000025341265676644000252250ustar00rootroot00000000000000# Sets visibility of a constant (class, module, const) module YARD module Handlers module Ruby class PrivateConstantHandler < YARD::Handlers::Ruby::Base handles method_call(:private_constant) namespace_only process do errors = [] statement.parameters.each do |param| next unless AstNode === param begin privatize_constant(param) rescue UndocumentableError => err errors << err.message end end if errors.size > 0 msg = errors.size == 1 ? ": #{errors[0]}" : "s: #{errors.join(", ")}" raise UndocumentableError, "private constant#{msg} for #{namespace.path}" end end private def privatize_constant(node) if node.literal? || (node.type == :var_ref && node[0].type == :const) node = node.jump(:tstring_content, :const) const = Proxy.new(namespace, node[0]) ensure_loaded!(const) const.visibility = :private else raise UndocumentableError, "invalid argument to private_constant: #{node.source}" end rescue NamespaceMissingError raise UndocumentableError, "private visibility set on unrecognized constant: #{node[0]}" end end end end end yard-master/lib/yard/handlers/ruby/struct_handler_methods.rb000066400000000000000000000153241265676644000247120ustar00rootroot00000000000000# Helper methods to parse @attr_* tags on a class. # # @deprecated The use of +@attr+ tags are deprecated since 0.8.0 in favour of # the +@!attribute+ directive. This module should not be relied on. # @since 0.5.6 module YARD::Handlers::Ruby::StructHandlerMethods include YARD::CodeObjects # Extracts the user's defined @member tag for a given class and its member. Returns # nil if the user did not define a @member tag for this struct entry. # # @param [ClassObject] klass the class whose tags we're searching # @param [String] member the name of the struct member we need # @param [Symbol] type reader method, or writer method? # @return [Tags::Tag, nil] the tag matching the request, or nil if not found def member_tag_for_member(klass, member, type = :read) specific_tag = type == :read ? :attr_reader : :attr_writer (klass.tags(specific_tag) + klass.tags(:attr)).find {|tag| tag.name == member} end # Retrieves all members defined in @attr* tags # # @param [ClassObject] klass the class with the attributes # @return [Array] the list of members defined as attributes on the class def members_from_tags(klass) tags = klass.tags(:attr) + klass.tags(:attr_reader) + klass.tags(:attr_writer) tags.map {|t| t.name }.uniq end # Determines whether to create an attribute method based on the class's # tags. # # @param [ClassObject] klass the class whose tags we're searching # @param [String] member the name of the struct member we need # @param [Symbol] type (:read) reader method, or writer method? # @return [Boolean] should the attribute be created? def create_member_method?(klass, member, type = :read) return true if (klass.tags(:attr) + klass.tags(:attr_reader) + klass.tags(:attr_writer)).empty? return true if member_tag_for_member(klass, member, type) return !member_tag_for_member(klass, member, :write) if type == :read return !member_tag_for_member(klass, member, :read) end # Gets the return type for the member in a nicely formatted string. Used # to be injected into auto-generated docstrings. # # @param [Tags::Tag] member_tag the tag object to check for types # @return [String] the user-declared type of the struct member, or [Object] if # the user did not define a type for this member. def return_type_from_tag(member_tag) (member_tag && member_tag.types) ? member_tag.types : "Object" end # Creates the auto-generated docstring for the getter method of a struct's # member. This is used so the generated documentation will look just like that # of an attribute defined using attr_accessor. # # @param [ClassObject] klass the class whose members we're working with # @param [String] member the name of the member we're generating documentation for # @return [String] a docstring to be attached to the getter method for this member def add_reader_tags(klass, new_method, member) member_tag = member_tag_for_member(klass, member, :read) return_type = return_type_from_tag(member_tag) getter_doc_text = member_tag ? member_tag.text : "Returns the value of attribute #{member}" new_method.docstring.replace(getter_doc_text) new_method.add_tag YARD::Tags::Tag.new(:return, "the current value of #{member}", return_type) end # Creates the auto-generated docstring for the setter method of a struct's # member. This is used so the generated documentation will look just like that # of an attribute defined using attr_accessor. # # @param [ClassObject] klass the class whose members we're working with # @param [String] member the name of the member we're generating documentation for # @return [String] a docstring to be attached to the setter method for this member def add_writer_tags(klass, new_method, member) member_tag = member_tag_for_member(klass, member, :write) return_type = return_type_from_tag(member_tag) setter_doc_text = member_tag ? member_tag.text : "Sets the attribute #{member}" new_method.docstring.replace(setter_doc_text) new_method.add_tag YARD::Tags::Tag.new(:param, "the value to set the attribute #{member} to.", return_type, "value") new_method.add_tag YARD::Tags::Tag.new(:return, "the newly set value", return_type) end # Creates and registers a class object with the given name and superclass name. # Returns it for further use. # # @param [String] classname the name of the class # @param [String] superclass the name of the superclass # @return [ClassObject] the class object for further processing/method attaching def create_class(classname, superclass) register ClassObject.new(namespace, classname) do |o| o.superclass = superclass if superclass o.superclass.type = :class if o.superclass.is_a?(Proxy) end end # Creates the setter (writer) method and attaches it to the class as an attribute. # Also sets up the docstring to prettify the documentation output. # # @param [ClassObject] klass the class to attach the method to # @param [String] member the name of the member we're generating a method for def create_writer(klass, member) # We want to convert these members into attributes just like # as if they were declared using attr_accessor. new_meth = register MethodObject.new(klass, "#{member}=", :instance) do |o| o.parameters = [['value', nil]] o.signature ||= "def #{member}=(value)" o.source ||= "#{o.signature}\n @#{member} = value\nend" end add_writer_tags(klass, new_meth, member) klass.attributes[:instance][member][:write] = new_meth end # Creates the getter (reader) method and attaches it to the class as an attribute. # Also sets up the docstring to prettify the documentation output. # # @param [ClassObject] klass the class to attach the method to # @param [String] member the name of the member we're generating a method for def create_reader(klass, member) new_meth = register MethodObject.new(klass, member, :instance) do |o| o.signature ||= "def #{member}" o.source ||= "#{o.signature}\n @#{member}\nend" end add_reader_tags(klass, new_meth, member) klass.attributes[:instance][member][:read] = new_meth end # Creates the given member methods and attaches them to the given ClassObject. # # @param [ClassObject] klass the class to generate attributes for # @param [Array] members a list of member names def create_attributes(klass, members) # For each parameter, add reader and writers members.each do |member| next if klass.attributes[:instance][member] klass.attributes[:instance][member] = SymbolHash[:read => nil, :write => nil] create_writer klass, member if create_member_method?(klass, member, :write) create_reader klass, member if create_member_method?(klass, member, :read) end end end yard-master/lib/yard/handlers/ruby/visibility_handler.rb000066400000000000000000000013431265676644000240260ustar00rootroot00000000000000# Handles 'private', 'protected', and 'public' calls. class YARD::Handlers::Ruby::VisibilityHandler < YARD::Handlers::Ruby::Base handles method_call(:private) handles method_call(:protected) handles method_call(:public) namespace_only process do return if (ident = statement.jump(:ident)) == statement case statement.type when :var_ref, :vcall self.visibility = ident.first.to_sym when :fcall, :command statement[1].traverse do |node| case node.type when :symbol; source = node.first.source when :string_content; source = node.source else next end MethodObject.new(namespace, source, scope) {|o| o.visibility = ident.first } end end end endyard-master/lib/yard/handlers/ruby/yield_handler.rb000066400000000000000000000020261265676644000227440ustar00rootroot00000000000000# Handles 'yield' calls class YARD::Handlers::Ruby::YieldHandler < YARD::Handlers::Ruby::Base handles :yield, :yield0 process do return unless owner.is_a?(MethodObject) # Only methods yield return if owner.has_tag? :yield # Don't override yield tags return if owner.has_tag? :yieldparam # Same thing. yieldtag = YARD::Tags::Tag.new(:yield, "", []) if statement.type == :yield statement.jump(:list).children.each do |item| if item == s(:var_ref, s(:kw, "self")) yieldtag.types << '_self' owner.add_tag YARD::Tags::Tag.new(:yieldparam, "the object that the method was called on", owner.namespace.path, '_self') elsif item == s(:zsuper) yieldtag.types << '_super' owner.add_tag YARD::Tags::Tag.new(:yieldparam, "the result of the method from the superclass", nil, '_super') else yieldtag.types << item.source end end end owner.add_tag(yieldtag) unless yieldtag.types.empty? end end yard-master/lib/yard/i18n/000077500000000000000000000000001265676644000156125ustar00rootroot00000000000000yard-master/lib/yard/i18n/locale.rb000066400000000000000000000034221265676644000173770ustar00rootroot00000000000000module YARD module I18n # +Locale+ is a unit of translation. It has {#name} and a set of # messages. # # @since 0.8.2 class Locale class << self # @return [String, nil] the default locale name. # @since 0.8.4 attr_accessor :default undef default def default @@default ||= nil end undef default= def default=(locale) @@default = locale end end # @return [String] the name of the locale. It used IETF language # tag format +[language[_territory][.codeset][@modifier]]+. # @see http://tools.ietf.org/rfc/bcp/bcp47.txt # BCP 47 - Tags for Identifying Languages attr_reader :name # Creates a locale for +name+ locale. # # @param [String] name the locale name. def initialize(name) @name = name @messages = {} end # Loads translation messages from +locale_directory+/{#name}.po. # # @param [String] locale_directory the directory path that has # {#name}.po. # @return [Boolean] +true+ if PO file exists, +false+ otherwise. def load(locale_directory) return false if @name.nil? po_file = File.join(locale_directory, "#{@name}.po") return false unless File.exist?(po_file) require "yard/i18n/po_parser" return false unless POParser.available? po_parser = POParser.new @messages.merge!(po_parser.parse(po_file)) true end # @param [String] message the translation target message. # @return [String] translated message. If tarnslation isn't # registered, the +message+ is returned. def translate(message) @messages[message] || message end end end end yard-master/lib/yard/i18n/message.rb000066400000000000000000000032261265676644000175660ustar00rootroot00000000000000require "set" module YARD module I18n # +Message+ is a translation target message. It has message ID as # {#id} and some properties {#locations} and {#comments}. # # @since 0.8.1 class Message # @return [String] the message ID of the trnslation target message. attr_reader :id # @return [Set] the set of locations. Location is an array of # path and line number where the message is appeared. attr_reader :locations # @return [Set] the set of comments for the messages. attr_reader :comments # Creates a trasnlate target message for message ID +id+. # # @param [String] id the message ID of the translate target message. def initialize(id) @id = id @locations = Set.new @comments = Set.new end # Adds location information for the message. # # @param [String] path the path where the message appears. # @param [Integer] line the line number where the message appears. # @return [void] def add_location(path, line) @locations << [path, line] end # Adds a comment for the message. # # @param [String] comment the comment for the message to be added. # @return [void] def add_comment(comment) @comments << comment unless comment.nil? end # @param [Message] other the +Message+ to be compared. # @return [Boolean] checks whether this message is equal to another. def ==(other) other.is_a?(self.class) and @id == other.id and @locations == other.locations and @comments == other.comments end end end end yard-master/lib/yard/i18n/messages.rb000066400000000000000000000030121265676644000177420ustar00rootroot00000000000000module YARD module I18n # Acts as a container for {Message} objects. # # @since 0.8.1 class Messages include Enumerable # Creates a new container. def initialize @messages = {} end # Enumerates each {Message} in the container. # # @yieldparam [Message] message the next message object in # the enumeration. # @return [void] def each(&block) @messages.each_value(&block) end # @param [String] id the message ID to perform a lookup on. # @return [Message, nil] a registered message for the given +id+, # or nil if no message for the ID is found. def [](id) @messages[id] end # Registers a {Message}, the mssage ID of which is +id+. If # corresponding +Message+ is already registered, the previously # registered object is returned. # # @param [String] id the ID of the message to be registered. # @return [Message] the registered +Message+. def register(id) @messages[id] ||= Message.new(id) end # Checks if this messages list is equal to another messages list. # # @param [Messages] other the container to compare. # @return [Boolean] whether +self+ and +other+ is equivalence or not. def ==(other) other.is_a?(self.class) and @messages == other.messages end protected # @return [Hash{String=>Message}] the set of message objects attr_reader :messages end end end yard-master/lib/yard/i18n/po_parser.rb000066400000000000000000000031441265676644000201330ustar00rootroot00000000000000module YARD module I18n # +Locale+ is a wrapper for gettext's PO parsing feature. It hides # gettext API difference from YARD. # # @since 0.8.8 class POParser if RUBY_VERSION < "1.9" begin require "gettext/tools/poparser" require "gettext/runtime/mofile" @@gettext_version = 2 rescue LoadError log.warn "Need gettext gem 2.x for i18n feature:" log.warn " gem install gettext -v 2.3.9" end else begin require "gettext/po_parser" require "gettext/mo" @@gettext_version = 3 rescue LoadError begin require "gettext/tools/poparser" require "gettext/runtime/mofile" @@gettext_version = 2 rescue LoadError log.warn "Need gettext gem for i18n feature:" log.warn " gem install gettext" end end end class << self # @return [Boolean] true if gettext is available, false otherwise. def available? !@@gettext_version.nil? end end # Parses PO file. # # @param [String] file path of PO file to be parsed. # @return [Hash] parsed messages. def parse(file) case @@gettext_version when 2 parser = GetText::PoParser.new data = GetText::MoFile.new when 3 parser = GetText::POParser.new data = GetText::MO.new end parser.report_warning = false parser.parse_file(file, data) data end end end end yard-master/lib/yard/i18n/pot_generator.rb000066400000000000000000000230451265676644000210130ustar00rootroot00000000000000require "stringio" module YARD module I18n # The +PotGenerator+ generates POT format string from # {CodeObjects::Base} and {CodeObjects::ExtraFileObject}. # # == POT and PO # # POT is an acronym for "Portable Object Template". POT is a # template file to create PO file. The extension for POT is # ".pot". PO file is an acronym for "Portable Object". PO file has # many parts of message ID (msgid) that is translation target # message and message string (msgstr) that is translated message # of message ID. If you want to tranlsate "Hello" in English into # "Bonjour" in French, "Hello" is the msgid ID and "Bonjour" is # msgstr. The extension for PO is ".po". # # == How to extract msgids # # The +PotGenerator+ has two parse methods: # # * {#parse_objects} for {CodeObjects::Base} # * {#parse_files} for {CodeObjects::ExtraFileObject} # # {#parse_objects} extracts msgids from docstring and tags of # {CodeObjects::Base} objects. The docstring of # {CodeObjects::Base} object is parsed and a paragraph is # extracted as a msgid. Tag name and tag text are extracted as # msgids from a tag. # # {#parse_files} extracts msgids from # {CodeObjects::ExtraFileObject} objects. The file content of # {CodeObjects::ExtraFileObject} object is parsed and a paragraph # is extracted as a msgid. # # == Usage # # To create a .pot file by +PotGenerator+, instantiate a # +PotGenerator+ with a relative working directory path from a # directory path that has created .pot file, parse # {CodeObjects::Base} objects and {CodeObjects::ExtraFileObject} # objects, generate a POT and write the generated POT to a .pot # file. The relative working directory path is ".." when the # working directory path is "." and the POT is wrote into # "po/yard.pot". # # @example Generate a .pot file # po_file_path = "po/yard.pot" # po_file_directory_pathname = Pathname.new(po_file_path).directory) # working_directory_pathname = Pathname.new(".") # relative_base_path = working_directory_pathname.relative_path_from(po_file_directory_pathname).to_s # # relative_base_path -> ".." # generator = YARD::I18n::PotGenerator.new(relative_base_path) # generator.parse_objects(objects) # generator.parse_files(files) # pot = generator.generate # po_file_directory_pathname.mkpath # File.open(po_file_path, "w") do |pot_file| # pot_file.print(pot) # end # @see http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html # GNU gettext manual about details of PO file class PotGenerator # Extracted messages. # # @return [Messages] # @since 0.8.1 attr_reader :messages # Creates a POT generator that uses +relative_base_path+ to # generate locations for a msgid. +relative_base_path+ is # prepended to all locations. # # @param [String] relative_base_path a relative working # directory path from a directory path that has created .pot # file. def initialize(relative_base_path) @relative_base_path = relative_base_path @extracted_objects = {} @messages = Messages.new end # Parses {CodeObjects::Base} objects and stores extracted msgids # into {#messages} # # @param [Array] objects a list of # {CodeObjects::Base} to be parsed. # @return [void] def parse_objects(objects) objects.each do |object| extract_documents(object) end end # Parses {CodeObjects::ExtraFileObject} objects and stores # extracted msgids into {#messages}. # # @param [Array] files a list # of {CodeObjects::ExtraFileObject} objects to be parsed. # @return [void] def parse_files(files) files.each do |file| extract_paragraphs(file) end end # Generates POT from +@messages+. # # One PO file entry is generated from a +Message+ in # +@messages+. # # Locations of the +Message+ are used to generate the reference # line that is started with "#: ". +relative_base_path+ passed # when the generater is created is prepended to each path in location. # # Comments of the +Message+ are used to generate the # translater-comment line that is started with "# ". # # @return [String] POT format string def generate pot = header sorted_messages = @messages.sort_by do |message| sorted_locations = message.locations.sort_by do |location| location end sorted_locations.first || [] end sorted_messages.each do |message| generate_message(pot, message) end pot end private def header <<-EOH # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\\n" "Report-Msgid-Bugs-To: \\n" "POT-Creation-Date: #{generate_pot_creation_date_value}\\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n" "Last-Translator: FULL NAME \\n" "Language-Team: LANGUAGE \\n" "Language: \\n" "MIME-Version: 1.0\\n" "Content-Type: text/plain; charset=UTF-8\\n" "Content-Transfer-Encoding: 8bit\\n" EOH end def current_time @current_time ||= Time.now end def generate_pot_creation_date_value current_time.strftime("%Y-%m-%d %H:%M%z") end def generate_message(pot, message) message.comments.sort.each do |comment| pot << "# #{comment}\n" unless comment.empty? end message.locations.sort.each do |path, line| pot << "#: #{@relative_base_path}/#{path}:#{line}\n" end escaped_message_id = escape_message_id(message.id) escaped_message_id = escaped_message_id.gsub(/\n/, "\\\\n\"\n\"") pot << "msgid \"#{escaped_message_id}\"\n" pot << "msgstr \"\"\n" pot << "\n" pot end def escape_message_id(message_id) message_id.gsub(/(\\|")/) do special_character = $1 "\\#{special_character}" end end def register_message(id) @messages.register(id) end def extract_documents(object) return if @extracted_objects.has_key?(object) @extracted_objects[object] = true case object when CodeObjects::NamespaceObject object.children.each do |child| extract_documents(child) end end if object.group message = register_message(object.group) object.files.each do |path, line| message.add_location(path, line) end message.add_comment(object.path) unless object.path.empty? end docstring = object.docstring unless docstring.empty? text = Text.new(StringIO.new(docstring)) text.extract_messages do |type, *args| case type when :paragraph paragraph, line_no = *args message = register_message(paragraph.rstrip) object.files.each do |path, line| message.add_location(path, (docstring.line || line) + line_no) end message.add_comment(object.path) unless object.path.empty? else raise "should not reach here: unexpected type: #{type}" end end end docstring.tags.each do |tag| extract_tag_documents(tag) end end def extract_tag_documents(tag) extract_tag_name(tag) extract_tag_text(tag) extract_documents(tag) if Tags::OverloadTag === tag end def extract_tag_name(tag) return if tag.name.nil? return if tag.name.is_a?(String) and tag.name.empty? key = "tag|#{tag.tag_name}|#{tag.name}" message = register_message(key) tag.object.files.each do |path, line| message.add_location(path, line) end tag_label = "@#{tag.tag_name}" tag_label << " [#{tag.types.join(', ')}]" if tag.types message.add_comment(tag_label) end def extract_tag_text(tag) return if tag.text.nil? return if tag.text.empty? message = register_message(tag.text) tag.object.files.each do |path, line| message.add_location(path, line) end tag_label = "@#{tag.tag_name}" tag_label << " [#{tag.types.join(', ')}]" if tag.types tag_label << " #{tag.name}" if tag.name message.add_comment(tag_label) end def extract_paragraphs(file) File.open(file.filename) do |input| text = Text.new(input, :have_header => true) text.extract_messages do |type, *args| case type when :attribute name, value, line_no = *args message = register_message(value) message.add_location(file.filename, line_no) message.add_comment(name) when :paragraph paragraph, line_no = *args message = register_message(paragraph.rstrip) message.add_location(file.filename, line_no) else raise "should not reach here: unexpected type: #{type}" end end end end end end end yard-master/lib/yard/i18n/text.rb000066400000000000000000000124271265676644000171310ustar00rootroot00000000000000module YARD module I18n # Provides some convenient features for translating a text. class Text # Creates a text object that has translation related features for # the input text. # # @param [#each_line] input a text to be translated. # @option options [Boolean] :have_header (false) whether the # input text has header or not. def initialize(input, options={}) @input = input @options = options end # Extracts translation target messages from +@input+. # # @yield [:attribute, name, value, line_no] the block that # recieves extracted an attribute in header. It may called many # times. # @yieldparam [String] name the name of extracted attribute. # @yieldparam [String] value the value of extracted attribute. # @yieldparam [Integer] line_no the defined line number of extracted # attribute. # @yield [:paragraph, text, start_line_no] the block that # recieves extracted a paragraph in body. Paragraph is a text # block separated by one or more empty lines. Empty line is a # line that contains only zero or more whitespaces. It may # called many times. # @yieldparam [String] text the text of extracted paragraph. # @yieldparam [Integer] start_line_no the start line number of # extracted paragraph. # @return [void] def extract_messages parse do |part| line_no = part[:line_no] case part[:type] when :markup, :empty_line # ignore when :attribute yield(:attribute, part[:name], part[:value], part[:line_no]) when :paragraph yield(:paragraph, part[:paragraph], part[:line_no]) end end end # Translates into +locale+. # # @param [Locale] locale the translation target locale. # @return [String] translated text. def translate(locale) translated_text = "" parse do |part| case part[:type] when :markup translated_text << part[:line] when :attribute prefix = "#{part[:prefix]}#{part[:name]}#{part[:infix]}" value = locale.translate(part[:value]) suffix = part[:suffix] translated_text << "#{prefix}#{value}#{suffix}" when :paragraph translated_text << locale.translate(part[:paragraph]) when :empty_line translated_text << part[:line] else raise "should not reach here: unexpected type: #{type}" end end translated_text end private def parse(&block) paragraph = "" paragraph_start_line = 0 line_no = 0 in_header = @options[:have_header] @input.each_line do |line| line_no += 1 if in_header case line when /^#!\S+\s*$/ if line_no == 1 emit_markup_event(line, line_no, &block) else in_header = false end when /^(\s*#\s*@)(\S+)(\s*)(.+?)(\s*)$/ emit_attribute_event(Regexp.last_match, line_no, &block) else in_header = false if line.strip.empty? emit_empty_line_event(line, line_no, &block) next end end next if in_header end case line when /^\s*$/ if paragraph.empty? emit_empty_line_event(line, line_no, &block) else paragraph << line emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block) paragraph = "" end else paragraph_start_line = line_no if paragraph.empty? paragraph << line end end unless paragraph.empty? emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block) end end def emit_markup_event(line, line_no) part = { :type => :markup, :line => line, :line_no => line_no, } yield(part) end def emit_attribute_event(match_data, line_no) part = { :type => :attribute, :prefix => match_data[1], :name => match_data[2], :infix => match_data[3], :value => match_data[4], :suffix => match_data[5], :line_no => line_no, } yield(part) end def emit_empty_line_event(line, line_no) part = { :type => :empty_line, :line => line, :line_no => line_no, } yield(part) end def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block) paragraph_part = { :type => :paragraph, :line_no => paragraph_start_line, } match_data = /(\s*)\z/.match(paragraph) if match_data paragraph_part[:paragraph] = match_data.pre_match yield(paragraph_part) emit_empty_line_event(match_data[1], line_no, &block) else paragraph_part[:paragraph] = paragraph yield(paragraph_part) end end end end end yard-master/lib/yard/logging.rb000066400000000000000000000133741265676644000170160ustar00rootroot00000000000000require 'logger' require 'thread' module YARD # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. class Logger < ::Logger # The list of characters displayed beside the progress bar to indicate # "movement". # @since 0.8.2 PROGRESS_INDICATORS = ["\u230C", "\u230D", "\u230E", "\u230F"] # @return [IO] the IO object being logged to # @since 0.8.2 def io; @logdev end def io=(pipe) @logdev = pipe end # @return [Boolean] whether backtraces should be shown (by default # this is on). def show_backtraces; @show_backtraces || level == DEBUG end attr_writer :show_backtraces # @return [Boolean] whether progress indicators should be shown when # logging CLIs (by default this is off). def show_progress return false if YARD.ruby18? # threading is too ineffective for progress support return false if YARD.windows? # windows has poor ANSI support return false unless io.tty? # no TTY support on IO return false unless level > INFO # no progress in verbose/debug modes @show_progress end attr_writer :show_progress # The logger instance # @return [Logger] the logger instance def self.instance(pipe = STDOUT) @logger ||= new(pipe) end # Creates a new logger def initialize(pipe, *args) super(pipe, *args) self.io = pipe self.show_backtraces = true self.show_progress = false self.level = WARN self.formatter = method(:format_log) @progress_indicator = 0 @mutex = Mutex.new end # Changes the debug level to DEBUG if $DEBUG is set # and writes a debugging message. def debug(*args) self.level = DEBUG if $DEBUG super end # Captures the duration of a block of code for benchmark analysis. Also # calls {#progress} on the message to display it to the user. # # @todo Implement capture storage for reporting of benchmarks # @param [String] msg the message to display # @param [Symbol, nil] nontty_log the level to log as if the output # stream is not a TTY. Use +nil+ for no alternate logging. # @yield a block of arbitrary code to benchmark # @return [void] def capture(msg, nontty_log = :debug, &block) progress(msg, nontty_log) yield ensure clear_progress end # Displays a progress indicator for a given message. This progress report # is only displayed on TTY displays, otherwise the message is passed to # the +nontty_log+ level. # # @param [String] msg the message to log # @param [Symbol, nil] nontty_log the level to log as if the output # stream is not a TTY. Use +nil+ for no alternate logging. # @return [void] # @since 0.8.2 def progress(msg, nontty_log = :debug) send(nontty_log, msg) if nontty_log return unless show_progress icon = "" if defined?(::Encoding) icon = PROGRESS_INDICATORS[@progress_indicator] + " " end @mutex.synchronize do print("\e[2K\e[?25l\e[1m#{icon}#{msg}\e[0m\r") @progress_msg = msg @progress_indicator += 1 @progress_indicator %= PROGRESS_INDICATORS.size end Thread.new do sleep(0.05) progress(msg + ".", nil) if @progress_msg == msg end end # Clears the progress indicator in the TTY display. # @return [void] # @since 0.8.2 def clear_progress return unless show_progress print_no_newline("\e[?25h\e[2K") @progress_msg = nil end # Displays an unformatted line to the logger output stream, adding # a newline. # @param [String] msg the message to display # @return [void] # @since 0.8.2 def puts(msg = '') print("#{msg}\n") end alias_method :print_no_newline, :<< private :print_no_newline # Displays an unformatted line to the logger output stream. # @param [String] msg the message to display # @return [void] # @since 0.8.2 def print(msg = '') clear_line print_no_newline(msg) end alias_method :<<, :print # Prints the backtrace +exc+ to the logger as error data. # # @param [Array] exc the backtrace list # @param [Symbol] level_meth the level to log backtrace at # @return [void] def backtrace(exc, level_meth = :error) return unless show_backtraces send(level_meth, "#{exc.class.class_name}: #{exc.message}") send(level_meth, "Stack trace:" + exc.backtrace[0..5].map {|x| "\n\t#{x}" }.join + "\n") end # Warns that the Ruby environment does not support continuations. Applies # to JRuby, Rubinius and MacRuby. This warning will only display once # per Ruby process. # # @deprecated Continuations are no longer needed by YARD 0.8.0+. # @return [void] def warn_no_continuations end # Sets the logger level for the duration of the block # # @example # log.enter_level(Logger::ERROR) do # YARD.parse_string "def x; end" # end # @param [Fixnum] new_level the logger level for the duration of the block. # values can be found in Ruby's Logger class. # @yield the block with the logger temporarily set to +new_level+ def enter_level(new_level = level, &block) old_level, self.level = level, new_level yield ensure self.level = old_level end private # Override this internal Logger method to clear line def add(*args) clear_line super(*args) end def clear_line return unless @progress_msg print_no_newline("\e[2K\r") end # Log format (from Logger implementation). Used by Logger internally def format_log(sev, time, prog, msg) "[#{sev.downcase}]: #{msg}\n" end end end yard-master/lib/yard/options.rb000066400000000000000000000174451265676644000170660ustar00rootroot00000000000000module YARD # Generalized options class for passing around large amounts of options between objects. # # The options class exists for better visibility and documentability of options being # passed through to other objects. Because YARD has parser and template architectures # that are heavily reliant on options, it is necessary to make these option keys easily # visible and understood by developers. Since the options class is more than just a # basic Hash, the subclass can provide aliasing and convenience methods to simplify # option property access, and, if needed, support backward-compatibility for deprecated # key names. # # == Hash and OpenStruct-like Access # # Although the options class allows for Hash-like access (opts[:key]), the recommended # mechanism for accessing an option key will be via standard method calls on attributes # # The options class can also act as an open ended key value storage structure (like a # Hash or OpenStruct), and allows for setting and getting of unregistered option keys. # This methodology is not recommended, however, and is only supported for backward # compatibility inside YARD. Whenever possible, developers should define all keys used # by an options class. # # == Declaring Default Values # # Note that the options class can contain default value definitions for certain options, # but to initialize these defaults, {#reset_defaults} must be called manually after # initialization; the options object is always created empty until defaults are applied. # # @abstract Subclasses should define (and document) custom attributes that are expected # to be made available as option keys. # @example Defining an Options class with custom option keys # class TemplateOptions < YARD::Options # # @return [Symbol] the output format to generate templates in # attr_accessor :format # # # @return [Symbol] the template to use when generating output # attr_accessor :template # end # @example Initializing default option values # class TemplateOptions < YARD::Options # def reset_defaults # super # self.format = :html # self.template = :default # self.highlight = true # # ... # end # end # @example Using +default_attr+ to create default attributes # class TemplateOptions < YARD::Options # default_attr :format, :html # default_attr :template, :default # default_attr :highlight, true # end # @example Deprecating an option while still supporting it # class TemplateOptions < YARD::Options # # @return [Boolean] if syntax highlighting should be performed on code blocks. # # Defaults to true. # attr_accessor :highlight # # # @deprecated Use {#highlight} instead. # # @return [Boolean] if no syntax highlighting should be performs on code blocks. # # Defaults to false. # attr_accessor :no_highlight # def no_highlight=(value) @highlight = !value end # def no_highlight; !highlight end # end class Options # @!macro [attach] yard.default_attr # @!attribute $1 # Defines an attribute named +key+ and sets a default value for it # # @example Defining a default option key # default_attr :name, 'Default Name' # default_attr :time, lambda { Time.now } # @param [Symbol] key the option key name # @param [Object, Proc] default the default object value. If the default # value is a proc, it is executed upon initialization. def self.default_attr(key, default) (@defaults ||= {})[key] = default attr_accessor(key) end # Delegates calls with Hash syntax to actual method with key name # # @example Calling on an option key with Hash syntax # options[:format] # equivalent to: options.format # @param [Symbol, String] key the option name to access # @return the value of the option named +key+ def [](key) send(key) end # Delegates setter calls with Hash syntax to the attribute setter with the key name # # @example Setting an option with Hash syntax # options[:format] = :html # equivalent to: options.format = :html # @param [Symbol, String] key the optin to set # @param [Object] value the value to set for the option # @return [Object] the value being set def []=(key, value) send("#{key}=", value) end # Updates values from an options hash or options object on this object. # All keys passed should be key names defined by attributes on the class. # # @example Updating a set of options on an Options object # opts.update(:template => :guide, :type => :fulldoc) # @param [Hash, Options] opts # @return [self] def update(opts) opts = opts.to_hash if Options === opts opts.each do |key, value| self[key] = value end self end # Creates a new options object and sets options hash or object value # onto that object. # # @param [Options, Hash] opts # @return [Options] the newly created options object # @see #update def merge(opts) dup.update(opts) end # @return [Hash] Converts options object to an options hash. All keys # will be symbolized. def to_hash opts = {} instance_variables.each do |ivar| name = ivar.to_s.sub(/^@/, '') opts[name.to_sym] = send(name) end opts end # Yields over every option key and value # @yield [key, value] every option key and value # @yieldparam [Symbol] key the option key # @yieldparam [Object] value the option value # @return [void] def each(&block) instance_variables.each do |ivar| name = ivar.to_s.sub(/^@/, '') yield(name.to_sym, send(name)) end end # Inspects the object def inspect "<#{self.class}: #{to_hash.inspect}>" end # @return [Boolean] whether another Options object equals the # keys and values of this options object def ==(other) case other when Options; to_hash == other.to_hash when Hash; to_hash == other else false end end # Handles setting and accessing of unregistered keys similar # to an OpenStruct object. # # @note It is not recommended to set and access unregistered keys on # an Options object. Instead, register the attribute before using it. def method_missing(meth, *args, &block) if meth.to_s =~ /^(.+)=$/ log.debug "Attempting to set unregistered key #{$1} on #{self.class}" instance_variable_set("@#{$1}", args.first) elsif args.size == 0 log.debug "Attempting to access unregistered key #{meth} on #{self.class}" instance_variable_get("@#{meth}") else super end end # Resets all values to their defaults. # # @abstract Subclasses should override this method to perform custom # value initialization if not using {default_attr}. Be sure to call # +super+ so that default initialization can take place. # @return [void] def reset_defaults names_set = {} self.class.ancestors.each do |klass| # look at all ancestors defaults = klass.instance_variable_get("@defaults") next unless defaults defaults.each do |key, value| next if names_set[key] names_set[key] = true self[key] = Proc === value ? value.call : value end end end # Deletes an option value for +key+ # # @param [Symbol, String] key the key to delete a value for # @return [Object] the value that was deleted def delete(key) val = self[key] if instance_variable_defined?("@#{key}") remove_instance_variable("@#{key}") end val end unless defined? tap() # only for 1.8.6 def tap(&block) yield(self); self end end end end yard-master/lib/yard/parser/000077500000000000000000000000001265676644000163275ustar00rootroot00000000000000yard-master/lib/yard/parser/base.rb000066400000000000000000000035701265676644000175730ustar00rootroot00000000000000module YARD module Parser # Represents the abstract base parser class that parses source code in # a specific way. A parser should implement {#parse}, {#tokenize} and # {#enumerator}. # # == Registering a Custom Parser # To register a parser, see {SourceParser.register_parser_type} # # @abstract # @see #parse # @see #tokenize # @see #enumerator # @since 0.5.6 class Base # Convenience method to create a new parser and {#parse} def self.parse(source, filename = nil) new(source, filename).parse end # This default constructor does nothing. The subclass is responsible for # storing the source contents and filename if they are required. # @param [String] source the source contents # @param [String] filename the name of the file if from disk def initialize(source, filename) raise NotImplementedError, "invalid parser implementation" end # This method should be implemented to parse the source and return itself. # @abstract # @return [Base] this method should return itself def parse raise NotImplementedError, "#{self.class} must implement #parse" end # This method should be implemented to tokenize given source # @abstract # @return [Array] a list/tree of lexical tokens def tokenize raise NotImplementedError, "#{self.class} does not support tokenization" end # This method should be implemented to return a list of semantic tokens # representing the source code to be post-processed. Otherwise the method # should return nil. # # @abstract # @return [Array] a list of semantic tokens representing the source code # to be post-processed # @return [nil] if no post-processing should be done def enumerator nil end end end endyard-master/lib/yard/parser/c/000077500000000000000000000000001265676644000165515ustar00rootroot00000000000000yard-master/lib/yard/parser/c/c_parser.rb000066400000000000000000000150021265676644000206720ustar00rootroot00000000000000module YARD module Parser module C class CParser < Base def initialize(source, file = '(stdin)') @file = file @namespaces = {} @content = source @index = 0 @line = 1 @state = nil @newline = true @statements = [] @last_comment = nil @last_statement = nil end def parse parse_toplevel enumerator end def enumerator @statements end def tokenize raise NotImplementedError, "no tokenization support for C/C++ files" end private def parse_toplevel advance_loop do case char when /['"]/; consume_quote(char) when '#'; consume_directive when '/'; consume_comment when /\s/; consume_whitespace else consume_toplevel_statement end end end def consume_quote(type = '"') advance advance_loop do case char when "\n"; advance; nextline when '\\'; advance(2) when type; advance; return else advance end end end def consume_directive return(advance) unless @newline @last_comment = nil @last_statement = nil advance_loop do if char == '\\' && nextchar =~ /[\r\n]/ advance_loop { advance; break(nextline) if char == "\n" } elsif char == "\n" return end advance end end def consume_toplevel_statement @newline = false start = @index line = @line decl = consume_until(/[{;]/) return nil if decl =~ /\A\s*\Z/ statement = ToplevelStatement.new(nil, @file, line) @statements << statement attach_comment(statement) stmts = nil if prevchar == '{' stmts = consume_body_statements if decl =~ /\A(typedef|enum|class|#{struct}|union)/ consume_until(';') end end statement.source = @content[start..@index] statement.block = stmts statement.declaration = decl end def consume_body_statements stmts = [] brace_level = 1 while true strip_non_statement_data start, line = @index, @line consume_until(/[{};]/) brace_level += 1 if prevchar == '{' brace_level -= 1 if prevchar == '}' break if prevchar.empty? || (brace_level <= 0 && prevchar == '}') end_chr = @index end_chr -= 1 if prevchar == '}' src = @content[start...@index] if src && src !~ /\A\s*\Z|\A\}\Z/ stmt = BodyStatement.new(src, @file, line) attach_comment(stmt) stmts << stmt end end stmts end def strip_non_statement_data start = @index begin start = @index case char when /\s/; consume_whitespace when '#'; consume_directive when '/'; consume_comment end end until start == @index end def consume_whitespace advance_loop { nextline if char == "\n"; break if char =~ /\S/; advance } end def consume_comment(add_comment = true) return(advance) unless nextchar == '*' || nextchar == '/' line = @line type = nextchar == '*' ? :multi : :line advance(2) comment = "" advance_loop do comment << char if type == :multi nextline if char == "\n" if char(2) == '*/' if add_comment comment << '/' stmt = Comment.new(comment, @file, line) stmt.type = type attach_comment(stmt) @statements << stmt end return advance(2) end elsif char == "\n" if add_comment stmt = Comment.new(comment[0...-1], @file, line) stmt.type = type attach_comment(stmt) @statements << stmt end return end advance end end def consume_until(end_char, bracket_level = 0, brace_level = 0, add_comment = true) end_char = /#{end_char}/ if end_char.is_a?(String) start = @index advance_loop do chr = char case chr when /\s/; consume_whitespace when /['"]/; consume_quote(char) when '#'; consume_directive when '/'; consume_comment(add_comment) when '{'; advance; brace_level += 1 when '}'; advance; brace_level -= 1 when '('; advance; bracket_level += 1 when ')'; advance; bracket_level -= 1 else advance end @newline = false if chr !~ /\s/ if chr =~ end_char && (chr == '{' || chr == '(') break elsif chr =~ end_char && bracket_level <= 0 && brace_level <= 0 break end end return @content[start...@index] end def attach_comment(statement) if Comment === statement if @last_statement && @last_statement.line == statement.line @last_statement.comments = statement statement.statement = @last_statement end @last_comment = statement @last_statement = nil else if @last_comment statement.comments = @last_comment @last_comment.statement = statement end @last_statement = statement @last_comment = nil end end def advance(num = 1) @index += num end def back(num = 1) @index -= num end def advance_loop(&block) while @index <= @content.size; yield end end def nextline @line += 1 @newline = true end def char(num = 1) @content[@index, num] end def prevchar(num = 1) @content[@index - 1, num] end def nextchar(num = 1) @content[@index + 1, num] end def struct /struct\s[:alnum:]+\s\{/ end end end end end yard-master/lib/yard/parser/c/comment_parser.rb000066400000000000000000000110501265676644000221110ustar00rootroot00000000000000module YARD module Parser module C module CommentParser protected def parse_comments(comments) @overrides = [] spaces = nil comments = remove_private_comments(comments) comments = comments.split(/\r?\n/).map do |line| line.gsub!(%r{^\s*/?\*/?}, '') line.gsub!(%r{\*/\s*$}, '') if line =~ /^\s*$/ next if spaces.nil? next "" end spaces = (line[/^(\s+)/, 1] || "").size if spaces.nil? line.gsub(/^\s{0,#{spaces}}/, '').rstrip end.compact comments = parse_overrides(comments) comments = parse_callseq(comments) comments.join("\n") end private def parse_overrides(comments) comments.map do |line| type, name = *line.scan(/^\s*Document-(class|module|method|const):\s*(\S.*)\s*$/).first if type @overrides << [type.to_sym, name] nil else line end end.compact end def parse_callseq(comments) return comments unless comments[0] =~ /\Acall-seq:\s*(\S.+)?/ if $1 comments[0] = " #{$1}" else comments.shift end overloads = [] seen_data = false while comments.first =~ /^\s+(\S.+)/ || comments.first =~ /^\s*$/ line = comments.shift.strip break if line.empty? && seen_data next if line.empty? seen_data = true line.sub!(/^\w+[\.#]/, '') signature, types = *line.split(/ [-=]> /) types = parse_types(types) if signature.sub!(/\[?\s*(\{(?:\s*\|(.+?)\|)?.*\})\s*\]?\s*$/, '') && $1 blk, blkparams = $1, $2 else blk, blkparams = nil, nil end case signature when /^(\w+)\s*=\s+(\w+)/ signature = "#{$1}=(#{$2})" when /^\w+\s+\S/ signature = signature.split(/\s+/) signature = "#{signature[1]}#{signature[2] ? '(' + signature[2..-1].join(' ') + ')' : ''}" when /^\w+\[(.+?)\]\s*(=)?/ signature = "[]#{$2}(#{$1})" when /^\w+\s+(#{CodeObjects::METHODMATCH})\s+(\w+)/ signature = "#{$1}(#{$2})" end break unless signature =~ /^#{CodeObjects::METHODNAMEMATCH}/ signature = signature.rstrip overloads << "@overload #{signature}" overloads << " @yield [#{blkparams}]" if blk overloads << " @return [#{types.join(', ')}]" unless types.empty? end comments + [""] + overloads end def parse_types(types) if types =~ /true or false/ ["Boolean"] else (types||"").split(/,| or /).map do |t| case t.strip.gsub(/^an?_/, '') when "class"; "Class" when "obj", "object", "anObject"; "Object" when "arr", "array", "anArray", /^\[/; "Array" when /^char\s*\*/, "char", "str", "string", "new_str"; "String" when "enum", "anEnumerator"; "Enumerator" when "exc", "exception"; "Exception" when "proc", "proc_obj", "prc"; "Proc" when "binding"; "Binding" when "hsh", "hash", "aHash"; "Hash" when "ios", "io"; "IO" when "file"; "File" when "float"; "Float" when "time", "new_time"; "Time" when "dir", "aDir"; "Dir" when "regexp", "new_regexp"; "Regexp" when "matchdata"; "MatchData" when "encoding"; "Encoding" when "fixnum", "fix"; "Fixnum" when /^(?:un)?signed$/, /^(?:(?:un)?signed\s*)?(?:short|int|long|long\s+long)$/, "integer", "Integer"; "Integer" when "num", "numeric", "Numeric", "number"; "Numeric" when "aBignum"; "Bignum" when "nil"; "nil" when "true"; "true" when "false"; "false" when "bool", "boolean", "Boolean"; "Boolean" when "self"; "self" when /^[-+]?\d/; t when /[A-Z][_a-z0-9]+/; t end end.compact end end def remove_private_comments(comment) comment = comment.gsub(/\/?\*--\n(.*?)\/?\*\+\+/m, '') comment = comment.sub(/\/?\*--\n.*/m, '') comment end end end end end yard-master/lib/yard/parser/c/statement.rb000066400000000000000000000024551265676644000211100ustar00rootroot00000000000000module YARD module Parser module C class Statement attr_accessor :source attr_accessor :line attr_accessor :file # @deprecated Groups are now defined by directives # @see Tags::GroupDirective attr_accessor :group attr_accessor :comments_hash_flag def initialize(source, file = nil, line = nil) @source = source @file = file @line = line end def line_range line...(line + source.count("\n")) end def comments_range comments.line_range end def first_line source.split(/\n/).first end def show "\t#{line}: #{first_line}" end end class BodyStatement < Statement attr_accessor :comments end class ToplevelStatement < Statement attr_accessor :block attr_accessor :declaration attr_accessor :comments end class Comment < Statement include CommentParser attr_accessor :type attr_accessor :overrides attr_accessor :statement def initialize(source, file = nil, line = nil) super(parse_comments(source), file, line) end def comments; self end end end end end yard-master/lib/yard/parser/ruby/000077500000000000000000000000001265676644000173105ustar00rootroot00000000000000yard-master/lib/yard/parser/ruby/ast_node.rb000066400000000000000000000376301265676644000214420ustar00rootroot00000000000000module YARD module Parser module Ruby # Builds and s-expression by creating {AstNode} objects with # the type provided by the first argument. # # @example An implicit list of keywords # ast = s(s(:kw, "if"), s(:kw, "else")) # ast.type # => :list # @example A method call # s(:command, s(:var_ref, "mymethod")) # # @overload s(*nodes, opts = {}) # @param [Array] nodes a list of nodes. # @param [Hash] opts any extra options (docstring, file, source) to # set on the object # @return [AstNode] an implicit node where node.type == +:list+ # @overload s(type, *children, opts = {}) # @param [Symbol] type the node type # @param [Array] children any child nodes inside this one # @param [Hash] opts any extra options to set on the object # @return [AstNode] a node of type +type+. # @see AstNode#initialize def s(*args) type = Symbol === args.first ? args.shift : :list opts = Hash === args.last ? args.pop : {} AstNode.node_class_for(type).new(type, args, opts) end # An AST node is characterized by a type and a list of children. It # is most easily represented by the s-expression {#s} such as: # # AST for "if true; 5 end": # s(s(:if, s(:var_ref, s(:kw, "true")), s(s(:int, "5")), nil)) # # The node type is not considered part of the list, only its children. # So +ast[0]+ does not refer to the type, but rather the first child # (or object). Items that are not +AstNode+ objects can be part of the # list, like Strings or Symbols representing names. To return only # the AstNode children of the node, use {#children}. class AstNode < Array attr_accessor :docstring_hash_flag attr_accessor :docstring, :docstring_range, :source # @deprecated Groups are now defined by directives # @see Tags::GroupDirective attr_accessor :group attr_writer :source_range, :line_range, :file, :full_source alias comments docstring alias comments_range docstring_range alias comments_hash_flag docstring_hash_flag alias to_s source # @return [Symbol] the node's unique symbolic type attr_accessor :type # @return [AstNode, nil] the node's parent or nil if it is a root node. attr_accessor :parent # @return [Range] the character range in {#full_source} represented # by the node def source_range reset_line_info unless @source_range @source_range end # @return [Range] the line range in {#full_source} represented # by the node def line_range reset_line_info unless @line_range @line_range end # @return [String] the filename the node was parsed from def file return parent.file if parent @file end # @return [String] the full source that the node was parsed from def full_source return parent.full_source if parent return @full_source if @full_source return IO.read(@file) if file && File.exist?(file) end # @return [String] the parse of {#full_source} that the node represents def source return parent.full_source[source_range] if parent full_source end # List of all known keywords # @return [Hash] KEYWORDS = { :class => true, :alias => true, :lambda => true, :do_block => true, :def => true, :defs => true, :begin => true, :rescue => true, :rescue_mod => true, :if => true, :if_mod => true, :else => true, :elsif => true, :case => true, :when => true, :next => true, :break => true, :retry => true, :redo => true, :return => true, :throw => true, :catch => true, :until => true, :until_mod => true, :while => true, :while_mod => true, :yield => true, :yield0 => true, :zsuper => true, :unless => true, :unless_mod => true, :for => true, :super => true, :return0 => true } # @group Creating an AstNode # Finds the node subclass that should be instantiated for a specific # node type # # @param [Symbol] type the node type to find a subclass for # @return [Class] a subclass of AstNode to instantiate the node with. def self.node_class_for(type) case type when :params ParameterNode when :call, :fcall, :vcall, :command, :command_call MethodCallNode when :if, :elsif, :if_mod, :unless, :unless_mod ConditionalNode when :for, :while, :while_mod, :until, :until_mod LoopNode when :def, :defs MethodDefinitionNode when :class, :sclass ClassNode when :module ModuleNode else if type.to_s =~ /_ref\Z/ ReferenceNode elsif type.to_s =~ /_literal\Z/ LiteralNode elsif KEYWORDS.has_key?(type) KeywordNode else AstNode end end end # Creates a new AST node # # @param [Symbol] type the type of node being created # @param [Array] arr the child nodes # @param [Hash] opts any extra line options # @option opts [Fixnum] :line (nil) the line the node starts on in source # @option opts [String] :char (nil) the character number the node starts on # in source # @option opts [Fixnum] :listline (nil) a special key like :line but for # list nodes # @option opts [Fixnum] :listchar (nil) a special key like :char but for # list nodes # @option opts [Boolean] :token (nil) whether the node represents a token def initialize(type, arr, opts = {}) super(arr) self.type = type self.line_range = opts[:line] self.source_range = opts[:char] @fallback_line = opts[:listline] @fallback_source = opts[:listchar] @token = true if opts[:token] end # @return [Boolean] whether the node is equal to another by checking # the list and type # @private def ==(ast) super && type == ast.type end # @group Traversing a Node # Searches through the node and all descendants and returns the # first node with a type matching any of +node_types+, otherwise # returns the original node (self). # # @example Returns the first method definition in a block of code # ast = YARD.parse_string("if true; def x; end end").ast # ast.jump(:def) # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil, # # nil), s(s(:void_stmt, ))) # @example Returns first 'def' or 'class' statement # ast = YARD.parse_string("class X; def y; end end") # ast.jump(:def, :class).first # # => # @example If the node types are not present in the AST # ast = YARD.parse("def x; end") # ast.jump(:def) # # @param [Array] node_types a set of node types to match # @return [AstNode] the matching node, if one was found # @return [self] if no node was found def jump(*node_types) traverse {|child| return(child) if node_types.include?(child.type) } self end # @return [Array] the {AstNode} children inside the node def children @children ||= select {|e| AstNode === e } end # Traverses the object and yields each node (including descendants) in order. # # @yield each descendant node in order # @yieldparam [AstNode] self, or a child/descendant node # @return [void] def traverse nodes = [self] nodes.each.with_index do |node, index| yield node nodes.insert index+1, *node.children end end # @group Node Meta Types # @return [Boolean] whether the node is a token def token? @token end # @return [Boolean] whether the node is a reference (variable, # constant name) def ref? false end # @return [Boolean] whether the node is a literal value def literal? false end # @return [Boolean] whether the node is a keyword def kw? false end # @return [Boolean] whether the node is a method call def call? false end # @return [Boolean] whether the node is a method definition def def? false end # @return [Boolean] whether the node is a if/elsif/else condition def condition? false end # @return [Boolean] whether the node is a loop def loop? false end # @return [Boolean] whether the node has a block def block? respond_to?(:block) || condition? end # @group Getting Line Information # @return [Boolean] whether the node has a {#line_range} set def has_line? @line_range ? true : false end # @return [Fixnum] the starting line number of the node def line line_range && line_range.first end # @return [String] the first line of source represented by the node. def first_line full_source.split(/\r?\n/)[line - 1].strip end # @group Printing a Node # @return [String] the first line of source the node represents def show "\t#{line}: #{first_line}" end # @return [nil] pretty prints the node def pretty_print(q) objs = self.dup + [:__last__] objs.unshift(type) if type && type != :list options = [] if @docstring options << ['docstring', docstring] end if @source_range || @line_range options << ['line', line_range] options << ['source', source_range] end objs.pop if options.size == 0 q.group(3, 's(', ')') do q.seplist(objs, nil, :each) do |v| if v == :__last__ q.seplist(options, nil, :each) do |arr| k, v2 = *arr q.group(3) do q.text k q.group(3) do q.text ': ' q.pp v2 end end end else q.pp v end end end end # @return [String] inspects the object def inspect typeinfo = type && type != :list ? ':' + type.to_s + ', ' : '' 's(' + typeinfo + map(&:inspect).join(", ") + ')' end # @group Managing node state # Resets node state in tree def unfreeze @children = nil end # @endgroup private # Resets line information # @return [void] def reset_line_info if size == 0 self.line_range = @fallback_line self.source_range = @fallback_source elsif children.size > 0 f, l = children.first, children.last self.line_range = Range.new(f.line_range.first, l.line_range.last) self.source_range = Range.new(f.source_range.first, l.source_range.last) elsif @fallback_line || @fallback_source self.line_range = @fallback_line self.source_range = @fallback_source else self.line_range = 0...0 self.source_range = 0...0 end end end class ReferenceNode < AstNode def ref?; true end def path Array.new flatten end def namespace Array.new flatten[0...-1] end end class LiteralNode < AstNode def literal?; true end end class KeywordNode < AstNode def kw?; true end end class ParameterNode < AstNode def unnamed_required_params self[0] end def unnamed_optional_params return @unnamed_optional_params if defined?(@unnamed_optional_params) params = self[1] || [] if self[-3] && self[-3][0] && self[-3][0].type == :unnamed_optional_arg params += self[-3] end @unnamed_optional_params = params.empty? ? nil : params end def named_params return @named_params if defined?(@named_params) if YARD.ruby2? && self[-3] && self[-3][0] && self[-3][0].type == :named_arg @named_params = self[-3] else @named_params = nil end end def splat_param self[2] ? self[2][0] : nil end def unnamed_end_params self[3] end def double_splat_param YARD.ruby2? ? self[-2] : nil end def block_param self[-1] ? self[-1][0] : nil end end class MethodCallNode < AstNode def call?; true end def namespace; first if index_adjust > 0 end def method_name(name_only = false) name = self[index_adjust] if name == :call nil elsif name_only && Array === name name.jump(:ident).first.to_sym else name end end def parameters(include_block_param = true) return [] if type == :vcall params = self[1 + index_adjust] return [] unless params params = call_has_paren? ? params.first : params return [] unless params include_block_param ? params : params[0...-1] end def block_param; parameters.last end def block last.type == :do_block || last.type == :brace_block ? last : nil end private def index_adjust [:call, :command_call].include?(type) ? 2 : 0 end def call_has_paren? [:fcall, :call].include?(type) end end class MethodDefinitionNode < AstNode def kw?; true end def def?; true end def namespace; first if index_adjust > 0 end def method_name(name_only = false) name = self[index_adjust] name_only ? name.jump(:ident).first.to_sym : name end def parameters(include_block_param = true) params = self[1 + index_adjust] params = params[0] if params.type == :paren include_block_param ? params : params[0...-1] end alias block last private def index_adjust type == :defs ? 2 : 0 end end class ConditionalNode < KeywordNode def condition?; true end def condition; first end def then_block; self[1] end def else_block if self[2] && !cmod? self[2].type == :elsif ? self[2] : self[2][0] end end private def cmod?; type =~ /_mod$/ end end class ClassNode < KeywordNode def class_name; first end def superclass; type == :sclass ? nil : self[1] end def block; last end end class ModuleNode < KeywordNode def module_name; first end def block; last end end class LoopNode < KeywordNode def loop?; true end def condition; type == :for ? s(self[0], self[1]) : first end def block; last end end # Represents a lone comment block in source class CommentNode < AstNode def docstring; first end def docstring=(value) end alias comments docstring def source; "" end def first_line; "" end end end end endyard-master/lib/yard/parser/ruby/legacy/000077500000000000000000000000001265676644000205545ustar00rootroot00000000000000yard-master/lib/yard/parser/ruby/legacy/ruby_lex.rb000066400000000000000000001064531265676644000227430ustar00rootroot00000000000000require "e2mmap" require "irb/slex" module YARD module Parser::Ruby::Legacy # Legacy lexical tokenizer module. module RubyToken EXPR_BEG = :EXPR_BEG EXPR_MID = :EXPR_MID EXPR_END = :EXPR_END EXPR_ARG = :EXPR_ARG EXPR_FNAME = :EXPR_FNAME EXPR_DOT = :EXPR_DOT EXPR_CLASS = :EXPR_CLASS # Represents a token in the Ruby lexer class Token # @return [Integer] the line number in the file/stream the token is # located. attr_reader :line_no # @return [Integer] the character number in the file/stream the token # is located. attr_reader :char_no # @return [String] the token text value attr_reader :text # @return [Symbol] the lexical state at the token attr_accessor :lex_state # @private NO_TEXT = "??".freeze # Creates a new Token object # @param [Integer] line_no the line number to initialize the token to # @param [Integer] char_no the char number to initialize the token to def initialize(line_no, char_no) @line_no = line_no @char_no = char_no @text = NO_TEXT end # Chainable way to sets the text attribute # # @param [String] text the new text # @return [Token] this token object def set_text(text) @text = text self end end # Represents a block class TkBlockContents < Token def text; '...' end end # Represents an end statement class TkStatementEnd < Token def text; '' end end class TkNode < Token attr :node end # Represents whitespace class TkWhitespace < Token end # Represents a Ruby identifier class TkId < Token def initialize(line_no, char_no, name) super(line_no, char_no) @name = name end attr :name end # Represents a Ruby keyword class TkKW < TkId end # Represents a Ruby value class TkVal < Token def initialize(line_no, char_no, value = nil) super(line_no, char_no) set_text(value) end end class TkOp < Token def name self.class.op_name end end class TkOPASGN < TkOp def initialize(line_no, char_no, op) super(line_no, char_no) op = TkReading2Token[op] unless op.kind_of?(Symbol) @op = op end attr :op end class TkUnknownChar < Token def initialize(line_no, char_no, id) super(line_no, char_no) @name = char_no > 255 ? '?' : char_no.chr end attr :name end class TkError < Token end # @private def set_token_position(line, char) @prev_line_no = line @prev_char_no = char end # @private def Token(token, value = nil) tk = nil case token when String, Symbol source = token.kind_of?(String) ? TkReading2Token : TkSymbol2Token if (tk = source[token]).nil? IRB.fail TkReading2TokenNoKey, token end tk = Token(tk[0], value) else if token tk = if (token.ancestors & [TkId, TkVal, TkOPASGN, TkUnknownChar]).empty? token.new(@prev_line_no, @prev_char_no) else token.new(@prev_line_no, @prev_char_no, value) end end end tk end # @private TokenDefinitions = [ [:TkCLASS, TkKW, "class", EXPR_CLASS], [:TkMODULE, TkKW, "module", EXPR_BEG], [:TkDEF, TkKW, "def", EXPR_FNAME], [:TkUNDEF, TkKW, "undef", EXPR_FNAME], [:TkBEGIN, TkKW, "begin", EXPR_BEG], [:TkRESCUE, TkKW, "rescue", EXPR_MID], [:TkENSURE, TkKW, "ensure", EXPR_BEG], [:TkEND, TkKW, "end", EXPR_END], [:TkIF, TkKW, "if", EXPR_BEG, :TkIF_MOD], [:TkUNLESS, TkKW, "unless", EXPR_BEG, :TkUNLESS_MOD], [:TkTHEN, TkKW, "then", EXPR_BEG], [:TkELSIF, TkKW, "elsif", EXPR_BEG], [:TkELSE, TkKW, "else", EXPR_BEG], [:TkCASE, TkKW, "case", EXPR_BEG], [:TkWHEN, TkKW, "when", EXPR_BEG], [:TkWHILE, TkKW, "while", EXPR_BEG, :TkWHILE_MOD], [:TkUNTIL, TkKW, "until", EXPR_BEG, :TkUNTIL_MOD], [:TkFOR, TkKW, "for", EXPR_BEG], [:TkBREAK, TkKW, "break", EXPR_END], [:TkNEXT, TkKW, "next", EXPR_END], [:TkREDO, TkKW, "redo", EXPR_END], [:TkRETRY, TkKW, "retry", EXPR_END], [:TkIN, TkKW, "in", EXPR_BEG], [:TkDO, TkKW, "do", EXPR_BEG], [:TkRETURN, TkKW, "return", EXPR_MID], [:TkYIELD, TkKW, "yield", EXPR_END], [:TkSUPER, TkKW, "super", EXPR_END], [:TkSELF, TkKW, "self", EXPR_END], [:TkNIL, TkKW, "nil", EXPR_END], [:TkTRUE, TkKW, "true", EXPR_END], [:TkFALSE, TkKW, "false", EXPR_END], [:TkAND, TkKW, "and", EXPR_BEG], [:TkOR, TkKW, "or", EXPR_BEG], [:TkNOT, TkKW, "not", EXPR_BEG], [:TkIF_MOD, TkKW], [:TkUNLESS_MOD, TkKW], [:TkWHILE_MOD, TkKW], [:TkUNTIL_MOD, TkKW], [:TkALIAS, TkKW, "alias", EXPR_FNAME], [:TkDEFINED, TkKW, "defined?", EXPR_END], [:TklBEGIN, TkKW, "BEGIN", EXPR_END], [:TklEND, TkKW, "END", EXPR_END], [:Tk__LINE__, TkKW, "__LINE__", EXPR_END], [:Tk__FILE__, TkKW, "__FILE__", EXPR_END], [:TkIDENTIFIER, TkId], [:TkFID, TkId], [:TkGVAR, TkId], [:TkIVAR, TkId], [:TkCONSTANT, TkId], [:TkINTEGER, TkVal], [:TkFLOAT, TkVal], [:TkSYMBOL, TkVal], [:TkLABEL, TkVal], [:TkSTRING, TkVal], [:TkXSTRING, TkVal], [:TkREGEXP, TkVal], [:TkCOMMENT, TkVal], [:TkDSTRING, TkNode], [:TkDXSTRING, TkNode], [:TkDREGEXP, TkNode], [:TkNTH_REF, TkId], [:TkBACK_REF, TkId], [:TkUPLUS, TkOp, "+@"], [:TkUMINUS, TkOp, "-@"], [:TkPOW, TkOp, "**"], [:TkCMP, TkOp, "<=>"], [:TkEQ, TkOp, "=="], [:TkEQQ, TkOp, "==="], [:TkNEQ, TkOp, "!="], [:TkGEQ, TkOp, ">="], [:TkLEQ, TkOp, "<="], [:TkANDOP, TkOp, "&&"], [:TkOROP, TkOp, "||"], [:TkMATCH, TkOp, "=~"], [:TkNMATCH, TkOp, "!~"], [:TkDOT2, TkOp, ".."], [:TkDOT3, TkOp, "..."], [:TkAREF, TkOp, "[]"], [:TkASET, TkOp, "[]="], [:TkLSHFT, TkOp, "<<"], [:TkRSHFT, TkOp, ">>"], [:TkCOLON2, TkOp], [:TkCOLON3, TkOp], [:OPASGN, TkOp], # +=, -= etc. # [:TkASSOC, TkOp, "=>"], [:TkQUESTION, TkOp, "?"], #? [:TkCOLON, TkOp, ":"], #: # [:TkfLPAREN], # func( # # [:TkfLBRACK], # func[ # # [:TkfLBRACE], # func{ # [:TkSTAR], # *arg [:TkAMPER], # &arg # # [:TkSYMBOL, TkId], # :SYMBOL [:TkSYMBEG, TkId], [:TkGT, TkOp, ">"], [:TkLT, TkOp, "<"], [:TkPLUS, TkOp, "+"], [:TkMINUS, TkOp, "-"], [:TkMULT, TkOp, "*"], [:TkDIV, TkOp, "/"], [:TkMOD, TkOp, "%"], [:TkBITOR, TkOp, "|"], [:TkBITXOR, TkOp, "^"], [:TkBITAND, TkOp, "&"], [:TkBITNOT, TkOp, "~"], [:TkNOTOP, TkOp, "!"], [:TkBACKQUOTE, TkOp, "`"], [:TkASSIGN, Token, "="], [:TkDOT, Token, "."], [:TkLPAREN, Token, "("], #(exp) [:TkLBRACK, Token, "["], #[arry] [:TkLBRACE, Token, "{"], #{hash} [:TkRPAREN, Token, ")"], [:TkRBRACK, Token, "]"], [:TkRBRACE, Token, "}"], [:TkCOMMA, Token, ","], [:TkSEMICOLON, Token, ";"], # [:TkRD_COMMENT, TkVal], [:TkSPACE, TkWhitespace], [:TkNL, TkWhitespace], [:TkEND_OF_SCRIPT, TkWhitespace], [:TkBACKSLASH, TkUnknownChar, "\\"], [:TkAT, TkUnknownChar, "@"], [:TkDOLLAR, TkUnknownChar, "\$"], #" ] # { reading => token_class } # { reading => [token_class, *opt] } TkReading2Token = {} TkSymbol2Token = {} # @private def RubyToken.def_token(token_n, super_token = Token, reading = nil, *opts) token_n = token_n.id2name unless token_n.kind_of?(String) if RubyToken.const_defined?(token_n) # IRB.fail AlreadyDefinedToken, token_n end token_c = Class.new super_token RubyToken.const_set token_n, token_c # token_c.inspect if reading if TkReading2Token[reading] IRB.fail TkReading2TokenDuplicateError, token_n, reading end if opts.empty? TkReading2Token[reading] = [token_c] else TkReading2Token[reading] = [token_c].concat(opts) end end TkSymbol2Token[token_n.intern] = token_c if token_c <= TkOp token_c.class_eval %{ def self.op_name; "#{reading}"; end } end end for defs in TokenDefinitions def_token(*defs) end NEWLINE_TOKEN = TkNL.new(0,0) NEWLINE_TOKEN.set_text("\n") end # Lexical analyzer for Ruby source # @private class RubyLex # Read an input stream character by character. We allow for unlimited # ungetting of characters just read. # # We simplify the implementation greatly by reading the entire input # into a buffer initially, and then simply traversing it using # pointers. # # We also have to allow for the here document diversion. This # little gem comes about when the lexer encounters a here # document. At this point we effectively need to split the input # stream into two parts: one to read the body of the here document, # the other to read the rest of the input line where the here # document was initially encountered. For example, we might have # # do_something(<<-A, <<-B) # stuff # for # A # stuff # for # B # # When the lexer encounters the <= @size ch = @content[@offset, 1] @offset += 1 @hwm = @offset if @hwm < @offset if @newline_pending @line_num += 1 @last_newline = @offset - 1 @newline_pending = false end if ch == "\n" @newline_pending = true end ch end def getc_already_read getc end def ungetc(ch) raise "unget past beginning of file" if @offset <= 0 @offset -= 1 if @content[@offset] == ?\n @newline_pending = false end end def get_read res = @content[@read_back_offset...@offset] @read_back_offset = @offset res end def peek(at) pos = @offset + at if pos >= @size nil else @content[pos, 1] end end def peek_equal(str) @content[@offset, str.length] == str end def divert_read_from(reserve) @content[@offset, 0] = reserve @size = @content.size end end # end of nested class BufferedReader extend Exception2MessageMapper def_exception(:AlreadyDefinedToken, "Already defined token(%s)") def_exception(:TkReading2TokenNoKey, "key nothing(key='%s')") def_exception(:TkSymbol2TokenNoKey, "key nothing(key='%s')") def_exception(:TkReading2TokenDuplicateError, "key duplicate(token_n='%s', key='%s')") def_exception(:SyntaxError, "%s") include RubyToken include IRB attr_reader :continue attr_reader :lex_state def RubyLex.debug? false end def initialize(content) lex_init @reader = BufferedReader.new(content) @exp_line_no = @line_no = 1 @base_char_no = 0 @indent = 0 @ltype = nil @quoted = nil @lex_state = EXPR_BEG @space_seen = false @continue = false @line = "" @skip_space = false @read_auto_clean_up = false @exception_on_syntax_error = true end attr_accessor :skip_space attr_accessor :read_auto_clean_up attr_accessor :exception_on_syntax_error attr :indent # io functions def line_no @reader.line_num end def char_no @reader.column end def get_read @reader.get_read end def getc @reader.getc end def getc_of_rests @reader.getc_already_read end def gets c = getc or return l = "" begin l.concat c unless c == "\r" break if c == "\n" end while c = getc l end def ungetc(c = nil) @reader.ungetc(c) end def peek_equal?(str) @reader.peek_equal(str) end def peek(i = 0) @reader.peek(i) end def lex catch(:eof) do until (((tk = token).kind_of?(TkNL) || tk.kind_of?(TkEND_OF_SCRIPT)) && !@continue or tk.nil?) end line = get_read if line == "" and tk.kind_of?(TkEND_OF_SCRIPT) || tk.nil? nil else line end end end def token set_token_position(line_no, char_no) catch(:eof) do begin begin tk = @OP.match(self) @space_seen = tk.kind_of?(TkSPACE) rescue SyntaxError abort if @exception_on_syntax_error tk = TkError.new(line_no, char_no) end end while @skip_space and tk.kind_of?(TkSPACE) if @read_auto_clean_up get_read end # throw :eof unless tk p tk if $DEBUG tk.lex_state = lex_state if tk tk end end ENINDENT_CLAUSE = [ "case", "class", "def", "do", "for", "if", "module", "unless", "until", "while", "begin" #, "when" ] ACCEPTS_COLON = ["if", "for", "unless", "until", "while"] DEINDENT_CLAUSE = ["end" #, "when" ] PERCENT_LTYPE = { "q" => "\'", "Q" => "\"", "x" => "\`", "r" => "/", "w" => "]", "W" => "]" } PERCENT_PAREN = { "{" => "}", "[" => "]", "<" => ">", "(" => ")" } Ltype2Token = { "\'" => TkSTRING, "\"" => TkSTRING, "\`" => TkXSTRING, "/" => TkREGEXP, "]" => TkDSTRING } Ltype2Token.default = TkSTRING DLtype2Token = { "\"" => TkDSTRING, "\`" => TkDXSTRING, "/" => TkDREGEXP, } def lex_init() @OP = SLex.new @OP.def_rules("\0", "\004", "\032") do |chars, io| Token(TkEND_OF_SCRIPT).set_text(chars) end @OP.def_rules(" ", "\t", "\f", "\r", "\13") do |chars, io| @space_seen = TRUE while (ch = getc) =~ /[ \t\f\r\13]/ chars << ch end ungetc Token(TkSPACE).set_text(chars) end @OP.def_rule("#") do |op, io| identify_comment end @OP.def_rule("=begin", proc{@prev_char_no == 0 && peek(0) =~ /\s/}) do |op, io| str = op @ltype = "=" begin line = "" begin ch = getc line << ch end until ch == "\n" str << line end until line =~ /^=end/ ungetc @ltype = nil if str =~ /\A=begin\s+rdoc/i str.sub!(/\A=begin.*\n/, '') str.sub!(/^=end.*/m, '') Token(TkCOMMENT).set_text(str) else Token(TkCOMMENT).set_text(str) end end @OP.def_rule("\n") do print "\\n\n" if RubyLex.debug? @colonblock_seen = false case @lex_state when EXPR_BEG, EXPR_FNAME, EXPR_DOT @continue = TRUE else @continue = FALSE @lex_state = EXPR_BEG end Token(TkNL).set_text("\n") end @OP.def_rules("*", "**", "!", "!=", "!~", "=", "==", "===", "=~", "<=>", "<", "<=", ">", ">=", ">>") do |op, io| @lex_state = EXPR_BEG Token(op).set_text(op) end @OP.def_rules("<<") do |op, io| tk = nil if @lex_state != EXPR_END && @lex_state != EXPR_CLASS && (@lex_state != EXPR_ARG || @space_seen) c = peek(0) tk = identify_here_document if /[-\w_\"\'\`]/ =~ c end if !tk @lex_state = EXPR_BEG tk = Token(op).set_text(op) end tk end @OP.def_rules("'", '"') do |op, io| identify_string(op) end @OP.def_rules("`") do |op, io| if @lex_state == EXPR_FNAME Token(op).set_text(op) else identify_string(op) end end @OP.def_rules('?') do |op, io| if @lex_state == EXPR_END @lex_state = EXPR_BEG Token(TkQUESTION).set_text(op) else ch = getc if @lex_state == EXPR_ARG && ch !~ /\s/ ungetc @lex_state = EXPR_BEG Token(TkQUESTION).set_text(op) else str = op str << ch if (ch == '\\') #' str << read_escape end @lex_state = EXPR_END Token(TkINTEGER).set_text(str) end end end @OP.def_rules("&", "&&", "|", "||") do |op, io| @lex_state = EXPR_BEG Token(op).set_text(op) end @OP.def_rules("+=", "-=", "*=", "**=", "&=", "|=", "^=", "<<=", ">>=", "||=", "&&=") do |op, io| @lex_state = EXPR_BEG op =~ /^(.*)=$/ Token(TkOPASGN, $1).set_text(op) end @OP.def_rule("+@", proc{@lex_state == EXPR_FNAME}) do |op, io| Token(TkUPLUS).set_text(op) end @OP.def_rule("-@", proc{@lex_state == EXPR_FNAME}) do |op, io| Token(TkUMINUS).set_text(op) end @OP.def_rules("+", "-") do |op, io| catch(:RET) do if @lex_state == EXPR_ARG if @space_seen and peek(0) =~ /[0-9]/ throw :RET, identify_number(op) else @lex_state = EXPR_BEG end elsif @lex_state != EXPR_END and peek(0) =~ /[0-9]/ throw :RET, identify_number(op) else @lex_state = EXPR_BEG end Token(op).set_text(op) end end @OP.def_rule(".") do @lex_state = EXPR_BEG if peek(0) =~ /[0-9]/ ungetc identify_number("") else # for obj.if @lex_state = EXPR_DOT Token(TkDOT).set_text(".") end end @OP.def_rules("..", "...") do |op, io| @lex_state = EXPR_BEG Token(op).set_text(op) end lex_int2 end def lex_int2 @OP.def_rules("]", "}", ")") do |op, io| @lex_state = EXPR_END @indent -= 1 Token(op).set_text(op) end @OP.def_rule(":") do if (@colonblock_seen && @lex_state != EXPR_BEG) || peek(0) =~ /\s/ @lex_state = EXPR_BEG tk = Token(TkCOLON) else @lex_state = EXPR_FNAME tk = Token(TkSYMBEG) end tk.set_text(":") end @OP.def_rule("::") do # p @lex_state.id2name, @space_seen if @lex_state == EXPR_BEG or @lex_state == EXPR_ARG && @space_seen @lex_state = EXPR_BEG tk = Token(TkCOLON3) else @lex_state = EXPR_DOT tk = Token(TkCOLON2) end tk.set_text("::") end @OP.def_rule("/") do |op, io| if @lex_state == EXPR_BEG || @lex_state == EXPR_MID identify_string(op) elsif peek(0) == '=' getc @lex_state = EXPR_BEG Token(TkOPASGN, :/).set_text("/=") #") elsif @lex_state == EXPR_ARG and @space_seen and peek(0) !~ /\s/ identify_string(op) else @lex_state = EXPR_BEG Token("/").set_text(op) end end @OP.def_rules("^") do @lex_state = EXPR_BEG Token("^").set_text("^") end # @OP.def_rules("^=") do # @lex_state = EXPR_BEG # Token(TkOPASGN, :^) # end @OP.def_rules(",", ";") do |op, io| @colonblock_seen = false @lex_state = EXPR_BEG Token(op).set_text(op) end @OP.def_rule("~") do @lex_state = EXPR_BEG Token("~").set_text("~") end @OP.def_rule("~@", proc{@lex_state = EXPR_FNAME}) do @lex_state = EXPR_BEG Token("~").set_text("~@") end @OP.def_rule("(") do @indent += 1 # if @lex_state == EXPR_BEG || @lex_state == EXPR_MID # @lex_state = EXPR_BEG # tk = Token(TkfLPAREN) # else @lex_state = EXPR_BEG tk = Token(TkLPAREN) # end tk.set_text("(") end @OP.def_rule("[]", proc{@lex_state == EXPR_FNAME}) do Token("[]").set_text("[]") end @OP.def_rule("[]=", proc{@lex_state == EXPR_FNAME}) do Token("[]=").set_text("[]=") end @OP.def_rule("[") do @indent += 1 # if @lex_state == EXPR_FNAME # t = Token(TkfLBRACK) # else # if @lex_state == EXPR_BEG || @lex_state == EXPR_MID # t = Token(TkLBRACK) # elsif @lex_state == EXPR_ARG && @space_seen # else # t = Token(TkfLBRACK) # end # end t = Token(TkLBRACK) @lex_state = EXPR_BEG t.set_text("[") end @OP.def_rule("{") do @indent += 1 # if @lex_state != EXPR_END && @lex_state != EXPR_ARG # t = Token(TkLBRACE) # else # t = Token(TkfLBRACE) # end t = Token(TkLBRACE) @lex_state = EXPR_BEG t.set_text("{") end @OP.def_rule('\\') do #' if getc == "\n" @space_seen = true @continue = true Token(TkSPACE).set_text("\\\n") else ungetc Token("\\").set_text("\\") #" end end @OP.def_rule('%') do |op, io| if @lex_state == EXPR_BEG || @lex_state == EXPR_MID identify_quotation('%') elsif peek(0) == '=' getc Token(TkOPASGN, "%").set_text("%=") elsif @lex_state == EXPR_ARG and @space_seen and peek(0) !~ /\s/ identify_quotation('%') else @lex_state = EXPR_BEG Token("%").set_text("%") end end @OP.def_rule('$') do #' identify_gvar end @OP.def_rule('@') do if peek(0) =~ /[@\w_]/ ungetc identify_identifier else Token("@").set_text("@") end end # @OP.def_rule("def", proc{|op, io| /\s/ =~ io.peek(0)}) do # |op, io| # @indent += 1 # @lex_state = EXPR_FNAME # # @lex_state = EXPR_END # # until @rests[0] == "\n" or @rests[0] == ";" # # rests.shift # # end # end @OP.def_rule("__END__", proc{@prev_char_no == 0 && peek(0) =~ /[\r\n]/}) do throw :eof end @OP.def_rule("") do |op, io| printf "MATCH: start %s: %s\n", op, io.inspect if RubyLex.debug? if peek(0) =~ /[0-9]/ t = identify_number("") elsif peek(0) =~ /[\w_]/ t = identify_identifier end printf "MATCH: end %s: %s\n", op, io.inspect if RubyLex.debug? t end p @OP if RubyLex.debug? end def identify_gvar @lex_state = EXPR_END str = "$" tk = case ch = getc when /[~_*$?!@\/\\;,=:<>".]/ #" str << ch Token(TkGVAR, str) when "-" str << "-" << getc Token(TkGVAR, str) when "&", "`", "'", "+" str << ch Token(TkBACK_REF, str) when /[1-9]/ str << ch while (ch = getc) =~ /[0-9]/ str << ch end ungetc Token(TkNTH_REF) when /\w/ ungetc ungetc return identify_identifier else ungetc Token("$") end tk.set_text(str) end def identify_identifier token = "" token.concat getc if peek(0) =~ /[$@]/ token.concat getc if peek(0) == "@" while (ch = getc) =~ /\w|_/ print ":", ch, ":" if RubyLex.debug? token.concat ch end ungetc if ch == "!" or ch == "?" token.concat getc end # fix token # $stderr.puts "identifier - #{token}, state = #@lex_state" case token when /^\$/ return Token(TkGVAR, token).set_text(token) when /^\@/ @lex_state = EXPR_END return Token(TkIVAR, token).set_text(token) end if @lex_state != EXPR_DOT print token, "\n" if RubyLex.debug? token_c, *trans = TkReading2Token[token] if token_c # reserved word? if (@lex_state != EXPR_BEG && @lex_state != EXPR_FNAME && trans[1]) # modifiers token_c = TkSymbol2Token[trans[1]] @lex_state = trans[0] else if @lex_state != EXPR_FNAME if ENINDENT_CLAUSE.include?(token) @indent += 1 if ACCEPTS_COLON.include?(token) @colonblock_seen = true else @colonblock_seen = false end elsif DEINDENT_CLAUSE.include?(token) @indent -= 1 @colonblock_seen = false end @lex_state = trans[0] else @lex_state = EXPR_END end end return Token(token_c, token).set_text(token) end end if @lex_state == EXPR_FNAME @lex_state = EXPR_END if peek(0) == '=' token.concat getc end elsif @lex_state == EXPR_BEG || @lex_state == EXPR_DOT @lex_state = EXPR_ARG else @lex_state = EXPR_END end if token[0, 1] =~ /[A-Z]/ return Token(TkCONSTANT, token).set_text(token) elsif token[token.size - 1, 1] =~ /[!?]/ return Token(TkFID, token).set_text(token) else return Token(TkIDENTIFIER, token).set_text(token) end end def identify_here_document ch = getc if ch == "-" ch = getc indent = true end if /['"`]/ =~ ch # ' lt = ch quoted = "" while (c = getc) && c != lt quoted.concat c end else lt = '"' quoted = ch.dup while (c = getc) && c =~ /\w/ quoted.concat c end ungetc end ltback, @ltype = @ltype, lt reserve = "" while ch = getc reserve << ch if ch == "\\" #" ch = getc reserve << ch elsif ch == "\n" break end end str = "" while (l = gets) l.chomp! l.strip! if indent break if l == quoted str << l.chomp << "\n" end @reader.divert_read_from(reserve) @ltype = ltback @lex_state = EXPR_END Token(Ltype2Token[lt], str).set_text(str.dump) end def identify_quotation(initial_char) ch = getc if lt = PERCENT_LTYPE[ch] initial_char += ch ch = getc elsif ch =~ /\W/ lt = "\"" else # RubyLex.fail SyntaxError, "unknown type of %string ('#{ch}')" end # if ch !~ /\W/ # ungetc # next # end # @ltype = lt @quoted = ch unless @quoted = PERCENT_PAREN[ch] identify_string(lt, @quoted, ch, initial_char) if lt end def identify_number(start) str = start.dup if start == "+" or start == "-" or start == "" start = getc str << start end @lex_state = EXPR_END if start == "0" if peek(0) == "x" ch = getc str << ch match = /[0-9a-f_]/ else match = /[0-7_]/ end while ch = getc if ch !~ match ungetc break else str << ch end end return Token(TkINTEGER).set_text(str) end type = TkINTEGER allow_point = TRUE allow_e = TRUE while ch = getc case ch when /[0-9_]/ str << ch when allow_point && "." type = TkFLOAT if peek(0) !~ /[0-9]/ ungetc break end str << ch allow_point = false when allow_e && "e", allow_e && "E" str << ch type = TkFLOAT if peek(0) =~ /[+-]/ str << getc end allow_e = false allow_point = false else ungetc break end end Token(type).set_text(str) end def identify_string(ltype, quoted = ltype, opener=nil, initial_char = nil) @ltype = ltype @quoted = quoted subtype = nil str = "" str << initial_char if initial_char str << (opener||quoted) nest = 0 begin while ch = getc str << ch if @quoted == ch if nest == 0 break else nest -= 1 end elsif opener == ch nest += 1 elsif @ltype != "'" && @ltype != "]" and ch == "#" ch = getc if ch == "{" subtype = true str << ch << skip_inner_expression else ungetc(ch) end elsif ch == '\\' #' str << read_escape end end if @ltype == "/" if peek(0) =~ /i|o|n|e|s/ str << getc end end if subtype Token(DLtype2Token[ltype], str) else Token(Ltype2Token[ltype], str) end.set_text(str) ensure @ltype = nil @quoted = nil @lex_state = EXPR_END end end def skip_inner_expression res = "" nest = 0 while (ch = getc) res << ch if ch == '}' break if nest.zero? nest -= 1 elsif ch == '{' nest += 1 end end res end def identify_comment @ltype = "#" comment = "#" while ch = getc if ch == "\\" ch = getc if ch == "\n" ch = " " else comment << "\\" end else if ch == "\n" @ltype = nil ungetc break end end comment << ch end return Token(TkCOMMENT).set_text(comment) end def read_escape res = "" case ch = getc when /[0-7]/ ungetc ch 3.times do case ch = getc when /[0-7]/ when nil break else ungetc break end res << ch end when "x" res << ch 2.times do case ch = getc when /[0-9a-fA-F]/ when nil break else ungetc break end res << ch end when "M" res << ch if (ch = getc) != '-' ungetc else res << ch if (ch = getc) == "\\" #" res << ch res << read_escape else res << ch end end when "C", "c" #, "^" res << ch if ch == "C" and (ch = getc) != "-" ungetc else res << ch if (ch = getc) == "\\" #" res << ch res << read_escape else res << ch end end else res << ch end res end end end end yard-master/lib/yard/parser/ruby/legacy/ruby_parser.rb000066400000000000000000000011741265676644000234410ustar00rootroot00000000000000module YARD module Parser module Ruby module Legacy # Legacy Ruby parser # @since 0.5.6 class RubyParser < Parser::Base def initialize(source, filename) @source = source end def parse @parse ||= StatementList.new(@source) self end def tokenize @tokenize ||= TokenList.new(@source) end def enumerator @parse end def encoding_line; @parse.encoding_line end def shebang_line; @parse.shebang_line end end end end end endyard-master/lib/yard/parser/ruby/legacy/statement.rb000066400000000000000000000030011265676644000230770ustar00rootroot00000000000000module YARD module Parser::Ruby::Legacy class Statement attr_reader :tokens, :comments, :block attr_accessor :comments_range # @deprecated Groups are now defined by directives # @see Tags::GroupDirective attr_accessor :group attr_accessor :comments_hash_flag def initialize(tokens, block = nil, comments = nil) @tokens = tokens @block = block @comments = comments @comments_hash_flag = false end def first_line to_s.split(/\n/)[0] end def to_s(include_block = true) tokens.map do |token| RubyToken::TkBlockContents === token ? (include_block ? block.to_s : '') : token.text end.join end alias source to_s def inspect l = line - 1 to_s(false).split(/\n/).map do |text| "\t#{l += 1}: #{text}" end.join("\n") end def show "\t#{line}: #{first_line}" end # @return [Fixnum] the first line of Ruby source def line tokens.first.line_no end # @return [Range] the first to last lines of Ruby source # @since 0.5.4 def line_range tokens.first.line_no..tokens.last.line_no end private def clean_tokens(tokens) last_tk = nil tokens.reject do |tk| tk.is_a?(RubyToken::TkNL) || (last_tk.is_a?(RubyToken::TkSPACE) && last_tk.class == tk.class) && last_tk = tk end end end end endyard-master/lib/yard/parser/ruby/legacy/statement_list.rb000066400000000000000000000312221265676644000241400ustar00rootroot00000000000000module YARD module Parser::Ruby::Legacy class StatementList < Array include RubyToken attr_accessor :shebang_line, :encoding_line # The following list of tokens will require a block to be opened # if used at the beginning of a statement. OPEN_BLOCK_TOKENS = [TkCLASS, TkDEF, TkMODULE, TkUNTIL, TkIF, TkELSIF, TkUNLESS, TkWHILE, TkFOR, TkCASE] # Creates a new statement list # # @param [TokenList, String] content the tokens to create the list from def initialize(content) @shebang_line = nil @encoding_line = nil if content.is_a? TokenList @tokens = content.dup elsif content.is_a? String @tokens = TokenList.new(content.gsub("\r", "")) else raise ArgumentError, "Invalid content for StatementList: #{content.inspect}:#{content.class}" end parse_statements end private def parse_statements while stmt = next_statement do self << stmt end end # Returns the next statement in the token stream # # @return [Statement] the next statement def next_statement @state = :first_statement @statement_stack = [] @level = 0 @block_num = 0 @done = false @current_block = nil @comments_line = nil @comments_hash_flag = nil @statement, @block, @comments = TokenList.new, nil, nil @last_tk, @last_ns_tk, @before_last_tk, @before_last_ns_tk = nil, nil, nil, nil @first_line = nil while !@done && tk = @tokens.shift process_token(tk) @before_last_tk = @last_tk @last_tk = tk # Save last token unless [TkSPACE, TkNL, TkEND_OF_SCRIPT].include? tk.class @before_last_ns_tk = @last_ns_tk @last_ns_tk = tk end end # Return the code block with starting token and initial comments # If there is no code in the block, return nil @comments = @comments.compact if @comments if @block || !@statement.empty? sanitize_statement_end sanitize_block @statement.pop if [TkNL, TkSPACE, TkSEMICOLON].include?(@statement.last.class) stmt = Statement.new(@statement, @block, @comments) if @comments && @comments_line stmt.comments_range = (@comments_line..(@comments_line + @comments.size - 1)) stmt.comments_hash_flag = @comments_hash_flag end stmt elsif @comments @statement << TkCOMMENT.new(@comments_line, 0) @statement.first.set_text("# " + @comments.join("\n# ")) Statement.new(@statement, nil, @comments) else nil end end def sanitize_statement_end extra = [] (@statement.size - 1).downto(0) do |index| token = @statement[index] if TkStatementEnd === token while [TkNL, TkSPACE, TkSEMICOLON].include?(@statement[index - 1].class) extra.unshift(@statement.delete_at(index - 1)) index -= 1 end @statement.insert(index + 1, *extra) return end end end def sanitize_block return unless @block extra = [] while [TkSPACE, TkNL, TkSEMICOLON].include?(@block.last.class) next(@block.pop) if TkSEMICOLON === @block.last extra.unshift(@block.pop) end @statement.each_with_index do |token, index| if TkBlockContents === token @statement[index, 1] = [token, *extra] return end end end # Processes a single token # # @param [RubyToken::Token] tk the token to process def process_token(tk) # p tk.class, tk.text, @state, @level, @current_block, "
    " case @state when :first_statement return if process_initial_comment(tk) return if @statement.empty? && [TkSPACE, TkNL, TkCOMMENT].include?(tk.class) @comments_last_line = nil if @statement.empty? && tk.class == TkALIAS @state = :alias_statement @alias_values = [] push_token(tk) return end return if process_simple_block_opener(tk) push_token(tk) return if process_complex_block_opener(tk) if balances?(tk) process_statement_end(tk) else @state = :balance end when :alias_statement push_token(tk) @alias_values << tk unless [TkSPACE, TkNL, TkCOMMENT].include?(tk.class) if @alias_values.size == 2 @state = :first_statement if [NilClass, TkNL, TkEND_OF_SCRIPT, TkSEMICOLON].include?(peek_no_space.class) @done = true end end when :balance @statement << tk return unless balances?(tk) @state = :first_statement process_statement_end(tk) when :block_statement push_token(tk) return unless balances?(tk) process_statement_end(tk) when :pre_block @current_block = nil process_block_token(tk) unless tk.class == TkSEMICOLON @state = :block when :block process_block_token(tk) when :post_block if tk.class == TkSPACE @statement << tk return end process_statement_end(tk) @state = :block end if @first_line == tk.line_no && !@statement.empty? && TkCOMMENT === tk process_initial_comment(tk) end end # Processes a token in a block # # @param [RubyToken::Token] tk the token to process def process_block_token(tk) if balances?(tk) @statement << tk @state = :first_statement process_statement_end(tk) elsif @block_num > 1 || (@block.empty? && [TkSPACE, TkNL].include?(tk.class)) @statement << tk else if @block.empty? @statement << TkBlockContents.new(tk.line_no, tk.char_no) end @block << tk end end # Processes a comment token that comes before a statement # # @param [RubyToken::Token] tk the token to process # @return [Boolean] whether or not +tk+ was processed as an initial comment def process_initial_comment(tk) if @statement.empty? && (@comments_last_line || 0) < tk.line_no - 2 @comments = nil end return unless tk.class == TkCOMMENT case tk.text when Parser::SourceParser::SHEBANG_LINE if !@last_ns_tk && !@encoding_line @shebang_line = tk.text return end when Parser::SourceParser::ENCODING_LINE if (@last_ns_tk.class == TkCOMMENT && @last_ns_tk.text == @shebang_line) || !@last_ns_tk @encoding_line = tk.text return end end return if !@statement.empty? && @comments return if @first_line && tk.line_no > @first_line if @comments_last_line && @comments_last_line < tk.line_no - 1 if @comments && @statement.empty? @tokens.unshift(tk) return @done = true end @comments = nil end @comments_line = tk.line_no unless @comments # Remove the "#" and up to 1 space before the text # Since, of course, the convention is to have "# text" # and not "#text", which I deem ugly (you heard it here first) @comments ||= [] if tk.text =~ /\A=begin/ lines = tk.text.count("\n") @comments += tk.text.gsub(/\A=begin.*\r?\n|\r?\n=end.*\r?\n?\Z/, '').split(/\r?\n/) @comments_last_line = tk.line_no + lines else @comments << tk.text.gsub(/^(#+)\s{0,1}/, '') @comments_hash_flag = $1 == '##' if @comments_hash_flag == nil @comments_last_line = tk.line_no end @comments.pop if @comments.size == 1 && @comments.first =~ /^\s*$/ true end # Processes a simple block-opening token; # that is, a block opener such as +begin+ or +do+ # that isn't followed by an expression # # @param [RubyToken::Token] tk the token to process def process_simple_block_opener(tk) return unless [TkLBRACE, TkDO, TkBEGIN, TkELSE].include?(tk.class) && # Make sure hashes are parsed as hashes, not as blocks (@last_ns_tk.nil? || @last_ns_tk.lex_state != EXPR_BEG) @level += 1 @state = :block @block_num += 1 unless @block @block = TokenList.new tokens = [tk, TkStatementEnd.new(tk.line_no, tk.char_no)] tokens = tokens.reverse if TkBEGIN === tk.class @statement.push(*tokens) else @statement << tk end true end # Processes a complex block-opening token; # that is, a block opener such as +while+ or +for+ # that is followed by an expression # # @param [RubyToken::Token] tk the token to process def process_complex_block_opener(tk) return unless OPEN_BLOCK_TOKENS.include?(tk.class) @current_block = tk.class @state = :block_statement true end # Processes a token that closes a statement # # @param [RubyToken::Token] tk the token to process def process_statement_end(tk) # Whitespace means that we keep the same value of @new_statement as last token return if tk.class == TkSPACE return unless # We might be coming after a statement-ending token... ((@last_tk && [TkSEMICOLON, TkNL, TkEND_OF_SCRIPT].include?(tk.class)) || # Or we might be at the beginning of an argument list (@current_block == TkDEF && tk.class == TkRPAREN)) # Continue line ending on . or :: return if @last_tk && [EXPR_DOT].include?(@last_tk.lex_state) # Continue a possible existing new statement unless we just finished an expression... return unless (@last_tk && [EXPR_END, EXPR_ARG].include?(@last_tk.lex_state)) || # Or we've opened a block and are ready to move into the body (@current_block && [TkNL, TkSEMICOLON].include?(tk.class) && # Handle the case where the block statement's expression is on the next line # # while # foo # end @last_ns_tk.class != @current_block && # And the case where part of the expression is on the next line # # while foo || # bar # end @last_tk.lex_state != EXPR_BEG) # Continue with the statement if we've hit a comma in a def return if @current_block == TkDEF && peek_no_space.class == TkCOMMA if [TkEND_OF_SCRIPT, TkNL, TkSEMICOLON].include?(tk.class) && @state == :block_statement && [TkRBRACE, TkEND].include?(@last_ns_tk.class) && @level == 0 @current_block = nil end unless @current_block @done = true return end @state = :pre_block @level += 1 @block_num += 1 unless @block @block = TokenList.new @statement << TkStatementEnd.new(tk.line_no, tk.char_no) end end # Handles the balancing of parentheses and blocks # # @param [RubyToken::Token] tk the token to process # @return [Boolean] whether or not the current statement's parentheses and blocks # are balanced after +tk+ def balances?(tk) unless [TkALIAS, TkDEF].include?(@last_ns_tk.class) || @before_last_ns_tk.class == TkALIAS if [TkLPAREN, TkLBRACK, TkLBRACE, TkDO, TkBEGIN].include?(tk.class) @level += 1 elsif OPEN_BLOCK_TOKENS.include?(tk.class) @level += 1 unless tk.class == TkELSIF elsif [TkRPAREN, TkRBRACK, TkRBRACE, TkEND].include?(tk.class) && @level > 0 @level -= 1 end end @level == 0 end # Adds a token to the current statement, # unless it's a newline, semicolon, or comment # # @param [RubyToken::Token] tk the token to process def push_token(tk) @first_line = tk.line_no if @statement.empty? @statement << tk unless @level == 0 && [TkCOMMENT].include?(tk.class) end # Returns the next token in the stream that's not a space # # @return [RubyToken::Token] the next non-space token def peek_no_space return @tokens.first unless @tokens.first.class == TkSPACE return @tokens[1] end end end end yard-master/lib/yard/parser/ruby/legacy/token_list.rb000066400000000000000000000036721265676644000232640ustar00rootroot00000000000000module YARD module Parser::Ruby::Legacy class TokenList < Array include RubyToken def initialize(content = nil) self << content if content end def to_s(full_statement = false, show_block = true) inject([]) do |acc, token| break acc if !full_statement && TkStatementEnd === token if !show_block && TkBlockContents === token acc << "" else acc << token.text end acc end.join end # @param [TokenList, Token, String] tokens # A list of tokens. If the token is a string, it # is parsed with {RubyLex}. def push(*tokens) tokens.each do |tok| if tok.is_a?(TokenList) || tok.is_a?(Array) concat tok elsif tok.is_a?(Token) super tok elsif tok.is_a?(String) parse_content(tok) else raise ArgumentError, "Expecting token, list of tokens or string of code to be tokenized. Got #{tok.class}" end end self end alias_method :<<, :push def squeeze(type = TkSPACE) last = nil TokenList.new(map {|t| x = t.is_a?(type) && last.is_a?(type) ? nil : t; last = t; x }) end private def parse_content(content) lex = RubyLex.new(content) while tk = lex.token do self << convert_token(lex, tk) end end def convert_token(lex, tk) if TkIDENTIFIER === tk && lex.peek == ':' next_tk = lex.token sym = TkLABEL.new(tk.line_no, tk.char_no, nil) sym.lex_state = lex.lex_state sym.set_text(tk.text + next_tk.text) elsif TkSYMBEG === tk && next_tk = lex.token sym = TkSYMBOL.new(tk.line_no, tk.char_no, nil) sym.lex_state = lex.lex_state sym.set_text(tk.text + next_tk.text) else tk end end end end endyard-master/lib/yard/parser/ruby/ruby_parser.rb000066400000000000000000000512421265676644000221760ustar00rootroot00000000000000begin require 'ripper'; rescue LoadError; end module YARD module Parser module Ruby # Ruby 1.9 parser # @!attribute [r] encoding_line # @!attribute [r] shebang_line # @!attribute [r] enumerator class RubyParser < Parser::Base def initialize(source, filename) @parser = RipperParser.new(source, filename) end def parse; @parser.parse end def tokenize; @parser.tokens end def enumerator; @parser.enumerator end def shebang_line; @parser.shebang_line end def encoding_line; @parser.encoding_line end end # Internal parser class # @since 0.5.6 class RipperParser < Ripper attr_reader :ast, :charno, :comments, :file, :tokens attr_reader :shebang_line, :encoding_line alias root ast def initialize(source, filename, *args) super @last_ns_token = nil @file = filename @source = source @tokens = [] @comments = {} @comments_range = {} @comments_flags = {} @heredoc_tokens = nil @heredoc_state = nil @map = {} @ns_charno = 0 @list = [] @charno = 0 @shebang_line = nil @encoding_line = nil @file_encoding = nil end def parse @ast = super @ast.full_source = @source @ast.file = @file freeze_tree insert_comments self end def enumerator ast.children end def file_encoding return nil unless defined?(::Encoding) return @file_encoding if @file_encoding return Encoding.default_internal unless @encoding_line if match = @encoding_line.match(SourceParser::ENCODING_LINE) @file_encoding = match.captures.last end end private MAPPINGS = { :BEGIN => "BEGIN", :END => "END", :alias => "alias", :array => :lbracket, :arg_paren => :lparen, :begin => "begin", :blockarg => "&", :brace_block => :lbrace, :break => "break", :case => "case", :class => "class", :def => "def", :defined => "defined?", :defs => "def", :do_block => "do", :else => "else", :elsif => "elsif", :ensure => "ensure", :for => "for", :hash => :lbrace, :if => "if", :lambda => [:tlambda, "lambda"], :module => "module", :next => "next", :paren => :lparen, :qwords_literal => :qwords_beg, :redo => "redo", :regexp_literal => :regexp_beg, :rescue => "rescue", :rest_param => "*", :retry => "retry", :return => "return", :return0 => "return", :sclass => "class", :string_embexpr => :embexpr_beg, :string_literal => [:tstring_beg, :heredoc_beg], :super => "super", :symbol => :symbeg, :top_const_ref => "::", :undef => "undef", :unless => "unless", :until => "until", :when => "when", :while => "while", :xstring_literal => :backtick, :yield => "yield", :yield0 => "yield", :zsuper => "super" } REV_MAPPINGS = {} AST_TOKENS = [:CHAR, :backref, :const, :cvar, :gvar, :heredoc_end, :ident, :int, :float, :ivar, :label, :period, :regexp_end, :tstring_content, :backtick] MAPPINGS.each do |k, v| if Array === v v.each {|_v| (REV_MAPPINGS[_v] ||= []) << k } else (REV_MAPPINGS[v] ||= []) << k end end PARSER_EVENT_TABLE.each do |event, arity| node_class = AstNode.node_class_for(event) if /_new\z/ =~ event.to_s and arity == 0 module_eval(<<-eof, __FILE__, __LINE__ + 1) def on_#{event}(*args) #{node_class}.new(:list, args, :listchar => charno...charno, :listline => lineno..lineno) end eof elsif /_add(_.+)?\z/ =~ event.to_s module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{event}; rescue NameError; end def on_#{event}(list, item) list.push(item) list end eof elsif MAPPINGS.has_key?(event) module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{event}; rescue NameError; end def on_#{event}(*args) visit_event #{node_class}.new(:#{event}, args) end eof else module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{event}; rescue NameError; end def on_#{event}(*args) #{node_class}.new(:#{event}, args, :listline => lineno..lineno, :listchar => charno...charno) end eof end end SCANNER_EVENTS.each do |event| ast_token = AST_TOKENS.include?(event) module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{event}; rescue NameError; end def on_#{event}(tok) visit_ns_token(:#{event}, tok, #{ast_token.inspect}) end eof end REV_MAPPINGS.select {|k,v| k.is_a?(Symbol) }.each do |pair| event, value = *pair ast_token = AST_TOKENS.include?(event) module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{event}; rescue NameError; end def on_#{event}(tok) (@map[:#{event}] ||= []) << [lineno, charno] visit_ns_token(:#{event}, tok, #{ast_token.inspect}) end eof end [:kw, :op].each do |event| module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{event}; rescue NameError; end def on_#{event}(tok) unless @last_ns_token == [:kw, "def"] || (@tokens.last && @tokens.last[0] == :symbeg) (@map[tok] ||= []) << [lineno, charno] end visit_ns_token(:#{event}, tok, true) end eof end [:sp, :nl, :ignored_nl].each do |event| module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{event}; rescue NameError; end def on_#{event}(tok) add_token(:#{event}, tok) @charno += tok.length end eof end def visit_event(node) map = @map[MAPPINGS[node.type]] lstart, sstart = *(map ? map.pop : [lineno, @ns_charno - 1]) node.source_range = Range.new(sstart, @ns_charno - 1) node.line_range = Range.new(lstart, lineno) if node.respond_to?(:block) sr, lr = node.block.source_range, node.block.line_range node.block.source_range = Range.new(sr.first, @tokens.last[2][1]) node.block.line_range = Range.new(lr.first, @tokens.last[2][0]) end node end def visit_event_arr(node) mapping = MAPPINGS[node.type].find {|k| @map[k] && !@map[k].empty? } lstart, sstart = *@map[mapping].pop node.source_range = Range.new(sstart, @ns_charno - 1) node.line_range = Range.new(lstart, lineno) node end def visit_ns_token(token, data, ast_token = false) add_token(token, data) ch = charno @last_ns_token = [token, data] @charno += data.length @ns_charno = charno if ast_token AstNode.new(token, [data], :line => lineno..lineno, :char => ch..charno-1, :token => true) end end def add_token(token, data) if @tokens.last && @tokens.last[0] == :symbeg @tokens[-1] = [:symbol, ":" + data, @tokens.last[2]] elsif @heredoc_state == :started @heredoc_tokens << [token, data, [lineno, charno]] # fix ripper encoding of heredoc bug # (see http://bugs.ruby-lang.org/issues/6200) data.force_encoding(file_encoding) if file_encoding @heredoc_state = :ended if token == :heredoc_end elsif (token == :nl || token == :comment) && @heredoc_state == :ended @heredoc_tokens.unshift([token, data, [lineno, charno]]) @tokens += @heredoc_tokens @heredoc_tokens = nil @heredoc_state = nil else @tokens << [token, data, [lineno, charno]] if token == :heredoc_beg @heredoc_state = :started @heredoc_tokens = [] end end end undef on_program undef on_assoc_new undef on_array undef on_hash undef on_bare_assoc_hash undef on_assoclist_from_args undef on_aref undef on_aref_field undef on_lbracket undef on_rbracket undef on_qwords_new undef on_qwords_add undef on_string_literal undef on_lambda undef on_unary undef on_string_content undef on_rescue undef on_void_stmt undef on_params undef on_label undef on_comment undef on_embdoc_beg undef on_embdoc undef on_embdoc_end undef on_parse_error undef on_bodystmt undef on_top_const_ref undef on_const_path_ref def on_program(*args) args.first end def on_body_stmt(*args) args.compact.size == 1 ? args.first : AstNode.new(:list, args) end alias on_bodystmt on_body_stmt def on_assoc_new(*args) AstNode.new(:assoc, args) end def on_hash(*args) visit_event AstNode.new(:hash, args.first || []) end def on_bare_assoc_hash(*args) AstNode.new(:list, args.first) end def on_assoclist_from_args(*args) args.first end def on_unary(op, val) map = @map[op.to_s[0,1]] lstart, sstart = *(map ? map.pop : [lineno, @ns_charno - 1]) node = AstNode.node_class_for(:unary).new(:unary, [op, val]) node.source_range = Range.new(sstart, @ns_charno - 1) node.line_range = Range.new(lstart, lineno) node end def on_aref(*args) @map[:lbracket].pop ll, lc = *@map[:aref].pop sr = args.first.source_range.first..lc lr = args.first.line_range.first..ll AstNode.new(:aref, args, :char => sr, :line => lr) end def on_aref_field(*args) @map[:lbracket].pop AstNode.new(:aref_field, args, :listline => lineno..lineno, :listchar => charno...charno) end def on_array(other) node = AstNode.node_class_for(:array).new(:array, [other]) map = @map[MAPPINGS[node.type]] if map && !map.empty? lstart, sstart = *map.pop node.source_range = Range.new(sstart, @ns_charno - 1) node.line_range = Range.new(lstart, lineno) else sstart = other.source_range.begin lstart = other.line_range.begin node.source_range = Range.new(sstart, @ns_charno - 1) node.line_range = Range.new(lstart, lineno) node.source_range = other.source_range node.line_range = other.line_range end node end def on_lbracket(tok) (@map[:lbracket] ||= []) << [lineno, charno] visit_ns_token(:lbracket, tok, false) end def on_rbracket(tok) (@map[:aref] ||= []) << [lineno, charno] visit_ns_token(:rbracket, tok, false) end def on_top_const_ref(*args) type = :top_const_ref node = AstNode.node_class_for(type).new(type, args) mapping = @map[MAPPINGS[type]] extra_op = mapping.last[1] + 2 == charno ? mapping.pop : nil lstart, sstart = *mapping.pop node.source_range = Range.new(sstart, args.last.source_range.last) node.line_range = Range.new(lstart, args.last.line_range.last) mapping.push(extra_op) if extra_op node end def on_const_path_ref(*args) ReferenceNode.new(:const_path_ref, args, :listline => lineno..lineno, :listchar => charno..charno) end [:if_mod, :unless_mod, :while_mod].each do |kw| node_class = AstNode.node_class_for(kw) module_eval(<<-eof, __FILE__, __LINE__ + 1) begin; undef on_#{kw}; rescue NameError; end def on_#{kw}(*args) sr = args.last.source_range.first..args.first.source_range.last lr = args.last.line_range.first..args.first.line_range.last #{node_class}.new(:#{kw}, args, :line => lr, :char => sr) end eof end def on_qwords_new(*args) node = LiteralNode.new(:qwords_literal, args) if @map[:qwords_beg] lstart, sstart = *@map[:qwords_beg].pop node.source_range = Range.new(sstart, @ns_charno-1) node.line_range = Range.new(lstart, lineno) end node end def on_qwords_add(list, item) last = @source[@ns_charno,1] == "\n" ? @ns_charno - 1 : @ns_charno list.source_range = (list.source_range.first..last) list.line_range = (list.line_range.first..lineno) list.push(item) list end def on_string_literal(*args) node = visit_event_arr(LiteralNode.new(:string_literal, args)) if args.size == 1 r = args[0].source_range if node.source_range != Range.new(r.first - 1, r.last + 1) klass = AstNode.node_class_for(node[0].type) r = Range.new(node.source_range.first + 1, node.source_range.last - 1) node[0] = klass.new(node[0].type, [@source[r]], :line => node.line_range, :char => r) end end node end def on_lambda(*args) visit_event_arr AstNode.new(:lambda, args) end def on_string_content(*args) AstNode.new(:string_content, args, :listline => lineno..lineno, :listchar => charno..charno) end def on_rescue(exc, *args) exc = AstNode.new(:list, exc) if exc visit_event AstNode.new(:rescue, [exc, *args]) end def on_void_stmt AstNode.new(:void_stmt, [], :line => lineno..lineno, :char => charno...charno) end def on_params(*args) args.map! do |arg| next arg unless arg.class == Array if arg.first.class == Array arg.map! do |sub_arg| next sub_arg unless sub_arg.class == Array if sub_arg[0].type == :label type = :named_arg else type = :unnamed_optional_arg end AstNode.new(type, sub_arg, :listline => lineno..lineno, :listchar => charno..charno) end end AstNode.new(:list, arg, :listline => lineno..lineno, :listchar => charno..charno) end ParameterNode.new(:params, args, :listline => lineno..lineno, :listchar => charno..charno) end def on_label(data) add_token(:label, data) ch = charno @charno += data.length @ns_charno = charno AstNode.new(:label, [data[0...-1]], :line => lineno..lineno, :char => ch..charno-1, :token => true) end def on_comment(comment) not_comment = false if @last_ns_token.nil? || @last_ns_token.size == 0 if comment =~ SourceParser::SHEBANG_LINE && !@encoding_line @shebang_line = comment not_comment = true elsif comment =~ SourceParser::ENCODING_LINE @encoding_line = comment not_comment = true end end ch = charno visit_ns_token(:comment, comment) if not_comment @last_ns_token = nil return end source_range = ch..(charno-1) comment = comment.gsub(/^(\#+)\s{0,1}/, '').chomp append_comment = @comments[lineno - 1] hash_flag = $1 == '##' ? true : false if append_comment && @comments_last_column && @comments_last_column == column && comment_starts_line?(ch) @comments.delete(lineno - 1) @comments_flags[lineno] = @comments_flags[lineno - 1] @comments_flags.delete(lineno - 1) range = @comments_range.delete(lineno - 1) source_range = range.first..source_range.last comment = append_comment + "\n" + comment end @comments[lineno] = comment @comments_range[lineno] = source_range @comments_flags[lineno] = hash_flag if !append_comment @comments_last_column = column end def on_embdoc_beg(text) visit_ns_token(:embdoc_beg, text) @embdoc_start = charno-text.length @embdoc = "" end def on_embdoc(text) visit_ns_token(:embdoc, text) @embdoc << text end def on_embdoc_end(text) visit_ns_token(:embdoc_end, text) @comments_last_column = nil @comments[lineno] = @embdoc @comments_range[lineno] = @embdoc_start...charno @embdoc_start = nil @embdoc = nil end def on_parse_error(msg) raise ParserSyntaxError, "syntax error in `#{file}`:(#{lineno},#{column}): #{msg}" end def comment_starts_line?(charno) (charno-1).downto(0) do |i| ch = @source[i] break if ch == "\n" return false if ch != " " && ch != "\t" end true end def insert_comments root.traverse do |node| next if node.type == :comment || node.type == :list || node.parent.type != :list # check upwards from line before node; check node's line at the end ((node.line-1).downto(node.line-2).to_a + [node.line]).each do |line| comment = @comments[line] if comment && !comment.empty? add_comment(line, node) break end end @comments.keys.each do |line| if node.line > line add_comment(line, nil, node) end end end # insert any lone unadded comments before node root.traverse do |node| next if node.type == :list || node.parent.type != :list @comments.keys.each do |line| if node.line_range.include?(line) pick = nil node.traverse do |subnode| next unless subnode.type == :list pick ||= subnode next unless subnode.line_range.include?(line) pick = subnode end add_comment(line, nil, pick, true) if pick end end end if @comments.size > 0 # insert all remaining comments @comments.each do |line, comment| add_comment(line, nil, root, true) end @comments = {} end def add_comment(line, node = nil, before_node = nil, into = false) comment = @comments[line] source_range = @comments_range[line] line_range = ((line - comment.count("\n"))..line) if node.nil? node = CommentNode.new(:comment, [comment], :line => line_range, :char => source_range) if into before_node.push(node) before_node.unfreeze node.parent = before_node elsif before_node parent_node = before_node.parent idx = parent_node.index(before_node) parent_node.insert(idx, node) parent_node.unfreeze node.parent = parent_node end end node.docstring = comment node.docstring_hash_flag = @comments_flags[line] node.docstring_range = line_range @comments.delete(line) @comments_range.delete(line) @comments_flags.delete(line) end def freeze_tree(node = nil) node ||= root node.children.each do |child| child.parent = node freeze_tree(child) end end end if defined?(::Ripper) end end endyard-master/lib/yard/parser/source_parser.rb000066400000000000000000000463231265676644000215400ustar00rootroot00000000000000require 'stringio' require 'ostruct' module YARD module Parser # Raised when an object is recognized but cannot be documented. This # generally occurs when the Ruby syntax used to declare an object is # too dynamic in nature. class UndocumentableError < Exception; end # Raised when the parser sees a Ruby syntax error class ParserSyntaxError < UndocumentableError; end # Responsible for parsing a list of files in order. The # {#parse} method of this class can be called from the # {SourceParser#globals} globals state list to re-enter # parsing for the remainder of files in the list recursively. # # @see Processor#parse_remaining_files class OrderedParser # @return [Array] the list of remaining files to parse attr_accessor :files # Creates a new OrderedParser with the global state and a list # of files to parse. # # @note OrderedParser sets itself as the +ordered_parser+ key on # global_state for later use in {Handlers::Processor}. # @param [OpenStruct] global_state a structure containing all global # state during parsing # @param [Array] files the list of files to parse def initialize(global_state, files) @global_state = global_state @files = files.dup @global_state.ordered_parser = self end # Parses the remainder of the {#files} list. # # @see Processor#parse_remaining_files def parse while file = files.shift log.capture("Parsing #{file}") do SourceParser.new(SourceParser.parser_type, @global_state).parse(file) end end end end # Responsible for parsing a source file into the namespace. Parsing # also invokes handlers to process the parsed statements and generate # any code objects that may be recognized. # # == Custom Parsers # SourceParser allows custom parsers to be registered and called when # a certain filetype is recognized. To register a parser and hook it # up to a set of file extensions, call {register_parser_type} # # @see register_parser_type # @see Handlers::Base # @see CodeObjects::Base class SourceParser SHEBANG_LINE = /\A\s*#!\S+/ ENCODING_LINE = /\A(?:\s*#*!.*\r?\n)?\s*(?:#+|\/\*+|\/\/+).*coding\s*[:=]{1,2}\s*([a-z\d_\-]+)/i # The default glob of files to be parsed. # @since 0.9.0 DEFAULT_PATH_GLOB = ["{lib,app}/**/*.rb", "ext/**/*.{c,cc,cxx,cpp}"] # Byte order marks for various encodings # @since 0.7.0 ENCODING_BYTE_ORDER_MARKS = { 'utf-8' => "\xEF\xBB\xBF", # Not yet supported #'utf-16be' => "\xFE\xFF", #'utf-16le' => "\xFF\xFE", #'utf-32be' => "\x00\x00\xFF\xFE", #'utf-32le' => "\xFF\xFE", } class << self # @return [Symbol] the default parser type (defaults to :ruby) attr_reader :parser_type def parser_type=(value) @parser_type = validated_parser_type(value) end # Parses a path or set of paths # # @param [String, Array] paths a path, glob, or list of paths to # parse # @param [Array] excluded a list of excluded path matchers # @param [Fixnum] level the logger level to use during parsing. See # {YARD::Logger} # @return [void] def parse(paths = DEFAULT_PATH_GLOB, excluded = [], level = log.level) log.debug("Parsing #{paths.inspect} with `#{parser_type}` parser") excluded = excluded.map do |path| case path when Regexp; path else Regexp.new(path.to_s, Regexp::IGNORECASE) end end files = [paths].flatten. map {|p| File.directory?(p) ? "#{p}/**/*.{rb,c,cc,cxx,cpp}" : p }. map {|p| p.include?("*") ? Dir[p].sort_by {|f| f.length } : p }.flatten. reject {|p| !File.file?(p) || excluded.any? {|re| p =~ re } } log.enter_level(level) do parse_in_order(*files.uniq) end end # Parses a string +content+ # # @param [String] content the block of code to parse # @param [Symbol] ptype the parser type to use. See {parser_type}. # @return the parser object that was used to parse +content+ def parse_string(content, ptype = parser_type) new(ptype).parse(StringIO.new(content)) end # Tokenizes but does not parse the block of code # # @param [String] content the block of code to tokenize # @param [Symbol] ptype the parser type to use. See {parser_type}. # @return [Array] a list of tokens def tokenize(content, ptype = parser_type) new(ptype).tokenize(content) end # Registers a new parser type. # # @example Registering a parser for "java" files # SourceParser.register_parser_type :java, JavaParser, 'java' # @param [Symbol] type a symbolic name for the parser type # @param [Base] parser_klass a class that implements parsing and tokenization # @param [Array, String, Regexp] extensions a list of extensions or a # regex to match against the file extension # @return [void] # @see Parser::Base def register_parser_type(type, parser_klass, extensions = nil) unless Base > parser_klass raise ArgumentError, "expecting parser_klass to be a subclass of YARD::Parser::Base" end parser_type_extensions[type.to_sym] = extensions if extensions parser_types[type.to_sym] = parser_klass end # @return [Hash{Symbol=>Object}] a list of registered parser types # @private # @since 0.5.6 def parser_types; @@parser_types ||= {} end def parser_types=(value) @@parser_types = value end # @return [Hash] a list of registered parser type extensions # @private # @since 0.5.6 def parser_type_extensions; @@parser_type_extensions ||= {} end def parser_type_extensions=(value) @@parser_type_extensions = value end # Finds a parser type that is registered for the extension. If no # type is found, the default Ruby type is returned. # # @return [Symbol] the parser type to be used for the extension # @since 0.5.6 def parser_type_for_extension(extension) type = parser_type_extensions.find do |t, exts| [exts].flatten.any? {|ext| ext === extension } end validated_parser_type(type ? type.first : :ruby) end # Returns the validated parser type. Basically, enforces that :ruby # type is never set if the Ripper library is not available # # @param [Symbol] type the parser type to set # @return [Symbol] the validated parser type # @private def validated_parser_type(type) !defined?(::Ripper) && type == :ruby ? :ruby18 : type end # @group Parser Callbacks # Registers a callback to be called before a list of files is parsed # via {parse}. The block passed to this method will be called on # subsequent parse calls. # # @example Installing a simple callback # SourceParser.before_parse_list do |files, globals| # puts "Starting to parse..." # end # YARD.parse('lib/**/*.rb') # # prints "Starting to parse..." # # @example Setting global state # SourceParser.before_parse_list do |files, globals| # globals.method_count = 0 # end # SourceParser.after_parse_list do |files, globals| # puts "Found #{globals.method_count} methods" # end # class MyCountHandler < Handlers::Ruby::Base # handles :def, :defs # process { globals.method_count += 1 } # end # YARD.parse # # Prints: "Found 37 methods" # # @example Using a global callback to cancel parsing # SourceParser.before_parse_list do |files, globals| # return false if files.include?('foo.rb') # end # # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method # YARD.parse('bar.rb') # parses normally # # @yield [files, globals] the yielded block is called once before # parsing all files # @yieldparam [Array] files the list of files that will be parsed. # @yieldparam [OpenStruct] globals a global structure to store arbitrary # state for post processing (see {Handlers::Processor#globals}) # @yieldreturn [Boolean] if the block returns +false+, parsing is # cancelled. # @return [Proc] the yielded block # @see after_parse_list # @see before_parse_file # @since 0.7.0 def before_parse_list(&block) before_parse_list_callbacks << block end # Registers a callback to be called after a list of files is parsed # via {parse}. The block passed to this method will be called on # subsequent parse calls. # # @example Printing results after parsing occurs # SourceParser.after_parse_list do # puts "Finished parsing!" # end # YARD.parse # # Prints "Finished parsing!" after parsing files # @yield [files, globals] the yielded block is called once before # parsing all files # @yieldparam [Array] files the list of files that will be parsed. # @yieldparam [OpenStruct] globals a global structure to store arbitrary # state for post processing (see {Handlers::Processor#globals}) # @yieldreturn [void] the return value for the block is ignored. # @return [Proc] the yielded block # @see before_parse_list # @see before_parse_file # @since 0.7.0 def after_parse_list(&block) after_parse_list_callbacks << block end # Registers a callback to be called before an individual file is parsed. # The block passed to this method will be called on subsequent parse # calls. # # To register a callback that is called before the entire list of files # is processed, see {before_parse_list}. # # @example Installing a simple callback # SourceParser.before_parse_file do |parser| # puts "I'm parsing #{parser.file}" # end # YARD.parse('lib/**/*.rb') # # prints: # "I'm parsing lib/foo.rb" # "I'm parsing lib/foo_bar.rb" # "I'm parsing lib/last_file.rb" # # @example Cancel parsing of any test_*.rb files # SourceParser.before_parse_file do |parser| # return false if parser.file =~ /^test_.+\.rb$/ # end # # @yield [parser] the yielded block is called once before each # file that is parsed. This might happen many times for a single # codebase. # @yieldparam [SourceParser] parser the parser object that will {#parse} # the file. # @yieldreturn [Boolean] if the block returns +false+, parsing for # the file is cancelled. # @return [Proc] the yielded block # @see after_parse_file # @see before_parse_list # @since 0.7.0 def before_parse_file(&block) before_parse_file_callbacks << block end # Registers a callback to be called after an individual file is parsed. # The block passed to this method will be called on subsequent parse # calls. # # To register a callback that is called after the entire list of files # is processed, see {after_parse_list}. # # @example Printing the length of each file after it is parsed # SourceParser.after_parse_file do |parser| # puts "#{parser.file} is #{parser.contents.size} characters" # end # YARD.parse('lib/**/*.rb') # # prints: # "lib/foo.rb is 1240 characters" # "lib/foo_bar.rb is 248 characters" # # @yield [parser] the yielded block is called once after each file # that is parsed. This might happen many times for a single codebase. # @yieldparam [SourceParser] parser the parser object that parsed # the file. # @yieldreturn [void] the return value for the block is ignored. # @return [Proc] the yielded block # @see before_parse_file # @see after_parse_list # @since 0.7.0 def after_parse_file(&block) after_parse_file_callbacks << block end # @return [Array] the list of callbacks to be called before # parsing a list of files. Should only be used for testing. # @since 0.7.0 def before_parse_list_callbacks @before_parse_list_callbacks ||= [] end # @return [Array] the list of callbacks to be called after # parsing a list of files. Should only be used for testing. # @since 0.7.0 def after_parse_list_callbacks @after_parse_list_callbacks ||= [] end # @return [Array] the list of callbacks to be called before # parsing a file. Should only be used for testing. # @since 0.7.0 def before_parse_file_callbacks @before_parse_file_callbacks ||= [] end # @return [Array] the list of callbacks to be called after # parsing a file. Should only be used for testing. # @since 0.7.0 def after_parse_file_callbacks @after_parse_file_callbacks ||= [] end # @endgroup private # Parses a list of files in a queue. # # @param [Array] files a list of files to queue for parsing # @return [void] def parse_in_order(*files) global_state = OpenStruct.new before_parse_list_callbacks.each do |cb| return if cb.call(files, global_state) == false end OrderedParser.new(global_state, files).parse after_parse_list_callbacks.each do |cb| cb.call(files, global_state) end end end register_parser_type :ruby, Ruby::RubyParser register_parser_type :ruby18, Ruby::Legacy::RubyParser register_parser_type :c, C::CParser, ['c', 'cc', 'cxx', 'cpp'] self.parser_type = :ruby # @return [String] the filename being parsed by the parser. attr_accessor :file # @return [Symbol] the parser type associated with the parser instance. # This should be set by the {#initialize constructor}. attr_reader :parser_type # @return [OpenStruct] an open struct containing arbitrary global state # shared between files and handlers. # @since 0.7.0 attr_reader :globals # @return [String] the contents of the file to be parsed # @since 0.7.0 attr_reader :contents # @overload initialize(parser_type = SourceParser.parser_type, globals = nil) # Creates a new parser object for code parsing with a specific parser type. # # @param [Symbol] parser_type the parser type to use # @param [OpenStruct] globals global state to be re-used across separate source files def initialize(parser_type = SourceParser.parser_type, globals1 = nil, globals2 = nil) globals = [true, false].include?(globals1) ? globals2 : globals1 @file = '(stdin)' @globals = globals || OpenStruct.new self.parser_type = parser_type end # The main parser method. This should not be called directly. Instead, # use the class methods {parse} and {parse_string}. # # @param [String, #read, Object] content the source file to parse # @return [Object, nil] the parser object used to parse the source def parse(content = __FILE__) case content when String @file = File.cleanpath(content) content = convert_encoding(File.read_binary(file)) checksum = Registry.checksum_for(content) return if Registry.checksums[file] == checksum if Registry.checksums.has_key?(file) log.info "File '#{file}' was modified, re-processing..." end Registry.checksums[@file] = checksum self.parser_type = parser_type_for_filename(file) else content = content.read if content.respond_to? :read end @contents = content @parser = parser_class.new(content, file) self.class.before_parse_file_callbacks.each do |cb| return @parser if cb.call(self) == false end @parser.parse post_process self.class.after_parse_file_callbacks.each do |cb| cb.call(self) end @parser rescue ArgumentError, NotImplementedError => e log.warn("Cannot parse `#{file}': #{e.message}") log.backtrace(e, :warn) rescue ParserSyntaxError => e log.warn(e.message.capitalize) log.backtrace(e, :warn) end # Tokenizes but does not parse the block of code using the current {#parser_type} # # @param [String] content the block of code to tokenize # @return [Array] a list of tokens def tokenize(content) @parser = parser_class.new(content, file) @parser.tokenize end private # Searches for encoding line and forces encoding # @since 0.5.3 def convert_encoding(content) return content unless content.respond_to?(:force_encoding) if content =~ ENCODING_LINE content.force_encoding($1) else content.force_encoding('binary') ENCODING_BYTE_ORDER_MARKS.each do |encoding, bom| bom.force_encoding('binary') if content[0,bom.size] == bom content.force_encoding(encoding) return content end end content.force_encoding('utf-8') # UTF-8 is default encoding content end end # Runs a {Handlers::Processor} object to post process the parsed statements. # @return [void] def post_process return unless @parser.respond_to? :enumerator return unless enumerator = @parser.enumerator post = Handlers::Processor.new(self) post.process(enumerator) end def parser_type=(value) @parser_type = self.class.validated_parser_type(value) end # Guesses the parser type to use depending on the file extension. # # @param [String] filename the filename to use to guess the parser type # @return [Symbol] a parser type that matches the filename def parser_type_for_filename(filename) ext = (File.extname(filename)[1..-1] || "").downcase type = self.class.parser_type_for_extension(ext) parser_type == :ruby18 && type == :ruby ? :ruby18 : type end # @since 0.5.6 def parser_class klass = self.class.parser_types[parser_type] raise ArgumentError, "invalid parser type '#{parser_type}' or unrecognized file", caller[1..-1] if !klass klass end end end end yard-master/lib/yard/rake/000077500000000000000000000000001265676644000157555ustar00rootroot00000000000000yard-master/lib/yard/rake/yardoc_task.rb000066400000000000000000000052371265676644000206140ustar00rootroot00000000000000require 'rake' require 'rake/tasklib' module YARD module Rake # The rake task to run {CLI::Yardoc} and generate documentation. class YardocTask < ::Rake::TaskLib # The name of the task # @return [String] the task name attr_accessor :name # Options to pass to {CLI::Yardoc} # @return [Array] the options passed to the commandline utility attr_accessor :options # Options to pass to {CLI::Stats} # @return [Array] the options passed to the stats utility attr_accessor :stats_options # The Ruby source files (and any extra documentation files separated by '-') # to process. # @example Task files assignment # YARD::Rake::YardocTask.new do |t| # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] # end # @return [Array] a list of files attr_accessor :files # Runs a +Proc+ before the task # @return [Proc] a proc to call before running the task attr_accessor :before # Runs a +Proc+ after the task # @return [Proc] a proc to call after running the task attr_accessor :after # @return [Verifier, Proc] an optional {Verifier} to run against all objects # being generated. Any object that the verifier returns false for will be # excluded from documentation. This attribute can also be a lambda. # @see Verifier attr_accessor :verifier # Creates a new task with name +name+. # # @param [String, Symbol] name the name of the rake task # @yield a block to allow any options to be modified on the task # @yieldparam [YardocTask] _self the task object to allow any parameters # to be changed. def initialize(name = :yard) @name = name @options = [] @stats_options = [] @files = [] yield self if block_given? self.options += ENV['OPTS'].split(/[ ,]/) if ENV['OPTS'] self.files += ENV['FILES'].split(/[ ,]/) if ENV['FILES'] self.options << '--no-stats' unless self.stats_options.empty? define end protected # Defines the rake task # @return [void] def define desc "Generate YARD Documentation" unless ::Rake.application.last_comment task(name) do before.call if before.is_a?(Proc) yardoc = YARD::CLI::Yardoc.new yardoc.options[:verifier] = verifier if verifier yardoc.run(*(options + files)) YARD::CLI::Stats.run(*(stats_options + ['--use-cache'])) unless stats_options.empty? after.call if after.is_a?(Proc) end end end end end yard-master/lib/yard/registry.rb000066400000000000000000000401041265676644000172270ustar00rootroot00000000000000require 'fileutils' require 'digest/sha1' module YARD # The +Registry+ is the centralized data store for all {CodeObjects} created # during parsing. The storage is a key value store with the object's path # (see {CodeObjects::Base#path}) as the key and the object itself as the value. # Object paths must be unique to be stored in the Registry. All lookups for # objects are done on the singleton Registry instance using the {Registry.at} # or {Registry.resolve} methods. # # == Saving / Loading a Registry # The registry is saved to a "yardoc file" (actually a directory), which can # be loaded back to perform any lookups. See {Registry.load!} and # {Registry.save} for information on saving and loading of a yardoc file. # # == Threading Notes # The registry class is a singleton class that is accessed directly in many # places across YARD. To mitigate threading issues, YARD (0.6.5+) makes # the Registry thread local. This means all access to a registry for a specific # object set must occur in the originating thread. # # @example Loading the Registry # Registry.load!('/path/to/yardocfile') # loads all objects into memory # Registry.at('YARD::CodeObjects::Base').docstring # # => "+Base+ is the superclass of all code objects ..." # @example Getting an object by a specific path # Registry.at('YARD::CodeObjects::Base#docstring') # @example Performing a lookup on a method anywhere in the inheritance tree # Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true) module Registry DEFAULT_YARDOC_FILE = ".yardoc" LOCAL_YARDOC_INDEX = File.expand_path('~/.yard/gem_index') DEFAULT_PO_DIR = "po" extend Enumerable class << self # @group Getting .yardoc File Locations # Returns the .yardoc file associated with a gem. # # @param [String] gem the name of the gem to search for # @param [String] ver_require an optional Gem version requirement # @param [Boolean] for_writing whether or not the method should search # for writable locations # @return [String] if +for_writing+ is set to +true+, returns the best # location suitable to write the .yardoc file. Otherwise, the first # existing location associated with the gem's .yardoc file. # @return [nil] if +for_writing+ is set to false and no yardoc file # is found, returns nil. def yardoc_file_for_gem(gem, ver_require = ">= 0", for_writing = false) spec = Gem.source_index.find_name(gem, ver_require) return if spec.empty? spec = spec.first if gem =~ /^yard-doc-/ path = File.join(spec.full_gem_path, DEFAULT_YARDOC_FILE) return File.exist?(path) && !for_writing ? path : nil end if for_writing global_yardoc_file(spec, for_writing) || local_yardoc_file(spec, for_writing) else local_yardoc_file(spec, for_writing) || global_yardoc_file(spec, for_writing) end end # Gets/sets the yardoc filename # @return [String] the yardoc filename # @see DEFAULT_YARDOC_FILE attr_accessor :yardoc_file undef yardoc_file, yardoc_file= def yardoc_file=(v) Thread.current[:__yard_yardoc_file__] = v end def yardoc_file Thread.current[:__yard_yardoc_file__] ||= DEFAULT_YARDOC_FILE end # @group Loading Data from Disk # Loads the registry and/or parses a list of files # # @example Loads the yardoc file or parses files 'a', 'b' and 'c' (but not both) # Registry.load(['a', 'b', 'c']) # @example Reparses files 'a' and 'b' regardless of whether yardoc file exists # Registry.load(['a', 'b'], true) # @param [String, Array] files if +files+ is an Array, it should represent # a list of files that YARD should parse into the registry. If reload is # set to false and the yardoc file already exists, these files are skipped. # If files is a String, it should represent the yardoc file to load # into the registry. # @param [Boolean] reparse if reparse is false and a yardoc file already # exists, any files passed in will be ignored. # @return [Registry] the registry object (for chaining) # @raise [ArgumentError] if files is not a String or Array def load(files = [], reparse = false) if files.is_a?(Array) if File.exist?(yardoc_file) && !reparse load_yardoc else size = thread_local_store.keys.size YARD.parse(files) save if thread_local_store.keys.size > size end elsif files.is_a?(String) load_yardoc(files) else raise ArgumentError, "Must take a list of files to parse or the .yardoc file to load." end self end # Loads a yardoc file directly # # @param [String] file the yardoc file to load. # @return [Registry] the registry object (for chaining) def load_yardoc(file = yardoc_file) clear thread_local_store.load(file) self end # Loads a yardoc file and forces all objects cached on disk into # memory. Equivalent to calling {load_yardoc} followed by {load_all} # # @param [String] file the yardoc file to load # @return [Registry] the registry object (for chaining) # @see #load_yardoc # @see #load_all # @since 0.5.1 def load!(file = yardoc_file) clear thread_local_store.load!(file) self end # Forces all objects cached on disk into memory # # @example Loads all objects from disk # Registry.load # Registry.all.count #=> 0 # Registry.load_all # Registry.all.count #=> 17 # @return [Registry] the registry object (for chaining) # @since 0.5.1 def load_all thread_local_store.load_all self end # @group Saving and Deleting Data from Disk # Saves the registry to +file+ # # @param [String] file the yardoc file to save to # @return [Boolean] true if the file was saved def save(merge = false, file = yardoc_file) thread_local_store.save(merge, file) end # Deletes the yardoc file from disk # @return [void] def delete_from_disk thread_local_store.destroy end # @group Adding and Deleting Objects from the Registry # Registers a new object with the registry # # @param [CodeObjects::Base] object the object to register # @return [CodeObjects::Base] the registered object def register(object) return if object.is_a?(CodeObjects::Proxy) thread_local_store[object.path] = object end # Deletes an object from the registry # @param [CodeObjects::Base] object the object to remove # @return [void] def delete(object) thread_local_store.delete(object.path) end # Clears the registry # @return [void] def clear self.thread_local_store = RegistryStore.new end # @group Accessing Objects in the Registry # Iterates over {all} with no arguments def each(&block) all.each(&block) end # Returns all objects in the registry that match one of the types provided # in the +types+ list (if +types+ is provided). # # @example Returns all objects # Registry.all # @example Returns all classes and modules # Registry.all(:class, :module) # @param [Array] types an optional list of types to narrow the # objects down by. Equivalent to performing a select: # +Registry.all.select {|o| types.include(o.type) }+ # @return [Array] the list of objects found # @see CodeObjects::Base#type def all(*types) if types.empty? thread_local_store.values.select {|obj| obj != root } else list = [] types.each do |type| list += thread_local_store.values_for_type(type) end list end end # Returns the paths of all of the objects in the registry. # @param [Boolean] reload whether to load entire database # @return [Array] all of the paths in the registry. def paths(reload = false) thread_local_store.keys(reload).map {|k| k.to_s } end # Returns the object at a specific path. # @param [String, :root] path the pathname to look for. If +path+ is +root+, # returns the {root} object. # @return [CodeObjects::Base] the object at path # @return [nil] if no object is found def at(path) path ? thread_local_store[path] : nil end alias_method :[], :at # The root namespace object. # @return [CodeObjects::RootObject] the root object in the namespace def root; thread_local_store[:root] end # @param [String] name the locale name. # @return [I18n::Locale] the locale object for +name+. # @since 0.8.3 def locale(name) thread_local_store.locale(name) end # Attempts to find an object by name starting at +namespace+, performing # a lookup similar to Ruby's method of resolving a constant in a namespace. # # @example Looks for instance method #reverse starting from A::B::C # Registry.resolve(P("A::B::C"), "#reverse") # @example Looks for a constant in the root namespace # Registry.resolve(nil, 'CONSTANT') # @example Looks for a class method respecting the inheritance tree # Registry.resolve(myclass, 'mymethod', true) # @example Looks for a constant but returns a proxy if not found # Registry.resolve(P('A::B::C'), 'D', false, true) # => # # @example Looks for a complex path from a namespace # Registry.resolve(P('A::B'), 'B::D') # => # # @param [CodeObjects::NamespaceObject, nil] namespace the starting namespace # (module or class). If +nil+ or +:root+, starts from the {root} object. # @param [String, Symbol] name the name (or complex path) to look for from # +namespace+. # @param [Boolean] inheritance Follows inheritance chain (mixins, superclass) # when performing name resolution if set to +true+. # @param [Boolean] proxy_fallback If +true+, returns a proxy representing # the unresolved path (namespace + name) if no object is found. # @param [Symbol, nil] type the {CodeObjects::Base#type} that the resolved # object must be equal to. No type checking if nil. # @return [CodeObjects::Base] the object if it is found # @return [CodeObjects::Proxy] a Proxy representing the object if # +proxy_fallback+ is +true+. # @return [nil] if +proxy_fallback+ is +false+ and no object was found. # @see P def resolve(namespace, name, inheritance = false, proxy_fallback = false, type = nil) if namespace.is_a?(CodeObjects::Proxy) return proxy_fallback ? CodeObjects::Proxy.new(namespace, name, type) : nil end if namespace == :root || !namespace namespace = root else namespace = namespace.parent until namespace.is_a?(CodeObjects::NamespaceObject) end orignamespace = namespace name = name.to_s if name =~ /^#{CodeObjects::NSEPQ}/ [name, name[2..-1]].each do |n| found = at(n) return found if found && (type.nil? || found.type == type) end else while namespace if namespace.is_a?(CodeObjects::NamespaceObject) if inheritance nss = namespace.inheritance_tree(true) if namespace.respond_to?(:superclass) if namespace.superclass != P('BasicObject') nss |= [P('Object')] end nss |= [P('BasicObject')] end else nss = [namespace] end nss.each do |ns| next if ns.is_a?(CodeObjects::Proxy) found = partial_resolve(ns, name, type) return found if found end end namespace = namespace.parent end end proxy_fallback ? CodeObjects::Proxy.new(orignamespace, name, type) : nil end # @group Managing Source File Checksums # @return [Hash{String => String}] a set of checksums for files def checksums thread_local_store.checksums end # @param [String] data data to checksum # @return [String] the SHA1 checksum for data def checksum_for(data) Digest::SHA1.hexdigest(data) end # @group Managing Internal State (Advanced / Testing Only) # Whether or not the Registry storage should load everything into a # single object database (for disk efficiency), or spread them out # (for load time efficiency). # # @note Setting this attribute to nil will offload the decision to # the {RegistryStore storage adapter}. # @return [Boolean, nil] if this value is set to nil, the storage # adapter will decide how to store the data. attr_accessor :single_object_db undef single_object_db, single_object_db= def single_object_db=(v) Thread.current[:__yard_single_db__] = v end def single_object_db; Thread.current[:__yard_single_db__] end # The assumed types of a list of paths. This method is used by CodeObjects::Base # @return [{String => Symbol}] a set of unresolved paths and their assumed type # @private # @deprecated The registry no longer globally tracks proxy types. def proxy_types thread_local_store.proxy_types end # @group I18n features # Gets/sets the directory that has LANG.po files # @return [String] the directory that has .po files attr_accessor :po_dir undef po_dir, po_dir= def po_dir=(dir) Thread.current[:__yard_po_dir__] = dir end def po_dir Thread.current[:__yard_po_dir__] ||= DEFAULT_PO_DIR end # @group Legacy Methods # The registry singleton instance. # # @deprecated use Registry.methodname directly. # @return [Registry] returns the registry instance def instance; self end private # @group Accessing Objects in the Registry # Attempts to resolve a name in a namespace # # @param [CodeObjects::NamespaceObject] namespace the starting namespace # @param [String] name the name to look for # @param [Symbol, nil] type the {CodeObjects::Base#type} that the resolved # object must be equal to def partial_resolve(namespace, name, type = nil) obj = at(name) || at('#' + name) if namespace.root? return obj if obj && (type.nil? || obj.type == type) [CodeObjects::NSEP, CodeObjects::CSEP, ''].each do |s| next if s.empty? && name =~ /^\w/ path = name if namespace != root path = [namespace.path, name].join(s) end found = at(path) return found if found && (type.nil? || found.type == type) end nil end # @group Retrieving yardoc File Locations def global_yardoc_file(spec, for_writing = false) path = spec.full_gem_path yfile = File.join(path, DEFAULT_YARDOC_FILE) if for_writing && File.writable?(path) return yfile elsif !for_writing && File.exist?(yfile) return yfile end end def local_yardoc_file(spec, for_writing = false) path = Registry::LOCAL_YARDOC_INDEX FileUtils.mkdir_p(path) if for_writing path = File.join(path, "#{spec.full_name}.yardoc") if for_writing path else File.exist?(path) ? path : nil end end # @group Threading support # @since 0.6.5 def thread_local_store Thread.current[:__yard_registry__] ||= clear end # @since 0.6.5 def thread_local_store=(value) Thread.current[:__yard_registry__] = value end end end end yard-master/lib/yard/registry_store.rb000066400000000000000000000216041265676644000204470ustar00rootroot00000000000000require 'fileutils' module YARD # The data store for the {Registry}. # # @see Registry # @see Serializers::YardocSerializer class RegistryStore # @deprecated The registry no longer tracks proxy types attr_reader :proxy_types attr_reader :file, :checksums def initialize @file = nil @checksums = {} @store = {} @proxy_types = {} @object_types = {:root => [:root]} @notfound = {} @loaded_objects = 0 @available_objects = 0 @locales = {} @store[:root] = CodeObjects::RootObject.allocate @store[:root].send(:initialize, nil, :root) end # Gets a {CodeObjects::Base} from the store # # @param [String, Symbol] key the path name of the object to look for. # If it is empty or :root, returns the {#root} object. # @return [CodeObjects::Base, nil] a code object or nil if none is found def get(key) key = :root if key == '' key = key.to_sym return @store[key] if @store[key] return if @loaded_objects >= @available_objects # check disk return if @notfound[key] if obj = @serializer.deserialize(key) @loaded_objects += 1 put(key, obj) else @notfound[key] = true nil end end # Associates an object with a path # @param [String, Symbol] key the path name (:root or '' for root object) # @param [CodeObjects::Base] value the object to store # @return [CodeObjects::Base] returns +value+ def put(key, value) if key == '' @object_types[:root] = [:root] @store[:root] = value else @notfound.delete(key.to_sym) (@object_types[value.type] ||= []) << key.to_s if @store[key.to_sym] @object_types[@store[key.to_sym].type].delete(key.to_s) end @store[key.to_sym] = value end end alias [] get alias []= put # Deletes an object at a given path # @param [#to_sym] key the key to delete # @return [void] def delete(key) @store.delete(key.to_sym) end # Gets all path names from the store. Loads the entire database # if +reload+ is +true+ # # @param [Boolean] reload if false, does not load the entire database # before a lookup. # @return [Array] the path names of all the code objects def keys(reload = false) load_all if reload; @store.keys end # Gets all code objects from the store. Loads the entire database # if +reload+ is +true+ # # @param [Boolean] reload if false, does not load the entire database # before a lookup. # @return [Array] all the code objects def values(reload = false) load_all if reload; @store.values end # @param [Symbol] type the type to look for # @return [Array] a list of object paths with a given # {CodeObjects::Base#type} # @since 0.8.0 def paths_for_type(type, reload = false) load_all if reload @object_types[type] || [] end # @param [Symbol] type the type to look for # @return [Array] a list of objects with a given # {CodeObjects::Base#type} # @since 0.8.0 def values_for_type(type, reload = false) load_all if reload paths_for_type(type).map {|t| @store[t.to_sym] } end # @return [CodeObjects::RootObject] the root object def root; @store[:root] end # @param [String] name the locale name. # @return [I18n::Locale] the locale object for +name+. # @since 0.8.3 def locale(name) @locales[name] ||= load_locale(name) end # @param [String, nil] file the name of the yardoc db to load # @return [Boolean] whether the database was loaded def load(file = nil) @file = file @store = {} @proxy_types = {} @object_types = {} @notfound = {} @serializer = Serializers::YardocSerializer.new(@file) load_yardoc end # Loads the .yardoc file and loads all cached objects into memory # automatically. # # @param [String, nil] file the name of the yardoc db to load # @return [Boolean] whether the database was loaded # @see #load_all # @since 0.5.1 def load!(file = nil) if load(file) load_all true else false end end # Loads all cached objects into memory # @return [void] def load_all return unless @file return if @loaded_objects >= @available_objects log.debug "Loading entire database: #{@file} ..." objects = [] all_disk_objects.sort_by {|x| x.size }.each do |path| if obj = @serializer.deserialize(path, true) objects << obj end end objects.each do |obj| put(obj.path, obj) end @loaded_objects += objects.size log.debug "Loaded database (file='#{@file}' count=#{objects.size} total=#{@available_objects})" end # Saves the database to disk # @param [Boolean] merge if true, merges the data in memory with the # data on disk, otherwise the data on disk is deleted. # @param [String, nil] file if supplied, the name of the file to save to # @return [Boolean] whether the database was saved def save(merge = true, file = nil) if file && file != @file @file = file @serializer = Serializers::YardocSerializer.new(@file) end destroy unless merge sdb = Registry.single_object_db if sdb == true || sdb == nil @serializer.serialize(@store) else values(false).each do |object| @serializer.serialize(object) end end write_proxy_types write_object_types write_checksums true end # Deletes the .yardoc database on disk # # @param [Boolean] force if force is not set to true, the file/directory # will only be removed if it ends with .yardoc. This helps with # cases where the directory might have been named incorrectly. # @return [Boolean] true if the .yardoc database was deleted, false # otherwise. def destroy(force = false) if (!force && file =~ /\.yardoc$/) || force if File.file?(@file) # Handle silent upgrade of old .yardoc format File.unlink(@file) elsif File.directory?(@file) FileUtils.rm_rf(@file) end true else false end end protected def objects_path @serializer.objects_path end # @deprecated The registry no longer tracks proxy types def proxy_types_path @serializer.proxy_types_path end def checksums_path @serializer.checksums_path end def object_types_path @serializer.object_types_path end def load_yardoc return false unless @file if File.directory?(@file) # new format @loaded_objects = 0 @available_objects = all_disk_objects.size load_proxy_types load_checksums load_root load_object_types true elsif File.file?(@file) # old format load_yardoc_old true else false end end private def load_yardoc_old @store, @proxy_types = *Marshal.load(File.read_binary(@file)) end # @deprecated The registry no longer tracks proxy types def load_proxy_types return unless File.file?(proxy_types_path) @proxy_types = Marshal.load(File.read_binary(proxy_types_path)) end def load_object_types if File.file?(object_types_path) @object_types = Marshal.load(File.read_binary(object_types_path)) else # migrate db without object_types values.each do |object| (@object_types[object.type] ||= []) << object.path end end end def load_checksums return unless File.file?(checksums_path) lines = File.readlines(checksums_path).map do |line| line.strip.split(/\s+/) end @checksums = Hash[lines] end def load_root if root = @serializer.deserialize('root') @loaded_objects += 1 if root.is_a?(Hash) # single object db log.debug "Loading single object DB from .yardoc" @loaded_objects += (root.keys.size - 1) @store = root else # just the root object @store[:root] = root end end end def load_locale(name) locale = I18n::Locale.new(name) locale.load(Registry.po_dir) locale end def all_disk_objects Dir.glob(File.join(objects_path, '**/*')).select {|f| File.file?(f) } end # @deprecated The registry no longer tracks proxy types def write_proxy_types File.open!(proxy_types_path, 'wb') {|f| f.write(Marshal.dump(@proxy_types)) } end def write_object_types File.open!(object_types_path, 'wb') {|f| f.write(Marshal.dump(@object_types)) } end def write_checksums File.open!(checksums_path, 'w') do |f| @checksums.each {|k, v| f.puts("#{k} #{v}") } end end end end yard-master/lib/yard/rubygems/000077500000000000000000000000001265676644000166705ustar00rootroot00000000000000yard-master/lib/yard/rubygems/backports.rb000066400000000000000000000003421265676644000212040ustar00rootroot00000000000000begin require 'rubygems' if defined?(Gem::VERSION) && Gem::VERSION >= '1.8.0' require File.dirname(__FILE__) + '/backports/gem' require File.dirname(__FILE__) + '/backports/source_index' end rescue LoadError end yard-master/lib/yard/rubygems/backports/000077500000000000000000000000001265676644000206605ustar00rootroot00000000000000yard-master/lib/yard/rubygems/backports/LICENSE.txt000066400000000000000000000046331265676644000225110ustar00rootroot00000000000000RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim Weirich and others. You can redistribute it and/or modify it under either the terms of the MIT license (see the file MIT.txt), or the conditions below: 1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: a. place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. b. use the modified software only within your corporation or organization. c. give non-standard executables non-standard names, with instructions on where to get the original software distribution. d. make other distribution arrangements with the author. 3. You may distribute the software in object code or executable form, provided that you do at least ONE of the following: a. distribute the executables and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. b. accompany the distribution with the machine-readable source of the software. c. give non-standard executables non-standard names, with instructions on where to get the original software distribution. d. make other distribution arrangements with the author. 4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under these terms. For the list of those files and their copying conditions, see the file LEGAL. 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. yard-master/lib/yard/rubygems/backports/MIT.txt000066400000000000000000000021001265676644000220430ustar00rootroot00000000000000Copyright (c) Chad Fowler, Rich Kilmer, Jim Weirich and others. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. yard-master/lib/yard/rubygems/backports/gem.rb000066400000000000000000000004021265676644000217510ustar00rootroot00000000000000module Gem class << self undef source_index if method_defined?(:source_index) # Returns the Gem::SourceIndex of specifications that are in the Gem.path def source_index @@source_index ||= SourceIndex.from_installed_gems end end end yard-master/lib/yard/rubygems/backports/source_index.rb000066400000000000000000000224211265676644000236750ustar00rootroot00000000000000#-- # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. # All rights reserved. # See LICENSE.txt for permissions. #++ require 'rubygems/specification' ## # The SourceIndex object indexes all the gems available from a # particular source (e.g. a list of gem directories, or a remote # source). A SourceIndex maps a gem full name to a gem # specification. # # NOTE:: The class used to be named Cache, but that became # confusing when cached source fetchers where introduced. The # constant Gem::Cache is an alias for this class to allow old # YAMLized source index objects to load properly. class Gem::SourceIndex # Undef old methods alias old_initialize initialize undef old_initialize %w(all_gems prerelease_gems load_gems_in latest_specs prerelease_specs released_specs add_spec add_specs remove_spec each specification index_signature gem_signature size length find_name search released_gems refresh! outdated == dump gems spec_dirs spec_dirs=).each do |meth| undef_method(meth) if method_defined?(meth) end include Enumerable attr_reader :gems # :nodoc: ## # Directories to use to refresh this SourceIndex when calling refresh! attr_accessor :spec_dirs class << self # Undef old methods %w(from_installed_gems installed_spec_directories from_gems_in load_specification).each do |meth| if instance_methods(true).find {|m| m.to_s == meth } undef_method(meth) end end ## # Factory method to construct a source index instance for a given # path. # # deprecated:: # If supplied, from_installed_gems will act just like # +from_gems_in+. This argument is deprecated and is provided # just for backwards compatibility, and should not generally # be used. # # return:: # SourceIndex instance def from_installed_gems(*deprecated) if deprecated.empty? from_gems_in(*installed_spec_directories) else from_gems_in(*deprecated) # HACK warn end end ## # Returns a list of directories from Gem.path that contain specifications. def installed_spec_directories Gem.path.collect { |dir| File.join(dir, "specifications") } end ## # Creates a new SourceIndex from the ruby format gem specifications in # +spec_dirs+. def from_gems_in(*spec_dirs) source_index = new source_index.spec_dirs = spec_dirs source_index.refresh! end ## # Loads a ruby-format specification from +file_name+ and returns the # loaded spec. def load_specification(file_name) Gem::Specification.load file_name end end ## # Constructs a source index instance from the provided specifications, which # is a Hash of gem full names and Gem::Specifications. #-- # TODO merge @gems and @prerelease_gems and provide a separate method # #prerelease_gems def initialize(specifications={}) @gems = {} specifications.each{ |full_name, spec| add_spec spec } @spec_dirs = nil end # TODO: remove method def all_gems @gems end def prerelease_gems @gems.reject{ |name, gem| !gem.version.prerelease? } end def released_gems @gems.reject{ |name, gem| gem.version.prerelease? } end ## # Reconstruct the source index from the specifications in +spec_dirs+. def load_gems_in(*spec_dirs) @gems.clear spec_dirs.reverse_each do |spec_dir| spec_files = Dir.glob File.join(spec_dir, '*.gemspec') spec_files.each do |spec_file| gemspec = Gem::Specification.load spec_file add_spec gemspec if gemspec end end self end ## # Returns an Array specifications for the latest released versions # of each gem in this index. def latest_specs(include_prerelease=false) result = Hash.new { |h,k| h[k] = [] } latest = {} sort.each do |_, spec| name = spec.name curr_ver = spec.version prev_ver = latest.key?(name) ? latest[name].version : nil next if !include_prerelease && curr_ver.prerelease? next unless prev_ver.nil? or curr_ver >= prev_ver or latest[name].platform != Gem::Platform::RUBY if prev_ver.nil? or (curr_ver > prev_ver and spec.platform == Gem::Platform::RUBY) then result[name].clear latest[name] = spec end if spec.platform != Gem::Platform::RUBY then result[name].delete_if do |result_spec| result_spec.platform == spec.platform end end result[name] << spec end # TODO: why is this a hash while @gems is an array? Seems like # structural similarity would be good. result.values.flatten end ## # An array including only the prerelease gemspecs def prerelease_specs prerelease_gems.values end ## # An array including only the released gemspecs def released_specs released_gems.values end ## # Add a gem specification to the source index. def add_spec(gem_spec, name = gem_spec.full_name) # No idea why, but the Indexer wants to insert them using original_name # instead of full_name. So we make it an optional arg. @gems[name] = gem_spec end ## # Add gem specifications to the source index. def add_specs(*gem_specs) gem_specs.each do |spec| add_spec spec end end ## # Remove a gem specification named +full_name+. def remove_spec(full_name) @gems.delete full_name end ## # Iterate over the specifications in the source index. def each(&block) # :yields: gem.full_name, gem @gems.each(&block) end ## # The gem specification given a full gem spec name. def specification(full_name) @gems[full_name] end ## # The signature for the source index. Changes in the signature indicate a # change in the index. def index_signature require 'digest' Digest::SHA256.new.hexdigest(@gems.keys.sort.join(',')).to_s end ## # The signature for the given gem specification. def gem_signature(gem_full_name) require 'digest' Digest::SHA256.new.hexdigest(@gems[gem_full_name].to_yaml).to_s end def size @gems.size end alias length size ## # Find a gem by an exact match on the short name. def find_name(gem_name, requirement = Gem::Requirement.default) dep = Gem::Dependency.new gem_name, requirement search dep end ## # Search for a gem by Gem::Dependency +gem_pattern+. If +only_platform+ # is true, only gems matching Gem::Platform.local will be returned. An # Array of matching Gem::Specification objects is returned. # # For backwards compatibility, a String or Regexp pattern may be passed as # +gem_pattern+, and a Gem::Requirement for +platform_only+. This # behavior is deprecated and will be removed. def search(gem_pattern, platform_only = false) requirement = nil only_platform = false # TODO - Remove support and warning for legacy arguments after 2008/11 unless Gem::Dependency === gem_pattern warn "#{Gem.location_of_caller.join ':'}:Warning: Gem::SourceIndex#search support for #{gem_pattern.class} patterns is deprecated, use #find_name" end case gem_pattern when Regexp then requirement = platform_only || Gem::Requirement.default when Gem::Dependency then only_platform = platform_only requirement = gem_pattern.requirement gem_pattern = if Regexp === gem_pattern.name then gem_pattern.name elsif gem_pattern.name.empty? then // else /^#{Regexp.escape gem_pattern.name}$/ end else requirement = platform_only || Gem::Requirement.default gem_pattern = /#{gem_pattern}/i end unless Gem::Requirement === requirement then requirement = Gem::Requirement.create requirement end specs = all_gems.values.select do |spec| spec.name =~ gem_pattern and requirement.satisfied_by? spec.version end if only_platform then specs = specs.select do |spec| Gem::Platform.match spec.platform end end specs.sort_by { |s| s.sort_obj } end ## # Replaces the gems in the source index from specifications in the # directories this source index was created from. Raises an exception if # this source index wasn't created from a directory (via from_gems_in or # from_installed_gems, or having spec_dirs set). def refresh! raise 'source index not created from disk' if @spec_dirs.nil? load_gems_in(*@spec_dirs) end ## # Returns an Array of Gem::Specifications that are not up to date. def outdated outdateds = [] latest_specs.each do |local| dependency = Gem::Dependency.new local.name, ">= #{local.version}" fetcher = Gem::SpecFetcher.fetcher remotes = fetcher.find_matching dependency remotes = remotes.map { |(_, version, _), _| version } latest = remotes.sort.last outdateds << local.name if latest and local.version < latest end outdateds end def ==(other) # :nodoc: self.class === other and @gems == other.gems end def dump Marshal.dump(self) end end # :stopdoc: module Gem ## # Cache is an alias for SourceIndex to allow older YAMLized source index # objects to load properly. Cache = SourceIndex unless defined?(Cache) end # :startdoc: yard-master/lib/yard/rubygems/doc_manager.rb000066400000000000000000000045041265676644000214570ustar00rootroot00000000000000begin require 'rubygems/user_interaction' require 'rubygems/doc_manager' rescue LoadError end class Gem::DocManager def self.load_yardoc require File.expand_path(File.join(File.dirname(__FILE__), *%w(.. .. yard))) end def run_yardoc(*args) args << '--quiet' args << '--backtrace' if Gem.configuration.backtrace unless File.file?(File.join(@spec.full_gem_path, '.yardopts')) args << @spec.require_paths if @spec.extra_rdoc_files.size > 0 args << '-' args += @spec.extra_rdoc_files end end args = args.flatten.map {|arg| arg.to_s } old_pwd = Dir.pwd Dir.chdir(@spec.full_gem_path) YARD::CLI::Yardoc.run(*args) rescue Errno::EACCES => e dirname = File.dirname e.message.split("-")[1].strip raise Gem::FilePermissionError.new(dirname) rescue => ex alert_error "While generating documentation for #{@spec.full_name}" ui.errs.puts "... MESSAGE: #{ex}" ui.errs.puts "... YARDOC args: #{args.join(' ')}" ui.errs.puts "\t#{ex.backtrace.join("\n\t")}" if Gem.configuration.backtrace ui.errs.puts "(continuing with the rest of the installation)" ensure Dir.chdir(old_pwd) end begin undef setup_rdoc; rescue NameError; end def setup_rdoc if File.exist?(@doc_dir) && !File.writable?(@doc_dir) then raise Gem::FilePermissionError.new(@doc_dir) end FileUtils.mkdir_p @doc_dir unless File.exist?(@doc_dir) self.class.load_rdoc if @spec.has_rdoc? self.class.load_yardoc if @spec.has_yardoc? end def install_yardoc rdoc_dir = File.join(@doc_dir, 'rdoc') FileUtils.rm_rf rdoc_dir say "Installing YARD documentation for #{@spec.full_name}..." run_yardoc '-o', rdoc_dir end def install_ri_yard install_ri_yard_orig if @spec.has_rdoc? return if @spec.has_rdoc? == false return if @spec.has_yardoc? self.class.load_yardoc say "Building YARD (yri) index for #{@spec.full_name}..." run_yardoc '-c', '-n' end begin alias install_ri_yard_orig install_ri alias install_ri install_ri_yard rescue NameError; end def install_rdoc_yard if @spec.has_rdoc? install_rdoc_yard_orig elsif @spec.has_yardoc? install_yardoc end end begin alias install_rdoc_yard_orig install_rdoc alias install_rdoc install_rdoc_yard rescue NameError; end end yard-master/lib/yard/rubygems/specification.rb000066400000000000000000000017461265676644000220450ustar00rootroot00000000000000require 'rubygems/specification' class Gem::Specification # @since 0.5.3 def has_yardoc=(value) @has_rdoc = value ? 'yard' : false end def has_yardoc @has_rdoc == 'yard' end undef has_rdoc? def has_rdoc? (@has_rdoc ||= true) && @has_rdoc != 'yard' end alias has_yardoc? has_yardoc # has_rdoc should not be ignored! if respond_to?(:overwrite_accessor) overwrite_accessor(:has_rdoc) { @has_rdoc ||= true } overwrite_accessor(:has_rdoc=) {|v| @has_rdoc = v } else attr_accessor :has_rdoc end if defined?(Gem::VERSION) && Gem::VERSION >= '1.7.' def _dump_with_rdoc(limit) dmp = _dump_without_rdoc(limit) dmp[15] = @has_rdoc if dmp[15] == true dmp end alias _dump_without_rdoc _dump alias _dump _dump_with_rdoc @@default_value[:has_rdoc] = true if defined?(@@default_value) @@attributes << 'has_rdoc' if defined?(@@attributes) @@nil_attributes << 'has_rdoc' if defined?(@@nil_attributes) end end yard-master/lib/yard/serializers/000077500000000000000000000000001265676644000173675ustar00rootroot00000000000000yard-master/lib/yard/serializers/base.rb000066400000000000000000000060211265676644000206250ustar00rootroot00000000000000module YARD module Serializers # The abstract base serializer. Serializers allow templates to be # rendered to various endpoints. For instance, a {FileSystemSerializer} # would allow template contents to be written to the filesystem # # To implement a custom serializer, override the following methods: # * {#serialize} # * {#serialized_path} # # Optionally, a serializer can implement before and after filters: # * {#before_serialize} # * {#after_serialize} # # @abstract Override this class to implement a custom serializer. class Base # All serializer options are saved so they can be passed to other serializers. # # @return [SymbolHash] the serializer options attr_reader :options # @group Creating a New Serializer # Creates a new serializer with options # # @param [Hash] opts the options to assign to {#options} def initialize(opts = {}) @options = SymbolHash.new(false).update(opts) end # @group Serializing an Object # Serializes an object. # # @abstract This method should implement the logic that serializes # +data+ to the respective endpoint. This method should also call # the before and after callbacks {#before_serialize} and {#after_serialize} # @param [CodeObjects::Base, String] object the object to serialize the # data for. The object can also be a string (for non-object serialization) # @param [String] data the contents that should be serialized def serialize(object, data) end # The serialized path of an object # # @abstract This method should return the path of the object on the # endpoint. For instance, for a file serializer, this should return # the filename that represents the object on disk. # @param [CodeObjects::Base] object the object to return a path for # @return [String] the serialized path of an object def serialized_path(object) end # Returns whether an object has been serialized # # @abstract This method should return whether the endpoint already exists. # For instance, a file system serializer would check if the file exists # on disk. You will most likely use +#basepath+ and {#serialized_path} to # get the endpoint's location. # @param [CodeObjects::Base] object the object to check existence of # @return [Boolean] whether the endpoint exists. # @since 0.6.0 def exists?(object) false end # @group Callbacks # Called before serialization. # # @abstract Should run code before serialization. Should return false # if serialization should not occur. # @return [Boolean] whether or not serialization should occur def before_serialize; end # Called after serialization. # # @abstract Should run code after serialization. # @param [String] data the data that was serialized. # @return [void] def after_serialize(data); end end end endyard-master/lib/yard/serializers/file_system_serializer.rb000066400000000000000000000107341265676644000244750ustar00rootroot00000000000000module YARD module Serializers # Implements a serializer that reads from and writes to the filesystem. class FileSystemSerializer < Base # The base path to write data to. # @return [String] a base path attr_reader :basepath def basepath=(value) @basepath = options[:basepath] = value end # The extension of the filename (defaults to +html+) # # @return [String] the extension of the file. Empty string for no extension. attr_reader :extension def extension=(value) @extension = options[:extension] = value end # Creates a new FileSystemSerializer with options # # @option opts [String] :basepath ('doc') the base path to write data to # @option opts [String] :extension ('html') the extension of the serialized # path filename. If this is set to the empty string, no extension is used. def initialize(opts = {}) super @name_map = nil @basepath = (options[:basepath] || 'doc').to_s @extension = (options.has_key?(:extension) ? options[:extension] : 'html').to_s end # Serializes object with data to its serialized path (prefixed by the +#basepath+). # # @return [String] the written data (for chaining) def serialize(object, data) path = File.join(basepath, serialized_path(object)) log.debug "Serializing to #{path}" File.open!(path, "wb") {|f| f.write data } end # Implements the serialized path of a code object. # # @param [CodeObjects::Base, CodeObjects::ExtraFileObject, String] object # the object to get a path for. The path of a string is the string itself. # @return [String] if object is a String, returns # object, otherwise the path on disk (without the basepath). def serialized_path(object) return object if object.is_a?(String) if object.is_a?(CodeObjects::ExtraFileObject) fspath = ['file.' + object.name + (extension.empty? ? '' : ".#{extension}")] else objname = object != YARD::Registry.root ? mapped_name(object) : "top-level-namespace" objname += '_' + object.scope.to_s[0,1] if object.is_a?(CodeObjects::MethodObject) fspath = [objname + (extension.empty? ? '' : ".#{extension}")] if object.namespace && object.namespace.path != "" fspath.unshift(*object.namespace.path.split(CodeObjects::NSEP)) end end File.join(encode_path_components(*fspath)) end # Checks the disk for an object and returns whether it was serialized. # # @param [CodeObjects::Base] object the object to check # @return [Boolean] whether an object has been serialized to disk def exists?(object) File.exist?(File.join(basepath, serialized_path(object))) end private # Builds a filename mapping from object paths to filesystem path names. # Needed to handle case sensitive YARD objects mapped into a case # insensitive filesystem. Uses with {#mapped_name} to determine the # mapping name for a given object. # # @note In order to use filesystem name mapping, you must initialize # the serializer object after preparing the {YARD::Registry}. def build_filename_map @name_map = {} YARD::Registry.all.each do |object| lpath = nil if object.parent && object.parent.type != :root lpath = object.parent.path + "::" + object.name.to_s.downcase else lpath = object.path.downcase end @name_map[lpath] ||= {} size = @name_map[lpath].size name = "#{object.name}#{size > 0 ? "_" * size : ""}" @name_map[lpath][object.name] = name end end # @return [String] the filesystem mapped name of a given object. def mapped_name(object) build_filename_map if !@name_map map = @name_map[object.path.downcase] return map && map[object.name] ? map[object.name] : object.name.to_s end # Remove special chars from filenames. # Windows disallows \ / : * ? " < > | but we will just remove any # non alphanumeric (plus period, underscore and dash). def encode_path_components(*components) components.map! do |p| p.gsub(/[^\w\.-]/) do |x| encoded = '_' x.each_byte { |b| encoded << ("%X" % b) } encoded end end end end end end yard-master/lib/yard/serializers/process_serializer.rb000066400000000000000000000012631265676644000236250ustar00rootroot00000000000000module YARD module Serializers # Serializes an object to a process (like less) # # @example Serializing to a pager (less) # serializer = ProcessSerializer.new('less') # serializer.serialize(object, "data!") class ProcessSerializer < Base # Creates a new ProcessSerializer for the shell command +cmd+ # # @param [String] cmd the command that will accept data on stdin def initialize(cmd) @cmd = cmd end # Overrides serialize behaviour and writes data to standard input # of the associated command def serialize(object, data) IO.popen(@cmd, 'w') {|io| io.write(data) } end end end end yard-master/lib/yard/serializers/stdout_serializer.rb000066400000000000000000000017441265676644000234750ustar00rootroot00000000000000module YARD module Serializers # A serializer that writes data to standard output. class StdoutSerializer < Base # Creates a serializer to print text to stdout # # @param [Fixnum, nil] wrap if wrap is a number, wraps text to +wrap+ # columns, otherwise no wrapping is done. def initialize(wrap = nil) @wrap = wrap end # Overrides serialize behaviour to write data to standard output def serialize(object, data) print(@wrap ? word_wrap(data, @wrap) : data) end private # Wraps text to a specific column length # # @param [String] text the text to wrap # @param [Fixnum] length the column length to wrap to # @return [String] the wrapped text def word_wrap(text, length = 80) # See ruby-talk/10655 / Ernest Ellingson text.gsub(/\t/," ").gsub(/.{1,50}(?:\s|\Z)/){($& + 5.chr).gsub(/\n\005/,"\n").gsub(/\005/,"\n")} end end end endyard-master/lib/yard/serializers/yardoc_serializer.rb000066400000000000000000000067301265676644000234340ustar00rootroot00000000000000module YARD # Stubs marshal dumps and acts a delegate class for an object by path # # @private class StubProxy instance_methods.each {|m| undef_method(m) unless m.to_s =~ /^__|^object_id$/ } def _dump(depth) @path end def self._load(str) new(str) end def hash; @path.hash end def initialize(path, transient = false) @path = path @transient = transient end def method_missing(meth, *args, &block) return true if meth == :respond_to? && args.first == :_dump @object = nil if @transient @object ||= Registry.at(@path) @object.send(meth, *args, &block) rescue NoMethodError => e e.backtrace.delete_if {|l| l[0, __FILE__.size] == __FILE__ } raise end end module Serializers class YardocSerializer < FileSystemSerializer def initialize(yfile) super(:basepath => yfile, :extension => 'dat') end def objects_path; File.join(basepath, 'objects') end # @deprecated The registry no longer tracks proxy types def proxy_types_path; File.join(basepath, 'proxy_types') end def checksums_path; File.join(basepath, 'checksums') end def object_types_path; File.join(basepath, 'object_types') end def serialized_path(object) path = case object when String, Symbol object = object.to_s if object =~ /#/ object += '_i' elsif object =~ /\./ object += '_c' end object.split(/::|\.|#/).map do |p| p.gsub(/[^\w\.-]/) do |x| encoded = '_' x.each_byte { |b| encoded << ("%X" % b) } encoded end end.join('/') + '.' + extension when YARD::CodeObjects::RootObject 'root.dat' else super(object) end File.join('objects', path) end def serialize(object) if Hash === object super(object[:root], dump(object)) if object[:root] else super(object, dump(object)) end end def deserialize(path, is_path = false) path = File.join(basepath, serialized_path(path)) unless is_path if File.file?(path) log.debug "Deserializing #{path}..." Marshal.load(File.read_binary(path)) else log.debug "Could not find #{path}" nil end end private def dump(object) object = internal_dump(object, true) unless object.is_a?(Hash) Marshal.dump(object) end def internal_dump(object, first_object = false) if !first_object && object.is_a?(CodeObjects::Base) && !(Tags::OverloadTag === object) return StubProxy.new(object.path) end if object.is_a?(Hash) || object.is_a?(Array) || object.is_a?(CodeObjects::Base) || object.instance_variables.size > 0 object = object.dup end object.instance_variables.each do |ivar| ivar_obj = object.instance_variable_get(ivar) ivar_obj_dump = internal_dump(ivar_obj) object.instance_variable_set(ivar, ivar_obj_dump) end case object when Hash list = object.map do |k, v| [k, v].map {|item| internal_dump(item) } end object.replace(Hash[list]) when Array list = object.map {|item| internal_dump(item) } object.replace(list) end object end end end endyard-master/lib/yard/server.rb000066400000000000000000000004551265676644000166720ustar00rootroot00000000000000module YARD module Server # Registers a static path to be used in static asset lookup. # @param [String] path the pathname to register # @return [void] # @since 0.6.2 def self.register_static_path(path) Commands::StaticFileCommand::STATIC_PATHS.push(path) end end endyard-master/lib/yard/server/000077500000000000000000000000001265676644000163415ustar00rootroot00000000000000yard-master/lib/yard/server/adapter.rb000066400000000000000000000102771265676644000203150ustar00rootroot00000000000000module YARD module Server # Short circuits a request by raising an error. This exception is caught # by {Commands::Base#call} to immediately end a request and return a response. class FinishRequest < RuntimeError; end # Raises an error if a resource is not found. This exception is caught by # {Commands::Base#call} to immediately end a request and return a 404 response # code. If a message is provided, the body is set to the exception message. class NotFoundError < RuntimeError; end # This class implements the bridge between the {Router} and the server # backend for a specific server type. YARD implements concrete adapters # for WEBrick and Rack respectively, though other adapters can be made # for other server architectures. # # == Subclassing Notes # To create a concrete adapter class, implement the {#start} method to # initiate the server backend. # # @abstract class Adapter # @return [String] the location where static files are located, if any. # To set this field on initialization, pass +:DocumentRoot+ to the # +server_opts+ argument in {#initialize} attr_accessor :document_root # @return [Hash{String=>Array}] a map of libraries. # @see LibraryVersion LibraryVersion for information on building a list of libraries # @see #add_library attr_accessor :libraries # @return [Hash] options passed and processed by adapters. The actual # options mostly depend on the adapters themselves. attr_accessor :options # @return [Hash] a set of options to pass to the server backend. Note # that +:DocumentRoot+ also sets the {#document_root}. attr_accessor :server_options # @return [Router] the router object used to route URLs to commands attr_accessor :router # Performs any global initialization for the adapter. # @note If you subclass this method, make sure to call +super+. # @return [void] def self.setup Templates::Template.extra_includes |= [YARD::Server::DocServerHelper] Templates::Engine.template_paths |= [File.dirname(__FILE__) + '/templates'] end # Performs any global shutdown procedures for the adapter. # @note If you subclass this method, make sure to call +super+. # @return [void] def self.shutdown Templates::Template.extra_includes -= [YARD::Server::DocServerHelper] Templates::Engine.template_paths -= [File.dirname(__FILE__) + '/templates'] end # Creates a new adapter object # # @param [Hash{String=>Array}] libs a list of libraries, # see {#libraries} for formulating this list. # @param [Hash] opts extra options to pass to the adapter # @option opts [Class] :router (Router) the router class to initialize as the # adapter's router. # @option opts [Boolean] :caching (false) whether or not caching is enabled # @option opts [Boolean] :single_library (false) whether to server documentation # for a single or multiple libraries (changes URL structure) def initialize(libs, opts = {}, server_opts = {}) self.class.setup self.libraries = libs self.options = opts self.server_options = server_opts self.document_root = server_options[:DocumentRoot] self.router = (options[:router] || Router).new(self) options[:adapter] = self log.debug "Serving libraries using #{self.class}: #{libraries.keys.join(', ')}" log.debug "Caching on" if options[:caching] log.debug "Document root: #{document_root}" if document_root end # Adds a library to the {#libraries} mapping for a given library object. # @example Adding a new library to an adapter # adapter.add_library LibraryVersion.new('mylib', '1.0', '/path/to/.yardoc') # @param [LibraryVersion] library a library to add def add_library(library) libraries[library.name] ||= [] libraries[library.name] |= [library] end # Implement this method to connect your adapter to your server. # @abstract def start raise NotImplementedError end end end end yard-master/lib/yard/server/commands/000077500000000000000000000000001265676644000201425ustar00rootroot00000000000000yard-master/lib/yard/server/commands/base.rb000066400000000000000000000152071265676644000214060ustar00rootroot00000000000000require 'fileutils' module YARD module Server module Commands # This is the base command class used to implement custom commands for # a server. A command will be routed to by the {Router} class and return # a Rack-style response. # # == Attribute Initializers # All attributes can be initialized via options passed into the {#initialize} # method. When creating a custom command, the {Adapter#options} will # automatically be mapped to attributes by the same name on your class. # # class MyCommand < Base # attr_accessor :myattr # end # # Adapter.new(libs, {:myattr => 'foo'}).start # # # when a request comes in, cmd.myattr == 'foo' # # == Subclassing Notes # To implement a custom command, override the {#run} method, not {#call}. # In your implementation, you should set the body and status for requests. # See details in the +#run+ method documentation. # # Note that if your command deals directly with libraries, you should # consider subclassing the more specific {LibraryCommand} class instead. # # @abstract # @see #run class Base # @group Basic Command and Adapter Options # @return [Hash] the options passed to the command's constructor attr_accessor :command_options # @return [Adapter] the server adapter attr_accessor :adapter # @return [Boolean] whether to cache attr_accessor :caching # @group Attributes Set Per Request # @return [Request] request object attr_accessor :request # @return [String] the path after the command base URI attr_accessor :path # @return [Hash{String => String}] response headers attr_accessor :headers # @return [Numeric] status code. Defaults to 200 per request attr_accessor :status # @return [String] the response body. Defaults to empty string. attr_accessor :body # @group Instance Method Summary # Creates a new command object, setting attributes named by keys # in the options hash. After initialization, the options hash # is saved in {#command_options} for further inspection. # # @example Creating a Command # cmd = DisplayObjectCommand.new(:caching => true, :library => mylib) # cmd.library # => mylib # cmd.command_options # => {:caching => true, :library => mylib} # @param [Hash] opts the options hash, saved to {#command_options} # after initialization. def initialize(opts = {}) opts.each do |key, value| send("#{key}=", value) if respond_to?("#{key}=") end self.command_options = opts end # The main method called by a router with a request object. # # @note This command should not be overridden by subclasses. Implement # the callback method {#run} instead. # @param [Adapter Dependent] request the request object # @return [Array(Numeric,Hash,Array)] a Rack-style response # of status, headers, and body wrapped in an array. def call(request) self.request = request self.path ||= request.path[1..-1] self.headers = {'Content-Type' => 'text/html'} self.body = '' self.status = 200 begin run rescue FinishRequest rescue NotFoundError => e self.body = e.message if e.message != e.class.to_s self.status = 404 end not_found if status == 404 [status, headers, body.is_a?(Array) ? body : [body]] end # @group Abstract Methods # Subclass this method to implement a custom command. This method # should set the {#status} and {#body}, and optionally modify the # {#headers}. Note that +#status+ defaults to 200. # # @example A custom command # class ErrorCommand < Base # def run # self.body = 'ERROR! The System is down!' # self.status = 500 # self.headers['Conten-Type'] = 'text/plain' # end # end # # @abstract # @return [void] def run raise NotImplementedError end protected # @group Helper Methods # Renders a specific object if provided, or a regular template rendering # if object is not provided. # # @todo This method is dependent on +#options+, it should be in {LibraryCommand}. # @param [CodeObjects::Base, nil] object calls {CodeObjects::Base#format} if # an object is provided, or {Templates::Engine.render} if object is nil. Both # receive +#options+ as an argument. # @return [String] the resulting output to display def render(object = nil) case object when CodeObjects::Base cache object.format(options) when nil cache Templates::Engine.render(options) else cache object end end # Override this method to implement custom caching mechanisms for # # @example Caching to memory # $memory_cache = {} # def cache(data) # $memory_cache[path] = data # end # @param [String] data the data to cache # @return [String] the same cached data (for chaining) # @see StaticCaching def cache(data) if caching && adapter.document_root path = File.join(adapter.document_root, request.path.sub(/\.html$/, '') + '.html') path = path.sub(%r{/\.html$}, '.html') FileUtils.mkdir_p(File.dirname(path)) log.debug "Caching data to #{path}" File.open(path, 'wb') {|f| f.write(data) } end self.body = data end # Sets the body and headers (but not status) for a 404 response. Does # nothing if the body is already set. # # @return [void] def not_found return unless body.empty? self.body = "Not found: #{request.path}" self.headers['Content-Type'] = 'text/plain' self.headers['X-Cascade'] = 'pass' end # Sets the headers and status code for a redirection to a given URL # @param [String] url the URL to redirect to # @raise [FinishRequest] causes the request to terminate. def redirect(url) headers['Location'] = url self.status = 302 raise FinishRequest end end end end end yard-master/lib/yard/server/commands/display_file_command.rb000066400000000000000000000017271265676644000246400ustar00rootroot00000000000000module YARD module Server module Commands # Displays a README or extra file. # # @todo Implement better support for detecting binary (image) filetypes class DisplayFileCommand < LibraryCommand attr_accessor :index def run ppath = library.source_path filename = File.cleanpath(File.join(library.source_path, path)) raise NotFoundError if !File.file?(filename) if filename =~ /\.(jpe?g|gif|png|bmp)$/i headers['Content-Type'] = StaticFileCommand::DefaultMimeTypes[$1.downcase] || 'text/html' render File.read_binary(filename) else file = CodeObjects::ExtraFileObject.new(filename) options.update :object => Registry.root, :type => :layout, :file => file, :index => index ? true : false render end end end end end end yard-master/lib/yard/server/commands/display_object_command.rb000066400000000000000000000031711265676644000251620ustar00rootroot00000000000000module YARD module Server module Commands # Displays documentation for a specific object identified by the path class DisplayObjectCommand < LibraryCommand include DocServerHelper def run if path.empty? if options.readme filename = options.readme.filename opts = adapter.options.merge( :index => true, :library => library, :path => filename.sub(%r{^#{library.source_path.to_s}/}, '')) self.status, self.headers, self.body = *DisplayFileCommand.new(opts).call(request) cache(self.body) return else self.path = 'index' end end return index if path == 'index' if object = Registry.at(object_path) options.update(:type => :layout) render(object) else self.status = 404 end end def index Registry.load_all options.update( :object => '_index.html', :objects => Registry.all(:module, :class), :type => :layout ) render end def not_found super self.body = "Could not find object: #{object_path}" end private def object_path return @object_path if @object_path if path == "toplevel" @object_path = :root else @object_path = path.sub(':', '#').gsub('/', '::').sub(/^toplevel\b/, '').sub(/\.html$/, '') end end end end end end yard-master/lib/yard/server/commands/frames_command.rb000066400000000000000000000005421265676644000234430ustar00rootroot00000000000000module YARD module Server module Commands # Displays an object wrapped in frames class FramesCommand < DisplayObjectCommand def run options.update(:frames => true, :type => :fulldoc) tpl = fulldoc_template tpl.generate_frameset cache(tpl.contents) end end end end end yard-master/lib/yard/server/commands/library_command.rb000066400000000000000000000113771265676644000236420ustar00rootroot00000000000000require 'thread' module YARD module Server module Commands class LibraryOptions < CLI::YardocOptions def adapter; @command.adapter end def library; @command.library end def single_library; @command.single_library end def serializer; @command.serializer end def serialize; false end attr_accessor :command attr_accessor :frames def each(&block) super(&block) yield(:adapter, adapter) yield(:library, library) yield(:single_library, single_library) yield(:serializer, serializer) end end # This is the base command for all commands that deal directly with libraries. # Some commands do not, but most (like {DisplayObjectCommand}) do. If your # command deals with libraries directly, subclass this class instead. # See {Base} for notes on how to subclass a command. # # @abstract class LibraryCommand < Base # @return [LibraryVersion] the object containing library information attr_accessor :library # @return [LibraryOptions] default options for the library attr_accessor :options # @return [Serializers::Base] the serializer used to perform file linking attr_accessor :serializer # @return [Boolean] whether router should route for multiple libraries attr_accessor :single_library # @return [Boolean] whether to reparse data attr_accessor :incremental # Needed to synchronize threads in {#setup_yardopts} # @private @@library_chdir_lock = Mutex.new def initialize(opts = {}) super self.serializer = DocServerSerializer.new end def call(request) save_default_template_info self.request = request self.options = LibraryOptions.new self.options.reset_defaults self.options.command = self setup_library self.options.title = "Documentation for #{library.name} " + (library.version ? '(' + library.version + ')' : '') super rescue LibraryNotPreparedError not_prepared ensure restore_template_info end private def save_default_template_info @old_template_paths = Templates::Engine.template_paths.dup @old_extra_includes = Templates::Template.extra_includes.dup end def restore_template_info Templates::Engine.template_paths = @old_template_paths Templates::Template.extra_includes = @old_extra_includes end def setup_library library.prepare! if request.xhr? && request.query['process'] load_yardoc setup_yardopts true end def setup_yardopts @@library_chdir_lock.synchronize do Dir.chdir(library.source_path) do yardoc = CLI::Yardoc.new if incremental yardoc.run('-c', '-n', '--no-stats') else yardoc.parse_arguments end yardoc.send(:verify_markup_options) yardoc.options.delete(:serializer) yardoc.options.delete(:serialize) options.update(yardoc.options.to_hash) end end end def load_yardoc raise LibraryNotPreparedError unless library.yardoc_file if Thread.current[:__yard_last_yardoc__] == library.yardoc_file log.debug "Reusing yardoc file: #{library.yardoc_file}" return end Registry.clear Templates::ErbCache.clear! Registry.load_yardoc(library.yardoc_file) Thread.current[:__yard_last_yardoc__] = library.yardoc_file end def not_prepared options.update(:template => :doc_server, :type => :processing) self.caching = false self.status = 202 self.body = render self.headers = {'Content-Type' => 'text/html'} [status, headers, [body]] end # Hack to load a custom fulldoc template object that does # not do any rendering/generation. We need this to access the # generate_*_list methods. def fulldoc_template tplopts = [options.template, :fulldoc, options.format] tplclass = Templates::Engine.template(*tplopts) obj = Object.new.extend(tplclass) class << obj; def init; end end obj.class = tplclass obj.send(:initialize, options) class << obj attr_reader :contents def asset(file, contents) @contents = contents end end obj end # @private @@last_yardoc = nil end end end end yard-master/lib/yard/server/commands/library_index_command.rb000066400000000000000000000010671265676644000250240ustar00rootroot00000000000000module YARD module Server module Commands # Returns the index of libraries served by the server. class LibraryIndexCommand < Base attr_accessor :options def run return unless path.empty? self.options = SymbolHash.new(false).update( :markup => :rdoc, :format => :html, :libraries => adapter.libraries, :adapter => adapter, :template => :doc_server, :type => :library_list ) render end end end end endyard-master/lib/yard/server/commands/list_command.rb000066400000000000000000000011671265676644000231450ustar00rootroot00000000000000module YARD module Server module Commands # Returns a list of objects of a specific type class ListCommand < LibraryCommand include Templates::Helpers::BaseHelper def run Registry.load_all options.update(:objects => run_verifier(Registry.all(:class, :module))) list_type = request.path.split('/').last meth = "generate_#{list_type}_list" tpl = fulldoc_template if tpl.respond_to?(meth) tpl.send(meth) cache(tpl.contents) else not_found end end end end end end yard-master/lib/yard/server/commands/search_command.rb000066400000000000000000000046421265676644000234400ustar00rootroot00000000000000module YARD module Server module Commands # Performs a search over the objects inside of a library and returns # the results as HTML or plaintext class SearchCommand < LibraryCommand include Templates::Helpers::BaseHelper include Templates::Helpers::ModuleHelper include DocServerHelper attr_accessor :results, :query def run Registry.load_all self.query = request.query['q'] redirect("/#{adapter.router.docs_prefix}/#{single_library ? library : ''}") if query.nil? || query =~ /\A\s*\Z/ if found = Registry.at(query) redirect(url_for(found)) end search_for_object request.xhr? ? serve_xhr : serve_normal end def visible_results results[0, 10] end private def url_for(object) File.join('', base_path(router.docs_prefix), serializer.serialized_path(object)) end def serve_xhr self.headers['Content-Type'] = 'text/plain' self.body = visible_results.map {|o| [(o.type == :method ? o.name(true) : o.name).to_s, o.path, o.namespace.root? ? '' : o.namespace.path, url_for(o) ].join(",") }.join("\n") end def serve_normal options.update( :visible_results => visible_results, :query => query, :results => results, :template => :doc_server, :type => :search ) self.body = Templates::Engine.render(options) end def search_for_object splitquery = query.split(/\s+/).map {|c| c.downcase }.reject {|m| m.empty? } self.results = run_verifier(Registry.all).select {|o| o.path.downcase.include?(query.downcase) }.reject {|o| name = (o.type == :method ? o.name(true) : o.name).to_s.downcase !name.include?(query.downcase) || case o.type when :method !(query =~ /[#.]/) && query.include?("::") when :class, :module, :constant, :class_variable query =~ /[#.]/ end }.sort_by {|o| name = (o.type == :method ? o.name(true) : o.name).to_s name.length.to_f / query.length.to_f } end end end end end yard-master/lib/yard/server/commands/static_file_command.rb000066400000000000000000000033711265676644000244570ustar00rootroot00000000000000require 'webrick/httputils' module YARD module Server module Commands # Serves static content when no other router matches a request class StaticFileCommand < Base include WEBrick::HTTPUtils DefaultMimeTypes['js'] = 'text/javascript' # Defines the paths used to search for static assets. To define an # extra path, use {YARD::Server.register_static_path} rather than # modifying this constant directly. Also note that files in the # document root will always take precedence over these paths. STATIC_PATHS = [] def run assets_template = Templates::Engine.template(:default, :fulldoc, :html) path = File.cleanpath(request.path).gsub(%r{^(../)+}, '') file = nil ([adapter.document_root] + STATIC_PATHS.reverse).compact.each do |path_prefix| file = File.join(path_prefix, path) break if File.exist?(file) file = nil end # Search in default/fulldoc/html template if nothing in static asset paths file ||= assets_template.find_file(path) if file ext = "." + (request.path[/\.(\w+)$/, 1] || "html") headers['Content-Type'] = mime_type(ext, DefaultMimeTypes) self.body = File.read(file) return end favicon? self.status = 404 end private # Return an empty favicon.ico if it does not exist so that # browsers don't complain. def favicon? return unless request.path == '/favicon.ico' self.headers['Content-Type'] = 'image/png' self.status = 200 self.body = '' raise FinishRequest end end end end endyard-master/lib/yard/server/doc_server_helper.rb000066400000000000000000000054721265676644000223700ustar00rootroot00000000000000module YARD module Server # A module that is mixed into {Templates::Template} in order to customize # certain template methods. module DocServerHelper # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead # of a disk location. # @param (see Templates::Helpers::HtmlHelper#url_for) # @return (see Templates::Helpers::HtmlHelper#url_for) def url_for(obj, anchor = nil, relative = false) return '' if obj.nil? return url_for_index if obj == '_index.html' return "/#{obj}" if String === obj url = super(obj, anchor, false) return unless url File.join('', base_path(router.docs_prefix), url) end # Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL instead # of a disk location. # @param (see Templates::Helpers::HtmlHelper#url_for_file) # @return (see Templates::Helpers::HtmlHelper#url_for_file) def url_for_file(filename, anchor = nil) if filename.is_a?(CodeObjects::ExtraFileObject) filename = filename.filename end "/#{base_path(router.docs_prefix)}/file/" + filename.sub(%r{^#{@library.source_path.to_s}/}, '') + (anchor ? "##{anchor}" : "") end # Modifies {Templates::Helpers::HtmlHelper#url_for_list} to return a URL # based on the list prefix instead of a HTML filename. # @param (see Templates::Helpers::HtmlHelper#url_for_list) # @return (see Templates::Helpers::HtmlHelper#url_for_list) def url_for_list(type) File.join('', base_path(router.list_prefix), type.to_s) end # Returns the frames URL for the page # @return (see Templates::Helpers::HtmlHelper#url_for_frameset) def url_for_frameset options.file ? url_for_file(options.file) : url_for(object) end # Returns the main URL, first checking a readme and then linking to the index # @return (see Templates::Helpers::HtmlHelper#url_for_main) def url_for_main options.readme ? url_for_file(options.readme) : url_for_index end # Returns the URL for the alphabetic index page # @return (see Templates::Helpers::HtmlHelper#url_for_index) def url_for_index File.join('', base_path(router.docs_prefix), 'index') end # @example The base path for a library 'foo' # base_path('docs') # => 'docs/foo' # @param [String] path the path prefix for a base path URI # @return [String] the base URI for a library with an extra +path+ prefix def base_path(path) libname = router.request.version_supplied ? @library.to_s : @library.name path + (@single_library ? '' : "/#{libname}") end # @return [Router] convenience method for accessing the router def router; @adapter.router end end end end yard-master/lib/yard/server/doc_server_serializer.rb000066400000000000000000000024571265676644000232620ustar00rootroot00000000000000require 'webrick/httputils' module YARD module Server # A custom {Serializers::Base serializer} which returns resource URLs instead of # static relative paths to files on disk. class DocServerSerializer < Serializers::FileSystemSerializer include WEBrick::HTTPUtils def initialize(command = nil) super(:basepath => '', :extension => '') end def serialized_path(object) case object when CodeObjects::RootObject "toplevel" when CodeObjects::ExtendedMethodObject name = object.name.to_s serialized_path(object.namespace) + ':' + urlencode(object.name.to_s) when CodeObjects::MethodObject serialized_path(object.namespace) + (object.scope == :instance ? ":" : ".") + urlencode(object.name.to_s) when CodeObjects::ConstantObject, CodeObjects::ClassVariableObject serialized_path(object.namespace) + "##{object.name}-#{object.type}" when CodeObjects::ExtraFileObject super(object).gsub(/^file\./, 'file/') else super(object) end end private def urlencode(name) if name.respond_to?(:force_encoding) name = name.dup.force_encoding('binary') end escape(name) end end end end yard-master/lib/yard/server/library_version.rb000066400000000000000000000237631265676644000221120ustar00rootroot00000000000000require 'fileutils' module YARD module Server # This exception is raised when {LibraryVersion#prepare!} fails, or discovers # that the library is not "prepared" to be served by class LibraryNotPreparedError < RuntimeError; end # A library version encapsulates a library's documentation at a specific version. # Although the version is optional, this allows for creating multiple documentation # points for a specific library, each representing a unique version. The term # "library" used in other parts of the YARD::Server documentation refers to # objects of this class unless otherwise noted. # # A library points to a location where a {#yardoc_file} is located so that # its documentation may be loaded and served. Optionally, a {#source_path} is # given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts}) # should be loaded from. Both of these methods may not be known immediately, # since the yardoc file may not be built until later. Resolving the yardoc # file and source path are dependent on the specific library "source type" used. # Source types (known as "library source") are discussed in detail below. # # == Using with Adapters # A list of libraries need to be passed into adapters upon creation. In # most cases, you will never do this manually, but if you use a {RackMiddleware}, # you will need to pass in this list yourself. To build this list of libraries, # you should create a hash of library names mapped to an *Array* of LibraryVersion # objects. For example: # # {'mylib' => [LibraryVersion.new('mylib', '1.0', ...), # LibraryVersion.new('mylib', '2.0', ...)]} # # Note that you can also use {Adapter#add_library} for convenience. # # The "array" part is required, even for just one library version. # # == Library Sources # The {#source} method represents the library source type, ie. where the # library "comes from". It might come from "disk", or it might come from a # "gem" (technically the disk, but a separate type nonetheless). In these # two cases, the yardoc file sits somewhere on your filesystem, though # it may also be built dynamically if it does not yet exist. This behaviour # is controlled through the {#prepare!} method, which prepares the yardoc file # given a specific library source. We will see how this works in detail in # the following section. # # == Implementing a Custom Library Source # YARD can be extended to support custom library sources in order to # build or retrieve a yardoc file at runtime from many different locations. # # To implement this behaviour, two methods must be added to the +LibraryVersion+ # class, +#load_yardoc_from_SOURCE+ and +#source_path_for_SOURCE+. In both # cases, "SOURCE" represents the source type used in {#source} when creating # the library object. The +#source_path_for_SOURCE+ method is called upon # creation and should return the location where the source code for the library # lives. The load method is called from {#prepare!} if there is no yardoc file # and should set {#yardoc_file}. Below is a full example for # implementing a custom library source, +:http+, which reads packaged .yardoc # databases from zipped archives off of an HTTP server. # # @example Implementing a Custom Library Source # # Adds the source type "http" for .yardoc files zipped on HTTP servers # class LibraryVersion # def load_yardoc_from_http # return if yardoc_file # we have the library # # # otherwise download it in a thread and return immediately # Thread.new do # # zip/unzip method implementations are not shown # download_zip_file("http://mysite.com/yardocs/#{self}.zip") # unzip_file_to("/path/to/yardocs/#{self}") # self.yardoc_file = "/path/to/yardocs/#{self}/.yardoc" # self.source_path = self.yardoc_file # end # # # tell the server it's not ready yet (but it might be next time) # raise LibraryNotPreparedError # end # # # we set this later # def source_path_for_http; nil end # end # # # Creating a library of this source type: # LibraryVersion.new('name', '1.0', nil, :http) # class LibraryVersion # @return [String] the name of the library attr_accessor :name # @return [String] the version of the specific library attr_accessor :version # @return [String] the location of the yardoc file used to load the object # information from. # @return [nil] if no yardoc file exists yet. In this case, {#prepare!} will # be called on this library to build the yardoc file. attr_accessor :yardoc_file # @return [Symbol] the source type representing where the yardoc should be # loaded from. Defaults are +:disk+ and +:gem+, though custom sources # may be implemented. This value is used to inform {#prepare!} about how # to load the necessary data in order to display documentation for an object. # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" attr_accessor :source # @return [String] the location of the source code for a library. This # value is filled by calling +#source_path_for_SOURCE+ on this class. # @return [nil] if there is no source code # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" attr_accessor :source_path # @param [String] name the name of the library # @param [String] version the specific (usually, but not always, numeric) library # version # @param [String] yardoc the location of the yardoc file, or nil if it is # generated later # @param [Symbol] source the location of the files used to build the yardoc. # Builtin source types are +:disk+ or +:gem+. def initialize(name, version = nil, yardoc = nil, source = :disk) self.name = name self.yardoc_file = yardoc self.version = version self.source = source self.source_path = load_source_path end # @param [Boolean] url_format if true, returns the string in a URI-compatible # format (for appending to a URL). Otherwise, it is given in a more human # readable format. # @return [String] the string representation of the library. def to_s(url_format = true) version ? "#{name}#{url_format ? '/' : '-'}#{version}" : "#{name}" end # @return [Fixnum] used for Hash mapping. def hash; to_s.hash end # @return [Boolean] whether another LibraryVersion is equal to this one def eql?(other) other.is_a?(LibraryVersion) && other.name == name && other.version == version && other.yardoc_file == yardoc_file end alias == eql? alias equal? eql? # @note You should not directly override this method. Instead, implement # +load_yardoc_from_SOURCENAME+ when implementing loading for a specific # source type. See the {LibraryVersion} documentation for "Implementing # a Custom Library Source" # # Prepares a library to be displayed by the server. This callback is # performed before each request on a library to ensure that it is loaded # and ready to be viewed. If any steps need to be performed prior to loading, # they are performed through this method (though they should be implemented # through the +load_yardoc_from_SOURCE+ method). # # @raise [LibraryNotPreparedError] if the library is not ready to be # displayed. Usually when raising this error, you would simultaneously # begin preparing the library for subsequent requests, although this # is not necessary. def prepare! return if yardoc_file meth = "load_yardoc_from_#{source}" send(meth) if respond_to?(meth, true) end # @return [Gem::Specification] a gemspec object for a given library. Used # for :gem source types. # @return [nil] if there is no installed gem for the library def gemspec ver = version ? "= #{version}" : ">= 0" Gem.source_index.find_name(name, ver).first end protected # Called when a library of source type "disk" is to be prepared. In this # case, the {#yardoc_file} should already be set, so nothing needs to be # done. def load_yardoc_from_disk nil end # Called when a library of source type "gem" is to be prepared. In this # case, the {#yardoc_file} needs to point to the correct location for # the installed gem. The yardoc file is built if it has not been done. # # @raise [LibraryNotPreparedError] if the gem does not have an existing # yardoc file. def load_yardoc_from_gem require 'rubygems' ver = version ? "= #{version}" : ">= 0" self.yardoc_file = Registry.yardoc_file_for_gem(name, ver) unless yardoc_file && File.directory?(yardoc_file) Thread.new do # Build gem docs on demand log.debug "Building gem docs for #{to_s(false)}" CLI::Gems.run(name, ver) self.yardoc_file = Registry.yardoc_file_for_gem(name, ver) FileUtils.touch(File.join(yardoc_file, 'complete')) end end unless yardoc_file && File.exist?(File.join(yardoc_file, 'complete')) raise LibraryNotPreparedError end end # @return [String] the source path for a disk source def source_path_for_disk File.dirname(yardoc_file) if yardoc_file end # @return [String] the source path for a gem source def source_path_for_gem gemspec.full_gem_path if gemspec end private def load_source_path meth = "source_path_for_#{source}" send(meth) if respond_to?(meth, true) end end end endyard-master/lib/yard/server/rack_adapter.rb000066400000000000000000000063401265676644000213110ustar00rootroot00000000000000require 'rack' require 'webrick/httputils' module YARD module Server # This class wraps the {RackAdapter} into a Rack-compatible middleware. # See {#initialize} for a list of options to pass via Rack's +#use+ method. # # @note You must pass a +:libraries+ option to the RackMiddleware via +#use+. To # read about how to return a list of libraries, see {LibraryVersion} or look # at the example below. # @example Using the RackMiddleware in a Rack application # libraries = {:mylib => [YARD::Server::LibraryVersion.new('mylib', nil, '/path/to/.yardoc')]} # use YARD::Server::RackMiddleware, :libraries => libraries # class RackMiddleware # Creates a new Rack-based middleware for serving YARD documentation. # # @param app the next Rack middleware in the stack # @option opts [Hash{String=>Array}] :libraries ({}) # the map of libraries to serve through the adapter. This option is *required*. # @option opts [Hash] :options ({}) a list of options to pass to the adapter. # See {Adapter#options} for a list. # @option opts [Hash] :server_options ({}) a list of options to pass to the server. # See {Adapter#server_options} for a list. def initialize(app, opts = {}) args = [opts[:libraries] || {}, opts[:options] || {}, opts[:server_options] || {}] @app = app @adapter = RackAdapter.new(*args) end def call(env) status, headers, body = *@adapter.call(env) if status == 404 @app.call(env) else [status, headers, body] end end end # A server adapter to respond to requests using the Rack server infrastructure. class RackAdapter < Adapter include WEBrick::HTTPUtils # Responds to Rack requests and builds a response with the {Router}. # @return [Array(Numeric,Hash,Array)] the Rack-style response def call(env) request = Rack::Request.new(env) request.path_info = unescape(request.path_info) # unescape things like %3F router.call(request) rescue StandardError => ex log.backtrace(ex) [500, {'Content-Type' => 'text/plain'}, [ex.message + "\n" + ex.backtrace.join("\n")]] end # Starts the +Rack::Server+. This method will pass control to the server and # block. # @return [void] def start server = Rack::Server.new(server_options) server.instance_variable_set("@app", self) print_start_message(server) server.start end private def print_start_message(server) opts = server.default_options.merge(server.options) log.puts ">> YARD #{YARD::VERSION} documentation server at http://#{opts[:Host]}:#{opts[:Port]}" # Only happens for Mongrel return unless server.server.to_s == "Rack::Handler::Mongrel" log.puts ">> #{server.server.class_name} web server (running on Rack)" log.puts ">> Listening on #{opts[:Host]}:#{opts[:Port]}, CTRL+C to stop" end end end end # @private class Rack::Request attr_accessor :version_supplied alias query params def xhr?; (env['HTTP_X_REQUESTED_WITH'] || "").downcase == "xmlhttprequest" end end yard-master/lib/yard/server/router.rb000066400000000000000000000143551265676644000202160ustar00rootroot00000000000000module YARD module Server # A router class implements the logic used to recognize a request for a specific # URL and run specific {Commands::Base commands}. # # == Subclassing Notes # To create a custom router, subclass this class and pass it into the adapter # options through {Adapter#initialize} or by directly modifying {Adapter#router}. # # The most general customization is to change the URL prefixes recognized by # routing, which can be done by overriding {#docs_prefix}, {#list_prefix} # and {#search_prefix}. # # == Implementing Custom Caching # By default, the Router class performs static disk-based caching on all # requests through the +#check_static_cache+. To override this behaviour, # or create your own caching mechanism, mixin your own custom module with # this method implemented as per {StaticCaching#check_static_cache}. # # @example Creating a subclassed router # # Adds 'my' to all routing prefixes # class MyRouter < YARD::Server::Router # def docs_prefix; 'mydocs' end # def list_prefix; 'mylist' end # def search_prefix; 'mysearch' end # end # # # Using it: # WebrickAdapter.new(libraries, :router => MyRouter).start class Router include StaticCaching include Commands # @return [Adapter Dependent] the request data coming in with the routing attr_accessor :request # @return [Adapter] the adapter used by the router attr_accessor :adapter # Creates a new router for a specific adapter # # @param [Adapter] adapter the adapter to route requests to def initialize(adapter) self.adapter = adapter end # Perform routing on a specific request, serving the request as a static # file through {Commands::StaticFileCommand} if no route is found. # # @param [Adapter Dependent] request the request object # @return [Array(Numeric,Hash,Array)] the Rack-style server response data def call(request) self.request = request if result = (check_static_cache || route) result else StaticFileCommand.new(adapter.options).call(request) end end # @group Route Prefixes # @return [String] the URI prefix for all object documentation requests def docs_prefix; 'docs' end # @return [String] the URI prefix for all class/method/file list requests def list_prefix; 'list' end # @return [String] the URI prefix for all search requests def search_prefix; 'search' end # @group Routing Methods # @return [Array(LibraryVersion, Array)] the library followed # by the rest of the path components in the request path. LibraryVersion # will be nil if no matching library was found. def parse_library_from_path(paths) return [adapter.libraries.values.first.first, paths] if adapter.options[:single_library] library, paths = nil, paths.dup if libs = adapter.libraries[paths.first] paths.shift if library = libs.find {|l| l.version == paths.first } request.version_supplied = true if request paths.shift else # use the last lib in the list request.version_supplied = false if request library = libs.last end end [library, paths] end protected # Performs routing algorithm to find which prefix is called, first # parsing out library name/version information. # # @return [Array(Numeric,Hash,Array)] the Rack-style response # @return [nil] if no route is matched def route(path = request.path) path = path.gsub(%r{//+}, '/').gsub(%r{^/|/$}, '') return route_index if path.empty? || path == docs_prefix case path when /^(#{docs_prefix}|#{list_prefix}|#{search_prefix})(\/.*|$)/ prefix = $1 paths = $2.gsub(%r{^/|/$}, '').split('/') library, paths = *parse_library_from_path(paths) return unless library return case prefix when docs_prefix; route_docs(library, paths) when list_prefix; route_list(library, paths) when search_prefix; route_search(library, paths) end end nil end # Routes requests from {#docs_prefix} and calls the appropriate command # @param [LibraryVersion] library the library to route for # @param [Array] paths path components (split by '/') # @return (see #route) def route_docs(library, paths) return route_index if library.nil? case paths.first when "frames" paths.shift cmd = DisplayObjectCommand when "file" paths.shift cmd = DisplayFileCommand else cmd = DisplayObjectCommand end cmd = cmd.new(final_options(library, paths)) cmd.call(request) end # Routes for the index of a library / multiple libraries # @return (see #route) def route_index if adapter.options[:single_library] route_docs(adapter.libraries.values.first.first, []) else LibraryIndexCommand.new(adapter.options.merge(:path => '')).call(request) end end # Routes requests from {#list_prefix} and calls the appropriate command # @param (see #route_docs) # @return (see #route_docs) def route_list(library, paths) return if paths.empty? ListCommand.new(final_options(library, paths)).call(request) end # Routes requests from {#search_prefix} and calls the appropriate command # @param (see #route_docs) # @return (see #route_docs) def route_search(library, paths) return unless paths.empty? SearchCommand.new(final_options(library, paths)).call(request) end # @group Utility Methods # Adds extra :library/:path option keys to the adapter options. # Use this method when passing options to a command. # # @param (see #route_docs) # @return [Hash] finalized options def final_options(library, paths) adapter.options.merge(:library => library, :path => paths.join('/')) end end end end yard-master/lib/yard/server/static_caching.rb000066400000000000000000000033401265676644000216310ustar00rootroot00000000000000module YARD module Server # Implements static caching for requests. # # @see Router Router documentation for "Caching" module StaticCaching # Called by a router to return the cached object. By default, this # method performs disk-based caching. To perform other forms of caching, # implement your own +#check_static_cache+ method and mix the module into # the Router class. # # Note that caching does not occur here. This method simply checks for # the existence of cached data. To actually cache a response, see # {Commands::Base#cache}. # # @example Implementing In-Memory Cache Checking # module MemoryCaching # def check_static_cache # # $memory_cache is filled by {Commands::Base#cache} # cached_data = $memory_cache[request.path] # if cached_data # [200, {'Content-Type' => 'text/html'}, [cached_data]] # else # nil # end # end # end # # class YARD::Server::Router; include MemoryCaching; end # @return [Array(Numeric,Hash,Array)] the Rack-style response # @return [nil] if no cache is available and routing should continue # @see Commands::Base#cache def check_static_cache return nil unless adapter.document_root cache_path = File.join(adapter.document_root, request.path.sub(/\.html$/, '') + '.html') cache_path = cache_path.sub(%r{/\.html$}, '.html') if File.file?(cache_path) log.debug "Loading cache from disk: #{cache_path}" return [200, {'Content-Type' => 'text/html'}, [File.read_binary(cache_path)]] end nil end end end end yard-master/lib/yard/server/templates/000077500000000000000000000000001265676644000203375ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/000077500000000000000000000000001265676644000217635ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/fulldoc/000077500000000000000000000000001265676644000234135ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/fulldoc/html/000077500000000000000000000000001265676644000243575ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/fulldoc/html/css/000077500000000000000000000000001265676644000251475ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/fulldoc/html/css/custom.css000066400000000000000000000057501265676644000272020ustar00rootroot00000000000000#search_results h1 { margin-bottom: 0; } #search_results p { margin-top: 0; margin-bottom: 25px; } #search_results ul { list-style-position: inside; padding-left: 0; list-style: none; } #search_results ul li { padding: 7px 15px; font-size: 1.1em; } form.search { z-index: 8000; position: absolute; color: #fff; border: 1px solid #99f; width: 210px; background: #05a; border-radius: 4px; border-top-left-radius: 0; border-top-right-radius: 0; } form.search input { height: 25px; padding: 0; padding-left: 4px; margin: 4px; margin-right: 0; width: 202px; border: 1px solid #99f; border-radius: 3px; font-size: 1.1em; box-sizing: border-box; -webkit-appearance: none; } @media (max-width: 920px) { form.search { position: absolute; color: #fff; width: 100%; margin-top: 0; background: #05a; border-radius: 0; border: 0; margin-bottom: 10px; left: 0; top: 0; } form.search input { margin-top: 9px; margin-bottom: 11px; margin-left: 12px; padding-left: 6px; border: 1px solid #eaf0ff; } #menu { margin-top: 41px; } #search a { border-top-left-radius: 3px; border-top-right-radius: 3px; background: none; border: 0; box-shadow: none; margin-top: 4px; padding-bottom: 5px; color: #eaf0ff; fill: #eaf0ff; } #search a.active { background: #048; border: 0; } } @media (min-width: 920px) { form.search { right: 12px; top: 0; } } #menu { padding-top: 5px; } #content h1 { margin-top: 15px; border-top: 0; } #content.error { font-size: 1.2em; } #content.error p tt { font-size: 1.2em; } #content.error .note { padding: 12px; } .signature .permalink { float: right; font-size: 0.9em; } /* autocomplete */ .ac_results { padding: 0px; border: 1px solid black; width: 500px; overflow: hidden; z-index: 99999; } .ac_results ul { width: 100%; list-style-position: outside; list-style: none; padding: 0; margin: 0; } .ac_results li { cursor: pointer; margin: 0px; padding: 3px; display: block; font-family: sans-serif; font-size: 12px; line-height: 16px; overflow: hidden; } .ac_loading { background: white url('/images/processing.gif') right center no-repeat; } .ac_even { background: #fafafa; border: 1px dotted #fafafa; border-left-width: 0; border-right-width: 0; } .ac_odd { background: #f0f0f0; border: 1px dotted #f0f0f0; border-left-width: 0; border-right-width: 0; } .ac_over { background: #ddd; cursor: pointer; border: 1px dotted #fff; border-left-width: 0; border-right-width: 0; } #fade { display: none; position: absolute; top: 0px; left: 0; background: #eee; z-index: -1; width: 100%; height: 100%; border-top: 1px solid #e0e0e0; } #processing { position: absolute; width: 400px; height: 200px; margin: auto; background: #fff; padding: 10px 30px; z-index: 20; -webkit-box-shadow: 0px 0px 20px #444; -moz-box-shadow: 0px 0px 20px #444; -webkit-border-radius: 4px; display: none; } #processing img { display: block; position: absolute; bottom: 30px; left: 44%; } yard-master/lib/yard/server/templates/default/fulldoc/html/images/000077500000000000000000000000001265676644000256245ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/fulldoc/html/images/processing.gif000066400000000000000000000023431265676644000304710ustar00rootroot00000000000000GIF89aõøøøèèèÒÒÒ¼¼¼®®®¢¢¢ÜÜܸ¸¸šššäääØØØªªª   °°°ÌÌÌööö¨¨¨ÔÔÔÿÿÿ666&&&PPPÄÄÄppp’’’VVVúúúhhhFFFÆÆÆHHH222æææ!ÿ NETSCAPE2.0!ù ÿ,ÿ@‰pH „‚dR¹ Ĩth8 ®W e»Ý4Sib€-k¹ÜK'²…£\ Øí¡ån¯1|!!B‹ C|Gvs  A!ù !,W@‰p(| ŽÇ‘˜@ ˡÉD… ªà¡"Q„zˆv$^QSàPÐH«$`Ád(ø÷q‘æÿx C€K†x ‰†gŽy WWCA!ù , M "Jdž¨”Hb+Q\¡¥g!ìHíT†YÉ#áh´p8žr—;º>KeÓ‰`,I¢ˆ‘$H¤ÖñŒ ˆlÑx lvœ}1Èè—b׃6"h8¤ƒ’€`@(„!ù !, YÀpñC…r\–Kc n¨NÇ¥BlFzR1 Ö"œ`Ǹ°€¨×B‚½žöB€ !€B€ !ŠBvG ur GA!ù !,V@‰pHt .• qhl(PèRÒ¹D¯Ë…çŠ%~¸]‰‚!G…‰QŽf0–€p°^—9 ÑP¯S§} S‚S‚ ‹t}‚ ‚A;yard-master/lib/yard/server/templates/default/fulldoc/html/js/000077500000000000000000000000001265676644000247735ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js000066400000000000000000000175031265676644000300400ustar00rootroot00000000000000/* * jQuery Autocomplete plugin 1.1 * * Copyright (c) 2009 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $ */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(3($){$.2e.1u({19:3(b,d){5 c=W b=="1B";d=$.1u({},$.M.1T,{Y:c?b:P,y:c?P:b,1J:c?$.M.1T.1J:10,X:d&&!d.1D?10:48},d);d.1y=d.1y||3(a){6 a};d.1v=d.1v||d.1R;6 A.I(3(){1M $.M(A,d)})},L:3(a){6 A.11("L",a)},1k:3(a){6 A.14("1k",[a])},2b:3(){6 A.14("2b")},28:3(a){6 A.14("28",[a])},24:3(){6 A.14("24")}});$.M=3(o,r){5 t={2Y:38,2S:40,2N:46,2I:9,2E:13,2B:27,2x:3I,2v:33,2p:34,2n:8};5 u=$(o).3r("19","3o").Q(r.2Q);5 p;5 m="";5 n=$.M.3c(r);5 s=0;5 k;5 h={1F:C};5 l=$.M.32(r,o,1Z,h);5 j;$.1Y.2X&&$(o.2U).11("45.19",3(){4(j){j=C;6 C}});u.11(($.1Y.2X?"43":"42")+".19",3(a){s=1;k=a.2M;3V(a.2M){O t.2Y:a.1d();4(l.N()){l.30()}w{12(0,D)}R;O t.2S:a.1d();4(l.N()){l.2D()}w{12(0,D)}R;O t.2v:a.1d();4(l.N()){l.2C()}w{12(0,D)}R;O t.2p:a.1d();4(l.N()){l.2A()}w{12(0,D)}R;O r.17&&$.1c(r.S)==","&&t.2x:O t.2I:O t.2E:4(1Z()){a.1d();j=D;6 C}R;O t.2B:l.Z();R;3J:1P(p);p=1O(12,r.1J);R}}).2t(3(){s++}).3E(3(){s=0;4(!h.1F){2r()}}).2q(3(){4(s++>1&&!l.N()){12(0,D)}}).11("1k",3(){5 c=(1r.7>1)?1r[1]:P;3 1N(q,a){5 b;4(a&&a.7){16(5 i=0;i1){5 f=r.S.7;5 c=$(o).18().1I;5 d,1H=0;$.I(b,3(i,a){1H+=a.7;4(c<=1H){d=i;6 C}1H+=f});b[d]=v;v=b.3f(r.S)}v+=r.S}u.K(v);1l();u.14("L",[e.y,e.F]);6 D}3 12(b,c){4(k==t.2N){l.Z();6}5 a=u.K();4(!c&&a==m)6;m=a;a=1m(a);4(a.7>=r.29){u.Q(r.26);4(!r.1s)a=a.J();21(a,3a,1l)}w{1q();l.Z()}};3 15(b){4(!b)6[""];4(!r.17)6[$.1c(b)];6 $.4h(b.23(r.S),3(a){6 $.1c(b).7?$.1c(a):P})}3 1m(a){4(!r.17)6 a;5 c=15(a);4(c.7==1)6 c[0];5 b=$(o).18().1I;4(b==a.7){c=15(a)}w{c=15(a.22(a.37(b),""))}6 c[c.7-1]}3 1G(q,a){4(r.1G&&(1m(u.K()).J()==q.J())&&k!=t.2n){u.K(u.K()+a.37(1m(m).7));$(o).18(m.7,m.7+a.7)}};3 2r(){1P(p);p=1O(1l,4g)};3 1l(){5 c=l.N();l.Z();1P(p);1q();4(r.36){u.1k(3(a){4(!a){4(r.17){5 b=15(u.K()).1n(0,-1);u.K(b.3f(r.S)+(b.7?r.S:""))}w{u.K("");u.14("L",P)}}})}};3 3a(q,a){4(a&&a.7&&s){1q();l.35(a,q);1G(q,a[0].F);l.20()}w{1l()}};3 21(f,d,g){4(!r.1s)f=f.J();5 e=n.31(f);4(e&&e.7){d(f,e)}w 4((W r.Y=="1B")&&(r.Y.7>0)){5 c={4f:+1M 4e()};$.I(r.2Z,3(a,b){c[a]=W b=="3"?b():b});$.4d({4c:"4b",4a:"19"+o.49,2V:r.2V,Y:r.Y,y:$.1u({q:1m(f),47:r.X},c),44:3(a){5 b=r.1A&&r.1A(a)||1A(a);n.1i(f,b);d(f,b)}})}w{l.2T();g(f)}};3 1A(c){5 d=[];5 b=c.23("\\n");16(5 i=0;i]*)("+a.22(/([\\^\\$\\(\\)\\[\\]\\{\\}\\*\\.\\+\\?\\|\\\\])/2K,"\\\\$1")+")(?![^<>]*>)(?![^&;]+;)","2K"),"<2J>$1")},1D:D,1E:3S};$.M.3c=3(g){5 h={};5 j=0;3 1f(s,a){4(!g.1s)s=s.J();5 i=s.2H(a);4(g.1w=="3R"){i=s.J().1k("\\\\b"+a.J())}4(i==-1)6 C;6 i==0||g.1w};3 1i(q,a){4(j>g.1g){1o()}4(!h[q]){j++}h[q]=a}3 1e(){4(!g.y)6 C;5 f={},2G=0;4(!g.Y)g.1g=1;f[""]=[];16(5 i=0,2F=g.y.7;i<2F;i++){5 c=g.y[i];c=(W c=="1B")?[c]:c;5 d=g.1v(c,i+1,g.y.7);4(d===C)1V;5 e=d.3Q(0).J();4(!f[e])f[e]=[];5 b={F:d,y:c,L:g.1z&&g.1z(c)||d};f[e].1U(b);4(2G++0){5 c=h[k];$.I(c,3(i,x){4(1f(x.F,q)){a.1U(x)}})}}6 a}w 4(h[q]){6 h[q]}w 4(g.1f){16(5 i=q.7-1;i>=g.29;i--){5 c=h[q.3O(0,i)];4(c){5 a=[];$.I(c,3(i,x){4(1f(x.F,q)){a[a.7]=x}});6 a}}}6 P}}};$.M.32=3(e,g,f,k){5 h={H:"3N"};5 j,z=-1,y,1t="",1S=D,G,B;3 2y(){4(!1S)6;G=$("<3M/>").Z().Q(e.2P).T("3L","3K").1Q(1K.2w);B=$("<3H/>").1Q(G).3G(3(a){4(U(a).2u&&U(a).2u.3F()==\'2s\'){z=$("1L",B).1h(h.H).3D(U(a));$(U(a)).Q(h.H)}}).2q(3(a){$(U(a)).Q(h.H);f();g.2t();6 C}).3C(3(){k.1F=D}).3B(3(){k.1F=C});4(e.E>0)G.T("E",e.E);1S=C}3 U(a){5 b=a.U;3A(b&&b.3z!="2s")b=b.3y;4(!b)6[];6 b}3 V(b){j.1n(z,z+1).1h(h.H);2o(b);5 a=j.1n(z,z+1).Q(h.H);4(e.1D){5 c=0;j.1n(0,z).I(3(){c+=A.1a});4((c+a[0].1a-B.1b())>B[0].3x){B.1b(c+a[0].1a-B.3w())}w 4(c=j.1j()){z=0}}3 2m(a){6 e.X&&e.X").3v(e.1y(a,1t)).Q(i%2==0?"3u":"3P").1Q(B)[0];$.y(c,"2k",y[i])}j=B.3t("1L");4(e.1X){j.1n(0,1).Q(h.H);z=0}4($.2e.2W)B.2W()}6{35:3(d,q){2y();y=d;1t=q;2l()},2D:3(){V(1)},30:3(){V(-1)},2C:3(){4(z!=0&&z-8<0){V(-z)}w{V(-8)}},2A:3(){4(z!=j.1j()-1&&z+8>j.1j()){V(j.1j()-1-z)}w{V(8)}},Z:3(){G&&G.Z();j&&j.1h(h.H);z=-1},N:3(){6 G&&G.3s(":N")},3q:3(){6 A.N()&&(j.2j("."+h.H)[0]||e.1X&&j[0])},20:3(){5 a=$(g).3p();G.T({E:W e.E=="1B"||e.E>0?e.E:$(g).E(),2i:a.2i+g.1a,1W:a.1W}).20();4(e.1D){B.1b(0);B.T({2L:e.1E,3n:\'3X\'});4($.1Y.3m&&W 1K.2w.3l.2L==="1x"){5 c=0;j.I(3(){c+=A.1a});5 b=c>e.1E;B.T(\'3k\',b?e.1E:c);4(!b){j.E(B.E()-2R(j.T("2O-1W"))-2R(j.T("2O-3j")))}}}},2g:3(){5 a=j&&j.2j("."+h.H).1h(h.H);6 a&&a.7&&$.y(a[0],"2k")},2T:3(){B&&B.2z()},1p:3(){G&&G.3i()}}};$.2e.18=3(b,f){4(b!==1x){6 A.I(3(){4(A.2d){5 a=A.2d();4(f===1x||b==f){a.4n("2c",b);a.3h()}w{a.4m(D);a.4l("2c",b);a.4k("2c",f);a.3h()}}w 4(A.3g){A.3g(b,f)}w 4(A.1C){A.1C=b;A.3e=f}})}5 c=A[0];4(c.2d){5 e=1K.18.4j(),3d=c.F,2a="<->",2f=e.3b.7;e.3b=2a;5 d=c.F.2H(2a);c.F=3d;A.18(d,d+2f);6{1I:d,39:d+2f}}w 4(c.1C!==1x){6{1I:c.1C,39:c.3e}}}})(4i);',62,272,'|||function|if|var|return|length|||||||||||||||||||||||||else||data|active|this|list|false|true|width|value|element|ACTIVE|each|toLowerCase|val|result|Autocompleter|visible|case|null|addClass|break|multipleSeparator|css|target|moveSelect|typeof|max|url|hide||bind|onChange||trigger|trimWords|for|multiple|selection|autocomplete|offsetHeight|scrollTop|trim|preventDefault|populate|matchSubset|cacheLength|removeClass|add|size|search|hideResultsNow|lastWord|slice|flush|unbind|stopLoading|arguments|matchCase|term|extend|formatMatch|matchContains|undefined|highlight|formatResult|parse|string|selectionStart|scroll|scrollHeight|mouseDownOnSelect|autoFill|progress|start|delay|document|li|new|findValueCallback|setTimeout|clearTimeout|appendTo|formatItem|needsInit|defaults|push|continue|left|selectFirst|browser|selectCurrent|show|request|replace|split|unautocomplete||loadingClass||setOptions|minChars|teststring|flushCache|character|createTextRange|fn|textLength|selected|in|top|filter|ac_data|fillList|limitNumberOfItems|BACKSPACE|movePosition|PAGEDOWN|click|hideResults|LI|focus|nodeName|PAGEUP|body|COMMA|init|empty|pageDown|ESC|pageUp|next|RETURN|ol|nullData|indexOf|TAB|strong|gi|maxHeight|keyCode|DEL|padding|resultsClass|inputClass|parseInt|DOWN|emptyList|form|dataType|bgiframe|opera|UP|extraParams|prev|load|Select|||display|mustMatch|substring||end|receiveData|text|Cache|orig|selectionEnd|join|setSelectionRange|select|remove|right|height|style|msie|overflow|off|offset|current|attr|is|find|ac_even|html|innerHeight|clientHeight|parentNode|tagName|while|mouseup|mousedown|index|blur|toUpperCase|mouseover|ul|188|default|absolute|position|div|ac_over|substr|ac_odd|charAt|word|180|RegExp|100|switch|400|auto|ac_loading|ac_results||ac_input|keydown|keypress|success|submit||limit|150|name|port|abort|mode|ajax|Date|timestamp|200|map|jQuery|createRange|moveEnd|moveStart|collapse|move'.split('|'),0,{}))yard-master/lib/yard/server/templates/default/layout/000077500000000000000000000000001265676644000233005ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/layout/html/000077500000000000000000000000001265676644000242445ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/layout/html/breadcrumb.erb000066400000000000000000000033761265676644000270550ustar00rootroot00000000000000 yard-master/lib/yard/server/templates/default/layout/html/script_setup.erb000066400000000000000000000004451265676644000274650ustar00rootroot00000000000000 yard-master/lib/yard/server/templates/default/layout/html/setup.rb000066400000000000000000000001461265676644000257320ustar00rootroot00000000000000def javascripts super + %w(js/autocomplete.js) end def stylesheets super + %w(css/custom.css) endyard-master/lib/yard/server/templates/default/method_details/000077500000000000000000000000001265676644000247505ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/method_details/html/000077500000000000000000000000001265676644000257145ustar00rootroot00000000000000yard-master/lib/yard/server/templates/default/method_details/html/permalink.erb000066400000000000000000000003361265676644000303720ustar00rootroot00000000000000 yard-master/lib/yard/server/templates/default/method_details/html/setup.rb000066400000000000000000000001171265676644000274000ustar00rootroot00000000000000def init super sections.place(:permalink).after_any(:method_signature) end yard-master/lib/yard/server/templates/doc_server/000077500000000000000000000000001265676644000224725ustar00rootroot00000000000000yard-master/lib/yard/server/templates/doc_server/library_list/000077500000000000000000000000001265676644000251715ustar00rootroot00000000000000yard-master/lib/yard/server/templates/doc_server/library_list/html/000077500000000000000000000000001265676644000261355ustar00rootroot00000000000000yard-master/lib/yard/server/templates/doc_server/library_list/html/contents.erb000066400000000000000000000011501265676644000304610ustar00rootroot00000000000000
      <% @libraries.sort_by {|name, y| name.downcase }.each do |name, library_versions| %>
    • <% library_versions = library_versions.dup %> <% first_lib = library_versions.pop %> <%= name %> <% if first_lib.version %> (<%= first_lib.version %><% if library_versions.size > 0 %>, <%= library_versions.reverse.map {|lib| "#{lib.version}" }.join(', ') %><% end %>) <% end %>
    • <% end %>
    yard-master/lib/yard/server/templates/doc_server/library_list/html/headers.erb000066400000000000000000000020471265676644000302450ustar00rootroot00000000000000 YARD Documentation Server <%= YARD::VERSION %> - Library Listing yard-master/lib/yard/server/templates/doc_server/library_list/html/library_list.erb000066400000000000000000000004771265676644000313360ustar00rootroot00000000000000 <%= erb(:headers) %>
    <%= yieldall %>
    yard-master/lib/yard/server/templates/doc_server/library_list/html/setup.rb000066400000000000000000000000721265676644000276210ustar00rootroot00000000000000def init sections :library_list, [:title, :contents] endyard-master/lib/yard/server/templates/doc_server/library_list/html/title.erb000066400000000000000000000002261265676644000277500ustar00rootroot00000000000000

    YARD Documentation Server <%= YARD::VERSION %>

    Library Listing (links without frames)

    yard-master/lib/yard/server/templates/doc_server/processing/000077500000000000000000000000001265676644000246465ustar00rootroot00000000000000yard-master/lib/yard/server/templates/doc_server/processing/html/000077500000000000000000000000001265676644000256125ustar00rootroot00000000000000yard-master/lib/yard/server/templates/doc_server/processing/html/processing.erb000066400000000000000000000043601265676644000304630ustar00rootroot00000000000000 Processing <%= @library.to_s(false) %>

    Processing <%= @library.name %>

    <%= @library.name %> <% if @library.version %>(<%= @library.version %>)<% end %> is being processed. You'll be redirected when the pages are built, it shouldn't take much longer.

    yard-master/lib/yard/server/templates/doc_server/processing/html/setup.rb000066400000000000000000000000431265676644000272740ustar00rootroot00000000000000def init sections :processing endyard-master/lib/yard/server/templates/doc_server/search/000077500000000000000000000000001265676644000237375ustar00rootroot00000000000000yard-master/lib/yard/server/templates/doc_server/search/html/000077500000000000000000000000001265676644000247035ustar00rootroot00000000000000yard-master/lib/yard/server/templates/doc_server/search/html/search.erb000066400000000000000000000013031265676644000266370ustar00rootroot00000000000000

    Search Results (for '<%= h @query %>')

    Showing <%= @visible_results.size %> of <%= @results.size %> results

      <% n = 1 %> <% @visible_results.each do |result| %> <% name = result.type == :method ? result.name(true).to_s : result.name.to_s %> <% path = name.gsub(/(#{Regexp.quote @query})/i, '\1') %>
    • <%= path %> <% if !result.namespace.root? %> (<%= result.namespace.path %>) <% end %>
    • <% n = n == 2 ? 1 : 2 %> <% end %>
    yard-master/lib/yard/server/templates/doc_server/search/html/setup.rb000066400000000000000000000002471265676644000263730ustar00rootroot00000000000000def init sections :search, [T('../default/layout')] end def search options.breadcrumb_title = h("Search for '#{@query}'") yieldall :contents => erb(:search) endyard-master/lib/yard/server/webrick_adapter.rb000066400000000000000000000024071265676644000220170ustar00rootroot00000000000000require 'webrick' module YARD module Server # The main adapter to initialize a WEBrick server. class WebrickAdapter < Adapter # Initializes a WEBrick server. If {Adapter#server_options} contains a # +:daemonize+ key set to true, the server will be daemonized. def start server_options[:ServerType] = WEBrick::Daemon if server_options[:daemonize] server = WEBrick::HTTPServer.new(server_options) server.mount('/', WebrickServlet, self) trap("INT") { server.shutdown } server.start end end # The main WEBrick servlet implementation, accepting only GET requests. class WebrickServlet < WEBrick::HTTPServlet::AbstractServlet attr_accessor :adapter def initialize(server, adapter) super self.adapter = adapter end def do_GET(request, response) status, headers, body = *adapter.router.call(request) response.status = status response.body = body.is_a?(Array) ? body[0] : body headers.each do |key, value| response[key] = value end end end end end # @private class WEBrick::HTTPRequest attr_accessor :version_supplied def xhr?; (self['X-Requested-With'] || "").downcase == 'xmlhttprequest' end end yard-master/lib/yard/tags/000077500000000000000000000000001265676644000157715ustar00rootroot00000000000000yard-master/lib/yard/tags/default_factory.rb000066400000000000000000000157311265676644000215000ustar00rootroot00000000000000module YARD module Tags class DefaultFactory TYPELIST_OPENING_CHARS = '[({<' TYPELIST_CLOSING_CHARS = '>})]' # Parses tag text and creates a new tag with descriptive text # # @param tag_name the name of the tag to parse # @param [String] text the raw tag text # @return [Tag] a tag object with the tag_name and text values filled def parse_tag(tag_name, text) Tag.new(tag_name, text.strip) end # Parses tag text and creates a new tag with a key name and descriptive text # # @param tag_name the name of the tag to parse # @param [String] text the raw tag text # @return [Tag] a tag object with the tag_name, name and text values filled def parse_tag_with_name(tag_name, text) name, text = *extract_name_from_text(text) Tag.new(tag_name, text, nil, name) end # Parses tag text and creates a new tag with formally declared types and # descriptive text # # @param tag_name the name of the tag to parse # @param [String] text the raw tag text # @return [Tag] a tag object with the tag_name, types and text values filled def parse_tag_with_types(tag_name, text) name, types, text = *extract_types_and_name_from_text(text) raise TagFormatError, "cannot specify a name before type list for '@#{tag_name}'" if name Tag.new(tag_name, text, types) end # Parses tag text and creates a new tag with formally declared types, a key # name and descriptive text # # @param tag_name the name of the tag to parse # @param [String] text the raw tag text # @return [Tag] a tag object with the tag_name, name, types and text values filled def parse_tag_with_types_and_name(tag_name, text) name, types, text = *extract_types_and_name_from_text(text) name, text = *extract_name_from_text(text) unless name Tag.new(tag_name, text, types, name) end # Parses tag text and creates a new tag with formally declared types, a title # on the first line and descriptive text # # @param tag_name the name of the tag to parse # @param [String] text the raw tag text # @return [Tag] a tag object with the tag_name, name, types and text values filled def parse_tag_with_types_and_title(tag_name, text) name, types, text = *extract_types_and_name_from_text_unstripped(text) if name title, desc = name, text else title, desc = *extract_title_and_desc_from_text(text) end Tag.new(tag_name, desc, types, title) rescue TagFormatError Tag.new(tag_name, '', types, nil) end def parse_tag_with_title_and_text(tag_name, text) title, desc = *extract_title_and_desc_from_text(text) Tag.new(tag_name, desc, nil, title) end def parse_tag_with_types_name_and_default(tag_name, text) # Can't allow () in a default tag, otherwise the grammar is too ambiguous when types is omitted. open, close = TYPELIST_OPENING_CHARS.gsub('(', ''), TYPELIST_CLOSING_CHARS.gsub(')', '') name, types, text = *extract_types_and_name_from_text(text, open, close) name, text = *extract_name_from_text(text) unless name if text =~ /\A\(/ _, default, text = *extract_types_and_name_from_text(text, '(', ')') DefaultTag.new(tag_name, text, types, name, default) else DefaultTag.new(tag_name, text, types, name, nil) end end def parse_tag_with_options(tag_name, text) name, text = *extract_name_from_text(text) OptionTag.new(tag_name, name, parse_tag_with_types_name_and_default(tag_name, text)) end private # Extracts the name from raw tag text returning the name and remaining value # # @param [String] text the raw tag text # @return [Array] an array holding the name as the first element and the # value as the second element def extract_name_from_text(text) text.strip.split(/\s+/, 2) end def extract_title_and_desc_from_text(text) raise TagFormatError if text.nil? || text.empty? title, desc = nil, nil if text =~ /\A[ \t]\n/ desc = text else text = text.split(/\r?\n/) title = text.shift.squeeze(' ').strip desc = text.join("\n") end [title, desc] end # Parses a [], <>, {} or () block at the beginning of a line of text # into a list of comma delimited values. # # @example # obj.parse_types('[String, Array, nil]') # => [nil, ['String', 'Array', 'nil'], ""] # obj.parse_types('b A string') # => ['b', ['String'], 'A string'] # # @return [Array(String, Array, String)] the text before the type # list (or nil), followed by the type list parsed into an array of # strings, followed by the text following the type list. def extract_types_and_name_from_text(text, opening_types = TYPELIST_OPENING_CHARS, closing_types = TYPELIST_CLOSING_CHARS) before, list, text = *extract_types_and_name_from_text_unstripped(text, opening_types, closing_types) if list.nil? [nil, nil, text.strip] else [before ? before.strip : nil, list.map {|e| e.strip }, text.strip] end end def extract_types_and_name_from_text_unstripped(text, opening_types = TYPELIST_OPENING_CHARS, closing_types = TYPELIST_CLOSING_CHARS) s, e = 0, 0 before = '' list, level, seen_space, i = [''], 0, false, 0 last_seen = '' while i < text.length c = text[i, 1] if (c == '"' || c == "'") && text[i..-1] =~ /#{c}.+?#{c}/ list.last << $& i += $&.length next end if level > 0 && c == '#' && text[i+1..-1] =~ CodeObjects::METHODNAMEMATCH list.last << c + $& i += $&.length + 1 next elsif opening_types.include?(c) list.last << c if level > 0 s = i if level == 0 level += 1 elsif closing_types.include?(c) level -= 1 unless last_seen == '=' && c == '>' break e = i if level == 0 list.last << c elsif c == ',' && level == 1 list.push '' elsif c =~ /\S/ && level == 0 break e = i if seen_space && list == [''] before << c elsif c =~ /\s/ && level == 0 && !before.empty? seen_space = true elsif level >= 1 list.last << c end last_seen = c i += 1 end before = before.empty? ? nil : before if list.size == 1 && list.first == '' [nil, nil, text] else [before, list, text[(e+1)..-1]] end end end end endyard-master/lib/yard/tags/default_tag.rb000066400000000000000000000004031265676644000205720ustar00rootroot00000000000000module YARD module Tags class DefaultTag < Tag attr_reader :defaults def initialize(tag_name, text, types = nil, name = nil, defaults = nil) super(tag_name, text, types, name) @defaults = defaults end end end endyard-master/lib/yard/tags/directives.rb000066400000000000000000000520371265676644000204660ustar00rootroot00000000000000require 'ostruct' module YARD module Tags # The base directive class. Subclass this class to create a custom # directive, registering it with {Library.define_directive}. Directive # classes are executed via the {#call} method, which perform all directive # processing on the object. # # If processing occurs within a handler, the {#handler} attribute is # available to access more information about parsing context and state. # Handlers are only available when parsing from {Parser::SourceParser}, # not when parsing directly from {DocstringParser}. If the docstring is # attached to an object declaration, {#object} will be set and available # to modify the generated code object directly. Note that both of these # attributes may be nil, and directives should test their existence # before attempting to use them. # # @abstract Subclasses should implement {#call}. # @see Library.define_directive # @since 0.8.0 class Directive # @return [Tag] the meta-data tag containing data input to the directive attr_accessor :tag # Set this field to replace the directive definition inside of a docstring # with arbitrary text. For instance, the {MacroDirective} uses this field # to expand its macro data in place of the call to a +@!macro+. # # @return [String] the text to expand in the original docstring in place # of this directive definition. # @return [nil] if no expansion should take place for this directive attr_accessor :expanded_text # @return [DocstringParser] the parser that is parsing all tag # information out of the docstring attr_accessor :parser # @!attribute [r] object # @return [CodeObjects::Base, nil] the object the parent docstring is # attached to. May be nil. def object; parser.object end # @!attribute [r] handler # @return [Handlers::Base, nil] the handler object the docstring parser # might be attached to. May be nil. Only available when parsing # through {Parser::SourceParser}. def handler; parser.handler end # @!endgroup # @param [Tag] tag the meta-data tag containing all input to the docstring # @param [DocstringParser] parser the docstring parser object def initialize(tag, parser) self.tag = tag self.parser = parser self.expanded_text = nil end # @!group Parser callbacks # Called when processing the directive. Subclasses should implement # this method to perform all functionality of the directive. # # @abstract implement this method to perform all data processing for # the directive. # @return [void] def call; raise NotImplementedError end # Called after parsing all directives and tags in the docstring. Used # to perform any cleanup after all directives perform their main task. # @return [void] def after_parse; end protected :parser end # Ends a group listing definition. Group definition automatically end # when class or module blocks are closed, and defining a new group overrides # the last group definition, but occasionally you need to end the current # group to return to the default listing. Use {tag:!group} to begin a # group listing. # # @example # class Controller # # @!group Callbacks # # def before_filter; end # def after_filter; end # # # @!endgroup # # def index; end # end # @see tag:!group # @since 0.6.0 class EndGroupDirective < Directive def call return unless handler handler.extra_state.group = nil end end # Defines a group listing. All methods (and attributes) seen after this # directive are placed into a group with the given description as the # group name. The group listing is used by templates to organize methods # and attributes into respective logical groups. To end a group listing # use {tag:!endgroup}. # # @note A group definition only applies to the scope it is defined in. # If a new class or module is opened after the directive, this directive # will not apply to methods in that class or module. # @example # # @!group Callbacks # # def before_filter; end # def after_filter; end # @see tag:!endgroup # @since 0.6.0 class GroupDirective < Directive def call return unless handler handler.extra_state.group = tag.text end end # Defines a block of text to be expanded whenever the macro is called by name # in subsequent docstrings. The macro data can be any arbitrary text data, be # it regular documentation, meta-data tags or directives. # # == Defining a Macro # # A macro must first be defined in order to be used. Note that a macro is also # expanded upon definition if it defined on an object (the docstring of a # method, class, module or constant object as opposed to a free standing # comment). To define a macro, use the "new" or "attach" identifier in the # types specifier list. A macro will also automatically be created if an # indented macro data block is given, so the keywords are not strictly needed. # # === Anonymous Macros # # In addition to standard named macros, macros can be defined anonymously if # no name is given. In this case, they can not be re-used in future docstrings, # but they will expand in the first definition. This is useful when needing # to take advantage of the macro expansion variables (described below). # # == Using a Macro # # To re-use a macro in another docstring after it is defined, simply use # @!macro the_name with no indented block of macro data. The resulting # data will be expanded in place. # # == Attaching a Macro to a DSL Method # # Macros can be defined to auto-expand on DSL-style class method calls. To # define a macro to be auto expanded in this way, use the "attach" keyword # in the type specifier list ("new" is implied). # # Attached macros can also be attached directly on the class method declaration # that provides the DSL method to its subclasses. The syntax in either case # is the same. # # == Macro Expansion Variables # # In the case of using macros on DSL-style method calls, a number of expansion # variables can be used for interpolation inside of the macro data. The variables, # similar in syntax to Ruby's global variables, are as follows: # # * $0 - the method name being called # * $1, $2, $3, ... - the Nth argument in the method call # * $& - the full source line # # The following example shows what the expansion variables might hold for a given # DSL method call: # # property :foo, :a, :b, :c, String # # $0 => "property" # # $1 => "foo" # # $2 => "a" # # $& => "property :foo, :a, :b, :c, String" # # === Ranges # # Ranges are also acceptable with the syntax ${N-M}. Negative values # on either N or M are valid, and refer to indexes from the end of the list. # Consider a DSL method that creates a method using the first argument with # argument names following, ending with the return type of the method. This # could be documented as: # # # @!macro dsl_method # # @!method $1(${2--2}) # # @return [${-1}] the return value of $0 # create_method_with_args :foo, :a, :b, :c, String # # As described, the method is using the signature foo(a, b, c) and the return # type from the last argument, +String+. When using ranges, tokens are joined # with commas. Note that this includes using $0: # # !!!plain # $0-1 # => Interpolates to "create_method_with_args, foo" # # If you want to separate them with spaces, use $1 $2 $3 $4 .... Note that # if the token cannot be expanded, it will return the empty string (not an error), # so it would be safe to list $1 $2 ... $10, for example. # # === Escaping Interpolation # # Interpolation can be escaped by prefixing the +$+ with +\\\+, like so: # # # @!macro foo # # I have \$2.00 USD. # # @example Defining a simple macro # # @!macro [new] returnself # # @return [self] returns itself # @example Using a simple macro in multiple docstrings # # Documentation for map # # ... # # @macro returnself # def map; end # # # Documentation for filter # # ... # # @macro returnself # def filter; end # @example Attaching a macro to a class method (for DSL usage) # class Resource # # Defines a new property # # @param [String] name the property name # # @param [Class] type the property's type # # @!macro [attach] property # # @return [$2] the $1 property # def self.property(name, type) end # end # # class Post < Resource # property :title, String # property :view_count, Integer # end # @example Attaching a macro directly to a DSL method # class Post < Resource # # @!macro [attach] property # # @return [$2] the $1 property # property :title, String # # # Macro will expand on this definition too # property :view_count, Integer # end # @since 0.7.0 class MacroDirective < Directive def call raise TagFormatError if tag.name.nil? && tag.text.to_s.empty? unless macro_data = find_or_create warn return end self.expanded_text = expand(macro_data) end private def new? (tag.types && tag.types.include?('new')) || (tag.text && !tag.text.strip.empty?) end def attach? new? && # must have data or there is nothing to attach class_method? || # always attach to class methods (tag.types && tag.types.include?('attach')) end def class_method? object && object.is_a?(CodeObjects::MethodObject) && object.scope == :class end def anonymous? tag.name.nil? || tag.name.empty? end def expand(macro_data) return if attach? && class_method? return if !anonymous? && new? && (!handler || handler.statement.source.empty?) call_params = [] caller_method = nil full_source = '' if handler call_params = handler.call_params caller_method = handler.caller_method full_source = handler.statement.source end all_params = ([caller_method] + call_params).compact CodeObjects::MacroObject.expand(macro_data, all_params, full_source) end def find_or_create if new? || attach? if handler && attach? obj = object ? object : P("#{handler.namespace}.#{handler.caller_method}") else obj = nil end if anonymous? # anonymous macro return tag.text || "" else macro = CodeObjects::MacroObject.create(tag.name, tag.text, obj) end else macro = CodeObjects::MacroObject.find(tag.name) end macro ? macro.macro_data : nil end def warn if object && handler log.warn "Invalid/missing macro name for " + "#{object.path} (#{handler.parser.file}:#{handler.statement.line})" end end end # Defines a method object with a given method signature, using indented # block data as the method's docstring. The signature is similar to the # {tag:overload} tag. The comment containing this directive does not need # to be attached to any source, but if it is, that source code will be # used as the method's source. # # To define an attribute method, see {tag:!attribute} # # @note For backwards compatibility support, you do not need to indent # the method's docstring text. If a +@!method+ directive is seen with # no indented block, the entire docstring is used as the new method's # docstring text. # @example Defining a simple method # # @!method quit(username, message = "Quit") # # Sends a quit message to the server for a +username+. # # @param [String] username the username to quit # # @param [String] message the quit message # quit_message_method # @example Attaching multiple methods to the same source # # @!method method1 # # @!method method2 # create_methods :method1, :method2 # @see tag:!attribute # @since 0.7.0 class MethodDirective < Directive SCOPE_MATCH = /\A\s*self\s*\.\s*/ def call; end def after_parse return unless handler use_indented_text create_object end protected def method_name sig = sanitized_tag_signature if sig && sig =~ /^#{CodeObjects::METHODNAMEMATCH}(\s|\(|$)/ sig[/\A\s*([^\(; \t]+)/, 1] else handler.call_params.first end end def method_signature "def #{sanitized_tag_signature || method_name}" end def sanitized_tag_signature if tag.name && tag.name =~ SCOPE_MATCH parser.state.scope = :class $' else tag.name end end def use_indented_text return if tag.text.empty? handler = parser.handler object = parser.object self.parser = parser.class.new(parser.library) parser.state.inside_directive = true parser.parse(tag.text, object, handler) parser.state.inside_directive = false end def create_object name = method_name scope = parser.state.scope || handler.scope visibility = parser.state.visibility || handler.visibility ns = CodeObjects::NamespaceObject === object ? object : handler.namespace obj = CodeObjects::MethodObject.new(ns, name, scope) handler.register_file_info(obj) handler.register_source(obj) handler.register_visibility(obj, visibility) handler.register_group(obj) obj.signature = method_signature obj.parameters = OverloadTag.new(:overload, method_signature).parameters obj.docstring = Docstring.new!(parser.text, parser.tags, obj, parser.raw_text, parser.reference) handler.register_module_function(obj) obj end end # Defines an attribute with a given name, using indented block data as the # attribute's docstring. If the type specifier is supplied with "r", "w", or # "rw", the attribute is made readonly, writeonly or readwrite respectively. # A readwrite attribute is the default, if no type is specified. The comment # containing this directive does not need to be attached to any source, but # if it is, that source code will be used as the method's source. # # To define an regular method, see {tag:!method} # # @note For backwards compatibility support, you do not need to indent # the attribute's docstring text. If an +@!attribute+ directive is seen with # no indented block, the entire docstring is used as the new attribute's # docstring text. # @example Defining a simple readonly attribute # # @!attribute [r] count # # @return [Fixnum] the size of the list # @example Defining a simple readwrite attribute # # @!attribute name # # @return [String] the name of the user # @see tag:!method # @since 0.7.0 class AttributeDirective < MethodDirective def after_parse return unless handler use_indented_text create_attribute_data(create_object) end protected def method_name name = sanitized_tag_signature || handler.call_params.first name += '=' unless readable? name end def method_signature if readable? "def #{method_name}" else "def #{method_name}(value)" end end private def create_attribute_data(object) return unless object clean_name = object.name.to_s.sub(/=$/, '') attrs = object.namespace.attributes[object.scope] attrs[clean_name] ||= SymbolHash[:read => nil, :write => nil] if readable? attrs[clean_name][:read] = object end if writable? if object.name.to_s[-1,1] == '=' writer = object writer.parameters = [['value', nil]] else writer = CodeObjects::MethodObject.new(object.namespace, object.name.to_s + '=', object.scope) writer.signature = "def #{object.name}=(value)" writer.visibility = object.visibility writer.dynamic = object.dynamic writer.source = object.source writer.group = object.group writer.parameters = [['value', nil]] writer.docstring = object.base_docstring handler.register_file_info(writer) end attrs[clean_name][:write] = writer end end def writable? !tag.types || tag.types.join.include?('w') end def readable? !tag.types || tag.types.join =~ /(?!w)r/ end end # Parses a block of code as if it were present in the source file at that # location. This directive is useful if a class has dynamic meta-programmed # behaviour that cannot be recognized by YARD. # # You can specify the language of the code block using the types # specification list. By default, the code language is "ruby". # # @example Documenting dynamic module inclusion # class User # # includes "UserMixin" and extends "UserMixin::ClassMethods" # # using the UserMixin.included callback. # # @!parse include UserMixin # # @!parse extend UserMixin::ClassMethods # end # @example Declaring a method as an attribute # # This should really be an attribute # # @!parse attr_reader :foo # def object; @parent.object end # @example Parsing C code # # @!parse [c] # # void Init_Foo() { # # rb_define_method(rb_cFoo, "method", method, 0); # # } # @since 0.8.0 class ParseDirective < Directive def call lang = tag.types ? tag.types.first.to_sym : (handler ? handler.parser.parser_type : :ruby) if handler && lang == handler.parser.parser_type pclass = Parser::SourceParser.parser_types[handler.parser.parser_type] pobj = pclass.new(tag.text, handler.parser.file) pobj.parse handler.parser.process(pobj.enumerator) else # initialize a new parse chain src_parser = Parser::SourceParser.new(lang, handler ? handler.globals : nil) src_parser.file = handler.parser.file if handler src_parser.parse(StringIO.new(tag.text)) end end end # Modifies the current parsing scope (class or instance). If this # directive is defined on a docstring attached to an object definition, # it is applied only to that object. Otherwise, it applies the scope # to all future objects in the namespace. # # @example Modifying the scope of a DSL method # # @!scope class # cattr_accessor :subclasses # @example Modifying the scope of a set of methods # # @!scope class # # # Documentation for method1 # def method1; end # # # Documentation for method2 # def method2; end # @since 0.7.0 class ScopeDirective < Directive def call if %w(class instance module).include?(tag.text) if object.is_a?(CodeObjects::MethodObject) object.scope = tag.text.to_sym else parser.state.scope = tag.text.to_sym end end end end # Modifies the current parsing visibility (public, protected, or private). # If this directive is defined on a docstring attached to an object # definition, it is applied only to that object. Otherwise, it applies # the visibility to all future objects in the namespace. # # @example Modifying the visibility of a DSL method # # @!visibility private # cattr_accessor :subclasses # @example Modifying the visibility of a set of methods # # Note that Ruby's "protected" is recommended over this directive # # @!visibility protected # # # Documentation for method1 # def method1; end # # # Documentation for method2 # def method2; end # @since 0.7.0 class VisibilityDirective < Directive def call if %w(public protected private).include?(tag.text) if object.is_a?(CodeObjects::Base) object.visibility = tag.text.to_sym elsif handler && !parser.state.inside_directive handler.visibility = tag.text.to_sym else parser.state.visibility = tag.text.to_sym end end end end end endyard-master/lib/yard/tags/library.rb000066400000000000000000000617041265676644000177720ustar00rootroot00000000000000module YARD module Tags # Keeps track of all the registered meta-data tags and directives. # Also allows for defining of custom tags and customizing the tag parsing # syntax. # # == Defining Custom Meta-Data Tags # # To define a custom tag, use {define_tag}. You should pass the tag # name and the factory method to use when creating the tag. If you do not # provide a factory method to use, it will default to {DefaultFactory#parse_tag} # # You can also define tag objects manually by simply implementing a "tagname_tag" # method that returns a {Tag} object, but they will not take advantage of tag factory # parsing: # # def mytag_tag(text) # Tag.new(:mytag, text) # end # # == Defining Custom Directives # # Directives can be defined by calling the {define_directive} method, taking # the directive name, an optional tag factory parser method (to parse the # data in the directive into a temporary {Tag} object) and a {Directive} subclass # that performs the directive processing. For more information on creating a # Directive subclass, see the {Directive} class documentation. # # Similar to tags, Directives can also be defined manually, in this case using # the method name "mydirective_directive" and returning a new {Directive} object: # # def mydirective_directive(tag, parser) # MyDirective.new(tag, parser) # end # # == Namespaced Tags # # In YARD 0.8.0+, tags can be namespaced using the '.' character. It is recommended # to namespace project specific tags, like +@yard.tag_name+, so that tags do not # collide with other plugins or new built-in tags. # # == Adding/Changing the Tag Syntax # # If you have specialized tag parsing needs you can substitute the {#factory} # object with your own by setting {Library.default_factory= Library.default_factory} # to a new class with its own parsing methods before running YARD. This is useful # if you want to change the syntax of existing tags (@see, @since, etc.) # # @example Defining a custom tag # define_tag "Parameter", :param, :with_types_and_name # define_tag "Author", :author # @example Defining a custom directive # define_directive :method, :with_title_and_text, MethodDirective # @see DefaultFactory # @see define_tag # @see define_directive # @see Directive class Library class << self # @return [SymbolHash{Symbol=>String}] the map of tag names and their # respective display labels. attr_reader :labels # @!attribute instance # @return [Library] the main Library instance object. def instance @instance ||= new end # @!attribute default_factory # Replace the factory object responsible for parsing tags by setting # this to an object (or class) that responds to +parse_TAGNAME+ methods # where +TAGNAME+ is the name of the tag. # # You should set this value before performing any source parsing with # YARD, otherwise your factory class will not be used. # # @example # YARD::Tags::Library.default_factory = MyFactory # # @see DefaultFactory def default_factory @default_factory ||= DefaultFactory.new end def default_factory=(factory) @default_factory = factory.is_a?(Class) ? factory.new : factory end # Returns the factory method used to parse the tag text for a specific tag # # @param [Symbol] tag the tag name # @return [Symbol] the factory method name for the tag # @return [Class,Symbol] the Tag class to use to parse the tag # or the method to call on the factory class # @return [nil] if the tag is freeform text # @since 0.6.0 def factory_method_for(tag) @factory_methods[tag] end # Returns the factory method used to parse the tag text for a specific # directive # # @param [Symbol] directive the directive name # @return [Symbol] the factory method name for the tag # @return [Class,Symbol] the Tag class to use to parse the tag or # the methods to call on the factory class # @return [nil] if the tag is freeform text # @since 0.8.0 def factory_method_for_directive(directive) @directive_factory_classes[directive] end # Sets the list of tags to display when rendering templates. The order of # tags in the list is also significant, as it represents the order that # tags are displayed in templates. # # You can use the {Array#place} to insert new tags to be displayed in # the templates at specific positions: # # Library.visible_tags.place(:mytag).before(:return) # # @return [Array] a list of ordered tags # @since 0.6.0 attr_accessor :visible_tags # Sets the list of tags that should apply to any children inside the # namespace they are defined in. For instance, a "@since" tag should # apply to all methods inside a module it is defined in. Transitive # tags can be overridden by directly defining a tag on the child object. # # @return [Array] a list of transitive tags # @since 0.6.0 attr_accessor :transitive_tags # Sorts the labels lexically by their label name, often used when displaying # the tags. # # @return [Array, String] the sorted labels as an array of the tag name and label def sorted_labels labels.sort_by {|a| a.last.downcase } end # Convenience method to define a new tag using one of {Tag}'s factory methods, or the # regular {DefaultFactory#parse_tag} factory method if none is supplied. # # @!macro [attach] yard.tag # @!method $2_tag # @!visibility private # @yard.tag $2 [$3] $1 # @param [#to_s] label the label used when displaying the tag in templates # @param [#to_s] tag the tag name to create # @param [#to_s, Class] meth the {Tag} factory method to call when # creating the tag or the name of the class to directly create a tag for def define_tag(label, tag, meth = nil) tag_meth = tag_method_name(tag) if meth.is_a?(Class) && Tag > meth class_eval <<-eof, __FILE__, __LINE__ def #{tag_meth}(text) #{meth}.new(#{tag.inspect}, text) end eof else class_eval <<-eof, __FILE__, __LINE__ def #{tag_meth}(text) send_to_factory(#{tag.inspect}, #{meth.inspect}, text) end eof end @labels ||= SymbolHash.new(false) @labels.update(tag => label) @factory_methods ||= SymbolHash.new(false) @factory_methods.update(tag => meth) tag end # @macro [attach] yard.directive # @!method $1_directive # @!visibility private # @yard.directive $1 [$2] $-1 # @overload define_directive(tag, tag_meth = nil, directive_class) # Convenience method to define a new directive using a {Tag} factory # method and {Directive} subclass that implements the directive # callbacks. # # @param [#to_s] tag the tag name of the directive # @param [#to_s] tag_meth the tag factory method to use when # parsing tag information # @param [Class] the directive class that implements the # directive behaviour # @see define_tag def define_directive(tag, tag_meth = nil, directive_class = nil) directive_meth = directive_method_name(tag) if directive_class.nil? tag_meth, directive_class = nil, tag_meth end class_eval <<-eof, __FILE__, __LINE__ def #{directive_meth}(tag, parser) directive_call(tag, parser) end eof @factory_methods ||= SymbolHash.new(false) @factory_methods.update(tag => tag_meth) @directive_factory_classes ||= SymbolHash.new(false) @directive_factory_classes.update(tag => directive_class) tag end def tag_method_name(tag_name) tag_or_directive_method_name(tag_name) end def directive_method_name(tag_name) tag_or_directive_method_name(tag_name, 'directive') end private def tag_or_directive_method_name(tag_name, type = 'tag') "#{tag_name.to_s.gsub('.', '_')}_#{type}" end end private def send_to_factory(tag_name, meth, text) meth = meth.to_s send_name = "parse_tag" + (meth.empty? ? "" : "_" + meth) if @factory.respond_to?(send_name) @factory.send(send_name, tag_name, text) else raise NoMethodError, "Factory #{@factory.class_name} does not implement factory method :#{meth}." end end # @return [Directive] def directive_call(tag, parser) meth = self.class.factory_method_for_directive(tag.tag_name) if meth <= Directive meth = meth.new(tag, parser) meth.call meth else meth.call(tag, parser) end end public # A factory class to handle parsing of tags, defaults to {default_factory} attr_accessor :factory def initialize(factory = Library.default_factory) self.factory = factory end # @param [#to_s] tag_name the name of the tag to look for # @return [Boolean] whether a tag by the given name is registered in # the library. def has_tag?(tag_name) tag_name && respond_to?(self.class.tag_method_name(tag_name)) end # Creates a new {Tag} object with a given tag name and data # @return [Tag] the newly created tag object def tag_create(tag_name, tag_buf) send(self.class.tag_method_name(tag_name), tag_buf) end # @param [#to_s] tag_name the name of the tag to look for # @return [Boolean] whether a directive by the given name is registered in # the library. def has_directive?(tag_name) tag_name && respond_to?(self.class.directive_method_name(tag_name)) end # Creates a new directive with tag information and a docstring parser # object. # @param [String] tag_name the name of the tag # @param [String] tag_buf the tag data # @param [DocstringParser] parser the parser object parsing the docstring # @return [Directive] the newly created directive def directive_create(tag_name, tag_buf, parser) meth = self.class.factory_method_for(tag_name) tag = send_to_factory(tag_name, meth, tag_buf) meth = self.class.directive_method_name(tag_name) send(meth, tag, parser) end # @!macro yard.tag.transitive # @note This tag is *transitive*. If it is applied on a # namespace (module or class), it will automatically be # applied to all children objects of that namespace unless # it is redefined on the child object. # Marks a class/module/method as abstract with optional # implementor information. # # @example # # @abstract Subclass and override {#run} to implement # # a custom Threadable class. # class Runnable # def run; raise NotImplementedError end # end define_tag "Abstract", :abstract # Declares the API that the object belongs to. Does not display in # output, but useful for performing queries (+yardoc --query+). Any text is # allowable in this tag, and there are no predefined values. # # @!macro yard.tag.transitive # @note The special name +@api private+ does display a notice in # documentation if it is listed, letting users know that the # method is not to be used by external components. # @example # class Post # # @api private # def reset_table!; table.flush end # end define_tag "API Visibility", :api # Declares a readwrite attribute on a Struct or class. # # @note This attribute is only applicable on class docstrings # @deprecated Use the more powerful {tag:!attribute} directive instead. # @example # # @attr [String] name the name of the structure # # @attr [Fixnum] size the size of the structure # class MyStruct < Struct; end define_tag "Attribute", :attr, :with_types_and_name # Declares a readonly attribute on a Struct or class. # # @note This attribute is only applicable on class docstrings # @deprecated Use the more powerful {tag:!attribute} directive instead. # @example # # @attr_reader [String] name the name of the structure # # @attr_reader [Fixnum] size the size of the structure # class MyStruct < Struct; end define_tag "Attribute Getter", :attr_reader, :with_types_and_name # Declares a writeonly attribute on a Struct or class. # # @note This attribute is only applicable on class docstrings # @deprecated Use the more powerful {tag:!attribute} directive instead. # @example # # @attr_reader [String] name the name of the structure # # @attr_reader [Fixnum] size the size of the structure # class MyStruct < Struct; end define_tag "Attribute Setter", :attr_writer, :with_types_and_name # List the author or authors of a class, module, or method. # # @example # # @author Foo Bar # class MyClass; end define_tag "Author", :author # Marks a method/class as deprecated with an optional description. # The description should be used to inform users of the recommended # migration path, and/or any useful information about why the object # was marked as deprecated. # # @example Deprecate a method with a replacement API # # @deprecated Use {#bar} instead. # def foo; end # @example Deprecate a method with no replacement # class Thread # # @deprecated Exiting a thread in this way is not reliable and # # can cause a program crash. # def kill; end # end define_tag "Deprecated", :deprecated # Show an example snippet of code for an object. The first line # is an optional title. # # @example # # @example Reverse a String # # "mystring".reverse #=> "gnirtsym" # def reverse; end # @yard.signature Optional title # Code block define_tag "Example", :example, :with_title_and_text # Adds an emphasized note at the top of the docstring for the object # # @example # # @note This method should only be used in outer space. # def eject; end # @see tag:todo define_tag "Note", :note # Describe an options hash in a method. The tag takes the # name of the options parameter first, followed by optional types, # the option key name, a default value for the key and a # description of the option. The default value should be placed within # parentheses and is optional (can be omitted). # # Note that a +@param+ tag need not be defined for the options # hash itself, though it is useful to do so for completeness. # # @note For keyword parameters, use +@param+, not +@option+. # # @example # # @param [Hash] opts the options to create a message with. # # @option opts [String] :subject The subject # # @option opts [String] :from ('nobody') From address # # @option opts [String] :to Recipient email # # @option opts [String] :body ('') The email's body # def send_email(opts = {}) end # @yard.signature name [Types] option_key (default_value) description define_tag "Options Hash", :option, :with_options # Describe that your method can be used in various # contexts with various parameters or return types. The first # line should declare the new method signature, and the following # indented tag data will be a new documentation string with its # own tags adding metadata for such an overload. # # @example # # @overload set(key, value) # # Sets a value on key # # @param key [Symbol] describe key param # # @param value [Object] describe value param # # @overload set(value) # # Sets a value on the default key +:foo+ # # @param value [Object] describe value param # def set(*args) end # @yard.signature method_signature(parameters) # Indented docstring for overload method define_tag "Overloads", :overload, OverloadTag # Documents a single method parameter (either regular or keyword) with a given name, type # and optional description. # # @example # # @param url [String] the URL of the page to download # # @param directory [String] the name of the directory to save to # def load_page(url, directory: 'pages') end define_tag "Parameters", :param, :with_types_and_name # Declares that the _logical_ visibility of an object is private. # In other words, it specifies that this method should be marked # private but cannot due to Ruby's visibility restrictions. This # exists for classes, modules and constants that do not obey Ruby's # visibility rules. For instance, an inner class might be considered # "private", though Ruby would make no such distinction. # # This tag is meant to be used in conjunction with the +--no-private+ # command-line option, and is required to actually remove these objects # from documentation output. See {file:README.md} for more information on # switches. # # If you simply want to set the API visibility of a method, you should # look at the {tag:api} tag instead. # # @note This method is not recommended for hiding undocumented or # "unimportant" methods. This tag should only be used to mark objects # private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you # can use +private_constant+ to declare constants (like classes or # modules) as private, and should be used instead of +@private+. # @macro yard.tag.transitive # @example # # @private # class InteralImplementation; end # @see tag:api # @yard.signature define_tag "Private", :private # Describes that a method may raise a given exception, with # an optional description of what it may mean. # # @example # # @raise [AccountBalanceError] if the account does not have # # sufficient funds to perform the transaction # def withdraw(amount) end define_tag "Raises", :raise, :with_types # Describes the return value (and type or types) of a method. # You can list multiple return tags for a method in the case # where a method has distinct return cases. In this case, each # case should begin with "if ...". # # @example A regular return value # # @return [Fixnum] the size of the file # def size; @file.size end # @example A method returns an Array or a single object # # @return [String] if a single object was returned # # from the database. # # @return [Array] if multiple objects were # # returned. # def find(query) end define_tag "Returns", :return, :with_types # "See Also" references for an object. Accepts URLs or # other code objects with an optional description at the end. # Note that the URL or object will be automatically linked by # YARD and does not need to be formatted with markup. # # @example # # Synchronizes system time using NTP. # # @see http://ntp.org/documentation.html NTP Documentation # # @see NTPHelperMethods # class NTPUpdater; end define_tag "See Also", :see, :with_name # Lists the version that the object was first added. # # @!macro yard.tag.transitive # @example # # @since 1.2.4 # def clear_routes; end define_tag "Since", :since # Marks a TODO note in the object being documented. # For reference, objects with TODO items can be enumerated # from the command line with a simple command: # # !!!sh # mocker$ yard list --query '@todo' # lib/mocker/mocker.rb:15: Mocker # lib/mocker/report/html.rb:5: Mocker::Report::Html # # YARD can also be used to enumerate the TODO items from # a short script: # # !!!ruby # require 'yard' # YARD::Registry.load!.all.each do |o| # puts o.tag(:todo).text if o.tag(:todo) # end # # @example # # @todo Add support for Jabberwocky service. # # There is an open source Jabberwocky library available # # at http://jbrwcky.org that can be easily integrated. # class Wonderlander; end # @see tag:note define_tag "Todo Item", :todo # Lists the version of a class, module or method. This is # similar to a library version, but at finer granularity. # In some cases, version of specific modules, classes, methods # or generalized components might change independently between # releases. A version tag is used to infer the API compatibility # of a specific object. # # @example # # The public REST API for http://jbrwcky.org # # @version 2.0 # class JabberwockyAPI; end define_tag "Version", :version # Describes what a method might yield to a given block. # The types specifier list should not list types, but names # of the parameters yielded to the block. If you define # parameters with +@yieldparam+, you do not need to define # the parameters in the type specification of +@yield+ as # well. # # @example # # For a block {|a,b,c| ... } # # @yield [a, b, c] Gives 3 random numbers to the block # def provide3values(&block) yield(42, 42, 42) end # @see tag:yieldparam # @see tag:yieldreturn # @yard.signature [parameters] description define_tag "Yields", :yield, :with_types # Defines a parameter yielded by a block. If you define the # parameters with +@yieldparam+, you do not need to define # them via +@yield+ as well. # # @example # # @yieldparam [String] name the name that is yielded # def with_name(name) yield(name) end define_tag "Yield Parameters", :yieldparam, :with_types_and_name # Documents the value and type that the block is expected # to return to the method. # # @example # # @yieldreturn [Fixnum] the number to add 5 to. # def add5_block(&block) 5 + yield end # @see tag:return define_tag "Yield Returns", :yieldreturn, :with_types # @yard.signature [r | w | rw] attribute_name # Indented attribute docstring define_directive :attribute, :with_types_and_title, AttributeDirective # @yard.signature define_directive :endgroup, EndGroupDirective define_directive :group, GroupDirective # @yard.signature [attach | new] optional_name # Optional macro expansion data define_directive :macro, :with_types_and_title, MacroDirective # @yard.signature method_signature(parameters) # Indented method docstring define_directive :method, :with_title_and_text, MethodDirective # @yard.signature [language] code define_directive :parse, :with_types, ParseDirective # Sets the scope of a DSL method. Only applicable to DSL method # calls. Acceptable values are 'class' or 'instance' # @yard.signature class | instance define_directive :scope, ScopeDirective # Sets the visibility of a DSL method. Only applicable to # DSL method calls. Acceptable values are public, protected, or private. # @yard.signature public | protected | private define_directive :visibility, VisibilityDirective self.visible_tags = [:abstract, :deprecated, :note, :todo, :example, :overload, :param, :option, :yield, :yieldparam, :yieldreturn, :return, :raise, :see, :author, :since, :version] self.transitive_tags = [:since, :api] end end end yard-master/lib/yard/tags/option_tag.rb000066400000000000000000000003231265676644000204570ustar00rootroot00000000000000module YARD module Tags class OptionTag < Tag attr_accessor :pair def initialize(tag_name, name, pair) super(tag_name, nil, nil, name) @pair = pair end end end end yard-master/lib/yard/tags/overload_tag.rb000066400000000000000000000035671265676644000207770ustar00rootroot00000000000000module YARD module Tags class OverloadTag < Tag attr_reader :signature, :parameters, :docstring def initialize(tag_name, text) super(tag_name, nil) parse_tag(text) parse_signature end def tag(name) docstring.tag(name) end def tags(name = nil) docstring.tags(name) end def has_tag?(name) docstring.has_tag?(name) end def object=(value) super(value) docstring.object = value docstring.tags.each {|tag| tag.object = value } end def name(prefix = false) return @name unless prefix object.scope == :class ? @name.to_s : "#{object.send(:sep)}#{@name}" end def method_missing(*args, &block) object.send(*args, &block) end def type object.type end def is_a?(other) object.is_a?(other) || self.class >= other.class || false end alias kind_of? is_a? private def parse_tag(text) @signature, text = *text.split(/\r?\n/, 2) @signature.strip! text ||= "" numspaces = text[/\A(\s*)/, 1].length text.gsub!(/^[ \t]{#{numspaces}}/, '') text.strip! @docstring = Docstring.new(text, nil) end def parse_signature if signature =~ /^(?:def\s)?\s*(#{CodeObjects::METHODMATCH})(?:(?:\s+|\s*\()(.*)(?:\)\s*$)?)?/m meth, args = $1, $2 meth.gsub!(/\s+/,'') # FIXME refactor this code to not make use of the Handlers::Base class (tokval_list should be moved) toks = YARD::Parser::Ruby::Legacy::TokenList.new(args) args = YARD::Handlers::Ruby::Legacy::Base.new(nil, nil).send(:tokval_list, toks, :all) args.map! {|a| k, v = *a.split('=', 2); [k.strip.to_s, (v ? v.strip : nil)] } if args @name = meth.to_sym @parameters = args end end end end end yard-master/lib/yard/tags/ref_tag.rb000066400000000000000000000001311265676644000177200ustar00rootroot00000000000000module YARD module Tags module RefTag attr_accessor :owner end end end yard-master/lib/yard/tags/ref_tag_list.rb000066400000000000000000000011311265676644000207540ustar00rootroot00000000000000module YARD module Tags class RefTagList attr_accessor :owner, :tag_name, :name def initialize(tag_name, owner, name = nil) @owner = CodeObjects::Proxy === owner ? owner : P(owner) @tag_name = tag_name.to_s @name = name end def tags if owner.is_a?(CodeObjects::Base) o = owner.tags(tag_name) o = o.select {|t| t.name.to_s == name.to_s } if name o.each do |t| t.extend(RefTag) t.owner = owner end o else [] end end end end endyard-master/lib/yard/tags/tag.rb000066400000000000000000000042131265676644000170710ustar00rootroot00000000000000module YARD module Tags # Represents a metadata tag value (+@tag+). Tags can have any combination of # {#types}, {#name} and {#text}, or none of the above. # # @example Programmatic tag creation # # The following docstring syntax: # # @param [String, nil] arg an argument # # # # is equivalent to: # Tag.new(:param, 'an argument', ['String', 'nil'], 'arg') class Tag # @return [String] the name of the tag attr_accessor :tag_name # @return [String] the tag text associated with the tag # @return [nil] if no tag text is supplied attr_accessor :text # @return [Array] a list of types associated with the tag # @return [nil] if no types are associated with the tag attr_accessor :types # @return [String] a name associated with the tag attr_accessor :name # @return [CodeObjects::Base] the associated object attr_accessor :object # Creates a new tag object with a tag name and text. Optionally, formally declared types # and a key name can be specified. # # Types are mainly for meta tags that rely on type information, such as +param+, +return+, etc. # # Key names are for tags that declare meta data for a specific key or name, such as +param+, # +raise+, etc. # # @param [#to_s] tag_name the tag name to create the tag for # @param [String] text the descriptive text for this tag # @param [Array] types optional type list of formally declared types # for the tag # @param [String] name optional key name which the tag refers to def initialize(tag_name, text, types = nil, name = nil) @tag_name, @text, @name, @types = tag_name.to_s, text, name, (types ? [types].flatten.compact : nil) end # Convenience method to access the first type specified. This should mainly # be used for tags that only specify one type. # # @return [String] the first of the list of specified types # @see #types def type types.first end end end endyard-master/lib/yard/tags/tag_format_error.rb000066400000000000000000000001201265676644000216430ustar00rootroot00000000000000module YARD module Tags class TagFormatError < Exception end end endyard-master/lib/yard/templates/000077500000000000000000000000001265676644000170315ustar00rootroot00000000000000yard-master/lib/yard/templates/engine.rb000066400000000000000000000164521265676644000206330ustar00rootroot00000000000000require 'ostruct' module YARD module Templates # This module manages all creation, handling and rendering of {Template} # objects. # # * To create a template object at a path, use {template}. # * To render a template, call {render}. # * To register a template path in the lookup paths, call {register_template_path}. module Engine class << self # @return [Array] the list of registered template paths attr_accessor :template_paths # Registers a new template path in {template_paths} # # @param [String] path a new template path # @return [void] def register_template_path(path) template_paths.push path end # Creates a template module representing the path. Searches on disk # for the first directory named +path+ (joined by '/') within the # template paths and builds a template module for. All other matching # directories in other template paths will be included in the # generated module as mixins (for overriding). # # @param [Array] path a list of path components # @raise [ArgumentError] if the path does not exist within one of the # {template_paths} on disk. # @return [Template] the module representing the template def template(*path) from_template = nil from_template = path.shift if path.first.is_a?(Template) path = path.join('/') full_paths = find_template_paths(from_template, path) path = File.cleanpath(path).gsub('../', '') raise ArgumentError, "No such template for #{path}" if full_paths.empty? mod = template!(path, full_paths) mod end # Forces creation of a template at +path+ within a +full_path+. # # @param [String] path the path name of the template # @param [Array] full_paths the full path on disk of the template # @return [Template] the template module representing the +path+ def template!(path, full_paths = nil) full_paths ||= [path] full_paths = [full_paths] unless full_paths.is_a?(Array) name = template_module_name(full_paths.first) begin; return const_get(name); rescue NameError; end mod = const_set(name, Module.new) mod.send(:include, Template) mod.send(:initialize, path, full_paths) mod end # Renders a template on a {CodeObjects::Base code object} using # a set of default (overridable) options. Either the +:object+ # or +:type+ keys must be provided. # # If a +:serializer+ key is provided and +:serialize+ is not set to # false, the rendered contents will be serialized through the {Serializers::Base} # object. See {with_serializer}. # # @example Renders an object with html formatting # Engine.render(:format => :html, :object => obj) # @example Renders without an object # Engine.render(:type => :fulldoc, :otheropts => somevalue) # @param [Hash] options the options hash # @option options [Symbol] :format (:text) the default format # @option options [Symbol] :type (nil) the :object's type. # @option options [Symbol] :template (:default) the default template # @return [String] the rendered template def render(options = {}) options = set_default_options(options) mod = template(options.template, options.type, options.format) if options.serializer && options.serialize != false with_serializer(options.object, options.serializer) { mod.run(options) } else mod.run(options) end end # Passes a set of objects to the +:fulldoc+ template for full documentation generation. # This is called by {CLI::Yardoc} to most commonly perform HTML # documentation generation. # # @param [Array] objects a list of {CodeObjects::Base} # objects to pass to the template # @param [Hash] options (see {render}) # @return [void] def generate(objects, options = {}) options = set_default_options(options) options.objects = objects options.object = Registry.root template(options.template, :fulldoc, options.format).run(options) end # Serializes the results of a block with a +serializer+ object. # # @param [CodeObjects::Base] object the code object to serialize # @param [Serializers::Base] serializer the serializer object # @yield a block whose result will be serialize # @yieldreturn [String] the contents to serialize # @see Serializers::Base def with_serializer(object, serializer, &block) output = nil filename = serializer.serialized_path(object) if serializer.respond_to?(:basepath) filename = File.join(serializer.basepath, filename) end log.capture("Generating #{filename}", nil) do serializer.before_serialize if serializer output = yield if serializer serializer.serialize(object, output) serializer.after_serialize(output) end end output end private # Sets default options on the options hash # # @param [Hash] options the options hash # @option options [Symbol] :format (:text) the default format # @option options [Symbol] :type (nil) the :object's type, if provided # @option options [Symbol] :template (:default) the default template # @return [void] def set_default_options(options = {}) if options.is_a?(Hash) options = TemplateOptions.new.tap do |o| o.reset_defaults o.update(options) end end options.type ||= options.object.type if options.object options end # Searches through the registered {template_paths} and returns # all full directories that have the +path+ within them on disk. # # @param [Template] from_template if provided, allows a relative # path to be specified from this template's full path. # @param [String] path the path component to search for in the # {template_paths} # @return [Array] a list of full paths that are existing # candidates for a template module def find_template_paths(from_template, path) paths = template_paths.dup paths = from_template.full_paths + paths if from_template paths.inject([]) do |acc, tp| full_path = File.cleanpath(File.join(tp, path)) acc.unshift(full_path) if File.directory?(full_path) acc end.uniq end # The name of the module that represents a +path+ # # @param [String] path the path to generate a module name for # @return [String] the module name def template_module_name(path) 'Template_' + path.to_s.gsub(/[^a-z0-9]/i, '_') end end self.template_paths = [] end Engine.register_template_path(File.join(YARD::ROOT, '..', 'templates')) end end yard-master/lib/yard/templates/erb_cache.rb000066400000000000000000000010331265676644000212460ustar00rootroot00000000000000module YARD module Templates # @since 0.5.4 module ErbCache def self.method_for(filename, &block) @methods ||= {} return @methods[filename] if @methods[filename] @methods[filename] = name = "_erb_cache_#{@methods.size}" erb = yield.src encoding = erb[/\A(#coding[:=].*\r?\n)/, 1] || '' module_eval "#{encoding}def #{name}; #{erb}; end", filename name end def self.clear! return unless @methods @methods.clear end end end end yard-master/lib/yard/templates/helpers/000077500000000000000000000000001265676644000204735ustar00rootroot00000000000000yard-master/lib/yard/templates/helpers/base_helper.rb000066400000000000000000000155171265676644000233020ustar00rootroot00000000000000module YARD::Templates::Helpers # The base helper module included in all templates. module BaseHelper attr_accessor :object, :serializer # @return [CodeObjects::Base] the object representing the current generated # page. Might not be the current {#object} when inside sub-templates. attr_reader :owner undef owner def owner; @owner || object.namespace end # @group Managing Global Template State # An object that keeps track of global state throughout the entire template # rendering process (including any sub-templates). # # @return [OpenStruct] a struct object that stores state # @since 0.6.0 def globals; options.globals end # @group Running the Verifier # Runs a list of objects against the {Verifier} object passed into the # template and returns the subset of verified objects. # # @param [Array] list a list of code objects # @return [Array] a list of code objects that match # the verifier. If no verifier is supplied, all objects are returned. def run_verifier(list) options.verifier ? options.verifier.run(list) : list end # @group Escaping Text # Escapes text. This is used a lot by the HtmlHelper and there should # be some helper to "clean up" text for whatever, this is it. def h(text) text end # @group Linking Objects and URLs # Links objects or URLs. This method will delegate to the correct +link_+ # method depending on the arguments passed in. # # @example Linking a URL # linkify('http://example.com') # @example Including docstring contents of an object # linkify('include:YARD::Docstring') # @example Linking to an extra file # linkify('file:README') # @example Linking an object by path # linkify('YARD::Docstring') def linkify(*args) if args.first.is_a?(String) case args.first when %r{://}, /^mailto:/ link_url(args[0], args[1], {:target => '_parent'}.merge(args[2]||{})) when /^include:file:(\S+)/ file = $1 relpath = File.relative_path(Dir.pwd, File.expand_path(file)) if relpath =~ /^\.\./ log.warn "Cannot include file from path `#{file}'" "" elsif File.file?(file) link_include_file(file) else log.warn "Cannot find file at `#{file}' for inclusion" "" end when /^include:(\S+)/ path = $1 if obj = YARD::Registry.resolve(object.namespace, path) link_include_object(obj) else log.warn "Cannot find object at `#{path}' for inclusion" "" end when /^render:(\S+)/ path = $1 if obj = YARD::Registry.resolve(object, path) opts = options.dup opts.delete(:serializer) obj.format(opts) else '' end when /^file:(\S+?)(?:#(\S+))?$/ link_file($1, args[1] ? args[1] : nil, $2) else link_object(*args) end else link_object(*args) end end # Includes an object's docstring into output. # @since 0.6.0 # @param [CodeObjects::Base] obj the object to include # @return [String] the object's docstring (no tags) def link_include_object(obj) obj.docstring end # Include a file as a docstring in output # @since 0.7.0 # @param [String] file the filename to include # @return [String] the file's contents def link_include_file(file) File.read(file) end # Links to an object with an optional title # # @param [CodeObjects::Base] obj the object to link to # @param [String] title the title to use for the link # @return [String] the linked object def link_object(obj, title = nil) return title if title case obj when YARD::CodeObjects::Base, YARD::CodeObjects::Proxy obj.title when String, Symbol P(obj).title else obj end end # Links to a URL # # @param [String] url the URL to link to # @param [String] title the optional title to display the link as # @param [Hash] params optional parameters for the link # @return [String] the linked URL def link_url(url, title = nil, params = nil) url end # Links to an extra file # # @param [String] filename the filename to link to # @param [String] title the title of the link # @param [String] anchor optional anchor # @return [String] the link to the file # @since 0.5.5 def link_file(filename, title = nil, anchor = nil) return filename.filename if CodeObjects::ExtraFileObject === filename filename end # @group Formatting Object Attributes # Formats a list of return types for output and links each type. # # @example Formatting types # format_types(['String', 'Array']) #=> "(String, Array)" # @example Formatting types without surrounding brackets # format_types(['String', 'Array'], false) #=> "String, Array" # @param [Array] list a list of types # @param [Boolean] brackets whether to surround the types in brackets # @return [String] the formatted list of Ruby types def format_types(list, brackets = true) list.nil? || list.empty? ? "" : (brackets ? "(#{list.join(", ")})" : list.join(", ")) end # @example Formatted type of an exception class # o = ClassObject.new(:root, :MyError) # o.superclass = P('RuntimeError') # format_object_type(o) # => "Exception" # @example Formatted type of a method # o = MethodObject.new(:root, :to_s) # format_object_type(o) # => "Method" # @param [CodeObjects::Base] object the object to retrieve the type for # @return [String] the human-readable formatted {CodeObjects::Base#type #type} # for the object def format_object_type(object) case object when YARD::CodeObjects::ClassObject object.is_exception? ? "Exception" : "Class" else object.type.to_s.capitalize end end # @example # s = format_object_title ModuleObject.new(:root, :MyModuleName) # s # => "Module: MyModuleName" # @param [CodeObjects::Base] object the object to retrieve a title for # @return [String] the page title name for a given object def format_object_title(object) case object when YARD::CodeObjects::RootObject "Top Level Namespace" else format_object_type(object) + ": " + object.title end end # Indents and formats source code # # @param [String] value the input source code # @return [String] formatted source code def format_source(value) sp = value.split("\n").last[/^(\s+)/, 1] num = sp ? sp.size : 0 value.gsub(/^\s{#{num}}/, '') end end end yard-master/lib/yard/templates/helpers/filter_helper.rb000066400000000000000000000012551265676644000236470ustar00rootroot00000000000000module YARD module Templates::Helpers # Helpers for various object types module FilterHelper # @return [Boolean] whether an object is a method def is_method?(object) object.type == :method end # @return [Boolean] whether an object is a namespace def is_namespace?(object) object.is_a?(CodeObjects::NamespaceObject) end # @return [Boolean] whether an object is a class def is_class?(object) object.is_a?(CodeObjects::ClassObject) end # @return [Boolean] whether an object is a module def is_module?(object) object.is_a?(CodeObjects::ModuleObject) end end end end yard-master/lib/yard/templates/helpers/html_helper.rb000066400000000000000000000521401265676644000233250ustar00rootroot00000000000000require 'cgi' module YARD module Templates::Helpers # The helper module for HTML templates. module HtmlHelper include MarkupHelper include HtmlSyntaxHighlightHelper # @group Escaping Template Data # Escapes HTML entities # # @param [String] text the text to escape # @return [String] the HTML with escaped entities def h(text) CGI.escapeHTML(text.to_s) end # Escapes a URL # # @param [String] text the URL # @return [String] the escaped URL def urlencode(text) CGI.escape(text.to_s) end # @group Converting Markup to HTML # Turns text into HTML using +markup+ style formatting. # # @param [String] text the text to format # @param [Symbol] markup examples are +:markdown+, +:textile+, +:rdoc+. # To add a custom markup type, see {MarkupHelper} # @return [String] the HTML def htmlify(text, markup = options.markup) markup_meth = "html_markup_#{markup}" return text unless respond_to?(markup_meth) return "" unless text return text unless markup html = send(markup_meth, text) if html.respond_to?(:encode) html = html.force_encoding(text.encoding) # for libs that mess with encoding html = html.encode(:invalid => :replace, :replace => '?') end html = resolve_links(html) unless [:text, :none, :pre].include?(markup) html = parse_codeblocks(html) end html end # Converts Markdown to HTML # @param [String] text input Markdown text # @return [String] output HTML # @since 0.6.0 def html_markup_markdown(text) # TODO: other libraries might be more complex provider = markup_class(:markdown) if provider.to_s == 'RDiscount' provider.new(text, :autolink).to_html elsif provider.to_s == 'RedcarpetCompat' provider.new(text, :no_intraemphasis, :gh_blockcode, :fenced_code, :autolink, :tables, :lax_spacing).to_html else provider.new(text).to_html end end # Converts Asciidoc to HTML # @param [String] text input Asciidoc text # @return [String] output HTML def html_markup_asciidoc(text) markup_class(:asciidoc).render(text) end # Converts Textile to HTML # @param [String] text the input Textile text # @return [String] output HTML # @since 0.6.0 def html_markup_textile(text) doc = markup_class(:textile).new(text) doc.hard_breaks = false if doc.respond_to?(:hard_breaks=) doc.to_html end # Converts plaintext to strict Textile (hard breaks) # @param [String] text the input textile data # @return [String] the output HTML # @since 0.6.0 def html_markup_textile_strict(text) markup_class(:textile).new(text).to_html end # Converts RDoc formatting (SimpleMarkup) to HTML # @param [String] text the input RDoc formatted text # @return [String] output HTML # @since 0.6.0 def html_markup_rdoc(text) doc = markup_class(:rdoc).new(text) doc.from_path = url_for(object) if doc.respond_to?(:from_path=) doc.to_html end # Converts plaintext to pre-formatted HTML # @param [String] text the input text # @return [String] the output HTML # @since 0.6.0 def html_markup_pre(text) "
    " + h(text) + "
    " end # Converts plaintext to regular HTML # @param [String] text the input text # @return [String] the output HTML # @since 0.6.0 def html_markup_text(text) h(text).gsub(/\r?\n/, '
    ') end # @return [String] the same text with no markup # @since 0.6.6 def html_markup_none(text) h(text) end # Converts HTML to HTML # @param [String] text input html # @return [String] output HTML # @since 0.6.0 def html_markup_html(text) text end # Highlights Ruby source. Similar to {#html_syntax_highlight}, but # this method is meant to be called from {#htmlify} when markup is # set to "ruby". # # @param [String] source the Ruby source # @return [String] the highlighted HTML # @since 0.7.0 def html_markup_ruby(source) '
    ' + html_syntax_highlight(source, :ruby) + '
    ' end # @return [String] HTMLified text as a single line (paragraphs removed) def htmlify_line(*args) "
    " + htmlify(*args) + "
    " end # @group Syntax Highlighting Source Code # Syntax highlights +source+ in language +type+. # # @note To support a specific language +type+, implement the method # +html_syntax_highlight_TYPE+ in this class. # # @param [String] source the source code to highlight # @param [Symbol, String] type the language type (:ruby, :plain, etc). Use # :plain for no syntax highlighting. # @return [String] the highlighted source def html_syntax_highlight(source, type = nil) return "" unless source return h(source) unless options.highlight new_type, source = parse_lang_for_codeblock(source) type ||= new_type || :ruby meth = "html_syntax_highlight_#{type}" respond_to?(meth) ? send(meth, source) : h(source) end # @return [String] unhighlighted source def html_syntax_highlight_plain(source) h(source) end # @group Linking Objects and URLs # Resolves any text in the form of +{Name}+ to the object specified by # Name. Also supports link titles in the form +{Name title}+. # # @example Linking to an instance method # resolve_links("{MyClass#method}") # => "MyClass#method" # @example Linking to a class with a title # resolve_links("{A::B::C the C class}") # => "the c class" # @param [String] text the text to resolve links in # @return [String] HTML with linkified references def resolve_links(text) code_tags = 0 text.gsub(/<(\/)?(pre|code|tt)|(\\|!)?\{(?!\})(\S+?)(?:\s([^\}]*?\S))?\}(?=[\W<]|.+<\/|$)/m) do |str| closed, tag, escape, name, title, match = $1, $2, $3, $4, $5, $& if tag code_tags += (closed ? -1 : 1) next str end next str unless code_tags == 0 next(match[1..-1]) if escape next(match) if name[0,1] == '|' if name == '.*<\/a>\s*(.*)\Z/ name, title = $1, $2 title = nil if title.empty? end name = CGI.unescapeHTML(name) if object.is_a?(String) object else link = linkify(name, title) if (link == name || link == title) && (name+' '+link !~ /\A/) match = /(.+)?(\{#{Regexp.quote name}(?:\s.*?)?\})(.+)?/.match(text) file = (@file ? @file.filename : object.file) || '(unknown)' line = (@file ? 1 : (object.docstring.line_range ? object.docstring.line_range.first : 1)) + (match ? $`.count("\n") : 0) log.warn "In file `#{file}':#{line}: Cannot resolve link to #{name} from text" + (match ? ":" : ".") log.warn((match[1] ? '...' : '') + match[2].gsub("\n","") + (match[3] ? '...' : '')) if match end link end end end # (see BaseHelper#link_file) def link_file(filename, title = nil, anchor = nil) if CodeObjects::ExtraFileObject === filename file = filename else contents = File.file?(filename) ? nil : '' file = CodeObjects::ExtraFileObject.new(filename, contents) end return title || file.title unless serializer link_url(url_for_file(file, anchor), title || file.title) end # (see BaseHelper#link_include_file) def link_include_file(file) unless file.is_a?(CodeObjects::ExtraFileObject) file = CodeObjects::ExtraFileObject.new(file) end file.attributes[:markup] ||= markup_for_file('', file.filename) htmlify(file.contents, file.attributes[:markup] || options.markup) end # (see BaseHelper#link_include_object) def link_include_object(obj) htmlify(obj.docstring) end # (see BaseHelper#link_object) def link_object(obj, title = nil, anchor = nil, relative = true) return title if obj.nil? obj = Registry.resolve(object, obj, true, true) if obj.is_a?(String) if title title = title.to_s elsif object.is_a?(CodeObjects::Base) # Check if we're linking to a class method in the current # object. If we are, create a title in the format of # "CurrentClass.method_name" if obj.is_a?(CodeObjects::MethodObject) && obj.scope == :class && obj.parent == object title = h([object.name, obj.sep, obj.name].join) elsif obj.title != obj.path title = h(obj.title) else title = h(object.relative_path(obj)) end else title = h(obj.title) end return title unless serializer return title if obj.is_a?(CodeObjects::Proxy) link = url_for(obj, anchor, relative) link = link ? link_url(link, title, :title => h("#{obj.title} (#{obj.type})")) : title "" + link + "" end # (see BaseHelper#link_url) def link_url(url, title = nil, params = {}) title ||= url title.gsub!(/[\r\n]/, ' ') params = SymbolHash.new(false).update( :href => url, :title => h(title) ).update(params) params[:target] ||= '_parent' if url =~ /^(\w+):\/\// "#{title}".gsub(/[\r\n]/, ' ') end # @group URL Helpers # @param [CodeObjects::Base] object the object to get an anchor for # @return [String] the anchor for a specific object def anchor_for(object) case object when CodeObjects::MethodObject "#{object.name}-#{object.scope}_#{object.type}" when CodeObjects::ClassVariableObject "#{object.name.to_s.gsub('@@', '')}-#{object.type}" when CodeObjects::Base "#{object.name}-#{object.type}" when CodeObjects::Proxy object.path else object.to_s end end # Returns the URL for an object. # # @param [String, CodeObjects::Base] obj the object (or object path) to link to # @param [String] anchor the anchor to link to # @param [Boolean] relative use a relative or absolute link # @return [String] the URL location of the object def url_for(obj, anchor = nil, relative = true) link = nil return link unless serializer return link if obj.is_a?(CodeObjects::Base) && run_verifier([obj]).empty? if obj.is_a?(CodeObjects::Base) && !obj.is_a?(CodeObjects::NamespaceObject) # If the obj is not a namespace obj make it the anchor. anchor, obj = obj, obj.namespace end objpath = serializer.serialized_path(obj) return link unless objpath relative = false if object == Registry.root if relative fromobj = object if object.is_a?(CodeObjects::Base) && !object.is_a?(CodeObjects::NamespaceObject) fromobj = owner end from = serializer.serialized_path(fromobj) link = File.relative_path(from, objpath) else link = objpath end link + (anchor ? '#' + urlencode(anchor_for(anchor)) : '') end # Returns the URL for a specific file # # @param [String, CodeObjects::ExtraFileObject] filename the filename to link to # @param [String] anchor optional anchor # @return [String] the URL pointing to the file def url_for_file(filename, anchor = nil) return '' unless serializer fromobj = object if CodeObjects::Base === fromobj && !fromobj.is_a?(CodeObjects::NamespaceObject) fromobj = fromobj.namespace end from = serializer.serialized_path(fromobj) if filename == options.readme path = 'index.html' else path = serializer.serialized_path(filename) end link = File.relative_path(from, path) link += (anchor ? '#' + urlencode(anchor) : '') link end # Returns the URL for a list type # # @param [String, Symbol] type the list type to generate a URL for # @return [String] the URL pointing to the list # @since 0.8.0 def url_for_list(type) url_for_file("#{type}_list.html") end # Returns the URL for the frameset page # # @return [String] the URL pointing to the frames page # @since 0.8.0 def url_for_frameset url_for_file("frames.html") end # Returns the URL for the main page (README or alphabetic index) # # @return [String] the URL pointing to the first main page the # user should see. def url_for_main url_for_file("index.html") end # Returns the URL for the alphabetic index page # # @return [String] the URL pointing to the first main page the # user should see. def url_for_index url_for_file("_index.html") end # @group Formatting Objects and Attributes # Formats a list of objects and links them # @return [String] a formatted list of objects def format_object_name_list(objects) objects.sort_by {|o| o.name.to_s.downcase }.map do |o| "" + linkify(o, o.name) + "" end.join(", ") end # Formats a list of types from a tag. # # @param [Array, FalseClass] typelist # the list of types to be formatted. # # @param [Boolean] brackets omits the surrounding # brackets if +brackets+ is set to +false+. # # @return [String] the list of types formatted # as [Type1, Type2, ...] with the types linked # to their respective descriptions. # def format_types(typelist, brackets = true) return unless typelist.is_a?(Array) list = typelist.map do |type| type = type.gsub(/([<>])/) { h($1) } type = type.gsub(/([\w:]+)/) { $1 == "lt" || $1 == "gt" ? $1 : linkify($1, $1) } "" + type + "" end list.empty? ? "" : (brackets ? "(#{list.join(", ")})" : list.join(", ")) end # Get the return types for a method signature. # # @param [CodeObjects::MethodObject] meth the method object # @param [Boolean] link whether to link the types # @return [String] the signature types # @since 0.5.3 def signature_types(meth, link = true) meth = convert_method_to_overload(meth) if meth.respond_to?(:object) && !meth.has_tag?(:return) meth = meth.object end type = options.default_return || "" if meth.tag(:return) && meth.tag(:return).types types = meth.tags(:return).map {|t| t.types ? t.types : [] }.flatten.uniq first = link ? h(types.first) : format_types([types.first], false) if types.size == 2 && types.last == 'nil' type = first + '?' elsif types.size == 2 && types.last =~ /^(Array)?<#{Regexp.quote types.first}>$/ type = first + '+' elsif types.size > 2 type = [first, '...'].join(', ') elsif types == ['void'] && options.hide_void_return type = "" else type = link ? h(types.join(", ")) : format_types(types, false) end elsif !type.empty? type = link ? h(type) : format_types([type], false) end type = "#{type} " unless type.empty? type end # Formats the signature of method +meth+. # # @param [CodeObjects::MethodObject] meth the method object to list # the signature of # @param [Boolean] link whether to link the method signature to the details view # @param [Boolean] show_extras whether to show extra meta-data (visibility, attribute info) # @param [Boolean] full_attr_name whether to show the full attribute name # ("name=" instead of "name") # @return [String] the formatted method signature def signature(meth, link = true, show_extras = true, full_attr_name = true) meth = convert_method_to_overload(meth) type = signature_types(meth, link) type = "⇒ #{type}" if type && !type.empty? scope = meth.scope == :class ? "." : "#" name = full_attr_name ? meth.name : meth.name.to_s.gsub(/^(\w+)=$/, '\1') blk = format_block(meth) args = !full_attr_name && meth.writer? ? "" : format_args(meth) extras = [] extras_text = '' if show_extras if rw = meth.attr_info attname = [rw[:read] ? 'read' : nil, rw[:write] ? 'write' : nil].compact attname = attname.size == 1 ? attname.join('') + 'only' : nil extras << attname if attname end extras << meth.visibility if meth.visibility != :public extras_text = ' (' + extras.join(", ") + ')' unless extras.empty? end title = "%s%s%s %s %s" % [scope, h(name), args, blk, type] if link if meth.is_a?(YARD::CodeObjects::MethodObject) link_title = "#{h meth.name(true)} (#{meth.scope} #{meth.type})" else link_title = "#{h name} (#{meth.type})" end obj = meth.respond_to?(:object) ? meth.object : meth url = url_for(object, obj) link_url(url, title, :title => link_title) + extras_text else title + extras_text end end # @group Getting the Character Encoding # Returns the current character set. The default value can be overridden # by setting the +LANG+ environment variable or by overriding this # method. In Ruby 1.9 you can also modify this value by setting # +Encoding.default_external+. # # @return [String] the current character set # @since 0.5.4 def charset has_encoding = defined?(::Encoding) if @file && has_encoding lang = @file.contents.encoding.to_s else return 'utf-8' unless has_encoding || lang = ENV['LANG'] if has_encoding lang = ::Encoding.default_external.name.downcase else lang = lang.downcase.split('.').last end end case lang when "ascii-8bit", "us-ascii", "ascii-7bit"; 'iso-8859-1' when "utf8"; 'utf-8' else; lang end end # @endgroup private # Converts a set of hash options into HTML attributes for a tag # # @param [Hash{String => String}] opts the tag options # @return [String] the tag attributes of an HTML tag def tag_attrs(opts = {}) opts.sort_by {|k, v| k.to_s }.map {|k,v| "#{k}=#{v.to_s.inspect}" if v }.join(" ") end # Converts a {CodeObjects::MethodObject} into an overload object # @since 0.5.3 def convert_method_to_overload(meth) # use first overload tag if it has a return type and method itself does not if !meth.tag(:return) && meth.tags(:overload).size == 1 && meth.tag(:overload).tag(:return) return meth.tag(:overload) end meth end # Parses !!!lang out of codeblock, returning the codeblock language # followed by the source code. # # @param [String] source the source code whose language to determine # @return [Array(String, String)] the language, if any, and the # remaining source # @since 0.7.5 def parse_lang_for_codeblock(source) type = nil if source =~ /\A(?:[ \t]*\r?\n)?[ \t]*!!!([\w.+-]+)[ \t]*\r?\n/ type, source = $1, $' end [type, source] end # Parses code blocks out of html and performs syntax highlighting # on code inside of the blocks. # # @param [String] html the html to search for code in # @return [String] highlighted html # @see #html_syntax_highlight def parse_codeblocks(html) html.gsub(/(?:\s*)?(.+?)(?:<\/code>\s*)?<\/pre>/m) do string = $3 # handle !!!LANG prefix to send to html_syntax_highlight_LANG language, _ = parse_lang_for_codeblock(string) language ||= $1 || $2 || object.source_type if options.highlight string = html_syntax_highlight(CGI.unescapeHTML(string), language) end classes = ['code', language].compact.join(' ') %Q{
    #{string}
    } end end end end end yard-master/lib/yard/templates/helpers/html_syntax_highlight_helper.rb000066400000000000000000000042651265676644000267670ustar00rootroot00000000000000module YARD module Templates module Helpers # Helper methods for syntax highlighting. module HtmlSyntaxHighlightHelper # Highlights Ruby source # @param [String] source the Ruby source code # @return [String] the highlighted Ruby source def html_syntax_highlight_ruby(source) if Parser::SourceParser.parser_type == :ruby html_syntax_highlight_ruby_ripper(source) else html_syntax_highlight_ruby_legacy(source) end end private def html_syntax_highlight_ruby_ripper(source) tokenlist = Parser::Ruby::RubyParser.parse(source, "(syntax_highlight)").tokens raise Parser::ParserSyntaxError if tokenlist.empty? && !source.empty? output = "" tokenlist.each do |s| output << "" if [:tstring_beg, :regexp_beg].include?(s[0]) case s.first when :nl, :ignored_nl, :sp output << h(s[1]) when :ident output << "#{h(s[1])}" else output << "#{h(s[1])}" end output << "" if [:tstring_end, :regexp_end].include?(s[0]) end output rescue Parser::ParserSyntaxError h(source) end def html_syntax_highlight_ruby_legacy(source) tokenlist = Parser::Ruby::Legacy::TokenList.new(source) tokenlist.map do |s| prettyclass = s.class.class_name.sub(/^Tk/, '').downcase prettysuper = s.class.superclass.class_name.sub(/^Tk/, '').downcase case s when Parser::Ruby::Legacy::RubyToken::TkWhitespace, Parser::Ruby::Legacy::RubyToken::TkUnknownChar h s.text when Parser::Ruby::Legacy::RubyToken::TkId prettyval = h(s.text) "#{prettyval}" else "#{h s.text}" end end.join end end end end endyard-master/lib/yard/templates/helpers/markup/000077500000000000000000000000001265676644000217725ustar00rootroot00000000000000yard-master/lib/yard/templates/helpers/markup/rdoc_markdown.rb000066400000000000000000000007771265676644000251630ustar00rootroot00000000000000module YARD module Templates module Helpers module Markup begin require 'rdoc'; rescue LoadError; end begin require 'rdoc/markdown' rescue LoadError raise NameError, "could not load RDoc Markdown support (rdoc is too old)" end class RDocMarkdown < RDocMarkup def initialize(text) super RDoc::Markdown.new.parse(text) end def fix_typewriter(html) html end end end end end end yard-master/lib/yard/templates/helpers/markup/rdoc_markup.rb000066400000000000000000000061331265676644000246300ustar00rootroot00000000000000require 'thread' module YARD module Templates module Helpers module Markup begin require 'rdoc'; rescue LoadError; end begin require 'rdoc/markup' require 'rdoc/markup/to_html' class RDocMarkup; MARKUP = RDoc::Markup end class RDocMarkupToHtml < RDoc::Markup::ToHtml if defined?(RDoc::VERSION) && RDoc::VERSION >= '4.0.0' && defined?(RDoc::Options) then def initialize options = RDoc::Options.new options.pipe = true super(options) end end end rescue LoadError begin require 'rdoc/markup/simple_markup' require 'rdoc/markup/simple_markup/to_html' class RDocMarkup; MARKUP = SM::SimpleMarkup end class RDocMarkupToHtml < SM::ToHtml; end rescue LoadError raise NameError, "could not load RDocMarkup (rdoc is not installed)" end end class RDocMarkup attr_accessor :from_path @@formatter = nil @@markup = nil @@mutex = nil def initialize(text) @text = text @@formatter ||= RDocMarkupToHtml.new @@markup ||= MARKUP.new @@mutex ||= Mutex.new end def to_html html = nil @@mutex.synchronize do @@formatter.from_path = from_path html = @@markup.convert(@text, @@formatter) end html = fix_dash_dash(html) html = fix_typewriter(html) html end private # Fixes RDoc behaviour with ++ only supporting alphanumeric text. # # @todo Refactor into own SimpleMarkup subclass def fix_typewriter(text) code_tags = 0 text.gsub(/<(\/)?(pre|code|tt)|(\s|^|>)\+(?! )([^\n\+]{1,900})(?! )\+/) do |str| closed, tag, first_text, type_text, pre_text, no_match = $1, $2, $3, $4, $`, $& if tag code_tags += (closed ? -1 : 1) next str end next str unless code_tags == 0 first_text + '' + type_text + '' end end # Don't allow -- to turn into — element. The chances of this being # some --option is far more likely than the typographical meaning. # # @todo Refactor into own SimpleMarkup subclass def fix_dash_dash(text) text.gsub(/—(?=\S)/, '--') end end class RDocMarkupToHtml attr_accessor :from_path # Disable auto-link of URLs def handle_special_HYPERLINK(special) @hyperlink ? special.text : super end def accept_paragraph(*args) par = args.last text = par.respond_to?(:txt) ? par.txt : par.text @hyperlink = !!(text =~ /\{(https?:|mailto:|link:|www\.)/) super end end end end end endyard-master/lib/yard/templates/helpers/markup_helper.rb000066400000000000000000000144511265676644000236630ustar00rootroot00000000000000require 'rubygems' module YARD module Templates::Helpers # Helper methods for loading and managing markup types. module MarkupHelper class << self # Clears the markup provider cache information. Mainly used for testing. # @return [void] def clear_markup_cache self.markup_cache = {} end # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers # @private # @since 0.6.4 attr_accessor :markup_cache end MarkupHelper.clear_markup_cache # The default list of markup providers for each markup type MARKUP_PROVIDERS = { :markdown => [ {:lib => :redcarpet, :const => 'RedcarpetCompat'}, {:lib => :rdiscount, :const => 'RDiscount'}, {:lib => :kramdown, :const => 'Kramdown::Document'}, {:lib => :bluecloth, :const => 'BlueCloth'}, {:lib => :maruku, :const => 'Maruku'}, {:lib => :'rpeg-markdown', :const => 'PEGMarkdown'}, {:lib => :rdoc, :const => 'YARD::Templates::Helpers::Markup::RDocMarkdown'}, ], :textile => [ {:lib => :redcloth, :const => 'RedCloth'}, ], :textile_strict => [ {:lib => :redcloth, :const => 'RedCloth'}, ], :rdoc => [ {:lib => nil, :const => 'YARD::Templates::Helpers::Markup::RDocMarkup'}, ], :asciidoc => [ {:lib => :asciidoctor, :const => 'Asciidoctor'} ], :ruby => [], :text => [], :pre => [], :html => [], :none => [], } # Returns a list of extensions for various markup types. To register # extensions for a type, add them to the array of extensions for the # type. # @since 0.6.0 MARKUP_EXTENSIONS = { :html => ['htm', 'html', 'shtml'], :text => ['txt'], :textile => ['textile', 'txtile'], :asciidoc => ['asciidoc', 'ad', 'adoc', 'asc'], :markdown => ['markdown', 'md', 'mdown', 'mkd'], :rdoc => ['rdoc'], :ruby => ['rb', 'ru'] } # Contains the Regexp object that matches the shebang line of extra # files to detect the markup type. MARKUP_FILE_SHEBANG = /\A#!(\S+)\s*$/ # Attempts to load the first valid markup provider in {MARKUP_PROVIDERS}. # If a provider is specified, immediately try to load it. # # On success this sets `@markup_provider` and `@markup_class` to # the provider name and library constant class/module respectively for # the loaded provider. # # On failure this method will inform the user that no provider could be # found and exit the program. # # @return [Boolean] whether the markup provider was successfully loaded. def load_markup_provider(type = options.markup) return true if MarkupHelper.markup_cache[type] MarkupHelper.markup_cache[type] ||= {} providers = MARKUP_PROVIDERS[type.to_sym] return true if providers && providers.empty? if providers && options.markup_provider providers = providers.select {|p| p[:lib] == options.markup_provider } end if providers == nil || providers.empty? log.error "Invalid markup type '#{type}' or markup provider " + "(#{options.markup_provider}) is not registered." return false end # Search for provider, return the library class name as const if found providers.each do |provider| begin require provider[:lib].to_s; rescue LoadError; next end if provider[:lib] begin klass = eval("::" + provider[:const]); rescue NameError; next end MarkupHelper.markup_cache[type][:provider] = provider[:lib] # Cache the provider MarkupHelper.markup_cache[type][:class] = klass return true end # Show error message telling user to install first potential provider name, lib = *[providers.first[:const], providers.first[:lib] || type] log.error "Missing '#{lib}' gem for #{type.to_s.capitalize} formatting. Install it with `gem install #{lib}`" false end # Checks for a shebang or looks at the file extension to determine # the markup type for the file contents. File extensions are registered # for a markup type in {MARKUP_EXTENSIONS}. # # A shebang should be on the first line of a file and be in the form: # # #!markup_type # # Standard markup types are text, html, rdoc, markdown, textile # # @param [String] contents Unused. Was necessary prior to 0.7.0. # Newer versions of YARD use {CodeObjects::ExtraFileObject#contents} # @return [Symbol] the markup type recognized for the file # @see MARKUP_EXTENSIONS # @since 0.6.0 def markup_for_file(contents, filename) if contents && contents =~ MARKUP_FILE_SHEBANG # Shebang support return $1.to_sym end ext = (File.extname(filename)[1..-1] || '').downcase MARKUP_EXTENSIONS.each do |type, exts| return type if exts.include?(ext) end options.markup end # Strips any shebang lines on the file contents that pertain to # markup or preprocessing data. # # @deprecated Use {CodeObjects::ExtraFileObject#contents} instead # @return [String] the file contents minus any preprocessing tags # @since 0.6.0 def markup_file_contents(contents) contents =~ MARKUP_FILE_SHEBANG ? $' : contents end # Gets the markup provider class/module constant for a markup type # Call {#load_markup_provider} before using this method. # # @param [Symbol] type the markup type (:rdoc, :markdown, etc.) # @return [Class] the markup class def markup_class(type = options.markup) load_markup_provider(type) MarkupHelper.markup_cache[type][:class] end # Gets the markup provider name for a markup type # Call {#load_markup_provider} before using this method. # # @param [Symbol] type the markup type (:rdoc, :markdown, etc.) # @return [Symbol] the markup provider name (usually the gem name of the library) def markup_provider(type = options.markup) MarkupHelper.markup_cache[type][:provider] end end end end yard-master/lib/yard/templates/helpers/method_helper.rb000066400000000000000000000046621265676644000236470ustar00rootroot00000000000000module YARD module Templates::Helpers # Helper methods for method objects. module MethodHelper # @return [String] formatted arguments for a method def format_args(object) return if object.parameters.nil? params = object.parameters if object.has_tag?(:yield) || object.has_tag?(:yieldparam) params.reject! do |param| param[0].to_s[0,1] == "&" && !object.tags(:param).any? {|t| t.name == param[0][1..-1] } end end unless params.empty? args = params.map do |n, v| v ? "#{n}#{n[-1,1] == ':' ? '' : ' ='} #{v}" : n.to_s end.join(", ") h("(#{args})") else "" end end # @return [String] formatted and linked return types for a method def format_return_types(object) return unless object.has_tag?(:return) && object.tag(:return).types return if object.tag(:return).types.empty? format_types [object.tag(:return).types.first], false end # @return [String] formatted block if one exists def format_block(object) if object.has_tag?(:yield) && object.tag(:yield).types params = object.tag(:yield).types elsif object.has_tag?(:yieldparam) params = object.tags(:yieldparam).map {|t| t.name } elsif object.has_tag?(:yield) return "{ ... }" else params = nil end params ? h("{|" + params.join(", ") + "| ... }") : "" end # @return [String] formats line numbers for source code of an object def format_lines(object) return "" if object.source.nil? || object.line.nil? i = -1 object.source.split(/\n/).map { object.line + (i += 1) }.join("\n") end # @return [String] formats source of an object def format_code(object, show_lines = false) i = -1 lines = object.source.split(/\n/) longestline = (object.line + lines.size).to_s.length lines.map do |line| lineno = object.line + (i += 1) (" " * (longestline - lineno.to_s.length)) + lineno.to_s + " " + line end.join("\n") end # @return [String] formats source code of a constant value def format_constant(value) sp = value.split("\n").last[/^(\s+)/, 1] num = sp ? sp.size : 0 html_syntax_highlight value.gsub(/^\s{#{num}}/, '') end end end end yard-master/lib/yard/templates/helpers/module_helper.rb000066400000000000000000000014461265676644000236510ustar00rootroot00000000000000module YARD module Templates module Helpers # Helper methods for managing module objects. module ModuleHelper # Prunes the method listing by running the verifier and removing attributes/aliases # @param [Array] list a list of methods # @param [Boolean] hide_attributes whether to prune attribute methods from the list # @return [Array] a pruned list of methods def prune_method_listing(list, hide_attributes = true) list = run_verifier(list) list = list.reject {|o| o.is_alias? unless CodeObjects::Proxy === o.namespace } list = list.reject {|o| o.is_attribute? unless CodeObjects::Proxy === o.namespace } if hide_attributes list end end end end end yard-master/lib/yard/templates/helpers/text_helper.rb000066400000000000000000000066001265676644000233450ustar00rootroot00000000000000module YARD module Templates module Helpers # Helper methods for text template formats. module TextHelper # @return [String] escapes text def h(text) out = "" text = text.split(/\n/) text.each_with_index do |line, i| out << case line when /^\s*$/; "\n\n" when /^\s+\S/, /^=/; line + "\n" else; line + (text[i + 1] =~ /^\s+\S/ ? "\n" : " ") end end out end # @return [String] wraps text at +col+ columns. def wrap(text, col = 72) text.gsub(/(.{1,#{col}})( +|$\n?)|(.{1,#{col}})/, "\\1\\3\n") end # @return [String] indents +text+ by +len+ characters. def indent(text, len = 4) text.gsub(/^/, ' ' * len) end # @return [String] aligns a title to the right def title_align_right(text, col = 72) align_right(text, '-', col) end # @return [String] aligns text to the right def align_right(text, spacer = ' ', col = 72) text = text[0, col - 4] + '...' if (col - 1 - text.length) < 0 spacer * (col - 1 - text.length) + " " + text end # @return [String] returns a horizontal rule for output def hr(col = 72, sep = "-") sep * col end # @return [String] the formatted signature for a method def signature(meth) # use first overload tag if it has a return type and method itself does not if !meth.tag(:return) && meth.tag(:overload) && meth.tag(:overload).tag(:return) meth = meth.tag(:overload) end type = options.default_return || "" rmeth = meth if !rmeth.has_tag?(:return) && rmeth.respond_to?(:object) rmeth = meth.object end if rmeth.tag(:return) && rmeth.tag(:return).types types = rmeth.tags(:return).map {|t| t.types ? t.types : [] }.flatten.uniq first = types.first if types.size == 2 && types.last == 'nil' type = first + '?' elsif types.size == 2 && types.last =~ /^(Array)?<#{Regexp.quote types.first}>$/ type = first + '+' elsif types.size > 2 type = [first, '...'].join(', ') elsif types == ['void'] && options.hide_void_return type = "" else type = types.join(", ") end end type = "(#{type})" if type.include?(',') type = " -> #{type} " unless type.empty? scope = meth.scope == :class ? "#{meth.namespace.name}." : "#{meth.namespace.name.to_s.downcase}." name = meth.name blk = format_block(meth) args = format_args(meth) extras = [] extras_text = '' if rw = meth.namespace.attributes[meth.scope][meth.name] attname = [rw[:read] ? 'read' : nil, rw[:write] ? 'write' : nil].compact attname = attname.size == 1 ? attname.join('') + 'only' : nil extras << attname if attname end extras << meth.visibility if meth.visibility != :public extras_text = '(' + extras.join(", ") + ')' unless extras.empty? title = "%s%s%s %s%s%s" % [scope, name, args, blk, type, extras_text] title.gsub(/\s+/, ' ') end end end end endyard-master/lib/yard/templates/helpers/uml_helper.rb000066400000000000000000000026321265676644000231570ustar00rootroot00000000000000module YARD module Templates::Helpers # Helpers for UML template format module UMLHelper # Official UML visibility prefix syntax for an object given its visibility # @param [CodeObjects::Base] object the object to retrieve visibility for # @return [String] the UML visibility prefix def uml_visibility(object) case object.visibility when :public; '+' when :protected; '#' when :private; '-' end end # Formats the path of an object for Graphviz syntax # @param [CodeObjects::Base] object an object to format the path of # @return [String] the encoded path def format_path(object) object.path.gsub('::', '_') end # Encodes text in escaped Graphviz syntax # @param [String] text text to encode # @return [String] the encoded text def h(text) text.to_s.gsub(/(\W)/, '\\\\\1') end # Tidies data by formatting and indenting text # @param [String] data pre-formatted text # @return [String] tidied text. def tidy(data) indent = 0 data.split(/\n/).map do |line| line.gsub!(/^\s*/, '') next if line.empty? indent -= 1 if line =~ /^\s*\}\s*$/ line = (' ' * (indent * 2)) + line indent += 1 if line =~ /\{\s*$/ line end.compact.join("\n") + "\n" end end end endyard-master/lib/yard/templates/section.rb000066400000000000000000000045231265676644000210260ustar00rootroot00000000000000module YARD module Templates # Abstracts the structure for a section and its subsections into an ordered # list of sections and subsections. # @since 0.6.0 class Section < Array attr_accessor :name def initialize(name, *args) self.name = name replace(parse_sections(args)) end def dup obj = super obj.name = name obj end def [](*args) if args.first.is_a?(Range) || args.size > 1 obj = super(*args) obj.name = name return obj elsif args.first.is_a?(Integer) return super(*args) end find {|o| o.name == args.first } end def eql?(other) super(other) && name == other.name end def ==(other) case other when Section eql?(other) when Array to_a == other else name == other end end def push(*args) super(*parse_sections(args)) end alias << push def unshift(*args) super(*parse_sections(args)) end def inspect n = name.respond_to?(:path) ? "T('#{name.path}')" : name.inspect subsects = empty? ? "" : ", subsections=#{super}" "Section(#{n}#{subsects})" end def place(*args) super(*parse_sections(args)) end def to_a list = [name] unless empty? subsects = [] each {|s| subsects += s.to_a } list << subsects end list end def any(item) find do |section| return section if section == item return section.any(item) unless section.empty? end nil end private def parse_sections(args) if args.size == 1 && args.first.is_a?(Array) && !args.first.is_a?(Section) args = args.first end sections = [] args.each_with_index do |name, index| case name when Section; sections << name when Array; next else subsections = args[index + 1].is_a?(Array) ? args[index + 1] : [] if subsections.is_a?(Section) subsections = [] end sections << Section.new(name, subsections) end end sections end end end endyard-master/lib/yard/templates/template.rb000066400000000000000000000331151265676644000211740ustar00rootroot00000000000000require 'erb' module YARD module Templates module Template attr_accessor :class, :section attr_reader :options class << self # Extra includes are mixins that are included after a template is created. These # mixins can be registered by plugins to operate on templates and override behaviour. # # Note that this array can be filled with modules or proc objects. If a proc object # is given, the proc will be called with the {Template#options} hash containing # relevant template information like the object, format, and more. The proc should # return a module or nil if there is none. # # @example Adding in extra mixins to include on a template # Template.extra_includes << MyHelper # @example Conditionally including a mixin if the format is html # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } # @return [Array] a list of modules to be automatically included # into any new template module attr_accessor :extra_includes # @!parse extend ClassMethods # @private def included(klass) klass.extend(ClassMethods) end # Includes the {extra_includes} modules into the template object. # # @param [Template] template the template object to mixin the extra includes. # @param [SymbolHash] options the options hash containing all template information # @return [void] def include_extra(template, options) extra_includes.each do |mod| mod = mod.call(options) if mod.is_a?(Proc) next unless mod.is_a?(Module) template.extend(mod) end end end self.extra_includes = [ proc {|options| { :html => Helpers::HtmlHelper, :text => Helpers::TextHelper, :dot => Helpers::UMLHelper }[options.format] } ] include ErbCache include Helpers::BaseHelper include Helpers::MethodHelper module ClassMethods attr_accessor :path, :full_path # @return [Array] a list of full paths # @note This method caches path results. Paths should not be modified # after this method is called; call {#reset_full_paths} to reset cache. def full_paths reset_full_paths unless defined? @cached_included_modules return @full_paths if included_modules == @cached_included_modules @cached_included_modules = included_modules @full_paths = included_modules.inject([full_path]) do |paths, mod| paths |= mod.full_paths if mod.respond_to?(:full_paths) paths end end # Resets cache for {#full_paths} def reset_full_paths @cached_included_modules = nil end def initialize(path, full_paths) full_path = full_paths.shift self.path = path self.full_path = full_path include_inherited(full_paths) include_parent load_setup_rb end # Searches for a file identified by +basename+ in the template's # path as well as any mixed in template paths. Equivalent to calling # {ClassMethods#find_nth_file} with index of 1. # # @param [String] basename the filename to search for # @return [String] the full path of a file on disk with filename # +basename+ in one of the template's paths. # @see find_nth_file def find_file(basename) find_nth_file(basename) end # Searches for the nth file (where n = +index+) identified # by basename in the template's path and any mixed in template paths. # # @param [String] basename the filename to search for # @param [Fixnum] index the nth existing file to return # @return [String] the full path of the nth file on disk with # filename +basename+ in one of the template paths def find_nth_file(basename, index = 1) n = 1 full_paths.each do |path| file = File.join(path, basename) if File.file?(file) return file if index == n n += 1 end end nil end def is_a?(klass) return true if klass == Template super(klass) end # Creates a new template object to be rendered with {Template#run} def new(*args) obj = Object.new.extend(self) obj.class = self obj.send(:initialize, *args) obj end def run(*args) new(*args).run end def T(*path) Engine.template(*path) end # Alias for creating a {Section} with arguments # @see Section#initialize # @since 0.6.0 def S(*args) Section.new(*args) end private def include_parent pc = path.to_s.split('/') if pc.size > 1 pc.pop pc = pc.join('/') begin include Engine.template(pc) rescue ArgumentError include Engine.template!(pc, full_path.gsub(%r{/[^/]+$}, '')) end end end def include_inherited(full_paths) full_paths.reverse.each do |full_path| include Engine.template!(path, full_path) end end def load_setup_rb setup_file = File.join(full_path, 'setup.rb') if File.file? setup_file module_eval(File.read(setup_file).taint, setup_file, 1) end end end def initialize(opts = TemplateOptions.new) opts_class = opts.class opts_class = TemplateOptions if opts_class == Hash @cache, @cache_filename = {}, {} @sections, @options = [], opts_class.new add_options(opts) Template.include_extra(self, options) init end # Loads a template specified by path. If +:template+ or +:format+ is # specified in the {#options} hash, they are prepended and appended # to the path respectively. # # @param [Array] path the path of the template # @return [Template] the loaded template module def T(*path) path.unshift(options.template) if options.template path.push(options.format) if options.format self.class.T(*path) end # Sets the sections (and subsections) to be rendered for the template # # @example Sets a set of erb sections # sections :a, :b, :c # searches for a.erb, b.erb, c.erb # @example Sets a set of method and erb sections # sections :a, :b, :c # a is a method, the rest are erb files # @example Sections with subsections # sections :header, [:name, :children] # # the above will call header.erb and only renders the subsections # # if they are yielded by the template (see #yieldall) # @param [Array] args the sections # to use to render the template. For symbols and strings, the # section will be executed as a method (if one exists), or rendered # from the file "name.erb" where name is the section name. For # templates, they will have {Template::ClassMethods#run} called on them. # Any subsections can be yielded to using yield or {#yieldall} def sections(*args) @sections = Section.new(nil, *args) if args.size > 0 @sections end # Initialization called on the template. Override this in a 'setup.rb' # file in the template's path to implement a template # # @example A default set of sections # def init # sections :section1, :section2, [:subsection1, :etc] # end # @see #sections def init end # Runs a template on +sects+ using extra options. This method should # not be called directly. Instead, call the class method {ClassMethods#run} # # @param [Hash, nil] opts any extra options to apply to sections # @param [Section, Array] sects a section list of sections to render # @param [Fixnum] start_at the index in the section list to start from # @param [Boolean] break_first if true, renders only the first section # @yield [opts] calls for the subsections to be rendered # @yieldparam [Hash] opts any extra options to yield # @return [String] the rendered sections joined together def run(opts = nil, sects = sections, start_at = 0, break_first = false, &block) out = "" return out if sects.nil? sects = sects[start_at..-1] if start_at > 0 sects = Section.new(nil, sects) unless sects.is_a?(Section) add_options(opts) do sects.each do |s| self.section = s subsection_index = 0 value = render_section(section) do |*args| value = with_section do run(args.first, section, subsection_index, true, &block) end subsection_index += 1 value end out << (value || "") break if break_first end end out end # Yields all subsections with any extra options # # @param [Hash] opts extra options to be applied to subsections def yieldall(opts = nil, &block) with_section { run(opts, section, &block) } end # @param [String, Symbol] section the section name # @yield calls subsections to be rendered # @return [String] the contents of the ERB rendered section def erb(section, &block) method_name = ErbCache.method_for(cache_filename(section)) do erb_with(cache(section), cache_filename(section)) end send(method_name, &block) end # Returns the contents of a file. If +allow_inherited+ is set to +true+, # use +{{{__super__}}}+ inside the file contents to insert the contents # of the file from an inherited template. For instance, if +templates/b+ # inherits from +templates/a+ and file "test.css" exists in both directories, # both file contents can be retrieved by having +templates/b/test.css+ look # like: # # {{{__super__}}} # ... # body { css styles here } # p.class { other styles } # # @param [String] basename the name of the file # @param [Boolean] allow_inherited whether inherited templates can # be inserted with +{{{__super__}}}+ # @return [String] the contents of a file identified by +basename+. All # template paths (including any mixed in templates) are searched for # the file # @see ClassMethods#find_file # @see ClassMethods#find_nth_file def file(basename, allow_inherited = false) file = self.class.find_file(basename) raise ArgumentError, "no file for '#{basename}' in #{self.class.path}" unless file data = IO.read(file) if allow_inherited superfile = self.class.find_nth_file(basename, 2) data.gsub!('{{{__super__}}}', superfile ? IO.read(superfile) : "") end data end # Calls the ERB file from the last inherited template with {#section}.erb # # @param [Symbol, String] sect if provided, uses a specific section name # @return [String] the rendered ERB file in any of the inherited template # paths. def superb(sect = section, &block) filename = self.class.find_nth_file(erb_file_for(sect), 2) return "" unless filename method_name = ErbCache.method_for(filename) { erb_with(IO.read(filename), filename) } send(method_name, &block) end def options=(value) @options = value set_ivars end def inspect "Template(#{self.class.path}) [section=#{section.name}]" end protected def erb_file_for(section) "#{section}.erb" end def erb_with(content, filename = nil) erb = ERB.new(content, nil, options.format == :text ? '<>' : nil) erb.filename = filename if filename erb end private def render_section(section, &block) section = section.name if section.is_a?(Section) case section when Section, String, Symbol if respond_to?(section) send(section, &block) else erb(section, &block) end when Module, Template section.run(options, &block) if section.is_a?(Template) end || "" end def cache(section) content = @cache[section.to_sym] return content if content file = cache_filename(section) @cache_filename[section.to_sym] = file raise ArgumentError, "no template for section '#{section}' in #{self.class.path}" unless file @cache[section.to_sym] = IO.read(file) end def cache_filename(section) @cache_filename[section.to_sym] ||= self.class.find_file(erb_file_for(section)) end def set_ivars options.each do |k, v| instance_variable_set("@#{k}", v) end end def add_options(opts = nil) return(yield) if opts.nil? && block_given? cur_opts = options if block_given? self.options = options.merge(opts) if block_given? value = yield self.options = cur_opts value end end def with_section(&block) sect = section value = yield self.section = sect value end end end end yard-master/lib/yard/templates/template_options.rb000066400000000000000000000071131265676644000227460ustar00rootroot00000000000000require 'ostruct' module YARD module Templates # An Options class containing default options for base template rendering. For # options specific to generation of HTML output, see {CLI::YardocOptions}. # # @see CLI::YardocOptions class TemplateOptions < YARD::Options # @return [Symbol] the template output format default_attr :format, :text # @return [Symbol] the template name used to render output default_attr :template, :default # @return [Symbol] the markup format to use when parsing docstrings default_attr :markup, :rdoc # default is :rdoc but falls back on :none # @return [String] the default return type for a method with no return tags default_attr :default_return, "Object" # @return [Boolean] whether void methods should show "void" in their signature default_attr :hide_void_return, false # @return [Boolean] whether code blocks should be syntax highlighted default_attr :highlight, true # @return [Class] the markup provider class for the markup format attr_accessor :markup_provider # @return [OpenStruct] an open struct containing any global state across all # generated objects in a template. default_attr :globals, lambda { OpenStruct.new } alias __globals globals # @return [CodeObjects::Base] the main object being generated in the template attr_accessor :object # @return [CodeObjects::Base] the owner of the generated object attr_accessor :owner # @return [Symbol] the template type used to generate output attr_accessor :type # @return [Boolean] whether serialization should be performed default_attr :serialize, true # @return [Serializers::Base] the serializer used to generate links and serialize # output. Serialization output only occurs if {#serialize} is +true+. attr_accessor :serializer # @deprecated use {#highlight} instead. # @return [Boolean] whether highlighting should be ignored attr_reader :no_highlight undef no_highlight def no_highlight; !highlight end def no_highlight=(value) self.highlight = !value end # @return [String] the title of a given page attr_accessor :page_title # @return [Boolean] whether the page is the "index" attr_accessor :index # @example A list of mixin path names (including wildcards) # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] # @return [Array] an array of module name wildcards to embed into # class documentation as if their methods were defined directly in the class. # Useful for modules like ClassMethods. If the name contains '::', the module # is matched against the full mixin path, otherwise only the module name is used. default_attr :embed_mixins, lambda { [] } # @param [CodeObjects::Base] mixin accepts any code object, but returns # nil unless the object is a module. # @return [Boolean] whether a mixin matches the embed_mixins list # @return [nil] if the mixin is not a module object def embed_mixins_match?(mixin) return nil unless mixin.is_a?(CodeObjects::ModuleObject) return nil if mixin == object # the method is not inherited embed_mixins.any? do |embed_mixin| re = /\A#{Regexp.quote(embed_mixin).gsub('\*', '.*')}\Z/ matchstr = embed_mixin.include?("::") ? mixin.path : mixin.name re.match(matchstr.to_s) end end # @return [Verifier] the verifier object attr_accessor :verifier end end end yard-master/lib/yard/verifier.rb000066400000000000000000000114051265676644000171740ustar00rootroot00000000000000module YARD # Similar to a Proc, but runs a set of Ruby expressions using a small # DSL to make tag lookups easier. # # The syntax is as follows: # * All syntax is Ruby compatible # * +object+ (+o+ for short) exist to access the object being verified # * +@TAGNAME+ is translated into +object.tag('TAGNAME')+ # * +@@TAGNAME+ is translated into +object.tags('TAGNAME')+ # * +object+ can be omitted as target for method calls (it is implied) # # @example Create a verifier to check for objects that don't have @private tags # verifier = Verifier.new('!@private') # verifier.call(object) # => true (no @private tag) # @example Create a verifier to find any return tag with an empty description # Verifier.new('@return.text.empty?') # # Equivalent to: # Verifier.new('object.tag(:return).text.empty?') # @example Check if there are any @param tags # Verifier.new('@@param.empty?') # # Equivalent to: # Verifier.new('object.tags(:param).empty?') # @example Using +object+ or +o+ to look up object attributes directly # Verifier.new('object.docstring == "hello world"') # # Equivalent to: # Verifier.new('o.docstring == "hello world"') # @example Without using +object+ or +o+ # Verifier.new('tag(:return).size == 1 || has_tag?(:author)') # @example Specifying multiple expressions # Verifier.new('@return', '@param', '@yield') # # Equivalent to: # Verifier.new('@return && @param && @yield') class Verifier # @return [Array] a list of all expressions the verifier checks for # @since 0.5.6 attr_reader :expressions def expressions=(value) @expressions = value create_method_from_expressions end # Creates a verifier from a set of expressions # # @param [Array] expressions a list of Ruby expressions to # parse. def initialize(*expressions) @expressions = [] add_expressions(*expressions) end # Adds a set of expressions and recompiles the verifier # # @param [Array] expressions a list of expressions # @return [void] # @since 0.5.6 def add_expressions(*expressions) self.expressions += expressions.flatten end # Passes any method calls to the object from the {#call} def method_missing(sym, *args, &block) if object.respond_to?(sym) object.send(sym, *args, &block) else super end end # Tests the expressions on the object. # # @note If the object is a {CodeObjects::Proxy} the result will always be true. # @param [CodeObjects::Base] object the object to verify # @return [Boolean] the result of the expressions def call(object) return true if object.is_a?(CodeObjects::Proxy) modify_nilclass @object = object retval = __execute ? true : false unmodify_nilclass retval end # Runs a list of objects against the verifier and returns the subset # of verified objects. # # @param [Array] list a list of code objects # @return [Array] a list of code objects that match # the verifier. def run(list) list.reject {|item| call(item).is_a?(FalseClass) } end protected # @return [CodeObjects::Base] the current object being tested attr_reader :object alias o object private # @private NILCLASS_METHODS = [:type, :method_missing] # Modifies nil to not throw NoMethodErrors. This allows # syntax like object.tag(:return).text to work if the #tag # call returns nil, which means users don't need to perform # stringent nil checking # # @return [void] def modify_nilclass NILCLASS_METHODS.each do |meth| NilClass.send(:define_method, meth) {|*args| } end end # Returns the state of NilClass back to normal # @return [void] def unmodify_nilclass NILCLASS_METHODS.each do |meth| next unless nil.respond_to?(meth) NilClass.send(:remove_method, meth) end end # Creates the +__execute+ method by evaluating the expressions # as Ruby code # @return [void] def create_method_from_expressions expr = expressions.map {|e| "(#{parse_expression(e)})" }.join(" && ") instance_eval(<<-eof, __FILE__, __LINE__ + 1) def __execute; #{expr}; end eof end # Parses a single expression, handling some of the DSL syntax. # # The syntax "@tag" should be turned into object.tag(:tag), # and "@@tag" should be turned into object.tags(:tag) # # @return [String] the parsed expression def parse_expression(expr) expr = expr.gsub(/@@(?:(\w+)|\{([\w\.]+)\})/, 'object.tags("\1\2")') expr = expr.gsub(/@(?:(\w+)|\{([\w\.]+)\})/, 'object.tag("\1\2")') expr end end end yard-master/lib/yard/version.rb000066400000000000000000000000461265676644000170450ustar00rootroot00000000000000module YARD VERSION = '0.8.7.6' end yard-master/po/000077500000000000000000000000001265676644000137445ustar00rootroot00000000000000yard-master/po/ja.po000066400000000000000000044060461265676644000147140ustar00rootroot00000000000000# Japanese translations for PACKAGE package. # Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # , 2011. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-11-20 22:17+0900\n" "PO-Revision-Date: 2012-06-20 16:56+0900\n" "Last-Translator: \n" "Language-Team: Japanese\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../README.md:1 msgid "" "YARD: Yay! A Ruby Documentation Tool\n" "====================================" msgstr "" "YARD: Yay! A Ruby Documentation Tool\n" "====================================" #: ../README.md:4 msgid "" "**Homepage**: [http://yardoc.org](http://yardoc.org) \n" "**IRC**: [irc.freenode.net / #yard](irc://irc.freenode.net/" "yard) \n" "**Git**: [http://github.com/lsegal/yard](http://github.com/lsegal/" "yard) \n" "**Author**: Loren Segal \n" "**Contributors**: See Contributors section below \n" "**Copyright**: 2007-2012 \n" "**License**: MIT License \n" "**Latest Version**: 0.8.2.1 (codename \"Shave It\") \n" "**Release Date**: June 10th 2012" msgstr "" "**Homepage**: [http://yardoc.org](http://yardoc.org) \n" "**IRC**: [irc.freenode.net / #yard](irc://irc.freenode.net/yard) \n" "**Git**: [http://github.com/lsegal/yard](http://github.com/lsegal/yard) \n" "**Author**: Loren Segal \n" "**Contributors**: See Contributors section below \n" "**Copyright**: 2007-2012 \n" "**License**: MIT License \n" "**Latest Version**: 0.8.2.1 (codename \"Shave It\") \n" "**Release Date**: June 10th 2012" #: ../README.md:14 msgid "" "Synopsis\n" "--------" msgstr "" "概è¦\n" "--------" #: ../README.md:17 msgid "" "YARD is a documentation generation tool for the Ruby programming language.\n" "It enables the user to generate consistent, usable documentation that can " "be\n" "exported to a number of formats very easily, and also supports extending " "for\n" "custom Ruby constructs such as custom class level definitions. Below is a\n" "summary of some of YARD's notable features." msgstr "" "YARDã¯ãƒ—ログミング言語Rubyã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆç”Ÿæˆãƒ„ールã§ã‚る。\n" "ユーザーãŒä¸€è²«æ€§ã®ã‚るドキュメント作æˆã‚’å¯èƒ½ã«ã—ã€\n" "ã„ãã¤ã‹ã®æ›¸å¼ã¸ç°¡å˜ã«ã‚¨ã‚­ã‚¹ãƒãƒ¼ãƒˆã§ãる。\n" "åˆã€ã‚«ã‚¹ã‚¿ãƒ å®šç¾©ã«ã‚ˆã£ã¦Rubyã®ã‚«ã‚¹ã‚¿ãƒ æ§‹æ–‡ç”¨ã«\n" "æ‹¡å¼µã™ã‚‹ã“ã¨ã‚’サãƒãƒ¼ãƒˆã‚‚ã™ã‚‹ã€‚\n" "下ã¯YARDã®è‘—åãªæ©Ÿèƒ½ã®è¦ç´„ã¨ãªã‚‹ã€‚" #: ../README.md:24 msgid "" "Feature List\n" "------------" msgstr "" "機能リスト\n" "------------" #: ../README.md:27 msgid "" "**1. RDoc/SimpleMarkup Formatting Compatibility**: YARD is made to be " "compatible\n" "with RDoc formatting. In fact, YARD does no processing on RDoc " "documentation\n" "strings, and leaves this up to the output generation tool to decide how to\n" "render the documentation." msgstr "" "** 1. RDoc/SimpleMarkup書å¼ã¨ã®ä¸¡ç«‹**: YARDã¯RDocã®æ›¸å¼ã¨ä¸¡ç«‹ã™ã‚‹ã€‚\n" "実際ã«ã¯ã€YARDã¯RDocドキュメント文字列ã®å‡¦ç†ã‚’行ã‚ãªã„。\n" "ãれã¯ã€å¾Œã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã‚’表示ã™ã‚‹æ–¹æ³•ã‚’é¸æŠžã™ã‚‹ç‚ºã€\n" "ãã®æ–‡å­—列を残ã—ã¦ã„る。" #: ../README.md:32 msgid "" "**2. Yardoc Meta-tag Formatting Like Python, Java, Objective-C and other " "languages**:\n" "YARD uses a '@tag' style definition syntax for meta tags alongside regular " "code\n" "documentation. These tags should be able to happily sit side by side RDoc " "formatted\n" "documentation, but provide a much more consistent and usable way to " "describe\n" "important information about objects, such as what parameters they take and " "what types\n" "they are expected to be, what type a method should return, what exceptions " "it can\n" "raise, if it is deprecated, etc.. It also allows information to be better " "(and more\n" "consistently) organized during the output generation phase. You can find a " "list\n" "of tags in the {file:docs/Tags.md#taglist Tags.md} file." msgstr "" "** 2. Python, Java, Objective-Cã‚„ä»–ã®è¨€èªžã®ã‚ˆã†ãªYardocã®ãƒ¡ã‚¿ã‚¿ã‚°ãƒ•ォーマット **:\n" "YARDã¯é€šå¸¸ã®ã‚³ãƒ¼ãƒ‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å´ã«ãƒ¡ã‚¿ã‚¿ã‚°ç”¨ã®'@tag'スタイルã®å®šç¾©æ§‹æ–‡ã‚’使ã†\n" "ã“れらã®ã‚¿ã‚°ã¯å¹¸ã„ãªã“ã¨ã«RDocå½¢å¼ã«ãƒ•ォーマットã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¨ä¸¦ã‚“ã§é…ç½®ã™ã‚‹äº‹ãŒã§ãã‚‹\n" "ã—ã‹ã—オブジェクトã«ã¤ã„ã¦é‡è¦ãªæƒ…報をæä¾›ã™ã‚‹ç‚ºã«æ›´ã«ä¸€è²«ã—ã¦ä¾¿åˆ©ãªæ–¹æ³•ã‚’æä¾›ã™ã‚‹ã€‚\n" "ãれらã®ä½•らã‹ã®ãƒ‘ラメーターã¨ãれらã®ä½•らã‹ã®æœŸå¾…ã•れる型をå–å¾—ã™ã‚‹ã«ã¯ã€\n" "ã©ã®åž‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’è¿”ã•ãªã‘れã°ãªã‚‰ãªã„ã‹ã€\n" "ã©ã®ä¾‹å¤–を上ã’ã‚‹ã“ã¨ãŒã§ãã‚‹ã‹ã€\n" "ã‚‚ã—ãれãŒé‡è¤‡ã—ãŸå ´åˆã¯,, etc..\n" "ãれã¯å‡ºåŠ›ç”Ÿæˆæ®µéšŽã®é–“ã«ã‚ˆã‚Šã‚ˆã(ãã—ã¦ä¸€è²«ã—ã¦)æ•´ç†ã•ã‚ŒãŸæƒ…報をå—ã‘入れる\n" "{file:docs/Tags.md#taglist Tags.md} ファイルã§ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã«ã¤ã„ã¦ç´¹ä»‹ã—ã¦ã„る。" #: ../README.md:42 msgid "" "YARD also supports an optional \"types\" declarations for certain tags.\n" "This allows the developer to document type signatures for ruby methods and\n" "parameters in a non intrusive but helpful and consistent manner. Instead of\n" "describing this data in the body of the description, a developer may " "formally\n" "declare the parameter or return type(s) in a single line. Consider the\n" "following method documented with YARD formatting:" msgstr "" "YARDã¯ç‰¹å®šã®ã‚¿ã‚°ã‚’用ã„çœç•¥å¯èƒ½ãª\"åž‹\"ã®å®£è¨€ã‚’サãƒãƒ¼ãƒˆã‚‚ã™ã‚‹ã€‚\n" "ã“れã«ã‚ˆã‚Šé–‹ç™ºè€…ã¯Rubyメソッド用やã€\n" "ç…©ã‚ã—ããªãã€ã—ã‹ã—å½¹ã«ç«‹ã¤ãƒ‘ラメータやã€\n" "一貫性ã®ã‚ã‚‹å½¢å¼ã‚’åž‹ã®ç”¨æ³•ã¨ã—ã¦è¨˜è¿°å¯èƒ½ã«ãªã‚‹ã€‚\n" "説明ã®ä¸­ã«ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’記述ã™ã‚‹ä»£ã‚りã«ã€\n" "開発者ã¯ã€1ã¤ã®è¡Œã®ä¸­ã§ãƒ‘ラメータやリターンタイプを形å¼çš„ã«å®£è¨€ã§ãる。\n" "YARDã®æ›¸å¼ã‚’使用ã—ãŸæ¬¡ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®è¨˜è¿°ã‚’考ãˆã¦ã¿ã‚‹ã€‚" #: ../README.md:49 msgid "" " # Reverses the contents of a String or IO object.\n" " #\n" " # @param [String, #read] contents the contents to reverse\n" " # @return [String] the contents reversed lexically\n" " def reverse(contents)\n" " contents = contents.read if respond_to? :read\n" " contents.reverse\n" " end" msgstr "" " # 文字列やIOオブジェクトã®å†…容を逆ã«ã™ã‚‹\n" " #\n" " # @param [String, #read] 逆ã«ã™ã‚‹ãŸã‚ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„を入れる\n" " # @return [String] 逆ã«ãªã£ãŸå˜èªžã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„\n" " def reverse(contents)\n" " contents = contents.read if respond_to? :read\n" " contents.reverse\n" " end" #: ../README.md:58 msgid "" "With the above @param tag, we learn that the contents parameter can either " "be\n" "a String or any object that responds to the 'read' method, which is more\n" "powerful than the textual description, which says it should be an IO " "object.\n" "This also informs the developer that they should expect to receive a String\n" "object returned by the method, and although this may be obvious for a\n" "'reverse' method, it becomes very useful when the method name may not be as\n" "descriptive." msgstr "" "上記ã®@paramã‚¿ã‚°ã«ã‚ˆã£ã¦ã€contentsã®ãƒ‘ラメータãŒ\n" "Stringã¾ãŸã¯ä½•らã‹ã®ã‚ªãƒ–ジェクトã®ã„ãšã‚Œã‹ã‚’\n" "'read'メソッドã«è¿”ã™ã“ã¨ãŒåˆ†ã‹ã‚‹ã€‚\n" "ãれã¯åŽŸæ–‡ã®èª¬æ˜Žã‚ˆã‚Šã‚‚ã‚‚ã£ã¨å¼·åŠ›ãª\n" "IOオブジェクトã«ãªã‚‹ã¨è¨€ãˆã‚‹ã€‚\n" "ã“れã¯é–‹ç™ºè€…é”ãŒãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã£ã¦è¿”ã•れãŸã€\n" "Stringオブジェクトをå—ã‘å–ã‚‹ã“ã¨ã‚’期待ã™ã‚‹ã“ã¨ã‚„ã€\n" "ã“ã®å ´åˆã¯\"reverse\"メソッドã®ç›®çš„ãŒæ˜Žã‚‰ã‹ã¨ã¯ã„ãˆã€\n" "メソッドåãŒèª¬æ˜Žã‚’å«ã‚“ã§ã„ãªã„時ã«ã¨ã¦ã‚‚便利ã¨ã„ã†äº‹ã‚’\n" "æ„味ã—ã¦ã„る。" #: ../README.md:66 msgid "" "**3. Custom Constructs and Extensibility of YARD**: YARD is designed to be\n" "extended and customized by plugins. Take for instance the scenario where " "you\n" "need to document the following code:" msgstr "" "** 3. YARDã®ã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã¨æ‹¡å¼µæ€§ **: YARDã¯\n" "プラグインã«ã‚ˆã£ã¦æ‹¡å¼µã‚„カスタマイズã™ã‚‹ç‚ºã«è¨­è¨ˆã•れã¦ã„る。\n" "例ãˆã°ã‚ãªãŸãŒæ¬¡ã®ã‚³ãƒ¼ãƒ‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å ´æ‰€ã‚’å¿…è¦ã¨ã™ã‚‹ã‚·ãƒŠãƒªã‚ªã‚’考ãˆã‚‹ã€‚" #: ../README.md:70 msgid "" " class List\n" " # Sets the publisher name for the list.\n" " cattr_accessor :publisher\n" " end" msgstr "" " class List\n" " # リスト用ã®ç™ºè¡Œè€…åを設定ã™ã‚‹\n" " cattr_accessor :publisher\n" " end" #: ../README.md:75 msgid "" "This custom declaration provides dynamically generated code that is hard for " "a\n" "documentation tool to properly document without help from the developer. To\n" "ease the pains of manually documenting the procedure, YARD can be extended " "by\n" "the developer to handle the `cattr_accessor` construct and automatically " "create\n" "an attribute on the class with the associated documentation. This makes\n" "documenting external API's, especially dynamic ones, a lot more consistent " "for\n" "consumption by the users." msgstr "" "ã“ã®ã‚«ã‚¹ã‚¿ãƒ å®£è¨€ã¯å‹•çš„ã«ç”Ÿæˆã•れるコードをæä¾›ã™ã‚‹ã€‚\n" "ãれã¯é–‹ç™ºè€…ã‹ã‚‰ã®åŠ©ã‘ãªã—ã§æ­£ç¢ºãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’\n" "ドキュメント作æˆãƒ„ールã§ä½œã‚‹ã®ãŒå›°é›£ãªç‚ºã§ã‚る。\n" "手書ãã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã™ã‚‹è‹¦åŠ´ãŒæ¥½ã«ãªã‚‹ã‚ˆã†ã«ã€\n" "YARD㯠`cattr_accessor` コンストラクタをæ“作ã™ã‚‹ã€‚\n" "åˆã€é–¢é€£ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¨ã‚¯ãƒ©ã‚¹ã®å±žæ€§ã‚’自動的ã«ç”Ÿæˆã™ã‚‹ã‚ˆã†ã«ã€\n" "開発者ã«ã‚ˆã£ã¦æ‹¡å¼µã§ãる。\n" "ã“ã®æ‹¡å¼µã«ã‚ˆã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ä½¿ç”¨ã™ã‚‹å¤šãã®ä¸€è²«æ€§ã®ã‚ã‚‹å‹•çš„ãª\n" "ドキュメント作æˆã®å¤–部ã®APIを作れる。" #: ../README.md:83 msgid "" "YARD is also designed for extensibility everywhere else, allowing you to " "add\n" "support for new programming languages, new data structures and even where/" "how\n" "data is stored." msgstr "" "YARDã¯ã©ã“ã§ã‚‚æ‹¡å¼µã§ãるよã†ã«è¨­è¨ˆã•れã¦ã„る。\n" "æ–°ã—ã„プログラム言語や新ã—ã„データ構造や\n" "ã©ã“ã«ã©ã®ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ã‹ã¨ã„ã£ãŸã‚µãƒãƒ¼ãƒˆã‚’追加ã§ãる。" #: ../README.md:87 msgid "" "**4. Raw Data Output**: YARD also outputs documented objects as raw data " "(the\n" "dumped Namespace) which can be reloaded to do generation at a later date, " "or\n" "even auditing on code. This means that any developer can use the raw data " "to\n" "perform output generation for any custom format, such as YAML, for " "instance.\n" "While YARD plans to support XHTML style documentation output as well as\n" "command line (text based) and possibly XML, this may still be useful for " "those\n" "who would like to reap the benefits of YARD's processing in other forms, " "such\n" "as throwing all the documentation into a database. Another useful way of\n" "exploiting this raw data format would be to write tools that can auto " "generate\n" "test cases, for example, or show possible unhandled exceptions in code." msgstr "" "**4. 未加工データã®å‡ºåŠ›**: YARDã¯ã‚ªãƒ–ジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’未加工ã®ã¾ã¾ãƒ‡ãƒ¼" "ã‚¿(ダンプã—ãŸåå‰ç©ºé–“)出力ã™ã‚‹ã€‚後ã§ç”Ÿæˆã™ã‚‹æ™‚ã‚„ã€ã‚³ãƒ¼ãƒ‰ã‚’ç­‰ã—ã調査ã™ã‚‹æ™‚ã¯" "å†ãƒ­ãƒ¼ãƒ‰ã•れる。\n" "ã¤ã¾ã‚Šã€é–‹ç™ºè€…ã®èª°ã‚‚ãŒä½•らã‹ã®ã‚«ã‚¹ã‚¿ãƒ æ›¸å¼ã®ã‚ˆã†ã«å‡ºåŠ›ç”Ÿæˆã‚’実行ã™ã‚‹ç‚ºã«ã€æœª" "加工データを使ã†ã€‚例ãˆã°ã€YAMLã®ã‚ˆã†ã«ã€‚\n" "YARDã¯XHTMLスタイルドキュメント出力もコマンドライン(テキストベース)ã‚‚\n" "(ã‚‚ã—ã‹ã—ãŸã‚‰XMLã‚‚)サãƒãƒ¼ãƒˆã‚’計画ã—ã¦ã„ã‚‹ã®ã§ã€\n" "å…¨ã¦ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¸æŠ•ã’ã¦ãŠã‘ã°ã€\n" "å°†æ¥ã€ä»–ã®åž‹ã§ã‚‚YARDã®å‡¦ç†ã®æ©æµã‚’å—ã‘よã†ã¨è€ƒãˆã¦ã„る人ã«ã¨ã£ã¦ã¯ã€\n" "役立ã¤ã‹ã‚‚ã—れãªã„。\n" "ã“ã®æœªåŠ å·¥ãƒ‡ãƒ¼ã‚¿ã®æ›¸å¼ã‚’利用ã™ã‚‹ä»–ã®æœ‰ç”¨ãªæ–¹æ³•ã¨ã—ã¦ã€\n" "自動生æˆãƒ†ã‚¹ãƒˆã‚±ãƒ¼ã‚¹ãŒã§ãるツールを書ã為やã€\n" "ã‚³ãƒ¼ãƒ‰ã®æœªå‡¦ç†ä¾‹å¤–を明らã‹ã«ã™ã‚‹ã“ã¨ã€ãªã©ãŒã‚る。" #: ../README.md:98 msgid "" "**5. Local Documentation Server**: YARD can serve documentation for " "projects\n" "or installed gems (similar to `gem server`) with the added benefit of " "dynamic\n" "searching, as well as live reloading. Using the live reload feature, you " "can\n" "document your code and immediately preview the results by refreshing the " "page;\n" "YARD will do all the work in re-generating the HTML. This makes writing\n" "documentation a much faster process." msgstr "" "**5. ローカルドキュメントサーãƒãƒ¼**:\n" "YARDã¯å‹•çš„ãªæ¤œç´¢ã‚‚å†ãƒ­ãƒ¼ãƒ‰ã®åˆ©ç‚¹ã‚‚用ã„\n" "プロジェクトやインストール済ã¿ã®gem( `gem server` ã¨åŒæ§˜)用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã‚’æä¾›ã™ã‚‹ã€‚\n" "live reload機能ã«ã‚ˆã£ã¦,ã‚ãªãŸã®ã‚³ãƒ¼ãƒ‰ã‚’記述ã—ãŸã‚Š\n" "ページをリフレーシュã™ã‚‹äº‹ã«ã‚ˆã£ã¦çµæžœã‚’ã™ãã«ãƒ—レビューã§ãã‚‹\n" "YARDã¯HTMLå†ç”Ÿæˆã®å…¨ã¦ã®ä»•事をã™ã‚‹\n" "ã“れã«ã‚ˆã‚Šãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä½œæˆã‚’より高速ã®ãƒ—ロセスã§è¡Œãˆã‚‹ã€‚" #: ../README.md:106 msgid "## Installing" msgstr "## インストール" #: ../README.md:108 msgid "To install YARD, use the following command:" msgstr "YARDをインストールã™ã‚‹ç‚ºã«æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使ã†ã€‚" #: ../README.md:110 msgid " $ gem install yard" msgstr " $ gem install yard" #: ../README.md:112 msgid "(Add `sudo` if you're installing under a POSIX system as root)" msgstr "" "(ã‚‚ã—POSIXシステムã®ãƒ«ãƒ¼ãƒˆä¸‹ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¦ã„ã‚‹å ´åˆã€sudoを追加ã™ã‚‹)" #: ../README.md:114 msgid "" "Alternatively, if you've checked the source out directly, you can call\n" "`rake install` from the root project directory." msgstr "" "上ã®ã‚³ãƒžãƒ³ãƒ‰ã®ä»£ã‚りã«ã€ã‚‚ã—ソースを直接ãƒã‚§ãƒƒã‚¯ã‚¢ã‚¦ãƒˆã—ãŸãªã‚‰ã°ã€\n" "ã‚ãªãŸã¯ãƒ—ロジェクトã®ãƒ«ãƒ¼ãƒˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ `rake install` を行ã†äº‹ãŒã§ãã‚‹" #: ../README.md:117 msgid "" "**Important Note for Debian/Ubuntu users:** there's a possible chance your " "Ruby\n" "install lacks RDoc, which is occasionally used by YARD to convert markup to " "HTML.\n" "If running `which rdoc` turns up empty, install RDoc by issuing:" msgstr "" "**Debian/Ubuntuユーザーã¸ã®é‡è¦ãªæ³¨æ„:**\n" "RubyãŒRDocãªã—ã§installã•れるå¯èƒ½æ€§ãŒã‚る。\n" "RDocã¯YARDã«ã‚ˆã£ã¦ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã‚’HTMLã«å¤‰æ›ã™ã‚‹ç‚ºã«æ™‚々使ã‚れるã®ã§ã€\n" "ã‚‚ã— `which rdoc` コマンドã§ãƒ‘スãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§RDocをインストールã™ã‚‹ã€‚" #: ../README.md:121 msgid " $ sudo apt-get install rdoc" msgstr " $ sudo apt-get install rdoc" # YARD::CLI::Yardoc #: ../README.md:124 msgid "## Usage" msgstr "## 使用法" #: ../README.md:126 msgid "" "There are a couple of ways to use YARD. The first is via command-line, and " "the\n" "second is the Rake task." msgstr "" "ãれらYARDを使ã†ã«ã¯ã„ãã¤ã‹ã®æ–¹æ³•ãŒã‚る。\n" "最åˆã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³çµŒç”±ã§ã€ã‚‚ã†ã²ã¨ã¤ã¯Rake taskã¨ã„ã†æ–¹æ³•ãŒã‚る。" #: ../README.md:129 msgid "**1. yard Command-line Tool**" msgstr "**1. yardã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ„ール**" #: ../README.md:131 msgid "" "YARD comes packaged with a executable named `yard` which can control the " "many\n" "functions of YARD, including generating documentation, graphs running the\n" "YARD server, and so on. To view a list of available YARD commands, type:" msgstr "" "YARDã¯å®Ÿè¡Œå¯èƒ½ãª `yard` ã¨ã„ã†åå‰ã¨ä¸€ç·’ã«ãƒ‘ッケージãŒå…¥ã£ã¦ã„る。\n" "ドキュメントã®ç”Ÿæˆã‚„ã€ã‚°ãƒ©ãƒ•ã€YARDサーãƒãƒ¼ã‚’èµ·å‹•ãªã©ã‚’å«ã¿\n" "ãŸãã•ã‚“ã®æ©Ÿèƒ½ã‚’制御ã§ãる。\n" "利用å¯èƒ½ãªYARDã®ã‚³ãƒžãƒ³ãƒ‰ã®ä¸€è¦§ã‚’表示ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã‚’タイプã™ã‚‹ã€‚" #: ../README.md:135 msgid " $ yard --help" msgstr " $ yard --help" #: ../README.md:137 msgid "" "Plugins can also add commands to the `yard` executable to provide extra\n" "functionality." msgstr "プラグインã¯è¿½åŠ ã®æ©Ÿèƒ½ã‚’æä¾›ã™ã‚‹ç‚ºã«å®Ÿè¡Œå¯èƒ½ãª `yard` コマンドを追加ã§ãる。" #: ../README.md:140 msgid "### Generating Documentation" msgstr "### ドキュメントを生æˆã™ã‚‹" #: ../README.md:142 msgid "" "The `yardoc` executable is a shortcut for `yard doc`." msgstr "The `yardoc` executable is a shortcut for `yard doc`." #: ../README.md:144 msgid "" "The most common command you will probably use is `yard doc`, or `yardoc`. " "You\n" "can type `yardoc --help` to see the options that YARD provides, but the\n" "easiest way to generate docs for your code is to simply type `yardoc` in " "your\n" "project root. This will assume your files are\n" "located in the `lib/` directory. If they are located elsewhere, you can " "specify\n" "paths and globs from the commandline via:" msgstr "" "æã‚‰ã最も使用ã•れる一般的ãªã‚³ãƒžãƒ³ãƒ‰ã¯ `yard doc` ã€ã¾ãŸã¯ `yardoc` ã¨ãªã‚‹ã ã‚ã†ã€‚\n" "YARDãŒæä¾›ã™ã‚‹ã‚ªãƒ—ションを見るã«ã¯ `yardoc --help` をタイプã™ã‚‹äº‹ã§è¡¨ç¤ºã§ãる。\n" "ã§ã‚‚ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã®ã«æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€\n" "ã‚ãªãŸã®ãƒ—ロジェクトã®ãƒ«ãƒ¼ãƒˆã§ `yardoc` をタイプã™ã‚‹æ–¹æ³•ã§ã‚る。\n" "ã“れã¯ã‚ãªãŸã®ãƒ•ァイル㌠`lib/` ディレクトリã®ä¸­ã§ç¤ºã•れるã¨ã¿ãªã™ã€‚\n" "ã‚‚ã—ä»–ã®å ´æ‰€ã«ã‚ã‚‹ãªã‚‰ã€æ¬¡ã®ã‚ˆã†ã«ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‹ã‚‰ãƒ‘スã¨globを指定ã™ã‚‹:" #: ../README.md:151 msgid " $ yardoc 'lib/**/*.rb' 'app/**/*.rb' ...etc..." msgstr " $ yardoc 'lib/**/*.rb' 'app/**/*.rb' ...etc..." #: ../README.md:153 msgid "" "The tool will generate a `.yardoc` file which will store the cached " "database\n" "of your source code and documentation. If you want to re-generate your docs\n" "with another template you can simply use the `--use-cache` (or -c)\n" "option to speed up the generation process by skipping source parsing." msgstr "" "ã“ã®ãƒ„ール㯠`.yardoc` ファイルを生æˆã™ã‚‹ã€‚ãれã¯\n" "ã‚ãªãŸã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’キャッシュã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’æ ¼ç´ã™ã‚‹ã€‚\n" "ã‚‚ã—ã‚ãªãŸãŒä»–ã®ãƒ†ãƒ³ãƒ—レートã¨å…±ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å†ç”Ÿæˆã—ãŸã„ãªã‚‰ã€\n" "å˜ã« `--use-cache` (or -c) オプションを使ãˆã°ã‚ˆã„。\n" "ソースã®è§£æžã‚’スキップã™ã‚‹äº‹ã«ã‚ˆã£ã¦ç”Ÿæˆãƒ—ロセスをスピードアップã™ã‚‹ã€‚" #: ../README.md:158 msgid "" "YARD will by default only document code in your public visibility. You can\n" "document your protected and private code by adding `--protected` or\n" "`--private` to the option switches. In addition, you can add `--no-private`\n" "to also ignore any object that has the `@private` meta-tag. This is similar\n" "to RDoc's \":nodoc:\" behaviour, though the distinction is important. RDoc\n" "implies that the object with :nodoc: would not be documented, whereas\n" "YARD still recommends documenting private objects for the private API (for\n" "maintainer/developer consumption)." msgstr "" "YARDã¯ãƒ‡ãƒ•ォルトã§publicãªå¯è¦–性ã®ä¸­ã®ã‚³ãƒ¼ãƒ‰ã ã‘を記述ã™ã‚‹ã€‚\n" "`--protected` ã‚„ `--private` オプション引数ã®è¿½åŠ ã«ã‚ˆã£ã¦\n" "protectedã¨privateãªã‚³ãƒ¼ãƒ‰ã‚’記録ã§ãる。\n" "ã•らã«ã€ `--no-private` ã®è¿½åŠ ã«ã‚ˆã£ã¦ã€\n" "`@private` メタタグをæŒã£ãŸä½•らã‹ã®ã‚ªãƒ–ジェクトã®ç„¡è¦–ã‚‚ã§ãる。\n" "区別ã¯é‡è¦ã§ã‚ã‚‹ã‚‚ã®ã®ã€ã“れã¯RDocã®\":nodoc:\"ã®æŒ™å‹•ã¨ä¼¼ã¦ã„る。\n" "RDocã¯ã‚ªãƒ–ジェクトã¨å…±ã«:nodoc:ã¯è¨˜éŒ²ã•れãªã„ã“ã¨ã‚’暗示ã™ã‚‹ã€‚\n" "ã¨ã“ã‚ãŒã€YARDã¯ä»Šã‚‚ãªãŠprivate APIã®ç‚ºã«\n" "privateãªã‚ªãƒ–ジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã‚’\n" "推奨ã™ã‚‹ã€‚(メンテナーや開発者ãŒåˆ©ç”¨ã™ã‚‹ç‚ºã«)" #: ../README.md:167 msgid "" "You can also add extra informative files (README, LICENSE) by separating\n" "the globs and the filenames with '-'." msgstr "" "globã¨ãƒ•ァイルåã¨å…±ã«'-'ã§åŒºåˆ‡ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€\n" "è¿½åŠ ã®æƒ…報ファイル(README, LICENSE)を追加もã§ãる。" #: ../README.md:170 msgid " $ yardoc 'app/**/*.rb' - README LICENSE FAQ" msgstr " $ yardoc 'app/**/*.rb' - README LICENSE FAQ" #: ../README.md:172 msgid "" "If no globs precede the '-' argument, the default glob (`lib/**/*.rb`) is\n" "used:" msgstr "ã‚‚ã—globç„¡ã—ã§ã€'-'引数ãŒå…ˆè¡Œã™ã‚‹å ´åˆã€ãƒ‡ãƒ•ォルトã®globã¯( `lib/**/*.rb` )を使ã†ã€‚" #: ../README.md:175 msgid " $ yardoc - README LICENSE FAQ" msgstr " $ yardoc - README LICENSE FAQ" #: ../README.md:177 msgid "" "Note that the README file can be specified with its own `--readme` switch." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚READMEファイルã¯è‡ªèº«ã®`--readme`引数ã¨å…±ã«æŒ‡å®šã•れる。" #: ../README.md:179 msgid "" "You can also add a `.yardopts` file to your project directory which lists\n" "the switches separated by whitespace (newlines or space) to pass to yardoc\n" "whenever it is run. A full overview of the `.yardopts` file can be found in\n" "{YARD::CLI::Yardoc}." msgstr "" "ã‚ãªãŸã¯ã‚ãªãŸã®ãƒ—ロジェクトディレクトリ㫠`.yardopts` を追加ã™ã‚‹ã“ã¨ã‚‚ã§ãる。\n" "ã“れã¯èµ·å‹•ã™ã‚‹æ™‚ã«æ¯Žå›žã€ã‚¹ãƒšãƒ¼ã‚¹ã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚ŒãŸå¼•æ•°ã®ãƒªã‚¹ãƒˆã‚’yardocã«æ¸¡ã™ã€‚\n" " `.yardopts` ファイルã®å…¨ã¦ã®æ¦‚è¦ã¯ã€ {YARD::CLI::Yardoc} ã§è¦‹ã¤ã‘ã‚‹ã“ã¨ãŒã§ãる。" #: ../README.md:184 msgid "### Queries" msgstr "### クエリー" #: ../README.md:186 msgid "" "The `yardoc` tool also supports a `--query` argument to only include " "objects\n" "that match a certain data or meta-data query. The query syntax is Ruby, " "though\n" "a few shortcuts are available. For instance, to document only objects that " "have\n" "an \"@api\" tag with the value \"public\", all of the following syntaxes " "would give\n" "the same result:" msgstr "" "`yardoc` ツールã¯ã€ `--query` 引数をサãƒãƒ¼ãƒˆã‚‚ã™ã‚‹ã€‚\n" "ã“れã¯ãƒžãƒƒãƒã™ã‚‹ã„ãらã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚„メタデータクエリーã®ã‚ªãƒ–ジェクトã ã‘å«ã‚“ã§ã„る。\n" "ã‚¯ã‚¨ãƒªãƒ¼ã®æ§‹æ–‡ã¯Rubyã§ã€ã„ãã¤ã‹ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãŒåˆ©ç”¨å¯èƒ½ã€‚\n" "例ãˆã°ã€\"@api\"ã‚¿ã‚°ã¨\"public\"ãªå€¤ã‚’æŒã¤ã‚ªãƒ–ジェクトã ã‘を記述ã™ã‚‹ã«ã¯ã€\n" "次ã®ã‚ˆã†ã«ãªã‚‹ã€‚(å…¨ã¦åŒã˜çµæžœã¨ãªã‚‹ã€‚)" #: ../README.md:192 msgid "" " --query '@api.text == \"public\"'\n" " --query 'object.has_tag?(:api) && object.tag(:api).text == \"public\"'\n" " --query 'has_tag?(:api) && tag(:api).text == \"public\"'" msgstr "" " --query '@api.text == \"public\"'\n" " --query 'object.has_tag?(:api) && object.tag(:api).text == \"public\"'\n" " --query 'has_tag?(:api) && tag(:api).text == \"public\"'" #: ../README.md:196 msgid "" "Note that the \"@tag\" syntax returns the first tag named \"tag\" on the " "object.\n" "To return the array of all tags named \"tag\", use \"@@tag\"." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "\"@tag\"æ§‹æ–‡ã¯ã€ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æœ€åˆã«\"tag\"ã¨å付ã‘られãŸã‚¿ã‚°ã‚’è¿”ã™ã€‚\n" "å…¨ã¦ã®\"tag\"ã¨å付ã‘ãŸã‚¿ã‚°ã®é…列を返ã™ã«ã¯ã€\"@@tag\"を使ã†ã€‚" #: ../README.md:199 msgid "" "Multiple `--query` arguments are allowed in the command line parameters. " "The\n" "following two lines both check for the existence of a return and param tag:" msgstr "" "複数ã®`--query`引数ã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³å¼•æ•°ã®ä¸­ã§è¨±å¯ã•れる。\n" "次ã®2行ã¯ä¸¡æ–¹ã¨ã‚‚実際ã®è¿”り値ã¨paramã‚¿ã‚°ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã€‚" #: ../README.md:202 msgid "" " --query '@return' --query '@param'\n" " --query '@return && @param'" msgstr "" " --query '@return' --query '@param'\n" " --query '@return && @param'" #: ../README.md:205 msgid "" "For more information about the query syntax, see the {YARD::Verifier} class." msgstr "ã•らãªã‚‹queryæ§‹æ–‡ã®æƒ…å ±ã«ã¤ã„ã¦ã¯ã€ {YARD::Verifier} クラスをå‚ç…§ã™ã‚‹ã€‚" #: ../README.md:207 msgid "**2. Rake Task**" msgstr "**2. Rake Task**" #: ../README.md:209 msgid "" "The second most obvious is to generate docs via a Rake task. You can do this " "by\n" "adding the following to your `Rakefile`:" msgstr "" "ã‚‚ã†ä¸€ã¤ã®æ–¹æ³•ã¨ã—ã¦ã€Rakeã®ã‚¿ã‚¹ã‚¯ã‚’介ã—ã¦ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã€‚\n" "ã‚ãªãŸã® `Rakefile` ã«æ¬¡ã®å†…容を追加ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ä½œæˆã§ãã‚‹:" #: ../README.md:212 msgid "" " YARD::Rake::YardocTask.new do |t|\n" " t.files = ['lib/**/*.rb', OTHER_PATHS] # optional\n" " t.options = ['--any', '--extra', '--opts'] # optional\n" " end" msgstr "" " YARD::Rake::YardocTask.new do |t|\n" " t.files = ['lib/**/*.rb', OTHER_PATHS] # optional\n" " t.options = ['--any', '--extra', '--opts'] # optional\n" " end" #: ../README.md:217 msgid "" "both the `files` and `options` settings are optional. `files` will default " "to\n" "`lib/**/*.rb` and `options` will represents any options you might want\n" "to add. Again, a full list of options is available by typing `yardoc --" "help`\n" "in a shell. You can also override the options at the Rake command-line with " "the\n" "OPTS environment variable:" msgstr "" "`files` ã‚‚ `options` ã®è¨­å®šã‚‚ã€çœç•¥å¯èƒ½ã€‚\n" "`files` 㯠`lib/**/*.rb` ã«ãƒ‡ãƒ•ォルトã§è¨­å®šã•れるã€\n" "ãã—㦠`options` ã¯è¿½åŠ ã—ãŸã„オプションを表ã—ã¦ã„る。\n" "ã•らã«ã€ã‚ªãƒ—ションã®å…¨ã¦ã®ãƒªã‚¹ãƒˆã¯ã€\n" "シェル㧠`yardoc --help` ã‚’\n" "タイプã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦åˆ©ç”¨å¯èƒ½ã€‚åˆã€\n" "Rakeコマンドラインã¨OPTS環境変数ã§optionsを上書ãã§ãる。" #: ../README.md:223 msgid " $ rake yard OPTS='--any --extra --opts'" msgstr " $ rake yard OPTS='--any --extra --opts'" #: ../README.md:225 msgid "**3. `yri` RI Implementation**" msgstr "**3. `yri` RIã®å®Ÿè£…**" #: ../README.md:227 msgid "" "The yri binary will use the cached .yardoc database to give you quick ri-" "style\n" "access to your documentation. It's way faster than ri but currently does " "not\n" "work with the stdlib or core Ruby libraries, only the active project. " "Example:" msgstr "" "yriコマンドã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ri-styleã§é€Ÿãアクセスã™ã‚‹ç‚ºã«ã€\n" "キャッシュã—ãŸ.yardocデータベースを使ã†ã ã‚ã†ã€‚\n" "ã“れã¯riã‚ˆã‚Šã‚‚é€Ÿã„æ–¹æ³•ã ãŒã€ã—ã‹ã—ã€ä»Šã®æ‰€ã€\n" "stdlibã‹ã‚³ã‚¢Rubyライブラリã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ–プロジェクトã ã‘ã§ã—ã‹\n" "å‹•ã‹ãªã„。\n" "使用例:" #: ../README.md:231 msgid "" " $ yri YARD::Handlers::Base#register\n" " $ yri File.relative_path" msgstr "" " $ yri YARD::Handlers::Base#register\n" " $ yri File.relative_path" #: ../README.md:234 msgid "" "Note that class methods must not be referred to with the \"::\" namespace\n" "separator. Only modules, classes and constants should use \"::\"." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "クラスメソッドã¯ã€\"::\"ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹åŒºåˆ‡ã‚Šã¨ã¨ã‚‚ã«å‚ç…§ã•れるã¹ãã§ã¯ãªã„。\n" "モジュールã ã‘クラスã¨å®šæ•°ã¯\"::\"を使ã†ã¹ãã§ã‚る。" #: ../README.md:237 msgid "" "You can also do lookups on any installed gems. Just make sure to build the\n" ".yardoc databases for installed gems with:" msgstr "" "ã‚ãªãŸã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã¿ã®ä»»æ„ã®gemを検索ã§ãる。\n" "以下ã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã¿ã®gemã¨ã¨ã‚‚ã«.yardocデータベースをビルドã™ã‚‹ã€‚" #: ../README.md:240 msgid " $ sudo yard gems" msgstr " $ sudo yard gems" #: ../README.md:242 msgid "" "If you don't have sudo access, it will write these files to your `~/.yard`\n" "directory. `yri` will also cache lookups there." msgstr "" "sudo権é™ã‚’ã‚‚ã£ã¦ã„ãªã„å ´åˆã¯ã€ã‚ãªãŸã® `~/.yard` ディレクトリã«ã“れらを記述ã™ã‚‹ã€‚\n" " `yri` ã¯ãれらをcache検索ã™ã‚‹ã€‚" #: ../README.md:245 msgid "**4. `yard server` Documentation Server**" msgstr "**4. `yard server` ドキュメント作æˆã‚µãƒ¼ãƒãƒ¼**" #: ../README.md:247 msgid "" "The `yard server` command serves documentation for a local project or all " "installed\n" "RubyGems. To serve documentation for a project you are working on, simply " "run:" msgstr "" "`yard server` コマンドã¯ã€\n" "ローカルプロジェクトやインストール済ã¿ã®RubyGems用ã®\n" "ドキュメント作æˆã‚’æä¾›ã™ã‚‹ã€‚\n" "ドキュメント作æˆã‚’æä¾›ã™ã‚‹ã«ã¯ã€\n" "ã‚ãªãŸãŒå–り組んã§ã„ã‚‹ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆä¸Šã§æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’å˜ã«å®Ÿè¡Œã™ã‚‹ã€‚" #: ../README.md:250 ../docs/WhatsNew.md:542 msgid " $ yard server" msgstr " $ yard server" #: ../README.md:252 msgid "" "And the project inside the current directory will be parsed (if the source " "has\n" "not yet been scanned by YARD) and served at [http://localhost:8808](http://" "localhost:8808)." msgstr "" "上ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦ãƒ—ロジェクトã®ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…部ã¯è§£æžã•れる。\n" "(YARDã«ã‚ˆã£ã¦ã‚¹ã‚­ãƒ£ãƒ³ã•れãŸã«ã‚‚ã‹ã‹ã‚らãšã‚½ãƒ¼ã‚¹ãŒãªã‹ã£ãŸå ´åˆ)\n" "ãã—㦠[http://localhost:8808](http://localhost:8808) ã§æä¾›ã•れる。" #: ../README.md:255 msgid "### Live Reloading" msgstr "### Live Reloading" #: ../README.md:257 msgid "" "If you want to serve documentation on a project while you document it so " "that\n" "you can preview the results, simply pass `--reload` (`-r`) to the above " "command\n" "and YARD will reload any changed files on each request. This will allow you " "to\n" "change any documentation in the source and refresh to see the new contents." msgstr "" "çµæžœã‚’プレビューã§ãるよã†ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆåŒ–ã—ãªãŒã‚‰ã€\n" "プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã‚’æä¾›ã—ãŸã„ãªã‚‰ã€\n" "上ã®ã‚³ãƒžãƒ³ãƒ‰ã«å˜ç´”ã« `--reload` (`-r`)を渡ã™ã€‚\n" "YARDã¯ãれãžã‚Œã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ã©ã‚Œã‹ã®å¤‰æ›´ãŒã‚ã£ãŸãƒ•ァイルをå†ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã€‚\n" "ã“れã¯ã‚ãªãŸãŒã‚½ãƒ¼ã‚¹ã®ä¸­ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å¤‰æ›´ã‚„\n" "æ–°ã—ã„コンテンツを見るã®ã«ãƒªãƒ•レッシュをå¯èƒ½ã«ã™ã‚‹ã€‚" #: ../README.md:262 msgid "### Serving Gems" msgstr "### Serving Gems" #: ../README.md:264 msgid "To serve documentation for all installed gems, call:" msgstr "" "å…¨ã¦ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã¿ã®gemã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã‚’æä¾›ã™ã‚‹ã«ã¯ã€\n" "次ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’入力ã™ã‚‹ã€‚" #: ../README.md:266 ../docs/WhatsNew.md:562 msgid " $ yard server --gems" msgstr " $ yard server --gems" #: ../README.md:268 msgid "" "This will also automatically build documentation for any gems that have not\n" "been previously scanned. Note that in this case there will be a slight " "delay\n" "between the first request of a newly parsed gem." msgstr "" "ã“れã¯è‡ªå‹•çš„ã«ä»¥å‰ã«ã‚¹ã‚­ãƒ£ãƒ³ã•れã¦ã„ãªã„ã‚らゆるgemã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ビルドã™" "る。\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã“ã®å ´åˆã€æ–°ãŸã«è§£æžã•れãŸgemã®æœ€åˆã®è¦æ±‚ã®é–“ã«ã‚ãšã‹ãªé…å»¶ãŒç™ºç”Ÿã™ã‚‹ã€‚" #: ../README.md:273 msgid "**5. `yard graph` Graphviz Generator**" msgstr "**5. `yard graph` ã¯Graphvizã®ã‚¸ã‚§ãƒãƒ¬ãƒ¼ã‚¿ãƒ¼**" #: ../README.md:275 msgid "" "You can use `yard graph` to generate dot graphs of your code. This, of " "course,\n" "requires [Graphviz](http://www.graphviz.org) and the `dot` binary. By " "default\n" "this will generate a graph of the classes and modules in the best UML2 " "notation\n" "that Graphviz can support, but without any methods listed. With the `--" "full`\n" "option, methods and attributes will be listed. There is also a `--" "dependencies`\n" "option to show mixin inclusions. You can output to stdout or a file, or pipe " "directly\n" "to `dot`. The same public, protected and private visibility rules apply to " "`yard graph`.\n" "More options can be seen by typing `yard graph --help`, but here is an " "example:" msgstr "" "ã‚ãªãŸã®ã‚³ãƒ¼ãƒ‰ã®å›³ã‚’生æˆã™ã‚‹ç‚ºã« `yard graph` を利用ã§ãる。\n" "ã“れã«ã¯ã‚‚ã¡ã‚ã‚“ã€[Graphviz](http://www.graphviz.org)㨠`dot` ãŒå¿…è¦ã¨ãªã‚‹ã€‚\n" "デフォルトã§ã“れã¯ã€Graphvizã®ã‚µãƒãƒ¼ãƒˆã§ãる最高ã®URL2表記ã§\n" "クラスやモジュールã®å›³ã‚’生æˆã™ã‚‹ã€‚ã—ã‹ã—ã€è¨˜è¼‰ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ç”Ÿæˆã—ãªã„。\n" "`-- full` オプションを用ã„メソッドã¨å±žæ€§ãŒè¨˜è¿°ã•れる。\n" "mixinã§å«ã‚“ã§ã„ã‚‹ã‚‚ã®ã‚’一覧ã™ã‚‹ç‚ºã« `--dependencies` オプションもã‚る。\n" "標準出力やファイルã«å‡ºåŠ›ã—ãŸã‚Šã€ã¾ãŸ `dot` ã«ç›´æŽ¥ãƒ‘イプã§ãる。\n" "åŒã˜public,protectedã¨privateã®å¯è¦–性è¦å‰‡ã¯ã€ `yard-graph` ã«é©ç”¨ã•れる。\n" "詳細ãªã‚ªãƒ—ションã¯ã€ `yard-graph --help` ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦è¦‹ã‚‹ã“ã¨ãŒã§ãる。\n" "次ã«ä¾‹ãŒã‚ã‚‹:" #: ../README.md:284 msgid " $ yard graph --protected --full --dependencies" msgstr " $ yard graph --protected --full --dependencies" #: ../README.md:287 msgid "## Changelog" msgstr "## Changelog" #: ../README.md:289 msgid "" "- **June.9.12**: 0.8.2.1 release\n" " - Fix a set of regressions in yard server search and dynamic generation" msgstr "" "- **June.9.12**: 0.8.2.1 release\n" " - Fix a set of regressions in yard server search and dynamic generation" #: ../README.md:292 msgid "" "- **June.7.12**: 0.8.2 release\n" " - Added progress style output in tty terminals\n" " - Embedded mixins should ignore methods defined on module (#539)\n" " - Fixed permalinks for embedded mixins in `yard server` (#540)\n" " - Improve parsing in CRuby code (#543)\n" " - Ensure Registry.resolve picks module when parsing mixins (#545)\n" " - Fixed regression that caused various commands to not show output " "(#548)\n" " - Respect current visibility when parsing class conditions (#551)" msgstr "" "- **June.7.12**: 0.8.2 release\n" " - Added progress style output in tty terminals\n" " - Embedded mixins should ignore methods defined on module (#539)\n" " - Fixed permalinks for embedded mixins in `yard server` (#540)\n" " - Improve parsing in CRuby code (#543)\n" " - Ensure Registry.resolve picks module when parsing mixins (#545)\n" " - Fixed regression that caused various commands to not show output (#548)\n" " - Respect current visibility when parsing class conditions (#551)" #: ../README.md:301 msgid "" "- **May.2.12**: 0.8.1 release\n" " - Added `--[no-]api` switch to generate docs for API sets (see {file:" "docs/WhatsNew.md} for details) (#532)\n" " - The `yard list` command now uses cache by default (#533)\n" " - Fix `yardoc` generating incorrectly named method list file (#528)\n" " - Fix HTML output occasionally showing trailing mdash on options list " "(#522)" msgstr "" "- **May.2.12**: 0.8.1 release\n" " - Added `--[no-]api` switch to generate docs for API sets (see {file:docs/WhatsNew.md} for details) (#532)\n" " - The `yard list` command now uses cache by default (#533)\n" " - Fix `yardoc` generating incorrectly named method list file (#528)\n" " - Fix HTML output occasionally showing trailing mdash on options list (#522)" #: ../README.md:307 msgid "" "- **April.30.12**: 0.8.0 release\n" " - See {file:docs/WhatsNew.md} for a list of added features\n" " - Over 20 bug fixes:\n" " - Properly filter hidden setter/getter attributes (#394)\n" " - Fix test failures in Linux environments (#397, #472, #473, #512, " "#513)\n" " - Fix attribute inheritance and @private (#432)\n" " - Fix attribute parsing (#435)\n" " - Allow aliases for attributes (#436)\n" " - Fix namespace fetching in `handle_alias()` (#437)\n" " - Fix overwritten attributes marked as inherited (#442)\n" " - Fix documenting constants defined from C code with `rb_define_const()" "` (#443)\n" " - Do not escape snippets twice (#445)\n" " - Ajax method/class search should not fire when a non-printable " "character is pressed (#446)\n" " - Fix yard server crashing when RDoc is not installed (#456)\n" " - Fix tags ignored when `(see #foo)` is used (#457)\n" " - Fix three \"Returns\" for two `@overload` tags (#458)\n" " - Do not auto-detect DSL methods as method objects if parameter name " "is not a valid method name (#464)\n" " - Fix attaching of macros to Object (#465)\n" " - Fix handling of `%w()` source in `[]/[]=` parsed context. (#461, " "pull in #468)\n" " - Don't add default `@return` if `@overload` has `@return`. (#458, " "pull in #469)\n" " - Don't discard tags by (see ...). (#457, pull in #470)\n" " - Fix constants listed as inherited when overwritten (#474)\n" " - Fix `yardoc --asset` behaving differently on first and subsequent " "calls. (#477)\n" " - `!!!lang` code blocks should set the lang in `
    `'s class. (#478, "
    "#479)\n"
    "      - Fix \"File List\" search tab error. (#502)\n"
    "      - Fix search bar not redirecting to method page. (#509)\n"
    "      - Fix server returning exception message bodies as String (#518)"
    msgstr ""
    "- **April.30.12**: 0.8.0 release\n"
    "    - See {file:docs/WhatsNew.md} for a list of added features\n"
    "    - Over 20 bug fixes:\n"
    "      - Properly filter hidden setter/getter attributes (#394)\n"
    "      - Fix test failures in Linux environments (#397, #472, #473, #512, #513)\n"
    "      - Fix attribute inheritance and @private (#432)\n"
    "      - Fix attribute parsing (#435)\n"
    "      - Allow aliases for attributes (#436)\n"
    "      - Fix namespace fetching in `handle_alias()` (#437)\n"
    "      - Fix overwritten attributes marked as inherited (#442)\n"
    "      - Fix documenting constants defined from C code with `rb_define_const()` (#443)\n"
    "      - Do not escape snippets twice (#445)\n"
    "      - Ajax method/class search should not fire when a non-printable character is pressed (#446)\n"
    "      - Fix yard server crashing when RDoc is not installed (#456)\n"
    "      - Fix tags ignored when `(see #foo)` is used (#457)\n"
    "      - Fix three \"Returns\" for two `@overload` tags (#458)\n"
    "      - Do not auto-detect DSL methods as method objects if parameter name is not a valid method name (#464)\n"
    "      - Fix attaching of macros to Object (#465)\n"
    "      - Fix handling of `%w()` source in `[]/[]=` parsed context. (#461, pull in #468)\n"
    "      - Don't add default `@return` if `@overload` has `@return`. (#458, pull in #469)\n"
    "      - Don't discard tags by (see ...). (#457, pull in #470)\n"
    "      - Fix constants listed as inherited when overwritten (#474)\n"
    "      - Fix `yardoc --asset` behaving differently on first and subsequent calls. (#477)\n"
    "      - `!!!lang` code blocks should set the lang in `
    `'s class. (#478, #479)\n"
    "      - Fix \"File List\" search tab error. (#502)\n"
    "      - Fix search bar not redirecting to method page. (#509)\n"
    "      - Fix server returning exception message bodies as String (#518)"
    
    #: ../README.md:335
    msgid ""
    "- **January.31.12**: 0.7.5 release\n"
    "    - Various minor bug fixes"
    msgstr ""
    "- **January.31.12**: 0.7.5 release\n"
    "    - Various minor bug fixes"
    
    #: ../README.md:338
    msgid ""
    "- **December.2.11**: 0.7.4 release\n"
    "    - Redcarpet is now the default Markdown formatting library. GFM now "
    "works out-of-box (#404)\n"
    "    - Fix server side searching for elements that are marked private (#420)\n"
    "    - Add 'textile_strict' and 'pre' markup types, reorganize text and none "
    "(#416)\n"
    "    - Improve encoding line detection (#415)\n"
    "    - Add support for `rb_define_alias` in CRuby code (#413)\n"
    "    - Fix rendering of some keywords in source view (#410)\n"
    "    - Add support for RDoc 3.10+ (#406, #407)\n"
    "    - Fix typewriter text being processed in code blocks (#403)\n"
    "    - Improve support for has_rdoc in RubyGems 1.8.x (#401)\n"
    "    - See the {file:docs/WhatsNew.md} document for details on added features"
    msgstr ""
    "- **December.2.11**: 0.7.4 release\n"
    "    - Redcarpet is now the default Markdown formatting library. GFM now works out-of-box (#404)\n"
    "    - Fix server side searching for elements that are marked private (#420)\n"
    "    - Add 'textile_strict' and 'pre' markup types, reorganize text and none (#416)\n"
    "    - Improve encoding line detection (#415)\n"
    "    - Add support for `rb_define_alias` in CRuby code (#413)\n"
    "    - Fix rendering of some keywords in source view (#410)\n"
    "    - Add support for RDoc 3.10+ (#406, #407)\n"
    "    - Fix typewriter text being processed in code blocks (#403)\n"
    "    - Improve support for has_rdoc in RubyGems 1.8.x (#401)\n"
    "    - See the {file:docs/WhatsNew.md} document for details on added features"
    
    #: ../README.md:350
    msgid ""
    "- **October.15.11**: 0.7.3 release\n"
    "    - Improve support for parsing under Ruby 1.9.2p290 and 1.9.3 (#365, "
    "#370)\n"
    "    - Add support for SWIG generated CRuby code (#369)\n"
    "    - Add support for `rb_define_attr` calls in CRuby code (#362)\n"
    "    - Handle file pointers in CRuby code (#358)"
    msgstr ""
    "- **October.15.11**: 0.7.3 release\n"
    "    - Improve support for parsing under Ruby 1.9.2p290 and 1.9.3 (#365, #370)\n"
    "    - Add support for SWIG generated CRuby code (#369)\n"
    "    - Add support for `rb_define_attr` calls in CRuby code (#362)\n"
    "    - Handle file pointers in CRuby code (#358)"
    
    #: ../README.md:356
    msgid ""
    "- **June.14.11**: 0.7.2 release\n"
    "    - Fix `yard --help` not showing proper output\n"
    "    - YARD now expands path to `.yardoc` file in daemon mode for server "
    "(#328)\n"
    "    - Fix `@overload` tag linking to wrong method (#330)\n"
    "    - Fix incorrect return type when using `@macro` (#334)\n"
    "    - YARD now requires 'thread' to support RubyGems 1.7+ (#338)\n"
    "    - Fix bug in constant documentation when using `%w()` (#348)\n"
    "    - Fix YARD style URL links when using autolinking markdown (#353)"
    msgstr ""
    "- **June.14.11**: 0.7.2 release\n"
    "    - Fix `yard --help` not showing proper output\n"
    "    - YARD now expands path to `.yardoc` file in daemon mode for server (#328)\n"
    "    - Fix `@overload` tag linking to wrong method (#330)\n"
    "    - Fix incorrect return type when using `@macro` (#334)\n"
    "    - YARD now requires 'thread' to support RubyGems 1.7+ (#338)\n"
    "    - Fix bug in constant documentation when using `%w()` (#348)\n"
    "    - Fix YARD style URL links when using autolinking markdown (#353)"
    
    #: ../README.md:365
    msgid ""
    "- **May.18.11**: 0.7.1 release\n"
    "    - Fixes a bug in `yard server` not displaying class list properly."
    msgstr ""
    "- **May.18.11**: 0.7.1 release\n"
    "    - Fixes a bug in `yard server` not displaying class list properly."
    
    #: ../README.md:368
    msgid ""
    "- **May.17.11**: 0.7.0 release\n"
    "    - See the {file:docs/WhatsNew.md} document for details on added "
    "features\n"
    "    - Make sure that Docstring#line_range is filled when possible (#243)\n"
    "    - Set #verifier in YardocTask (#282)\n"
    "    - Parse BOM in UTF-8 files (#288)\n"
    "    - Fix instance attributes not showing up in method list (#302)\n"
    "    - Fix rendering of %w() literals in constants (#306)\n"
    "    - Ignore keyboard shortcuts when an input is active (#312)\n"
    "    - And more..."
    msgstr ""
    "- **May.17.11**: 0.7.0 release\n"
    "    - See the {file:docs/WhatsNew.md} document for details on added features\n"
    "    - Make sure that Docstring#line_range is filled when possible (#243)\n"
    "    - Set #verifier in YardocTask (#282)\n"
    "    - Parse BOM in UTF-8 files (#288)\n"
    "    - Fix instance attributes not showing up in method list (#302)\n"
    "    - Fix rendering of %w() literals in constants (#306)\n"
    "    - Ignore keyboard shortcuts when an input is active (#312)\n"
    "    - And more..."
    
    #: ../README.md:378
    msgid ""
    "- **April.14.11**: 0.6.8 release\n"
    "    - Fix regression in RDoc 1.x markup loading\n"
    "    - Fix regression in loading of markup libraries for `yard server`"
    msgstr ""
    "- **April.14.11**: 0.6.8 release\n"
    "    - Fix regression in RDoc 1.x markup loading\n"
    "    - Fix regression in loading of markup libraries for `yard server`"
    
    #: ../README.md:382
    msgid ""
    "- **April.6.11**: 0.6.7 release\n"
    "    - Fix has_rdoc gem specification issue with new RubyGems plugin API "
    "(oops!)"
    msgstr ""
    "- **April.6.11**: 0.6.7 release\n"
    "    - Fix has_rdoc gem specification issue with new RubyGems plugin API (oops!)"
    
    #: ../README.md:385
    msgid ""
    "- **April.6.11**: 0.6.6 release\n"
    "    - Fix error message when RDoc is not present (#270)\n"
    "    - Add markup type 'none' to perform basic HTML translation (fallback "
    "when RDoc is not present)\n"
    "    - Add support for RubyGems 1.7.x (#272)\n"
    "    - Fix rendering of `{url description}` syntax when description contains "
    "newline"
    msgstr ""
    "- **April.6.11**: 0.6.6 release\n"
    "    - Fix error message when RDoc is not present (#270)\n"
    "    - Add markup type 'none' to perform basic HTML translation (fallback when RDoc is not present)\n"
    "    - Add support for RubyGems 1.7.x (#272)\n"
    "    - Fix rendering of `{url description}` syntax when description contains newline"
    
    #: ../README.md:391
    msgid ""
    "- **March.13.11**: 0.6.5 release\n"
    "    - Support `ripper` gem in Ruby 1.8.7\n"
    "    - Upgrade jQuery to 1.5.1\n"
    "    - Fix handling of alias statements with quoted symbols (#262)\n"
    "    - Add CSS styles (#260)\n"
    "    - Unhandled exception in YARD::Handlers::Ruby::MixinHandler indexing "
    "documentation for eventmachine (#248)\n"
    "    - Splice any alias references on method re-definitions into separate "
    "methods (#247)\n"
    "    - Fix \"yard graph\" (#245)\n"
    "    - Don't process ++ typewriter text inside of HTML attributes (#244)\n"
    "    - Prioritize loading of Kramdown before Maruku (#241)\n"
    "    - Skip shebang encoding in docstrings (#238)\n"
    "    - Fix truncation of references in @deprecated (#232)\n"
    "    - Show @api private note when no other tags are present (#231)\n"
    "    - Detect docstrings starting with \"##\" as `Docstring#hash_flag` "
    "(#230)\n"
    "    - Remove trailing whitespace from freeform tags (#229)\n"
    "    - Fix line through for deprecated methods (#225)\n"
    "    - Mistake in Tags.md (#223)\n"
    "    - Improve database storage by being more efficient with filesystem usage "
    "(#222)\n"
    "    - Make Registry thread local (#221)\n"
    "    - Support `private_constant` class method for 1.9.3 (#219)\n"
    "    - Do not assume RDoc is installed (#214)"
    msgstr ""
    "- **March.13.11**: 0.6.5 release\n"
    "    - Support `ripper` gem in Ruby 1.8.7\n"
    "    - Upgrade jQuery to 1.5.1\n"
    "    - Fix handling of alias statements with quoted symbols (#262)\n"
    "    - Add CSS styles (#260)\n"
    "    - Unhandled exception in YARD::Handlers::Ruby::MixinHandler indexing documentation for eventmachine (#248)\n"
    "    - Splice any alias references on method re-definitions into separate methods (#247)\n"
    "    - Fix \"yard graph\" (#245)\n"
    "    - Don't process ++ typewriter text inside of HTML attributes (#244)\n"
    "    - Prioritize loading of Kramdown before Maruku (#241)\n"
    "    - Skip shebang encoding in docstrings (#238)\n"
    "    - Fix truncation of references in @deprecated (#232)\n"
    "    - Show @api private note when no other tags are present (#231)\n"
    "    - Detect docstrings starting with \"##\" as `Docstring#hash_flag` (#230)\n"
    "    - Remove trailing whitespace from freeform tags (#229)\n"
    "    - Fix line through for deprecated methods (#225)\n"
    "    - Mistake in Tags.md (#223)\n"
    "    - Improve database storage by being more efficient with filesystem usage (#222)\n"
    "    - Make Registry thread local (#221)\n"
    "    - Support `private_constant` class method for 1.9.3 (#219)\n"
    "    - Do not assume RDoc is installed (#214)"
    
    #: ../README.md:413
    msgid ""
    "- **December.21.10**: 0.6.4 release\n"
    "    - Fix yri tool crashing with new Config class (gh-217)\n"
    "    - Fix support for ::TopLevelConstants (gh-216)\n"
    "    - YARD's test suite is now RSpec2 compatible (gh-215)\n"
    "    - Improved documentation for YARD::Server features (gh-207)\n"
    "    - Fix displaying of collaped method summary lists (gh-204)\n"
    "    - Fix automatic loading of markup providers (gh-206)\n"
    "    - Fix keyboard shortcuts for Chrome (gh-203)\n"
    "    - Disallow `extend self` inside of a class (gh-202)\n"
    "    - Constants now recognized in C extensions (gh-201)"
    msgstr ""
    "- **December.21.10**: 0.6.4 release\n"
    "    - Fix yri tool crashing with new Config class (gh-217)\n"
    "    - Fix support for ::TopLevelConstants (gh-216)\n"
    "    - YARD's test suite is now RSpec2 compatible (gh-215)\n"
    "    - Improved documentation for YARD::Server features (gh-207)\n"
    "    - Fix displaying of collaped method summary lists (gh-204)\n"
    "    - Fix automatic loading of markup providers (gh-206)\n"
    "    - Fix keyboard shortcuts for Chrome (gh-203)\n"
    "    - Disallow `extend self` inside of a class (gh-202)\n"
    "    - Constants now recognized in C extensions (gh-201)"
    
    #: ../README.md:424
    msgid ""
    "- **November.21.10**: 0.6.3 release\n"
    "    - Fixed regression that caused `yardoc --markup` to silently exit"
    msgstr ""
    "- **November.21.10**: 0.6.3 release\n"
    "    - Fixed regression that caused `yardoc --markup` to silently exit"
    
    #: ../README.md:427
    msgid ""
    "- **November.15.10**: 0.6.2 release\n"
    "    - **Plugins no longer automatically load, use `--plugin` to load a "
    "plugin**\n"
    "    - Added YARD::Config and ~/.yard/config YAML configuration file\n"
    "    - Added `yard config` command to view/edit YARD configuration file\n"
    "    - Fixes for YARD in 1.8.6 (gh-178)\n"
    "    - Various HTML template adjustments and fixes (gh-198,199,200)\n"
    "    - Improved `yard server -m` multi-project stability (gh-193)\n"
    "    - Fixed handling of `yardoc --no-private` with missing class definitions "
    "(gh-197)\n"
    "    - Added support for constants defined in C extensions (gh-177)\n"
    "    - Added support for Structs defined as \"Klass = Struct.new"
    "(...)\" (gh-187)\n"
    "    - Improved parsing support for third-party gems (gh-174,180)\n"
    "    - Improved support for JRuby 1.6.4+. YARD now passes all specs in JRuby "
    "(gh-185)\n"
    "    - Improved YARD documentation (gh-172,191,196)"
    msgstr ""
    "- **November.15.10**: 0.6.2 release\n"
    "    - **Plugins no longer automatically load, use `--plugin` to load a plugin**\n"
    "    - Added YARD::Config and ~/.yard/config YAML configuration file\n"
    "    - Added `yard config` command to view/edit YARD configuration file\n"
    "    - Fixes for YARD in 1.8.6 (gh-178)\n"
    "    - Various HTML template adjustments and fixes (gh-198,199,200)\n"
    "    - Improved `yard server -m` multi-project stability (gh-193)\n"
    "    - Fixed handling of `yardoc --no-private` with missing class definitions (gh-197)\n"
    "    - Added support for constants defined in C extensions (gh-177)\n"
    "    - Added support for Structs defined as \"Klass = Struct.new(...)\" (gh-187)\n"
    "    - Improved parsing support for third-party gems (gh-174,180)\n"
    "    - Improved support for JRuby 1.6.4+. YARD now passes all specs in JRuby (gh-185)\n"
    "    - Improved YARD documentation (gh-172,191,196)"
    
    #: ../README.md:441
    msgid ""
    "- **September.06.10**: 0.6.1 release\n"
    "    - Fixed TOC showing on top of class/method list in no-frames view\n"
    "    - A message now displays when running `yard server` with Rack/Mongrel "
    "installed\n"
    "    - Improved performance of JS inline search for large class/method lists\n"
    "    - Improved link titles for relative object links\n"
    "    - Removed `String#camelcase` and `String#underscore` for better Rails "
    "compat.\n"
    "    - Fixed support for loading .yardoc files under Windows\n"
    "    - Fixed inheritance tree arrows not displaying in certain environments"
    msgstr ""
    "- **September.06.10**: 0.6.1 release\n"
    "    - Fixed TOC showing on top of class/method list in no-frames view\n"
    "    - A message now displays when running `yard server` with Rack/Mongrel installed\n"
    "    - Improved performance of JS inline search for large class/method lists\n"
    "    - Improved link titles for relative object links\n"
    "    - Removed `String#camelcase` and `String#underscore` for better Rails compat.\n"
    "    - Fixed support for loading .yardoc files under Windows\n"
    "    - Fixed inheritance tree arrows not displaying in certain environments"
    
    #: ../README.md:450
    msgid ""
    "- **August.29.10**: 0.6.0 release\n"
    "    - Added dynamic local documentation server\n"
    "    - Added @group/@endgroup declarations to organize methods into groups\n"
    "    - Added `yard` executable to serve as main CLI tool with pluggable "
    "commands\n"
    "    - Added `--asset` switch to `yardoc` to copy files/dirs to output dir\n"
    "    - Added ability to register/manipulate tags via CLI (`--tag`, etc.)\n"
    "    - Added `yard diff` command\n"
    "    - Added statistics to `yardoc` output (and `yard stats` command)\n"
    "    - Added Javascript generated Table of Contents to file pages\n"
    "    - Updated various APIs\n"
    "    - Removed `yard-graph` executable\n"
    "    - See more changes in the {file:docs/WhatsNew.md what's new document}"
    msgstr ""
    "- **August.29.10**: 0.6.0 release\n"
    "    - Added dynamic local documentation server\n"
    "    - Added @group/@endgroup declarations to organize methods into groups\n"
    "    - Added `yard` executable to serve as main CLI tool with pluggable commands\n"
    "    - Added `--asset` switch to `yardoc` to copy files/dirs to output dir\n"
    "    - Added ability to register/manipulate tags via CLI (`--tag`, etc.)\n"
    "    - Added `yard diff` command\n"
    "    - Added statistics to `yardoc` output (and `yard stats` command)\n"
    "    - Added Javascript generated Table of Contents to file pages\n"
    "    - Updated various APIs\n"
    "    - Removed `yard-graph` executable\n"
    "    - See more changes in the {file:docs/WhatsNew.md what's new document}"
    
    #: ../README.md:463
    msgid ""
    "- **June.22.10**: 0.5.8 release\n"
    "    - Merge fix from 0.6 branch for --no-private visibility checking"
    msgstr ""
    "- **June.22.10**: 0.5.8 release\n"
    "    - Merge fix from 0.6 branch for --no-private visibility checking"
    
    #: ../README.md:466
    msgid ""
    "- **June.21.10**: 0.5.7 release\n"
    "    - Fixed visibility flag parsing in `yardoc`\n"
    "    - Updated Parser Architecture documentation with new SourceParser API\n"
    "    - Improved Registry documentation for new load commands\n"
    "    - Fix loading of .yardoc file as cache (and preserving aliases)\n"
    "    - Fix \"lib\" directory missing when running YARD on installed gems"
    msgstr ""
    "- **June.21.10**: 0.5.7 release\n"
    "    - Fixed visibility flag parsing in `yardoc`\n"
    "    - Updated Parser Architecture documentation with new SourceParser API\n"
    "    - Improved Registry documentation for new load commands\n"
    "    - Fix loading of .yardoc file as cache (and preserving aliases)\n"
    "    - Fix \"lib\" directory missing when running YARD on installed gems"
    
    #: ../README.md:473
    msgid ""
    "- **June.12.10**: 0.5.6 release\n"
    "    - Bug fixes for RubyGems plugin, `has_rdoc=false` should now work\n"
    "    - New API for registering custom parsers. See {file:docs/WhatsNew.md}"
    msgstr ""
    "- **June.12.10**: 0.5.6 release\n"
    "    - Bug fixes for RubyGems plugin, `has_rdoc=false` should now work\n"
    "    - New API for registering custom parsers. See {file:docs/WhatsNew.md}"
    
    #: ../README.md:477
    msgid ""
    "- **May.22.10**: 0.5.5 release\n"
    "    - Various bug fixes"
    msgstr ""
    "- **May.22.10**: 0.5.5 release\n"
    "    - Various bug fixes"
    
    #: ../README.md:480
    msgid ""
    "- **March.22.10**: 0.5.4 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    msgstr ""
    "- **March.22.10**: 0.5.4 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    
    #: ../README.md:483
    msgid ""
    "- **January.11.10**: 0.5.3 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    msgstr ""
    "- **January.11.10**: 0.5.3 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    
    #: ../README.md:486
    msgid ""
    "- **December.16.09**: 0.5.2 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    msgstr ""
    "- **December.16.09**: 0.5.2 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    
    #: ../README.md:489
    msgid ""
    "- **December.15.09**: 0.5.1 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    msgstr ""
    "- **December.15.09**: 0.5.1 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    
    #: ../README.md:492
    msgid ""
    "- **December.13.09**: 0.5.0 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    msgstr ""
    "- **December.13.09**: 0.5.0 release\n"
    "    - See {file:docs/WhatsNew.md what's new document} for changes"
    
    #: ../README.md:495
    msgid ""
    "- **November.15.09**: 0.4.0 release\n"
    "    - Added new templating engine based on [tadpole](http://github.com/"
    "lsegal/tadpole)\n"
    "    - Added YARD queries (`--query` CLI argument to yardoc)\n"
    "    - Greatly expanded YARD documentation\n"
    "    - Added plugin support\n"
    "    - New `@abstract` and `@private` tags\n"
    "    - Changed default rake task to `rake yard`\n"
    "    - Read about changes in {file:docs/WhatsNew.md}"
    msgstr ""
    "- **November.15.09**: 0.4.0 release\n"
    "    - Added new templating engine based on [tadpole](http://github.com/lsegal/tadpole)\n"
    "    - Added YARD queries (`--query` CLI argument to yardoc)\n"
    "    - Greatly expanded YARD documentation\n"
    "    - Added plugin support\n"
    "    - New `@abstract` and `@private` tags\n"
    "    - Changed default rake task to `rake yard`\n"
    "    - Read about changes in {file:docs/WhatsNew.md}"
    
    #: ../README.md:504
    msgid ""
    "- **August.13.09**: 0.2.3.5 release\n"
    "    - Minor bug fixes."
    msgstr ""
    "- **August.13.09**: 0.2.3.5 release\n"
    "    - Minor bug fixes."
    
    #: ../README.md:507
    msgid ""
    "- **August.07.09**: 0.2.3.4 release\n"
    "    - Minor bug fixes."
    msgstr ""
    "- **August.07.09**: 0.2.3.4 release\n"
    "    - Minor bug fixes."
    
    #: ../README.md:510
    msgid ""
    "- **July.26.09**: 0.2.3.3 release\n"
    "    - Minor bug fixes."
    msgstr ""
    "- **July.26.09**: 0.2.3.3 release\n"
    "    - Minor bug fixes."
    
    #: ../README.md:513
    msgid ""
    "- **July.06.09**: 0.2.3.2 release\n"
    "    - Fix Textile hard-break issues\n"
    "    - Add description for @see tag to use as link title in HTML docs.\n"
    "    - Add --title CLI option to specify a title for HTML doc files.\n"
    "    - Add custom.css file that can be overridden with various custom\n"
    "      styelsheet declarations. To use this, simply add `default/fulldoc/html/"
    "custom.css`\n"
    "      inside your code directory and use the `-t` template directory yardoc "
    "CLI\n"
    "      option to point to that template directory (the dir holding "
    "'default').\n"
    "    - Add support in `yardoc` CLI to specify extra files (formerly --files)\n"
    "      by appending \"- extra files here\" after regular source files. "
    "Example:"
    msgstr ""
    "- **July.06.09**: 0.2.3.2 release\n"
    "    - Fix Textile hard-break issues\n"
    "    - Add description for @see tag to use as link title in HTML docs.\n"
    "    - Add --title CLI option to specify a title for HTML doc files.\n"
    "    - Add custom.css file that can be overridden with various custom\n"
    "      styelsheet declarations. To use this, simply add `default/fulldoc/html/custom.css`\n"
    "      inside your code directory and use the `-t` template directory yardoc CLI\n"
    "      option to point to that template directory (the dir holding 'default').\n"
    "    - Add support in `yardoc` CLI to specify extra files (formerly --files)\n"
    "      by appending \"- extra files here\" after regular source files. Example:"
    
    #: ../README.md:524
    msgid "            yardoc --private lib/**/*.rb - FAQ LICENSE"
    msgstr "            yardoc --private lib/**/*.rb - FAQ LICENSE"
    
    #: ../README.md:526
    msgid ""
    "- **Jun.13.09**: 0.2.3.1 release.\n"
    "    - Add a RubyGems 1.3.2+ plugin to generate YARD documentation instead "
    "of\n"
    "      RDoc. To take advantage of this plugin, set `has_rdoc = 'yard'` in "
    "your\n"
    "      .gemspec file."
    msgstr ""
    "- **Jun.13.09**: 0.2.3.1 release.\n"
    "    - Add a RubyGems 1.3.2+ plugin to generate YARD documentation instead of\n"
    "      RDoc. To take advantage of this plugin, set `has_rdoc = 'yard'` in your\n"
    "      .gemspec file."
    
    #: ../README.md:531
    msgid ""
    "- **Jun.07.09**: 0.2.3 release. See the {file:docs/WhatsNew.md} file for a\n"
    "  list of important new features."
    msgstr ""
    "- **Jun.07.09**: 0.2.3 release. See the {file:docs/WhatsNew.md} file for a\n"
    "  list of important new features."
    
    #: ../README.md:534
    msgid ""
    "- **Jun.16.08**: 0.2.2 release. This is the largest changset since yard's\n"
    "  conception and involves a complete overhaul of the parser and API to make "
    "it\n"
    "  more robust and far easier to extend and use for the developer."
    msgstr ""
    "- **Jun.16.08**: 0.2.2 release. This is the largest changset since yard's\n"
    "  conception and involves a complete overhaul of the parser and API to make it\n"
    "  more robust and far easier to extend and use for the developer."
    
    #: ../README.md:538
    msgid "- **Feb.20.08**: 0.2.1 release."
    msgstr "- **Feb.20.08**: 0.2.1 release."
    
    #: ../README.md:540
    msgid ""
    "- **Feb.24.07**: Released 0.1a experimental version for testing. The goal "
    "here is\n"
    "  to get people testing YARD on their code because there are too many "
    "possible\n"
    "  code styles to fit into a sane amount of test cases. It also demonstrates "
    "the\n"
    "  power of YARD and what to expect from the syntax (Yardoc style meta tags)."
    msgstr ""
    "- **Feb.24.07**: Released 0.1a experimental version for testing. The goal here is\n"
    "  to get people testing YARD on their code because there are too many possible\n"
    "  code styles to fit into a sane amount of test cases. It also demonstrates the\n"
    "  power of YARD and what to expect from the syntax (Yardoc style meta tags)."
    
    #: ../README.md:546
    msgid "## Contributors"
    msgstr "## 貢献者ã¸"
    
    #: ../README.md:548
    msgid ""
    "Special thanks to all contributors for submitting patches. A full list of\n"
    "contributors including their patches can be found at:"
    msgstr ""
    "パッãƒã®ç”³è«‹ã‚’ã—ãŸå…¨ã¦ã®è²¢çŒ®è€…ã¸æœ¬å½“ã«æ„Ÿè¬ã™ã‚‹ã€‚\n"
    "ã“れらã®ãƒ‘ッãƒã‚’投ã’ãŸå…¨ã¦ã®è²¢çŒ®è€…ã®ãƒªã‚¹ãƒˆã¯æ¬¡ã§è¦‹ã‚Œã‚‹:"
    
    #: ../README.md:551
    msgid "http://github.com/lsegal/yard/contributors"
    msgstr "http://github.com/lsegal/yard/contributors"
    
    #: ../README.md:553
    msgid "## Copyright"
    msgstr "## Copyright"
    
    #: ../README.md:555
    msgid ""
    "YARD © 2007-2012 by [Loren Segal](mailto:lsegal@soen.ca). YARD is\n"
    "licensed under the MIT license except for some files which come from the\n"
    "RDoc/Ruby distributions. Please see the {file:LICENSE} and {file:LEGAL}\n"
    "documents for more information."
    msgstr ""
    "YARD © 2007-2012 by [Loren Segal](mailto:lsegal@soen.ca). YARD is\n"
    "licensed under the MIT license except for some files which come from the\n"
    "RDoc/Ruby distributions. Please see the {file:LICENSE} and {file:LEGAL}\n"
    "documents for more information."
    
    # title
    #: ../docs/CodeObjects.md:1
    msgid "CodeObjects Architecture"
    msgstr "コードオブジェクト構造"
    
    #: ../docs/CodeObjects.md:3
    msgid "# CodeObjects Architecture"
    msgstr "# コードオブジェクト構造"
    
    #: ../docs/CodeObjects.md:5
    msgid ""
    "Code objects are Ruby objects that describe the code being documented. For "
    "instance,\n"
    "all classes, modules, methods, etc. are all extracted from the Ruby source "
    "as code\n"
    "objects. All of these code objects extend from the {YARD::CodeObjects::Base} "
    "class, which\n"
    "provides basic attributes like source location, source code, name and path."
    msgstr ""
    "コードオブジェクトã¯è¨˜è¿°ã•れã¦ã„るコードã®ç”¨é€”を説明ã™ã‚‹Rubyオブジェクトã¨ãª"
    "る。\n"
    "例ãˆã°ã€å…¨ã¦ã®ã‚¯ãƒ©ã‚¹,モジュール,メソッド等ã¯ã€\n"
    "コードオブジェクトã®ã‚ˆã†ã«Rubyã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰å…¨ã¦æŠ½å‡ºã•れる。\n"
    "ã“れらコードオブジェクトã®å…¨ã¦ã¯ã€{YARD::CodeObjects::Base}クラスã‹ã‚‰æ‹¡å¼µã™"
    "る。\n"
    "ãã—ã¦ã€ã‚½ãƒ¼ã‚¹ã®ä½ç½®ã‚„,ソースコードや,åå‰ã‚„,パスã®ã‚ˆã†ã«åŸºæœ¬å±žæ€§ã‚’æä¾›ã™ã‚‹ã€‚"
    
    #: ../docs/CodeObjects.md:10
    msgid "## CodeObjects Organization"
    msgstr "## コードオブジェクト機構"
    
    #: ../docs/CodeObjects.md:12
    msgid ""
    "Code objects are divided into two basic types. {YARD::CodeObjects::"
    "NamespaceObject NamespaceObjects}\n"
    "and non-namespace objects. A namespace object refers to any object in Ruby "
    "that can have\n"
    "other objects defined inside of it. In the context of Ruby, this "
    "specifically means\n"
    "modules and classes (both of which are subclasses of `NamespaceObject`). "
    "These objects\n"
    "act like tree structures, maintaining a list of all of their direct "
    "children. All non\n"
    "namespace objects are simply subclasses of the Base class. The {YARD::"
    "CodeObjects::RootObject RootObject}\n"
    "is a special kind of `NamespaceObject` which refers to the top level "
    "namespace in Ruby.\n"
    "Methods that accept a namespace object as a parameter should also accept the "
    "symbol\n"
    "`:root` as a shortcut for the root object."
    msgstr ""
    "コードオブジェクトã¯äºŒã¤ã®åŸºæœ¬çš„ãªæ–¹ã«åˆ†å‰²ã•れる。\n"
    "ãれã¯{YARD::CodeObjects::NamespaceObject NamespaceObjects}ã¨namespaceã§ã¯ãªã„オブジェクトã§ã‚る。\n"
    "namespace オブジェクトã¯\n"
    "ãã®å†…部ã§å®šç¾©ã•れãŸä»–ã®ã‚ªãƒ–ジェクトをæŒã¤äº‹ãŒã§ãã‚‹ä»»æ„ã®Rubyã®ã‚ªãƒ–ジェクトをå‚ç…§ã™ã‚‹ã€‚\n"
    "ã“れã¯ç‰¹ã«ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¨ã‚¯ãƒ©ã‚¹ã‚’æ„味ã™ã‚‹ã€‚\n"
    "( `NamespaceObject` ã®ã‚µãƒ–クラスã®ã©ã¡ã‚‰ã¨ã‚‚)\n"
    "ã“れらã®ã‚ªãƒ–ジェクトã¯ãƒ„リー構造ã®ã‚ˆã†ã«æŒ¯ã‚‹èˆžã„ã€ã“れらã®ç›´æŽ¥ã®å­å…¨ã¦ã®ãƒªã‚¹ãƒˆã‚’ç¶­æŒã—ã¦ã„る。\n"
    "namespaceã§ã¯ãªã„å…¨ã¦ã®ã‚ªãƒ–ジェクトã¯å˜ç´”ã«ãƒ™ãƒ¼ã‚¹ã‚¯ãƒ©ã‚¹ã®ã‚µãƒ–クラスã§ã‚る。\n"
    "{YARD::CodeObjects::RootObject RootObject} ã¯\n"
    "特別㪠`NamespaceObject` ã¨ã‚‚ã„ãˆã€Rubyã®ä¸­ã®ãƒˆãƒƒãƒ—レベルnamaspaceã‚’å‚ç…§ã™ã‚‹ã€‚\n"
    "パラメータã¨ã—㦠namespace オブジェクトをå—ã‘入れるメソッドã¯ã€\n"
    "root オブジェクト用ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã¨ã—㦠`:root` シンボルもå—ã‘入れる。"
    
    #: ../docs/CodeObjects.md:22
    msgid ""
    "The following is an overview of the classes within the `CodeObjects` "
    "namespace:"
    msgstr "以下㯠`CodeObjects` ã®namespaceã®ä¸­ã§ç”¨ã„ã‚‰ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã®æ¦‚è¦ã¨ãªã‚‹ã€‚"
    
    #: ../docs/CodeObjects.md:24
    msgid "![CodeObjects Class Diagram](images/code-objects-class-diagram.png)"
    msgstr "![CodeObjects Class Diagram](images/code-objects-class-diagram.png)"
    
    #: ../docs/CodeObjects.md:26
    msgid "## Unique Path Representation"
    msgstr ""
    "## ユニークパス表ç¾\n"
    "## Unique Path Representation"
    
    #: ../docs/CodeObjects.md:28
    msgid ""
    "All CodeObjects are uniquely defined by their implementation of {YARD::"
    "CodeObjects::Base#path}.\n"
    "This path is used to locate or store a code object in the {YARD::Registry}. "
    "It is therefore\n"
    "essential that any Base subclass return a unique String value for #path so "
    "that the\n"
    "object may co-exist with other objects in the Registry."
    msgstr ""
    "å…¨ã¦ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã¯\n"
    "ã“れらã®{YARD::CodeObjects::Base#path}ã®å®Ÿè£…ã«ã‚ˆã£ã¦å€‹åˆ¥ã«å®šç¾©ã•れる。\n"
    "ã“ã®ãƒ‘スã¯å ´æ‰€ã‚’示ã™ãŸã‚ã‚„ {YARD::Registry} ã®ä¸­ã§ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトを登録ã™ã‚‹ãŸã‚利用ã•れる\n"
    "ãれ故ã€ä»»æ„ã®åŸºæœ¬ã‚µãƒ–クラスãŒå€‹åˆ¥ã®#pathãƒ¡ã‚½ãƒƒãƒ‰ç”¨ã®æ–‡å­—列値を返ã™å¿…è¦ãŒã‚る。\n"
    "オブジェクトã¯ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã®ä¸­ã§ä»–ã®ã‚ªãƒ–ジェクトã¨ä¸€ç·’ã«å…±å­˜ã™ã‚‹äº‹ã«ãªã‚‹ã€‚"
    
    #: ../docs/CodeObjects.md:33
    msgid ""
    "In practice, a path is simply the conventional Ruby representation of a "
    "class,\n"
    "module, constant, class variable or method. For example, the following "
    "objects\n"
    "would have the following respective paths:"
    msgstr ""
    "実際ã®ãƒ‘スã¯ã€å˜ç´”ã«æ…£ç¿’çš„ãªRubyã®\n"
    "クラス,モジュール,定数,クラス変数,メソッドã®è¡¨ç¾ã¨ãªã‚‹ã€‚\n"
    "例ãˆã°ã€æ¬¡ã®ã‚ªãƒ–ジェクトã¯ã€å¾Œã«ç¶šã個別ã®ãƒ‘スをæŒã£ã¦ã„る。"
    
    #: ../docs/CodeObjects.md:37
    msgid ""
    "* Class `Klass` inside module `Mod`: `Mod::Klass`\n"
    "* Instance method `bar` inside class `Foo`: `Foo#bar`\n"
    "* Class method `bar` inside class `Foo`: `Foo.bar`\n"
    "* Constant `VERSION` inside class `YARD`: `YARD::VERSION`\n"
    "* Class variable `@@abc` inside class `A`: `A::@@abc`"
    msgstr ""
    "* `Mod` モジュールã®å†…部㮠`Klass` クラス: `Mod::Klass`\n"
    "* `Foo` クラスã®å†…部㮠`bar` インスタンスメソッド: `Foo#bar`\n"
    "* `Foo` クラスã®å†…部㮠`bar` クラスメソッド: `Foo.bar`\n"
    "* `YARD` クラス内部㮠`VARSION` 定数: `YARD::VERSION`\n"
    "* `A` クラス内部㮠`@@abc` クラス変数: `A::@@abc`"
    
    #: ../docs/CodeObjects.md:43
    msgid "## Registry"
    msgstr "## レジストリー"
    
    #: ../docs/CodeObjects.md:45
    msgid ""
    "CodeObjects classes are coupled with the {YARD::Registry} class which keeps "
    "track of\n"
    "all instantiated code objects. This is an explicit design choice to allow "
    "objects\n"
    "to be fetched, cached, imported and exported from a centralized location. As "
    "mentioned\n"
    "above, this coupling is a result of the fact that each object is uniquely "
    "identified by\n"
    "its path, which is used to implement lookups. You can read more about the "
    "registry\n"
    "in the {YARD::Registry} class."
    msgstr ""
    "コードオブジェクトクラス㯠{YARD::Registry} クラスを用ã„組ã¿åˆã‚ã•れã€\n"
    "ãã—ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れãŸã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ãƒˆãƒ©ãƒƒã‚¯ã‚’ä¿æŒã™ã‚‹ã€‚\n"
    "ã“れã¯é›†ä¸­åŒ–ã•れる場所ã‹ã‚‰ã€\n"
    "フェッãƒ,キャッシュ,インãƒãƒ¼ãƒˆ,エクスãƒãƒ¼ãƒˆã•れるオブジェクトを許å¯ã™ã‚‹ãŸã‚ã®\n"
    "é¸æŠžã‚’æ˜Žç¢ºã«è¨­è¨ˆã™ã‚‹ã€‚\n"
    "上ã§è¨€ã‚れãŸã€\n"
    "ã“ã®çµ„ã¿åˆã‚ã›ã¯å€‹ã€…ã®ã‚ªãƒ–ジェクトã®è¦ç´ ã®çµæžœãŒãã®ãƒ‘スã«ã‚ˆã£ã¦ç‹¬è‡ªã«è­˜åˆ¥ã•れ,\n"
    "検索を実装ã™ã‚‹ãŸã‚ã«åˆ©ç”¨ã•れる。\n"
    "レジストリーã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ {YARD::Registry} クラスã®ä¸­ã§èª­ã‚€ã“ã¨ãŒã§ãる。"
    
    #: ../docs/CodeObjects.md:52
    msgid "## Identity Map"
    msgstr "## Identity Map"
    
    #: ../docs/CodeObjects.md:54
    msgid ""
    "Code objects are instantiated using an identity-map like implementation that "
    "guarantees\n"
    "only one unique Ruby object exists for an object described by a specific "
    "path. This\n"
    "allows developers to create a code object without checking if it already "
    "exists in\n"
    "the {YARD::Registry}. The following example will only create one object:"
    msgstr ""
    "コードオブジェクトã¯identity-mapã«ã‚ˆã£ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れる。\n"
    "ã“れã¯ã€ç‰¹å®šã®ãƒ‘スã«ã‚ˆã£ã¦èª¬æ˜Žã•れるオブジェクトãŒ\n"
    "固有ã®Rubyオブジェクトã ã¨ä¿è¨¼ã™ã‚‹å®Ÿè£…ã®ã‚ˆã†ãªã‚‚ã®ã§ã‚る。\n"
    "æ—¢ã«{YARD::Registry}ã®ä¸­ã«å­˜åœ¨ã™ã‚‹å ´åˆ\n"
    "確èªç„¡ã—ã§ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトを作æˆã™ã‚‹ç‚ºã«é–‹ç™ºè€…é”ã‚’å—ã‘入れる\n"
    "次ã®ä¾‹ã¯ä¸€ã¤ã®ã‚ªãƒ–ジェクトã ã‘作æˆã™ã‚‹ã€‚"
    
    #: ../docs/CodeObjects.md:59
    msgid ""
    "    id = ClassObject.new(:root, \"MyClass\").object_id #=> 13352\n"
    "    ClassObject.new(:root, \"MyClass\").object_id #=> 13352"
    msgstr ""
    "    id = ClassObject.new(:root, \"MyClass\").object_id #=> 13352\n"
    "    ClassObject.new(:root, \"MyClass\").object_id #=> 13352"
    
    #: ../docs/CodeObjects.md:62
    msgid "## Proxy Objects"
    msgstr "## プロキシ オブジェクト"
    
    #: ../docs/CodeObjects.md:64
    msgid ""
    "In addition to providing access to existing objects, a {YARD::CodeObjects::"
    "Proxy}\n"
    "class exists which can represent an object at a path that may or may not "
    "have been\n"
    "created. This is necessary to represent a reference to an object in code "
    "that is\n"
    "never defined in the same body of source code, or perhaps defined later. If "
    "any\n"
    "attributes of a proxy are accessed, it will immediately be resolved to the "
    "object\n"
    "at its declared path. In the case where such an object exists, it will act "
    "as\n"
    "a delegate to the object. However, if the object does not exist, a warning "
    "will\n"
    "be raised. Whenever arbitrary code objects are used, care should be taken "
    "in\n"
    "order to make sure attributes are not accessed on unresolvable proxies. An\n"
    "unresolvable proxy will return a class name of `Proxy` and #type of `:"
    "proxy`,\n"
    "for example:"
    msgstr ""
    "ã•らã«ç¾åœ¨ã®ã‚ªãƒ–ジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã™ã‚‹ã«ã¯ã€\n"
    "{YARD::CodeObjects::Proxy} クラスãŒã‚る。\n"
    "ãれã¯ä½œæˆã•れるã‹ã©ã†ã‹ã¯ã‚ã‹ã‚‰ãªã„ãŒãƒ‘スã§ã‚ªãƒ–ジェクトを表ã›ã‚‹ã€‚\n"
    "ã“れã¯åŒã˜ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰å†…ã§å®šç¾©ã•れãªã„コードã§ã‚ªãƒ–ジェクトã¸ã®å‚照を表ã™ç‚ºã‚„ã€\n"
    "ã“ã¨ã«ã‚ˆã‚‹ã¨å¾Œã§å®šç¾©ã•れる時ã«å¿…è¦ã¨ãªã‚‹ã€‚\n"
    "ä»»æ„プロキシã®å±žæ€§ãŒã‚¢ã‚¯ã‚»ã‚¹ã•れる場åˆã€\n"
    "ã™ãã«å®£è¨€ã•れãŸãƒ‘スã§ã‚ªãƒ–ジェクトã®ç‚ºã«è§£æ±ºã•れる。\n"
    "オブジェクトãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ã‚ªãƒ–ジェクトã«å§”è­²ã™ã‚‹ã‚ˆã†ã«æŒ¯ã‚‹èˆžã†ã€‚\n"
    "ã—ã‹ã—ãªãŒã‚‰ã€ã‚ªãƒ–ジェクトãŒå­˜åœ¨ã—ãªã‹ã£ãŸå ´åˆã¯ã€è­¦å‘ŠãŒå‡ºã‚‹ã ã‚ã†ã€‚\n"
    "ä»»æ„ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトãŒåˆ©ç”¨ã•れる時ã¯ã„ã¤ã§ã‚‚ã€\n"
    "å±žæ€§ãŒæœªè§£æ±ºã®ãƒ—ロキシ上ã§ã‚¢ã‚¯ã‚»ã‚¹ã—ãªã„ã‹ç¢ºèªã™ã‚‹ç‚ºã«\n"
    "順番ã«ã•れるã®ã§æ³¨æ„ã—ãªã‘れã°ãªã‚‰ãªã„。\n"
    "未解決ã®ãƒ—ロキシ㯠`Proxy` ã®ã‚¯ãƒ©ã‚¹å㨠`:proxy` ã®#typeメソッドを返ã™ã€‚\n"
    "例ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ã«:"
    
    #: ../docs/CodeObjects.md:76
    msgid ""
    "    P(:InvalidObject).type == :proxy  #=> true\n"
    "    P(:InvalidObject).is_a?(Proxy)    #=> true"
    msgstr ""
    "    P(:InvalidObject).type == :proxy  #=> true\n"
    "    P(:InvalidObject).is_a?(Proxy)    #=> true"
    
    #: ../docs/CodeObjects.md:79
    msgid "## Adding Data to Code Objects"
    msgstr "## コードオブジェクトã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã€‚"
    
    #: ../docs/CodeObjects.md:81
    msgid ""
    "Code objects act as hash-like structures that allow any arbitrary value to "
    "be set.\n"
    "This allows easy extending of existing objects without creating custom "
    "subclasses.\n"
    "For instance, to add a timestamp to a method object (when it was modified, "
    "maybe),\n"
    "it is possible to simply do:"
    msgstr ""
    "コードオブジェクトã¯è¨­å®šã•れる為ã®ä»»æ„ã®å€¤ã‚’å—ã‘入れるãƒãƒƒã‚·ãƒ¥æ§‹é€ ã®ã‚ˆã†ã«æŒ¯"
    "る舞ã†ã€‚\n"
    "ã“れã¯ã€ã‚«ã‚¹ã‚¿ãƒ ã‚µãƒ–クラスを作æˆã™ã‚‹ã“ã¨ç„¡ã—ã§ã€æ—¢å­˜ã®ã‚ªãƒ–ジェクトã®ç°¡å˜ãªæ‹¡"
    "張をå—ã‘入れる。\n"
    "例ãˆã°ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚ªãƒ–ジェクトã«timestampを追加ã™ã‚‹ç‚ºã«ã¯ã€\n"
    "ä»¥ä¸‹ã®æ§˜ã«å˜ç´”ã«ã™ã‚‹äº‹ãŒå¯èƒ½ã€‚"
    
    #: ../docs/CodeObjects.md:86
    msgid ""
    "    object = MethodObject.new(:root, \"my_method\")\n"
    "    object[:modified_at] = Time.now"
    msgstr ""
    "    object = MethodObject.new(:root, \"my_method\")\n"
    "    object[:modified_at] = Time.now"
    
    #: ../docs/CodeObjects.md:89
    msgid ""
    "This value can now be retrieved on this object both by the hash `[]` syntax "
    "as\n"
    "well as like any other method:"
    msgstr ""
    "ã“ã®å€¤ã¯ãƒãƒƒã‚·ãƒ¥ã®ã‚ˆã†ãª `[]` æ§‹æ–‡ã§ã‚‚以下ã®ã‚ˆã†ãª\n"
    "メソッド呼ã³å‡ºã—ã§ã‚‚å–り出ã™äº‹ãŒå‡ºæ¥ã‚‹ã€‚"
    
    #: ../docs/CodeObjects.md:92
    msgid "    object.modified_at #=> 2009-06-03 20:08:46 -0400"
    msgstr "    object.modified_at #=> 2009-06-03 20:08:46 -0400"
    
    #: ../docs/CodeObjects.md:94
    msgid "## Creating a Custom CodeObject"
    msgstr "## カスタムコードオブジェクトを作æˆã™ã‚‹"
    
    #: ../docs/CodeObjects.md:96
    msgid ""
    "It should first be mentioned that creating a custom code object should not "
    "be\n"
    "necessary in most cases, except when functionality that cannot be "
    "represented\n"
    "by classical Ruby objects is added. A good example *might* be a test class,\n"
    "which although is technically a Ruby class, has a significantly different "
    "purpose\n"
    "in documentation and needs a different set of metadata, as well as its own\n"
    "representation in documentation."
    msgstr ""
    "カスタムコードオブジェクトを作æˆã™ã‚‹å‰ã«ã€æœ€åˆã«è¨€åŠã™ã¹ãã“ã¨ã¨ã—ã¦ã€\n"
    "大抵ã®å ´åˆã€ã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトを作æˆã™ã‚‹äº‹ã¯å¿…é ˆã§ã¯ãªã„ã¯ãšã§ã‚"
    "る。\n"
    "ã“ã®é …ã¯æ¨™æº–çš„ãªRubyオブジェクトã®è¿½åŠ ã«ã‚ˆã£ã¦è¡¨ç¾ã§ããªã„機能ãŒã‚る時ã®äº‹ã‚’"
    "予期ã™ã‚‹ã€‚\n"
    "ã„ã„例ã¯ã€testクラスã‹ã‚‚ã—れãªã„ã€\n"
    "ãれã¯ã€å½¢ã®ä¸Šã§ã¯Rubyã®ã‚¯ãƒ©ã‚¹ã ã‘れã©ã‚‚ã€\n"
    "中ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚„メタデータã®å…¥ã£ãŸç•°ãªã‚‹è¨­å®šã‚’å¿…è¦ã¨ã—\n"
    "ã‹ãªã‚Šç•°ãªã‚‹ç›®çš„ã‚’ã‚‚ã£ã¦ã„る。\n"
    "ãれ自身もドキュメントã®ä¸­ã‚’表ã—ã¦ã„る。"
    
    #: ../docs/CodeObjects.md:103
    msgid ""
    "The {YARD::CodeObjects::Base#path} implementation is the most important part "
    "of the\n"
    "code object architecture. The first thing any custom code object must "
    "guarantee is\n"
    "that its path value is unique among all other objects. The recommended way "
    "to do this\n"
    "with custom objects is to add a descriptive prefix to the path. For example, "
    "the\n"
    "following is an implementation of the path for a hypothetical `FooObject`:"
    msgstr ""
    "{YARD::CodeObjects::Base#path}ã®å®Ÿè£…ãŒã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆæ§‹é€ ã®æœ€ã‚‚é‡è¦ãªéƒ¨åˆ†ã§ã‚る。\n"
    "ã©ã®ã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã§ã‚‚最åˆã«ä¿è¨¼ã•れãªã‘れã°ãªã‚‰ãªã„事ã¯ã€\n"
    "パスã®å€¤ãŒä»–ã®å…¨ã¦ã®ã‚ªãƒ–ジェクトã¨ã®é–“ã§å›ºæœ‰ã§ãªã‘れã°ãªã‚‰ãªã„。\n"
    "ã“れを行ã†ã®ã«æŽ¨å¥¨ã•れる方法ã¯ã€\n"
    "カスタムオブジェクトãŒãƒ‘スã«èª¬æ˜Žã®ãƒ—レフィックス(接頭語)ã‚’\n"
    "追加ã™ã‚‹æ–¹æ³•ã§ã‚る。\n"
    "例ãˆã°ã€æ¬¡ã¯ä»®ã® `FooObject` 用ã®ãƒ‘スã®å®Ÿè£…ã¨ãªã‚‹ã€‚"
    
    #: ../docs/CodeObjects.md:109
    msgid ""
    "    def path\n"
    "      \"__FooPrefix\" + sep + super\n"
    "    end"
    msgstr ""
    "    def path\n"
    "      \"__FooPrefix\" + sep + super\n"
    "    end"
    
    #: ../docs/CodeObjects.md:113
    msgid ""
    "Note that if our FooObject is a `NamespaceObject`, meaning if it can have "
    "child\n"
    "FooObjects defined inside of it, you may need to verify that the prefix is "
    "only\n"
    "applied once."
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "ã‚‚ã—例ã®FooObjectãŒã€ `NamespaceObject` ã®å ´åˆã€\n"
    "FooObjectãŒãれã®å†…部ã§å®šç¾©ã•れるå­ã‚’æŒã¦ã‚‹ã‹ã©ã†ã‹æ„味ã—ã¦ã„る。\n"
    "一度ã ã‘é©ç”¨ã•れるプレフィックスを確èªã™ã‚‹ç‚ºã«å¿…è¦ãªå ´åˆãŒã‚る。"
    
    # title
    #: ../docs/GettingStarted.md:1
    msgid "Getting Started Guide"
    msgstr "å°Žå…¥ã®æ¡ˆå†…"
    
    #: ../docs/GettingStarted.md:3
    msgid "# Getting Started with YARD"
    msgstr "# YARDを使ã„å§‹ã‚ã‚‹ã«ã¯"
    
    #: ../docs/GettingStarted.md:5
    msgid ""
    "There are a few ways which YARD can be of use to you or your project. This\n"
    "document will cover the most common ways to use YARD:"
    msgstr ""
    "YARDã«ã¯ãƒ—ロジェクトã®åŠ©ã‘ã¨ãªã‚‹ã„ãã¤ã‹ã®ä½¿ç”¨æ–¹æ³•ãŒã‚ã‚‹ãŒã€\n"
    "ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ä»¥ä¸‹ã®ç›®æ¬¡ã§ä¸€èˆ¬çš„ãªYARDã®ä½¿ã„æ–¹ã«ã¤ã„ã¦èª¬æ˜Žã™ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:8
    msgid ""
    "* [Documenting Code with YARD](#docing)\n"
    "* [Using YARD to Generate Documentation](#using)\n"
    "* [Configuring YARD](#config)\n"
    "* [Extending YARD](#extending)\n"
    "* [Templating YARD](#templating)\n"
    "* [Plugin Support](#plugins)"
    msgstr ""
    "* [YARDã§æ–‡æ›¸ã‚’作る](#docing)\n"
    "* [ドキュメントを生æˆã™ã‚‹YARDã®ä½¿ã„æ–¹](#using)\n"
    "* [YARDã®æ§‹æˆã™ã‚‹](#config)\n"
    "* [YARDã®æ‹¡å¼µã™ã‚‹](#extending)\n"
    "* [YARDã®ãƒ†ãƒ³ãƒ—レートを作æˆã™ã‚‹](#templating)\n"
    "* [プラグインサãƒãƒ¼ãƒˆ](#plugins)"
    
    #: ../docs/GettingStarted.md:15
    msgid ""
    msgstr ""
    
    #: ../docs/GettingStarted.md:17
    msgid "## Documenting Code with YARD"
    msgstr "## YARDã§æ–‡æ›¸ã‚’作る"
    
    #: ../docs/GettingStarted.md:19
    msgid ""
    "By default, YARD is compatible with the same RDoc syntax most Ruby "
    "developers\n"
    "are already familiar with. However, one of the biggest advantages of YARD "
    "is\n"
    "the extended meta-data syntax, commonly known as \"tags\", that you can use\n"
    "to express small bits of information in a structured and formal manner. "
    "While\n"
    "RDoc syntax expects you to describe your method in a completely free-form\n"
    "manner, YARD recommends declaring your parameters, return types, etc. with\n"
    "the `@tag` syntax, which makes outputting the documentation more consistent\n"
    "and easier to read. Consider the RDoc documentation for a method to_format:"
    msgstr ""
    "デフォルトã§ã€YARDã¯å¤šãã®Ruby開発者ãŸã¡ãŒã™ã§ã«ã‚ˆã知ã£ã¦ã„ã‚‹\n"
    "RDocæ§‹æ–‡ã¨ä¸¡ç«‹ã§ãる。\n"
    "ã—ã‹ã—ãªãŒã‚‰ã€\n"
    "YARDã®æœ€ã‚‚大ããªåˆ©ç‚¹ã®ä¸€ã¤ã¯ã€æ‹¡å¼µã§ãるメタデータ構文ã¨ãªã‚‹ã€‚\n"
    "ãれã¯ã€ä¸€èˆ¬çš„ã«çŸ¥ã‚‰ã‚Œã‚‹\"ã‚¿ã‚°\"ã®ã‚ˆã†ã«ã€\n"
    "å°ã•ãã¦æ§‹é€ åŒ–ã•ã‚ŒãŸæƒ…å ±ã®ä¸­ã‚’明確ã«ã™ã‚‹ç‚ºã‚„\n"
    "å½¢å¼çš„ãªæ–¹æ³•ã§è¨˜è¿°ã™ã‚‹ç‚ºã«åˆ©ç”¨ã§ãる。\n"
    "ã•らã«ã€RDocæ§‹æ–‡ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’説明ã™ã‚‹ç‚ºã«å…¨ã¦ãƒ•リーフォームマナーã§è¦æ±‚ã™ã‚‹ãŒã€\n"
    "YARDã¯å®£è¨€ã—ã¦ã„るパラメータã€ãƒªã‚¿ãƒ¼ãƒ³ã‚¿ã‚¤ãƒ—ãªã©ã‚’ `@tag` 構文を用ã„ã¦ã€\n"
    "一貫ã—ãŸè¡¨ç¾ã§ç°¡å˜ã«èª­ã‚€ç‚ºã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œã‚Šã‚’推奨ã™ã‚‹ã€‚\n"
    "RDocã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®to_formatメソッドã«ã¤ã„ã¦è€ƒãˆã¦ã¿ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:28
    msgid ""
    "    # Converts the object into textual markup given a specific `format`\n"
    "    # (defaults to `:html`)\n"
    "    #\n"
    "    # == Parameters:\n"
    "    # format::\n"
    "    #   A Symbol declaring the format to convert the object to. This\n"
    "    #   can be `:text` or `:html`.\n"
    "    #\n"
    "    # == Returns:\n"
    "    # A string representing the object in a specified\n"
    "    # format.\n"
    "    #\n"
    "    def to_format(format = :html)\n"
    "      # format the object\n"
    "    end"
    msgstr ""
    "    # 原文ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®ä¸Žãˆã‚‰ã‚ŒãŸç‰¹å®šã® `format` ã¸ã‚ªãƒ–ジェクトを変æ›ã™ã‚‹\n"
    "    # (defaults to `:html`)\n"
    "    #\n"
    "    # == Parameters:\n"
    "    # format::\n"
    "    #   A Symbol declaring the format to convert the object to. This\n"
    "    #   can be `:text` or `:html`.\n"
    "    #\n"
    "    # == Returns:\n"
    "    # A string representing the object in a specified\n"
    "    # format.\n"
    "    #\n"
    "    def to_format(format = :html)\n"
    "      # format the object\n"
    "    end"
    
    #: ../docs/GettingStarted.md:44
    msgid ""
    "While this may seem easy enough to read and understand, it's hard for a "
    "machine\n"
    "to properly pull this data back out of our documentation. Also we've tied "
    "our\n"
    "markup to our content, and now our documentation becomes hard to maintain "
    "if\n"
    "we decide later to change our markup style (maybe we don't want the \":\" "
    "suffix\n"
    "on our headers anymore)."
    msgstr ""
    "ã“れã¯èª­ã‚“ã ã‚Šç†è§£ã™ã‚‹ã«ã¯ç°¡å˜ã¨æ€ã‚れるã‹ã‚‚ã—れãªã„ãŒã€\n"
    "機械ã«ã¨ã£ã¦ã¯ä¾‹ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å–æ¶ˆã—データをé©åˆ‡ã«å†é…ç½®\n"
    "ã™ã‚‹ã®ã¯å¤§å¤‰ã§ã‚る。(フリーフォームãªã®ã§)\n"
    "内容ã¨ç´ä»˜ã„ãŸãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã«ãªã£ã¦ã„ã‚‹ã®ã§ã€\n"
    "マークアップスタイルを変更ã™ã‚‹ã®ãŒå¾Œã§æ±ºã¾ã£ãŸå ´åˆã€\n"
    "例ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã™ãã«ç¶­æŒã™ã‚‹ã®ãŒå¤§å¤‰ã«ãªã‚‹\n"
    "(æã‚‰ãã€ç§é”ã¯ä¾‹ã®è¦‹å‡ºã—ã®ã‚µãƒ•ィックス\":\"を望んã§ã„ãªã„。)"
    
    #: ../docs/GettingStarted.md:50
    msgid "In YARD, we would simply define our method as:"
    msgstr "YARDã®ä¸­ã§ã€ç§é”ã¯ä¾‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å˜ç´”ã«å®šç¾©ã™ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:52
    msgid ""
    "    # Converts the object into textual markup given a specific format.\n"
    "    #\n"
    "    # @param [Symbol] format the format type, `:text` or `:html`\n"
    "    # @return [String] the object converted into the expected format.\n"
    "    def to_format(format = :html)\n"
    "      # format the object\n"
    "    end"
    msgstr ""
    "    # 原文ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®ä¸Žãˆã‚‰ã‚ŒãŸç‰¹å®šã®ãƒ•ォーマットã¸ã‚ªãƒ–ジェクトを変æ›ã™ã‚‹\n"
    "    #\n"
    "    # @param [Symbol] format the format type, `:text` or `:html`\n"
    "    # @return [String] the object converted into the expected format.\n"
    "    def to_format(format = :html)\n"
    "      # format the object\n"
    "    end"
    
    #: ../docs/GettingStarted.md:60
    msgid ""
    "Using tags we can add semantic metadata to our code without worrying about\n"
    "presentation. YARD will handle presentation for us when we decide to "
    "generate\n"
    "documentation later."
    msgstr ""
    "タグを用ã„ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€\n"
    "ç§é”ã¯(フリーフォームã§ã®)見栄ãˆã‚’æ°—ã«ã™ã‚‹ã“ã¨ãªã\n"
    "æ„味ã®ã‚るメタデータを追加ã™ã‚‹ã“ã¨ãŒã§ãる。\n"
    "ãã—ã¦YARDã¯å¾Œã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã¨æ±ºã‚ãŸæ™‚ã€\n"
    "見栄ãˆã‚’処ç†ã§ãる。"
    
    #: ../docs/GettingStarted.md:64
    msgid "## Which Markup Format?"
    msgstr "## ã©ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—フォーマット?"
    
    #: ../docs/GettingStarted.md:66
    msgid ""
    "YARD does not impose a specific markup. The above example uses standard "
    "RDoc\n"
    "markup formatting, but YARD also supports textile and markdown via the\n"
    "command-line switch or `.yardopts` file (see below). This means that you "
    "are\n"
    "free to use whatever formatting you like. This guide is actually written\n"
    "using markdown. YARD, however, does add a few important syntaxes that are\n"
    "processed no matter which markup formatting you use, such as tag support\n"
    "and inter-document linking. These syntaxes are discussed below."
    msgstr ""
    "YARDã¯ç‰¹å®šã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã‚’å¼·è¦ã—ãªã„。\n"
    "上ã®ä¾‹ã¯æ¨™æº–ã®RDocマークアップ書å¼ã‚’例ã¨ã—ã¦ä½¿ã£ãŸãŒã€\n"
    "ãれã ã‘ã§ã¯ãªãã€\n"
    "コマンドラインや `.yardopts` ファイル経由ã§texttileã¨markdownもサãƒãƒ¼ãƒˆã™ã‚‹(以下å‚ç…§)\n"
    "ã“ã‚ŒãŒæ„味ã™ã‚‹ã“ã¨ã¯ã€\n"
    "ã‚ãªãŸãŒå¥½ããªã©ã‚“ãªæ›¸å¼ã‚’使ãŠã†ã¨ã‚‚自由ã§ã‚る。\n"
    "ã“ã®ã‚¬ã‚¤ãƒ‰ã¯å®Ÿéš›ã«markdownを使ã£ã¦æ›¸ã‹ã‚Œã¦ã„る。\n"
    "ã¨ã‚‚ã‚れYARDã«ã¯ã„ãã¤ã‹ã®é‡è¦ãªæ§‹æ–‡ã‚’追加ã•れãŸã€‚\n"
    "ãれã¯ã€\n"
    " 1. ã‚ãªãŸä½¿ã†ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—書å¼ã§å•題ãªã処ç†ã•れる\n"
    " 2. ã‚¿ã‚°ã®æ§˜ãªã‚µãƒãƒ¼ãƒˆ\n"
    " 3. ドキュメント内部ã®ãƒªãƒ³ã‚¯\n"
    "ã§ã‚る。\n"
    "ã“ã‚Œã‚‰ã®æ§‹æ–‡ã¯ä»¥é™ã§èª¬æ˜Žã•れる。"
    
    #: ../docs/GettingStarted.md:74
    msgid "## Adding Tags to Documentation"
    msgstr "## ドキュメントã«ã¤ã‘られã¦ã„ã‚‹ã‚¿ã‚°"
    
    #: ../docs/GettingStarted.md:76
    msgid ""
    "The tag syntax that YARD uses is the same @tag-style syntax you may have "
    "seen\n"
    "if you've ever coded in Java, Python, PHP, Objective-C or a myriad of other\n"
    "languages. The following tag adds an author tag to your class:"
    msgstr ""
    "YARDãŒä½¿ã†ã‚¿ã‚°æ§‹æ–‡ã¯,ã‚‚ã—ã‚ãªãŸãŒä»Šã¾ã§\n"
    "Java, Python, PHP, Objective-Cã‚„ç„¡æ•°ã®ä»–ã®è¨€èªžã‚’プログラミングã—ãŸäº‹ãŒã‚れã°\n"
    "æ—¢ã«ã‚ãªãŸãŒè¦‹ãŸã“ã¨ãŒã‚ã‚‹@tagスタイルã¨åŒã˜æ§‹æ–‡ã§ã‚ã‚‹\n"
    "次ã®ã‚¿ã‚°ã¯authorã‚¿ã‚°ã‚’ã‚ãªãŸã®ã‚¯ãƒ©ã‚¹ã«è¿½åŠ ã™ã‚‹:"
    
    #: ../docs/GettingStarted.md:80
    msgid ""
    "    # @author Loren Segal\n"
    "    class MyClass\n"
    "    end"
    msgstr ""
    "    # @author Loren Segal\n"
    "    class MyClass\n"
    "    end"
    
    #: ../docs/GettingStarted.md:84
    msgid ""
    "To allow for large amounts of text, the @tag syntax will recognize any "
    "indented\n"
    "lines following a tag as part of the tag data. For example:"
    msgstr ""
    "大é‡ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’å—ã‘入れる為ã«ã€\n"
    "ã‚¿ã‚°æ§‹æ–‡ã¯ç¶šãインデントã•れãŸè¡Œã‚’タグデータã®ä¸€éƒ¨ã¨ã—ã¦èªè­˜ã™ã‚‹ã ã‚ã†ã€‚\n"
    "例ãˆã°ä»¥ä¸‹ã®æ§˜ã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:87
    msgid ""
    "    # @deprecated Use {#my_new_method} instead of this method because\n"
    "    #   it uses a library that is no longer supported in Ruby 1.9.\n"
    "    #   The new method accepts the same parameters.\n"
    "    def mymethod\n"
    "    end"
    msgstr ""
    "    # @deprecated Use {#my_new_method} instead of this method because\n"
    "    #   it uses a library that is no longer supported in Ruby 1.9.\n"
    "    #   The new method accepts the same parameters.\n"
    "    def mymethod\n"
    "    end"
    
    #: ../docs/GettingStarted.md:93
    msgid "### List of Tags"
    msgstr "### ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆ"
    
    #: ../docs/GettingStarted.md:95
    msgid "A list of tags can be found in {file:docs/Tags.md#taglist}"
    msgstr "ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã¯ {file:docs/Tags.md#taglist} ã§è¦‹ã¤ã‘られる。"
    
    #: ../docs/GettingStarted.md:97 ../docs/Tags.md:230
    msgid "### Reference Tags"
    msgstr "### å‚ç…§ã‚¿ã‚°"
    
    #: ../docs/GettingStarted.md:99
    msgid ""
    "To reduce the amount of duplication in writing documentation for repetitive\n"
    "code, YARD introduces \"reference tags\", which are not quite tags, but not\n"
    "quite docstrings either. In a sense, they are tag (and docstring) "
    "modifiers.\n"
    "Basically, any docstring (or tag) that begins with \"(see OTHEROBJECT)\" "
    "will\n"
    "implicitly link the docstring or tag to the \"OTHEROBJECT\", copying any "
    "data\n"
    "from that docstring/tag into your current object. Consider the example:"
    msgstr ""
    "繰り返ã—ã®å¤šã„ドキュメント中ã®é‡è¤‡ã®ç·é‡ã‚’減少ã•ã›ã‚‹ãŸã‚ã«ã€\n"
    "YARDã¯ã‚¿ã‚°ã§ã‚‚docstringsã§ã‚‚ãªã„\"å‚ç…§ã‚¿ã‚°\"ã‚’å°Žå…¥ã™ã‚‹ã€‚\n"
    "ã‚ã‚‹æ„味ã§ã€ãれらã®ã‚¿ã‚°(ã¨docstring)ã®ä¿®é£¾ã¨ãªã‚‹ã€‚\n"
    "基本的ã«ã¯ã€\"(see OTHEROBJECT)\"ã‹ã‚‰å§‹ã¾ã‚‹docstring(åˆã¯ã‚¿ã‚°)ã¯\n"
    "\"OTHEROBJECT\"ã«æš—黙的ã«ãƒªãƒ³ã‚¯ã•れる。ã“れã«ã‚ˆã£ã¦\n"
    "何らã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’docstringã‚„ã‚¿ã‚°ã‹ã‚‰ã‚ãªãŸã®ä½œæ¥­ã‚ªãƒ–ジェクトã®ä¸­ã¸ã‚³ãƒ”ーã™ã‚‹ã“"
    "ã¨ãŒã§ãる。\n"
    "例を考ãˆã¦ã¿ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:106
    msgid ""
    "    class MyWebServer\n"
    "      # Handles a request\n"
    "      # @param [Request] request the request object\n"
    "      # @return [String] the resulting webpage\n"
    "      def get(request) \"hello\" end"
    msgstr ""
    "    class MyWebServer\n"
    "      # リクエストをæ“作ã™ã‚‹\n"
    "      # @param [Request] request the request object\n"
    "      # @return [String] the resulting webpage\n"
    "      def get(request) \"hello\" end"
    
    #: ../docs/GettingStarted.md:112
    msgid ""
    "      # (see #get)\n"
    "      def post(request) \"hello\" end\n"
    "    end"
    msgstr ""
    "      # (see #get)\n"
    "      def post(request) \"hello\" end\n"
    "    end"
    
    #: ../docs/GettingStarted.md:116
    msgid ""
    "The above `#post` method takes the docstring and all tags (`param` and "
    "`return`)\n"
    "of the `#get` method. When you generate HTML documentation, you will see "
    "this\n"
    "duplication automatically, so you don't have to manually type it out. We "
    "can\n"
    "also add our own custom docstring information below the \"see\" reference, "
    "and\n"
    "whatever we write will be appended to the docstring:"
    msgstr ""
    "上㮠`#post` メソッド㯠`#get` メソッドã®docstrigã¨\n"
    "å…¨ã¦ã®ã‚¿ã‚°( `param` åŠã³ `return` )ã‚’å–å¾—ã™ã‚‹ã€‚\n"
    "HTMLドキュメントを生æˆã™ã‚‹æ™‚ã«ã¯ã€\n"
    "`#get` メソッドã®ã‚¿ã‚°ã®å†…容ãŒè‡ªå‹•çš„ã«è¤‡è£½ã•れるã®ã§ã€\n"
    "ã‚ãªãŸãŒæ‰‹ã§ã‚¿ã‚¤ãƒ—ã™ã‚‹å¿…è¦ã¯ç„¡ã„。\n"
    "ã¾ãŸ\"see\"ã®å‚ç…§ã®ä¸‹ã«ã€è‡ªåˆ†ã§ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã—ãŸdocstring情報を追加ã§ãる。\n"
    "ãã—ã¦ã€ä»¥ä¸‹ã®ä¾‹ã®æ§˜ã«ã€\n"
    "ç§é”ãŒæ›¸ãã‚‚ã®ãŒã©ã‚“ãªã‚‚ã®ã§ã‚‚ã€docstringã«è¿½åŠ ã•れる。"
    
    #: ../docs/GettingStarted.md:122
    msgid ""
    "    # (see #get)\n"
    "    # @note This method may modify our application state!\n"
    "    def post(request) self.state += 1; \"hello\" end"
    msgstr ""
    "    # (see #get)\n"
    "    # @note ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚¢ãƒ—リケーションã®çŠ¶æ…‹ãŒå¤‰æ›´ã•れるã‹ã‚‚ã—れãªã„\n"
    "    def post(request) self.state += 1; \"hello\" end"
    
    #: ../docs/GettingStarted.md:126
    msgid ""
    "Here we added another tag, but we could have also added plain text. The\n"
    "text must be appended *after* the `(see ...)` statement, preferably on\n"
    "a separate line."
    msgstr ""
    "ã“ã“ã§ã¯ä»–ã®ã‚¿ã‚°(@note)を追加ã—ãŸãŒã€ä»–ã«ç°¡å˜ãªãƒ†ã‚­ã‚¹ãƒˆã‚’æŒã¤ã“ã¨ã‚‚ã§ãる。\n"
    "ãã®æ™‚ã¯ã§ãれã°ãƒ†ã‚­ã‚¹ãƒˆã‚’ã€`(see ...)`ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®æ¬¡ã®è¡Œã«è¿½åŠ ã™ã¹ãã§ã‚る。"
    
    #: ../docs/GettingStarted.md:130
    msgid ""
    "Note that we don't have to \"refer\" the whole docstring. We can also link\n"
    "individual tags instead. Since \"get\" and \"post\" actually have different\n"
    "descriptions, a more accurate example would be to only refer our parameter\n"
    "and return tags:"
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "å¿…ãšã—ã‚‚docstring全体を\"å‚ç…§\"ã™ã‚‹å¿…è¦ã¯ãªãã€\n"
    "代ã‚りã«å€‹ã€…ã®ã‚¿ã‚°ã‚’リンクã™ã‚‹ã“ã¨ãŒã§ãる。\n"
    "実際ã«ç•°ãªã‚‹èª¬æ˜Žã‚’æŒã£ã¦ã„ã‚‹\"get\"ã¨\"post\"ã‹ã‚‰ã€\n"
    "より正確ãªä¾‹ã¯ãƒ‘ラメータやリターンタグå‚ç…§ã ã‘ã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:135
    msgid ""
    "    class MyWebServer\n"
    "      # Handles a GET request\n"
    "      # @param [Request] request the request object\n"
    "      # @return [String] the resulting webpage\n"
    "      def get(request) \"hello\" end"
    msgstr ""
    "    class MyWebServer\n"
    "      # GETリクエストをæ“作ã™ã‚‹\n"
    "      # @param [Request] request the request object\n"
    "      # @return [String] the resulting webpage\n"
    "      def get(request) \"hello\" end"
    
    #: ../docs/GettingStarted.md:141
    msgid ""
    "      # Handles a POST request\n"
    "      # @note This method may modify our application state!\n"
    "      # @param (see #get)\n"
    "      # @return (see #get)\n"
    "      def post(request) self.state += 1; \"hello\" end\n"
    "    end"
    msgstr ""
    "      # POSTリクエストをæ“作ã™ã‚‹\n"
    "      # @note This method may modify our application state!\n"
    "      # @param (see #get)\n"
    "      # @return (see #get)\n"
    "      def post(request) self.state += 1; \"hello\" end\n"
    "    end"
    
    #: ../docs/GettingStarted.md:148
    msgid ""
    "The above copies all of the param and return tags from `#get`. Note that "
    "you\n"
    "cannot copy individual tags of a specific type with this syntax."
    msgstr ""
    "ä¸Šã®æ§‹æ–‡ã¯ã€ `#get` ã‹ã‚‰@paramã‚¿ã‚°ã¨@returnã‚¿ã‚°ã®å…¨ã¦ã®æƒ…報をコピーã™ã‚‹ã€‚\n"
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "ã“ã®æ§‹æ–‡ã‚’用ã„ã¦ã‚‚特定ã®åž‹ã®å€‹ã€…ã®ã‚¿ã‚°ã‚’コピーã§ããªã„。"
    
    #: ../docs/GettingStarted.md:151
    msgid "## Declaring Types"
    msgstr "## 型を宣言ã™ã‚‹"
    
    #: ../docs/GettingStarted.md:153
    msgid ""
    "Some tags also have an optional \"types\" field which let us declare a list "
    "of\n"
    "types associated with the tag. For instance, a return tag can be declared\n"
    "with or without a types field."
    msgstr ""
    "ã„ãã¤ã‹ã®ã‚¿ã‚°ã¯çœç•¥å¯èƒ½ãª\"åž‹\"フィールドもæŒã¤ã€‚\n"
    "ãれã¯é–¢é€£ã™ã‚‹åž‹ã®ãƒªã‚¹ãƒˆã‚’宣言ã™ã‚‹å ´æ‰€ã¨ãªã‚‹ã€‚\n"
    "例ãˆã°ã€@returnã‚¿ã‚°ã¯ã€\n"
    "型フィールドãŒã‚ã£ã¦ã‚‚ãªãã¦ã‚‚宣言ã§ãる。"
    
    #: ../docs/GettingStarted.md:157
    msgid ""
    "    # @return [String, nil] the contents of our object or nil\n"
    "    #   if the object has not been filled with data.\n"
    "    def validate; end"
    msgstr ""
    "    # @return [String, nil] オブジェクトやnilã¨ãªã‚‹ã€‚\n"
    "    #   nilã¯ãƒ‡ãƒ¼ã‚¿ã¨å…±ã«å†…容ãŒå…¥ã£ã¦ã„ãªã„å ´åˆã«ãªã‚‹ã€‚(ã“ã“ã¾ã§returnã®ã‚³ãƒ¡"
    "ント)\n"
    "    def validate; end"
    
    #: ../docs/GettingStarted.md:161
    msgid ""
    "    # We don't care about the \"type\" here:\n"
    "    # @return the object\n"
    "    def to_obj; end"
    msgstr ""
    "    # ä»¥ä¸‹ã®æ§˜ã«\"åž‹\"ã‚’æ°—ã«ã™ã‚‹å¿…è¦ã¯ãªã„\n"
    "    # @return the object\n"
    "    def to_obj; end"
    
    #: ../docs/GettingStarted.md:165
    msgid ""
    "The list of types is in the form `[type1, type2, ...]` and is mostly free-"
    "form,\n"
    "so we can also specify duck-types or constant values. For example:"
    msgstr ""
    "ã“ã®åž‹ã®ãƒªã‚¹ãƒˆã¯ `[type1, type2, ...]` ã®å½¢å¼ã§ã‚る。\n"
    "ãã—ã¦å¤§éƒ¨åˆ†ã¯ãƒ•リーフォームã¨ãªã‚‹ã€‚\n"
    "ã—ãŸãŒã£ã¦ãƒ€ãƒƒã‚¯ã‚¿ã‚¤ãƒ—ã€åˆã¯ã€å®šæ•°ã‚’指定ã™ã‚‹ã€‚\n"
    "例ãˆã°ã€"
    
    #: ../docs/GettingStarted.md:168
    msgid ""
    "    # @param [#to_s] argname any object that responds to `#to_s`\n"
    "    # @param [true, false] argname only true or false"
    msgstr ""
    "    # @param [#to_s] argname any object that responds to `#to_s`\n"
    "    # @param [true, false] argname only true or false"
    
    #: ../docs/GettingStarted.md:171
    msgid ""
    "Note the latter example can be replaced by the meta-type \"Boolean\".\n"
    "Another meta-type is \"void\", which stands for \"no meaningful value\"\n"
    "and is used for return values. These meta-types are by convention\n"
    "only, but are recommended."
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "後ã®ä¾‹ã¯ã€ãƒ¡ã‚¿ã‚¿ã‚¤ãƒ—ã®\"Boolean\"ã«ã‚ˆã£ã¦ç½®æ›ã•れる。\n"
    "ä»–ã®ãƒ¡ã‚¿ã‚¿ã‚¤ãƒ—ã¯\"void\"ã§\"æ„味ã®ãªã„値\"用ã§ã‚ã‚Šã€æˆ»ã‚Šå€¤ç”¨ã«åˆ©ç”¨ã•れる。\n"
    "ã“れらã®ãƒ¡ã‚¿ã‚¿ã‚¤ãƒ—ã¯æ…£ç¿’ã§åˆ©ç”¨ã•れるã ã‘ã ãŒæŽ¨å¥¨ã•れる。"
    
    #: ../docs/GettingStarted.md:176
    msgid ""
    "List types can be specified in the form `CollectionClass`.\n"
    "For instance, consider the following Array that holds a set of Strings and\n"
    "Symbols:"
    msgstr ""
    "åž‹ã®ãƒªã‚¹ãƒˆã¯ã€`CollectionClass`å½¢å¼ã®ä¸­ã§æŒ‡å®šã•れるã“ã¨ãŒã§ãる。\n"
    "例ã¨ã—ã¦ã€ä»¥ä¸‹ã®Arrayã¯Stringãã—ã¦Symbolã®ã‚»ãƒƒãƒˆã‚’ã‚‚ã£ã¦ã„ã‚‹ã¨è€ƒãˆã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:180
    msgid ""
    "    # @param [Array] list the list of strings and symbols."
    msgstr "    # @param [Array] list the list of strings and symbols."
    
    #: ../docs/GettingStarted.md:182
    msgid ""
    "We mentioned that these type fields are \"mostly\" free-form. In truth, "
    "they\n"
    "are defined \"by convention\". To view samples of common type "
    "specifications\n"
    "and recommended conventions for writing type specifications, see\n"
    "[http://yardoc.org/types.html](http://yardoc.org/types.html). Note that "
    "these\n"
    "conventions may change every now and then, although we are working on a "
    "more\n"
    "\"formal\" type specification proposal."
    msgstr ""
    "我々ãŒè¿°ã¹ã¦ããŸã“れらã®ãƒ•ィールドã®åž‹ã¯æ®†ã©ãŒãƒ•リーフォームã§ã‚る。\n"
    "実ã®ã¨ã“ã‚,ãã‚Œã‚‰ã¯æ…£ç¿’ã«ã‚ˆã£ã¦å®šç¾©ã•れる。\n"
    "åž‹ã®æŒ‡å®šç”¨ã«ä¸€èˆ¬çš„ãªåž‹æŒ‡å®šã®ä¾‹ã‚„推奨ã•れる慣習を調ã¹ã‚‹ã«ã¯ã€\n"
    "[http://yardoc.org/types.html](http://yardoc.org/types.html)ã‚’å‚ç…§\n"
    "ã“ã‚Œã‚‰ã®æ…£ç¿’ã¯ã„ã¤ã®æ—¥ã‹å¤‰æ›´ã•れるã‹ã‚‚ã—れãªã„ã€\n"
    "ã‘れã©ã‚‚我々ã¯ã‚ˆã‚Šæ­£å¼ãªåž‹æŒ‡å®šã®ææ¡ˆã«å–りã‹ã‹ã£ã¦ã„る。"
    
    #: ../docs/GettingStarted.md:189
    msgid "## Documenting DSL Methods"
    msgstr "## DSLメソッドを記述ã™ã‚‹"
    
    #: ../docs/GettingStarted.md:191
    msgid ""
    "Application code in Ruby often makes use of DSL style metaprogrammed "
    "methods.\n"
    "The most common is the `attr_accessor` method, which of course has built-in\n"
    "support in YARD. However, frameworks and libraries often expose custom\n"
    "methods that perform similar metaprogramming tasks, and it is often useful\n"
    "to document their functionality in your application. Consider the "
    "`property`\n"
    "method in a project like [DataMapper](http://datamapper.org), which creates\n"
    "a typed attribute for a database model. The code might look like:"
    msgstr ""
    "Rubyã®ä¸­ã®ã‚¢ãƒ—リケーションコードã¯ã€\n"
    "DSLスタイルã®ãƒ¡ã‚¿ãƒ—ログラミングã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’よã利用ã™ã‚‹ã€‚\n"
    "最も一般的ãªã®ã¯ã€ `attr_accessor` メソッドã§ã€\n"
    "ã‚‚ã¡ã‚ã‚“YARDã®ä¸­ã§ãƒ“ルトインサãƒãƒ¼ãƒˆã•れã¦ã„る。\n"
    "ã¨ã¯ã„ã†ã‚‚ã®ã®ã€ãƒ•レームワークやライブラリã§ã¯ã€\n"
    "大抵似ãŸã‚ˆã†ãªãƒ¡ã‚¿ãƒ—ログラミング作業を実行ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒ ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ç›®ã«ã™ã‚‹ã€‚\n"
    "ãã—ã¦ã€ãれã¯ã‚¢ãƒ—リケーションã®ä¸­ã«ã‚る機能を記述ã™ã‚‹ç‚ºã«ä¾¿åˆ©ã§ã‚る。\n"
    "[DataMapper](http://datamapper.org)ã®ã‚ˆã†ã«ãƒ—ロジェクトã®ä¸­ã® `property` メソッドを考ãˆã€\n"
    "ãã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¢ãƒ‡ãƒ«ç”¨ã®å±žæ€§ã®åž‹ã‚’作æˆã™ã‚‹ã¨\n"
    "ã‚³ãƒ¼â€‹â€‹ãƒ‰ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:199 ../docs/GettingStarted.md:209
    #: ../docs/GettingStarted.md:263 ../docs/GettingStarted.md:293
    msgid ""
    "    class Post\n"
    "      include DataMapper::Resource"
    msgstr ""
    "    class Post\n"
    "      include DataMapper::Resource"
    
    #: ../docs/GettingStarted.md:202
    msgid ""
    "      property :title, String\n"
    "    end"
    msgstr ""
    "      property :title, String\n"
    "    end"
    
    #: ../docs/GettingStarted.md:205
    msgid ""
    "As of version 0.7.0, YARD will automatically pick up on these basic methods "
    "if\n"
    "you document them with a docstring. Therefore, simply adding some comments "
    "to\n"
    "the code will cause it to generate documentation:"
    msgstr ""
    "0.7.0ç‰ˆã®æ™‚点ã§ã€ã‚‚ã—ã‚ãªãŸãŒä»Šã¾ã§ç´¹ä»‹ã—ãŸä¾‹ã®docstringを記述ã—ãŸå ´åˆã€\n"
    "YARDã¯çµ„ã¿è¾¼ã¿ã®åŸºæœ¬ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å–å¾—ã™ã‚‹ã ã‚ã†ã€‚\n"
    "ã—ãŸãŒã£ã¦ã€ç°¡å˜ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã—ã„ãã¤ã‹ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã™ã‚‹ã«ã¯ã€\n"
    "ä»¥ä¸‹ã®æ§˜ã«è¨˜è¿°ã§ãる。"
    
    #: ../docs/GettingStarted.md:212
    msgid ""
    "      # @return [String] the title property of the post\n"
    "      property :title, String\n"
    "    end"
    msgstr ""
    "      # @return [String] the title property of the post\n"
    "      property :title, String\n"
    "    end"
    
    #: ../docs/GettingStarted.md:216
    msgid ""
    "Note that YARD uses the first argument in the method call to determine the\n"
    "method name. In some cases, this would not be the method name, and you "
    "would\n"
    "need to declare it manually. You can do so with the `@!method` directive:"
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "YARDã¯ãƒ¡ã‚½ãƒƒãƒ‰åを決定ã™ã‚‹ã®ã«ã€ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã®æœ€åˆã«å¼•数を使ã†ã€‚\n"
    "ã‚‚ã—ã€ã“れãŒãƒ¡ã‚½ãƒƒãƒ‰åã§ãªã„å ´åˆã€æ‰‹å‹•ã§å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚る。\n"
    "下ã®`@method`ã‚¿ã‚°ã§å®£è¨€ã‚’行ã†ã“ã¨ãŒã§ãる。"
    
    #: ../docs/GettingStarted.md:220
    msgid ""
    "    # @!method foo\n"
    "    create_a_foo_method"
    msgstr ""
    "    # @!method foo\n"
    "    create_a_foo_method"
    
    #: ../docs/GettingStarted.md:223
    msgid ""
    "The @!method directive can also accept a full method signature with "
    "parameters:"
    msgstr ""
    "@!method 命令ã¯\n"
    "完全ãªãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚·ã‚°ãƒãƒãƒ£å—ã‘入れる事もã§ãる。"
    
    #: ../docs/GettingStarted.md:225
    msgid ""
    "    # @!method foo(name, opts = {})\n"
    "    create_a_foo_method"
    msgstr ""
    "    # @!method foo(name, opts = {})\n"
    "    create_a_foo_method"
    
    #: ../docs/GettingStarted.md:228
    msgid ""
    "You can also set visibility and scope, or modify the method signature with\n"
    "extra tags. The following adds documentation for a private class method:"
    msgstr ""
    "ã‚ãªãŸã¯å¯è¦–性やスコープも設定ã§ããŸã‚Šã€\n"
    "追加ã®ã‚¿ã‚°ã‚’用ã„メソッド用法を変更ã§ãる。\n"
    "以下ã¯ã€privateクラスメソッドã«å¯¾ã—ã¦ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«è¿½åŠ ã™ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:231
    msgid ""
    "    # @!method foo(opts = {})\n"
    "    # The foo method!\n"
    "    # @!scope class\n"
    "    # @!visibility private\n"
    "    create_a_private_foo_class_method"
    msgstr ""
    "    # @!method foo(opts = {})\n"
    "    # The foo method!\n"
    "    # @!scope class\n"
    "    # @!visibility private\n"
    "    create_a_private_foo_class_method"
    
    #: ../docs/GettingStarted.md:237
    msgid ""
    "Finally, you can tag a method as an attribute by replacing the @!method\n"
    "tag with @!attribute. The @!attribute directive allows for the flags [r], "
    "[w],\n"
    "or [rw] to declare a readonly, writeonly, or readwrite attribute, "
    "respectively."
    msgstr ""
    "最終的ã«ã€@!attributeタグを用ã„@!methodã‚¿ã‚°ã‚’\n"
    "ç½®æ›ã™ã‚‹äº‹ã«ã‚ˆã£ã¦å±žæ€§ã®æ§˜ã«ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚¿ã‚°ãŒå‡ºæ¥ã‚‹ã€‚\n"
    "読ã¿è¾¼ã¿å°‚用,書込ã¿å°‚用,èª­ã¿æ›¸ãOK,å€‹ã€…ã«æŒ‡å®šã‚’宣言ã™ã‚‹ç‚ºã«\n"
    "@!attirbute指令ã¯[r], [w], [rw]フラグ用ã«å—ã‘入れる\n"
    
    #: ../docs/GettingStarted.md:241
    msgid ""
    "    # @!attribute [w]\n"
    "    # The writeonly foo attribute!\n"
    "    a_writeonly_attribute :foo"
    msgstr ""
    "    # @!attribute [w]\n"
    "    # The writeonly foo attribute!\n"
    "    a_writeonly_attribute :foo"
    
    #: ../docs/GettingStarted.md:245
    msgid ""
    "(Note that if the name can be automatically detected, you do not need to\n"
    "specify it in the @!method or @!attribute directives)"
    msgstr ""
    "(次ã®ã“ã¨ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "åå‰ãŒè‡ªå‹•ã§èªã‚られる場åˆã€@!methodã‚„@!attributeã‚¿ã‚°ã®è¨˜å…¥ã‚’\n"
    "å¿…è¦ã¨ã—ãªã„ã“ã¨ã«æ³¨æ„ã™ã‚‹ã€‚)"
    
    #: ../docs/GettingStarted.md:248
    msgid "However, you will notice a few drawbacks with this basic support:"
    msgstr ""
    "ã¨ã¯ã„ã†ã‚‚ã®ã®ã€ã‚ãªãŸã¯ã“ã®åŸºæœ¬ã‚µãƒãƒ¼ãƒˆã®å‚™ãˆã‚‹ã„ãã¤ã‹ã®æ¬ ç‚¹ã«æ°—ã¥ãã ã‚"
    "ã†ã€‚"
    
    #: ../docs/GettingStarted.md:250
    msgid ""
    "1. There is a fair bit of duplication in such documentation. Specifically, "
    "we\n"
    "   repeat the term String and title twice in the property example.\n"
    "2. We must write a code comment for this property to show up in the "
    "documentation.\n"
    "   If we do not write a comment, it is ignored."
    msgstr ""
    "1. ã“ã®ã‚ˆã†ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯é‡è¤‡ã‚’å°‘ã—æ•´å½¢ã™ã‚‹ã€‚\n"
    "   具体的ã«ã¯ã€ç¹°ã‚Šè¿”ã—ã®String用語やproperty例ã®ä¸­ã®2度目ã®ã‚¿ã‚¤ãƒˆãƒ«\n"
    "2. ç§é”ã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«è¡¨ç¤ºã™ã‚‹ç‚ºã€propertyã§ã‚³ãƒ¼ãƒ‰ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’書ã‹ãªã‘れã°ãª"
    "らãªã„。\n"
    "   コメントを書ã‹ãªã„å ´åˆã€ãれã¯ç„¡è¦–ã•れる。"
    
    #: ../docs/GettingStarted.md:255
    msgid "### Macros"
    msgstr "### マクロ"
    
    #: ../docs/GettingStarted.md:257
    msgid ""
    "Fortunately YARD 0.7.0 also adds macros, a powerful way to add support for\n"
    "these DSL methods on the fly without writing extra plugins. Macros allow\n"
    "you to interpolate arguments from the method call inside the docstring,\n"
    "reducing duplication. If we re-wrote the `property` example from above\n"
    "using a macro, it might look like:"
    msgstr ""
    "幸é‹ã«ã‚‚ã€YARD 0.7.0ã¯ãƒžã‚¯ãƒ­ã‚‚追加ã™ã‚‹ã€‚\n"
    "ã“れらã®DSLメソッドã¯ä½™è¨ˆãªãƒ—ラグインを記述ã™ã‚‹ã“ã¨ãªã\n"
    "オンザフライã§ã‚µãƒãƒ¼ãƒˆã‚’追加ã™ã‚‹ç‚ºã®å¼·åŠ›ãªæ–¹æ³•ã¨ãªã‚‹ã€‚\n"
    "マクロã¯é‡è¤‡ã‚’減らã—ãŸã‚Šã€docstring内部ã®ãƒ¡ã‚½ãƒƒãƒ‰\n"
    "呼ã³å‡ºã—ã‹ã‚‰å¼•数を挿入ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã™ã‚‹ã€‚\n"
    "ã‚‚ã—ç§é”ãŒã€ä¾‹ã®`property`をマクロを用ã„ã¦æ›¸ãç›´ã—ãŸå ´åˆã¯ã€\n"
    "次ã®ã‚ˆã†ã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:266
    msgid ""
    "      # @!macro dm.property\n"
    "      # @return [$2] the $1 $0 of the post\n"
    "      property :title, String\n"
    "    end"
    msgstr ""
    "      # @!macro dm.property\n"
    "      # @return [$2] the $1 $0 of the post\n"
    "      property :title, String\n"
    "    end"
    
    #: ../docs/GettingStarted.md:271
    msgid ""
    "(Note that $0 represents the method call, in this case `property`. The rest\n"
    "are arguments in the method call.)"
    msgstr ""
    "(次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "$0ã¯ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—を表ã™ã€ã“ã®å ´åˆã¯`property`ã¨ãªã‚‹ã€‚\n"
    "残りã¯ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã®å¼•æ•°ã¨ãªã‚‹ã€‚)"
    
    #: ../docs/GettingStarted.md:274
    msgid ""
    "The above example is equivalent to the first version shown in the previous\n"
    "section. There is also some extra benefit to using this macro, in that we\n"
    "can re-apply it to any other property in our class by simply calling on\n"
    "the macro. The following:"
    msgstr ""
    "上ã®ä¾‹ã¯ã€å‰é …ã®ä¸­ã®æœ€åˆã®è¨³æ–‡ã¨ç­‰ã—ã„。\n"
    "ã“ã®ãƒžã‚¯ãƒ­ã‚’使ã†ã“ã¨ã«ã‚ˆã£ã¦ã„ãã¤ã‹ã®ç‰¹åˆ¥ãªæ©æµã‚‚ã‚る。\n"
    "ãれã¯ã€ãƒžã‚¯ãƒ­ã‚’ç°¡å˜ã«å‘¼ã³å‡ºã™ã“ã¨ã«ã‚ˆã£ã¦ã€\n"
    "例ã®ã‚¯ãƒ©ã‚¹ã®ä¸­ã®ä»–ã®propertyã«æœ€é©ç”¨ã§ãる。\n"
    "以下ã®ä¾‹ã¯ã€"
    
    #: ../docs/GettingStarted.md:279
    msgid ""
    "    # @!macro dm.property\n"
    "    property :view_count, Integer"
    msgstr ""
    "    # @!macro dm.property\n"
    "    property :view_count, Integer"
    
    #: ../docs/GettingStarted.md:282
    msgid "Would be equivalent to:"
    msgstr "下ã¨åŒç­‰ã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:284
    msgid ""
    "    # @return [Integer] the view_count property of the post\n"
    "    property :view_count, Integer"
    msgstr ""
    "    # @return [Integer] the view_count property of the post\n"
    "    property :view_count, Integer"
    
    #: ../docs/GettingStarted.md:287
    msgid ""
    "Finally, macros can be \"attached\" to method calls, allowing them to be "
    "implicitly\n"
    "activated every time the method call is seen in the source code of the "
    "class,\n"
    "or an inheriting class. By simply adding the `[attach]` flag, the macro\n"
    "becomes implicit on future calls. All of the properties below get "
    "documented\n"
    "by using this snippet:"
    msgstr ""
    "最終的ã«ã€ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã®ç‚ºã«\"追加\"ã•れるマクロã¯ã€\n"
    "クラスや継承クラスã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®ä¸­ã§è¦‹ã‚‰ã‚Œã‚‹ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã‚’\n"
    "ã„ã¤ã§ã‚‚èµ·å‹•ã§ãる様ã«å®Ÿè£…ã•れる。\n"
    "å˜ã« `[attach]` フラグを追加ã™ã‚‹ã“ã¨ã§ã€\n"
    "ãã®ãƒžã‚¯ãƒ­ã¯å°†æ¥ã®å‘¼ã³å‡ºã—ã§æš—黙的ã«å‘¼ã³å‡ºã•れる。\n"
    "下記ã®ã™ã¹ã¦ã®propertyã¯ã€ã“ã®ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’使用ã—ã¦ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:296
    msgid ""
    "      # @!macro [attach] dm.property\n"
    "      # @return [$2] the $1 $0 of the post\n"
    "      property :title, String\n"
    "      property :view_count, Integer\n"
    "      property :email, String\n"
    "    end"
    msgstr ""
    "      # @!macro [attach] dm.property\n"
    "      # @return [$2] the $1 $0 of the post\n"
    "      property :title, String\n"
    "      property :view_count, Integer\n"
    "      property :email, String\n"
    "    end"
    
    #: ../docs/GettingStarted.md:303
    msgid ""
    "You can read more about macros in the {file:docs/Tags.md Tags Overview} "
    "document."
    msgstr ""
    "ã‚‚ã£ã¨ãƒžã‚¯ãƒ­ã«ã¤ã„ã¦çŸ¥ã‚ŠãŸã„å ´åˆã¯\n"
    "{file:docs/Tags.md Tags Overview}ドキュメントã®ä¸­ã§èª­ã‚€ã“ã¨ãŒã§ãる。"
    
    #: ../docs/GettingStarted.md:305
    msgid "## Customized YARD Markup"
    msgstr "## YARDマークアップã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º"
    
    #: ../docs/GettingStarted.md:307
    msgid ""
    "YARD supports a special syntax to link to other code objects, URLs, files,\n"
    "or embed docstrings between documents. This syntax has the general form\n"
    "of `{Name OptionalTitle}` (where `OptionalTitle` can have spaces, but "
    "`Name`\n"
    "cannot)."
    msgstr ""
    "YARDã¯ä»–ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã€URLã€ãƒ•ァイルã€\n"
    "ドキュメントã®é–“ã§çµ„ã¿è¾¼ã‚€docstringã¸ã®ãƒªãƒ³ã‚¯ã®ç‰¹åˆ¥ãªæ§‹æ–‡ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã€‚\n"
    "ã“ã®æ§‹æ–‡ã¯ã€`{Name OptionalTitle}`ã®ä¸€èˆ¬çš„ãªåž‹ã‚’æŒã£ã¦ã„る。\n"
    "(`OptionalTitle`内ã§ã‚¹ãƒšãƒ¼ã‚¹ã‚’入れるã“ã¨ã¯ã§ãã‚‹ãŒã€\n"
    " `Name`ã¯å…¥ã‚Œã‚‹ã“ã¨ãŒã§ããªã„)"
    
    #: ../docs/GettingStarted.md:312
    msgid "### Linking Objects `{...}`"
    msgstr "### オブジェクトã®ãƒªãƒ³ã‚¯ `{...}`"
    
    #: ../docs/GettingStarted.md:314
    msgid ""
    "To link another \"object\" (class, method, module, etc.), use the format:"
    msgstr ""
    "ä»–ã®\"オブジェクト\"(クラスã€ãƒ¡ã‚½ãƒƒãƒ‰ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã€ etc.)ã¸ã®ãƒªãƒ³ã‚¯ã«ã¯ã€\n"
    "ä»¥ä¸‹ã®æ›¸å¼ã‚’使ã†:"
    
    #: ../docs/GettingStarted.md:316
    msgid ""
    "    {ObjectName#method OPTIONAL_TITLE}\n"
    "    {Class::CONSTANT My constant's title}\n"
    "    {#method_inside_current_namespace}"
    msgstr ""
    "    {ObjectName#method OPTIONAL_TITLE}\n"
    "    {Class::CONSTANT My constant's title}\n"
    "    {#method_inside_current_namespace}"
    
    #: ../docs/GettingStarted.md:320
    msgid ""
    "Without an explicit title, YARD will use the relative path to the object as\n"
    "the link name. Note that you can also use relative paths inside the object\n"
    "path to refer to an object inside the same namespace as your current "
    "docstring."
    msgstr ""
    "明確ãªã‚¿ã‚¤ãƒˆãƒ«ãŒç„¡ã„時ã€YARDã¯ã‚ªãƒ–ジェクトã®ãƒªãƒ³ã‚¯åã«ç›¸å¯¾ãƒ‘スを使ã†ã€‚\n"
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "ç¾åœ¨ã®docstringã®ã‚ˆã†ã«åŒã˜namespace内ã«ã‚るオブジェクトをå‚ç…§ã™ã‚‹ç‚ºã«ã€\n"
    "ãã®ã‚ªãƒ–ジェクトパス内ã§ç›¸å¯¾ãƒ‘スを使ãˆã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:324
    msgid ""
    "Note that the `@see` tag automatically links its data. You should not use\n"
    "the link syntax in this tag:"
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚`@see`ã‚¿ã‚°ã¯è‡ªå‹•リンクã¨ãªã‚‹ã®ã§ã€\n"
    "ã“ã®ã‚¿ã‚°ã®ãªã‹ã§ãƒªãƒ³ã‚¯æ§‹æ–‡ã‚’使ã†ã¹ãã§ã¯ãªã„。"
    
    #: ../docs/GettingStarted.md:327
    msgid ""
    "    # @see #methodname   <- Correct.\n"
    "    # @see {#methodname} <- Incorrect."
    msgstr ""
    "    # @see #methodname   <- æ­£.\n"
    "    # @see {#methodname} <- 誤."
    
    #: ../docs/GettingStarted.md:330
    msgid "If you want to use a Hash, prefix the first { with \"!\":"
    msgstr ""
    "ã‚‚ã—ã‚ãªãŸãŒãƒãƒƒã‚·ãƒ¥ã‚’使ã†ç‚ºã«ãƒ—レフィックスã«ã€\n"
    "最åˆã®{ãŒã»ã—ã„å ´åˆ\"!\"を一緒ã«ã¤ã‘る。"
    
    #: ../docs/GettingStarted.md:332
    msgid "   # !{ :some_key => 'value' }"
    msgstr "   # !{ :some_key => 'value' }"
    
    #: ../docs/GettingStarted.md:334
    msgid "### Linking URLs `{http://...}`"
    msgstr "### URLã®ãƒªãƒ³ã‚¯ `{http://...}`"
    
    #: ../docs/GettingStarted.md:336
    msgid "URLs are also linked using this `{...}` syntax:"
    msgstr "URLã¯ã“ã®`{...}`構文を用ã„リンクã•れる。"
    
    #: ../docs/GettingStarted.md:338
    msgid ""
    "    {http://example.com Optional Title}\n"
    "    {mailto:email@example.com}"
    msgstr ""
    "    {http://example.com Optional Title}\n"
    "    {mailto:email@example.com}"
    
    #: ../docs/GettingStarted.md:341
    msgid "### Linking Files `{file:...}`"
    msgstr "### ファイルã®ãƒªãƒ³ã‚¯ `{file:...}`"
    
    #: ../docs/GettingStarted.md:343
    msgid ""
    "Files can also be linked using this same syntax but by adding the `file:`\n"
    "prefix to the object name. Files refer to extra readme files you added\n"
    "via the command-line. Consider the following examples:"
    msgstr ""
    "ファイルもåŒã˜æ§‹æ–‡ã‚’使ã£ã¦ãƒªãƒ³ã‚¯ã•れるã€\n"
    "ã—ã‹ã—ã€ã‚ªãƒ–ジェクトåã®ãƒ—レフィックスã«`file:`ãŒè¿½åŠ ã•れる。\n"
    "ファイルã¯ã‚ãªãŸãŒã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³çµŒç”±ã§è¿½åŠ ã—ãŸç‰¹åˆ¥ãªreadmeファイルをå‚ç…§ã™"
    "る。\n"
    "次ã®ä¾‹ã‚’考ãˆã¦ã¿ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:347
    msgid ""
    "    {file:docs/GettingStarted.md Getting Started}\n"
    "    {file:mypage.html Name#anchor}"
    msgstr ""
    "    {file:docs/GettingStarted.md Getting Started}\n"
    "    {file:mypage.html Name#anchor}"
    
    #: ../docs/GettingStarted.md:350
    msgid ""
    "As shown, you can also add an optional `#anchor` if the page is an HTML link."
    msgstr ""
    "上ã®ã‚ˆã†ã«ã€\n"
    "ãã®ãƒšãƒ¼ã‚¸ãŒHTMLリンクå¯èƒ½ãªå ´åˆã¯çœç•¥å¯èƒ½ãª`#anchor`を追加ã§ãる。"
    
    #: ../docs/GettingStarted.md:352
    msgid "### Embedding Docstrings `{include:...}`"
    msgstr "### Docstringã®çµ„ã¿è¾¼ã¿ `{include:...}`"
    
    #: ../docs/GettingStarted.md:354
    msgid ""
    "We saw the `(see ...)` syntax above, which allowed us to link an entire "
    "docstring\n"
    "with another. Sometimes, however, we just want to copy docstring text "
    "without\n"
    "tags. Using the same `{...}` syntax, but using the `include:` prefix, we "
    "can\n"
    "embed a docstring (minus tags) at a specific point in the text."
    msgstr ""
    "ç§é”ã¯ä¸Šã®`{see ...}`構文を見ãŸãŒã€\n"
    "ãれã¯ä»–ã¨ä¸€ç·’ã«docstring丸ã”ã¨ãƒªãƒ³ã‚¯ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ãŸã€‚\n"
    "ã¨ã¯ã„ã†ã‚‚ã®ã®ã€ã‚¿ã‚°ãªã—ã§docstringã®ãƒ†ã‚­ã‚¹ãƒˆã‚³ãƒ”ーã®ã¿æ¬²ã—ã„å ´åˆãŒã‚る。\n"
    "ãã“ã§ã€åŒã˜`{...}`æ§‹æ–‡ã¨`include:`プレフィックスを用ã„ã‚‹ã¨ã€\n"
    "テキストã®ç‰¹å®šã®å ´æ‰€ã§ã€ã‚¿ã‚°ãªã—ã®docstringを組ã¿è¾¼ã‚€ã“ã¨ãŒã§ãる。"
    
    #: ../docs/GettingStarted.md:359
    msgid ""
    "    # This class is cool\n"
    "    # @abstract\n"
    "    class Foo; end"
    msgstr ""
    "    # This class is cool\n"
    "    # @abstract\n"
    "    class Foo; end"
    
    #: ../docs/GettingStarted.md:363
    msgid ""
    "    # This is another class. {include:Foo} too!\n"
    "    class Bar; end"
    msgstr ""
    "    # This is another class. {include:Foo} too!\n"
    "    class Bar; end"
    
    #: ../docs/GettingStarted.md:366
    msgid "The docstring for Bar becomes:"
    msgstr "docstringã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:368
    msgid "    \"This is another class. This class is cool too!\""
    msgstr "    \"This is another class. This class is cool too!\""
    
    #: ../docs/GettingStarted.md:370
    msgid "### Embedding Files `{include:file:...}`"
    msgstr "### ファイルã®åŸ‹ã‚込㿠`{include:file:...}`"
    
    #: ../docs/GettingStarted.md:372
    msgid ""
    "You can embed the contents of files using `{include:file:path/to/file}`,\n"
    "similar to the `{include:OBJECT}` tag above. If the file uses a specific "
    "markup\n"
    "type, it will be applied and embedded as marked up text. The following\n"
    "shows how the tag can be used inside of comments:"
    msgstr ""
    "`{include:file:path/to/file}`ã¯ä¸Šã®`{include:OBJECT}`ã‚¿ã‚°ã¨åŒæ§˜ã«\n"
    "使ã†äº‹ã«ã‚ˆã£ã¦ãƒ•ァイルã®å†…容を埋ã‚込む事ãŒã§ãる。\n"
    "ファイルãŒç‰¹å®šã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®åž‹ã‚’使ã†å ´åˆã¯,\n"
    "マークアップテキストã¨ã—ã¦åŸ‹ã‚è¾¼ã¾ã‚Œé©ç”¨ã•れる。\n"
    "次ã¯ã‚³ãƒ¡ãƒ³ãƒˆã®å†…部ã§åˆ©ç”¨ã•れるタグã«ã©ã®ã‚ˆã†ãªã‚‚ã®ãŒã‚ã‚‹ã‹ä¸€è¦§ã™ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:377
    msgid ""
    "    # Here is an example of a highlighted Ruby file:\n"
    "    #\n"
    "    # {include:file:examples/test.rb}"
    msgstr ""
    "    # ã“れã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れãŸRubyã®ãƒ•ァイルã®ä¾‹ã§ã‚ã‚‹\n"
    "    #\n"
    "    # {include:file:examples/test.rb}"
    
    #: ../docs/GettingStarted.md:381
    msgid "### Rendering Objects `{render:...}`"
    msgstr "### オブジェクトã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚° `{render:...}`"
    
    #: ../docs/GettingStarted.md:383
    msgid ""
    "Entire objects can also be rendered in place in documentation. This can be\n"
    "used for guide-style documentation which does not document the entire "
    "source\n"
    "tree, but instead selectively renders important classes or methods. "
    "Consider\n"
    "the following documentation inside of a README file:"
    msgstr ""
    "å…¨ã¦ã®ã‚ªãƒ–ジェクトã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®é©å½“ãªä½ç½®ã«è¡¨ç¤ºã•れる。\n"
    "{render:...}ã¯ã‚¬ã‚¤ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆç”¨ã«ä½¿ã‚れるãŒ\n"
    "ãれã¯å…¨ã¦ã®ã‚½ãƒ¼ã‚¹ãƒ„リーを記述ã—ãªã„。\n"
    "ã—ã‹ã—ã€ä»£ã‚りã«é‡è¦ãªã‚¯ãƒ©ã‚¹ã‚„ãƒ¡ã‚½ãƒƒãƒ‰ã‚’é¸æŠžçš„ã«è¡¨ç¤ºã™ã‚‹ã€‚\n"
    "以下ã®READMEファイルã®å†…部ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’考ãˆã¦ã¿ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:388
    msgid ""
    "    !!!plain\n"
    "    = igLatinPay!"
    msgstr ""
    "    !!!plain\n"
    "    = igLatinPay!"
    
    #: ../docs/GettingStarted.md:391
    msgid ""
    "    This library adds pig latin methods to the string class, allowing you\n"
    "    to transform sentences into pig latin."
    msgstr ""
    "    ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯string classã®ç‚ºã«pig latinメソッドを追加ã™ã‚‹ã€‚\n"
    "    pig latinã¸æ–‡ã‚’変æ›ã™ã‚‹äº‹ã‚’å¯èƒ½ã«ã™ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:394
    msgid "    {render:String#pig_latin}"
    msgstr "    {render:String#pig_latin}"
    
    #: ../docs/GettingStarted.md:396
    msgid "    You can also un-pig-latin-ify a word or sentence:"
    msgstr "    ã‚ãªãŸã¯å˜èªžã‚„æ–‡ã‚’ä»¥ä¸‹ã®æ§˜ã«pig-latinã«ã—ãªã„ã“ã¨ã‚‚ã§ãる。"
    
    #: ../docs/GettingStarted.md:398
    msgid "    {render:String#de_pig_latin}"
    msgstr "    {render:String#de_pig_latin}"
    
    #: ../docs/GettingStarted.md:400
    msgid ""
    "The above would render the methods in place inside the README document,\n"
    "allowing you to summarize a small library in a single file."
    msgstr ""
    "上ã®ã‚ˆã†ã«æ›¸ãã¨ã€READMEドキュメント内部ã®{}ã®ä¸­ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’表示ã™ã‚‹ã€‚\n"
    "ã“れã«ã‚ˆã£ã¦ã€ä¸€ã¤ã®ãƒ•ァイルã®ä¸­ã«ãƒ©ã‚¤ãƒ–ラリã®èª¬æ˜Žã‚’è¦ç´„ã§ãる。"
    
    #: ../docs/GettingStarted.md:403
    msgid ""
    msgstr ""
    
    #: ../docs/GettingStarted.md:405
    msgid "## Using YARD to Generate Documentation"
    msgstr "## ドキュメントを生æˆã™ã‚‹YARDã®ä½¿ã„æ–¹"
    
    #: ../docs/GettingStarted.md:407
    msgid "### `yard` Executable"
    msgstr "### 実行å¯èƒ½ãª`yard`コマンド"
    
    #: ../docs/GettingStarted.md:409
    msgid ""
    "YARD ships with a single executable aptly named `yard`. In addition to\n"
    "generating standard documentation for your project, you would use this tool\n"
    "if you wanted to:"
    msgstr ""
    "YARDã¯å˜ä¸€ã§é©åˆ‡ã«å®Ÿè¡Œå¯èƒ½ãª'yard'コマンドã¨ã—ã¦é€ã‚Šå‡ºã™ã€‚\n"
    "ã‚ãªãŸã®ãƒ—ロジェクトã®ç‚ºã®æ¨™æº–ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã“ã¨ã«åŠ ãˆã€\n"
    "次ã®ãƒ„ールも使ãˆã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:413
    msgid ""
    "* Document all installed gems\n"
    "* Run a local documentation server\n"
    "* Generate UML diagrams using [Graphviz][graphviz]\n"
    "* View `ri`-style documentation\n"
    "* Diff your documentation\n"
    "* Analyze documentation statistics."
    msgstr ""
    "* å…¨ã¦ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã®ã‚¸ã‚§ãƒ ã‚’記述ã™ã‚‹\n"
    "* ローカルドキュメントサーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹\n"
    "* [Graphviz][graphviz]ã«ã‚ˆã£ã¦UML図を生æˆã™ã‚‹\n"
    "* `ri`スタイルドキュメントを一覧ã™ã‚‹\n"
    "* ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å·®åˆ†ã‚’見る\n"
    "* ドキュメントã®çµ±è¨ˆã‚’è§£æžã™ã‚‹"
    
    #: ../docs/GettingStarted.md:420
    msgid ""
    "The following commands are available in YARD 0.6.x (see `yard help` for a\n"
    "full list):"
    msgstr ""
    "以下ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€YARD 0.6.xã§åˆ©ç”¨ã§ãる。\n"
    "(`yard help`コマンドã§å…¨ã¦ã®ãƒªã‚¹ãƒˆãŒè¦‹ã‚Œã‚‹)"
    
    #: ../docs/GettingStarted.md:423
    msgid "    Usage: yard  [options]"
    msgstr ""
    "    !!!plain\n"
    "    Usage: yard <コマンド> [オプション...]"
    
    #: ../docs/GettingStarted.md:425
    msgid ""
    "    Commands:\n"
    "    config   Views or edits current global configuration\n"
    "    diff     Returns the object diff of two gems or .yardoc files\n"
    "    doc      Generates documentation\n"
    "    gems     Builds YARD index for gems\n"
    "    graph    Graphs class diagram using Graphviz\n"
    "    help     Retrieves help for a command\n"
    "    ri       A tool to view documentation in the console like `ri`\n"
    "    server   Runs a local documentation server\n"
    "    stats    Prints documentation statistics on a set of files"
    msgstr ""
    "    Commands:\n"
    "    config   設定を見るã‹ã€ç¾åœ¨ã®å…¨ä½“çš„ãªæ§‹æˆã‚’編集ã™ã‚‹\n"
    "    diff     2ã¤ã®gemsã¾ãŸã¯ã€'.yardoc'ファイルã®ã‚ªãƒ–ジェクトã®å·®åˆ†ã‚’è¿”ã™\n"
    "    doc      ドキュメントを生æˆã™ã‚‹\n"
    "    gems     gemsã«YARDã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’組ã¿è¾¼ã‚€\n"
    "    graph    Graphvizを用ã„ã¦ã‚¯ãƒ©ã‚¹å›³ã‚’図示ã™ã‚‹\n"
    "    help     ヘルプコマンド\n"
    "    ri       `ri`ã®ã‚ˆã†ã«ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã®ä¸­ã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’作æˆã™ã‚‹\n"
    "    server   ローカルãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã‚µãƒ¼ãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹\n"
    "    stats    設定ã—ãŸãƒ•ァイルã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’出力ã™ã‚‹"
    
    #: ../docs/GettingStarted.md:436
    msgid ""
    "Note that `yardoc` is an alias for `yard doc`, and `yri` is an alias for\n"
    "`yard ri`. These commands are maintained for backwards compatibility."
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "`yardoc`ã¯ã€`yard doc`コマンドã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§,\n"
    "`yri`ã¯`yard ri`コマンドã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¨ãªã‚‹ã€‚\n"
    "ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å¾Œæ–¹äº’æ›ãŒç¶­æŒã•れã¦ã„る。"
    
    #: ../docs/GettingStarted.md:439
    msgid "### `.yardopts` Options File"
    msgstr "### `.yardopts` 設定ファイル"
    
    #: ../docs/GettingStarted.md:441
    msgid ""
    "Unless your documentation is very small, you'll end up needing to run "
    "`yardoc`\n"
    "with many options.  The `yardoc` tool will use the options found in this "
    "file.\n"
    "It is recommended to check this in to your repository and distribute it "
    "with\n"
    "your source. This file is placed at the root of your project (in the "
    "directory\n"
    "you run `yardoc` from) and contains all of arguments you would otherwise "
    "pass\n"
    "to the command-line tool. For instance, if you often type:"
    msgstr ""
    "ドキュメントãŒå°ã•ããªã„é™ã‚Šã€\n"
    "çµå±€`yardoc`コマンドã¨ä¸€ç·’ã«ãŸãã•ã‚“ã®è¨­å®šã‚’å¿…è¦ã¨ã—ã¦ã„ã‚‹ã ã‚ã†ã€‚\n"
    "`yardoc`コマンドã¯.yardoptsファイルã®ä¸­ã§è¦‹ã¤ã‘ãŸè¨­å®šã‚’使ã†ã€‚\n"
    "ãã®ç‚ºã€ã‚ãªãŸã®ãƒªãƒã‚¸ãƒˆãƒªã«å…¥ã‚Œã¦ã‚½ãƒ¼ã‚¹ã¨ä¸€ç·’ã«é…布ã™ã‚‹ã“ã¨ã‚’推奨ã™ã‚‹ã€‚\n"
    "ã“ã®ãƒ•ァイルã¯ã‚ãªãŸã®ãƒ—ロジェクトã®ãƒ«ãƒ¼ãƒˆã«ä½ç½®ã™ã‚‹ã€‚\n"
    "(ã‚ãªãŸãŒ`yardoc`ã‚’èµ·å‹•ã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ä¸­ã‹ã‚‰ã®)\n"
    "ãã—ã¦ã€å…¨ã¦ã®å¼•æ•°ã‚’å«ã‚“ã§ãªã‘れã°ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã§ã¯ãƒ‘スã—ãªã„ã ã‚ã†ã€‚\n"
    "例ãˆã°ã€ä»¥ä¸‹ã‚’よãタイプã™ã‚‹ãªã‚‰ã°ã€"
    
    #: ../docs/GettingStarted.md:448
    msgid "    yardoc --no-private --protected app/**/*.rb - README LEGAL COPYING"
    msgstr "    yardoc --no-private --protected app/**/*.rb - README LEGAL COPYING"
    
    #: ../docs/GettingStarted.md:450
    msgid "You can place the following into your `.yardopts`:"
    msgstr "下ã®å†…容を`.yardopts`ã®ä¸­ã¸æ›¸ãã“ã¨ã§è¨­å®šã§ãる。"
    
    #: ../docs/GettingStarted.md:452
    msgid "    --no-private --protected app/**/*.rb - README LEGAL COPYING"
    msgstr "    --no-private --protected app/**/*.rb - README LEGAL COPYING"
    
    #: ../docs/GettingStarted.md:454
    msgid "This way, you only need to type:"
    msgstr "ã“ã®æ–¹æ³•を用ã„ã‚‹ã¨ã€ä»¥ä¸‹ã‚’タイプã™ã‚‹ã ã‘ã§ã‚ˆã„。"
    
    #: ../docs/GettingStarted.md:456
    msgid "    yardoc"
    msgstr "    yardoc"
    
    #: ../docs/GettingStarted.md:458
    msgid ""
    "Any extra switches passed to the command-line now will be appended to your\n"
    "`.yardopts` options."
    msgstr "ã‚ãªãŸã®`.yardopts`設定ã«ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã«æ¸¡ã•れãŸå¼•æ•°ã¯è¿½åŠ ã•れる。"
    
    #: ../docs/GettingStarted.md:461
    msgid ""
    "Note that options for `yardoc` are discussed in the {file:README.md "
    "README},\n"
    "and a full overview of the `.yardopts` file can be found in {YARD::CLI::"
    "Yardoc}."
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "`yardoc`用ã®ã‚ªãƒ—ション㯠{file:README.md README} ã®ä¸­ã§èª¬æ˜Žã•れる。\n"
    "å…¨ã¦ã®`.yardopts`ãƒ•ã‚¡ã‚¤ãƒ«ã®æ¦‚è¦ã¯ {YARD::CLI::Yardoc} ã®ä¸­ã§è¦‹ã¤ã‘られる。"
    
    #: ../docs/GettingStarted.md:464
    msgid "### Documenting Extra Files"
    msgstr "### 追加ã®ãƒ•ァイルを記述ã™ã‚‹"
    
    #: ../docs/GettingStarted.md:466
    msgid ""
    "\"Extra files\" are extra guide style documents that help to give a brief "
    "overview\n"
    "of how to use your library/framework, as well as any extra information that\n"
    "might be vital for your users. The most common \"extra file\" is the "
    "README,\n"
    "which is automatically detected by YARD if found in the root of your "
    "project\n"
    "(any file starting with `README*`). You can specify extra files on the "
    "command\n"
    "line (or in the `.yardopts` file) by listing them after the '-' separator:"
    msgstr ""
    "\"Extra files\"ã¯ãƒ©ã‚¤ãƒ–ラリやフレームワークã§ä½¿ã†ã®ã«ã‚‚ã€\n"
    "ユーザーã«ã¨ã£ã¦ã®ä½•らã‹ã®ç‰¹åˆ¥ãªæƒ…å ±ã«ã‚‚ã€\n"
    "ç°¡å˜ãªæ¦‚è¦ã‚’æä¾›ã™ã‚‹ã“ã¨ã‚’助ã‘ã‚‹\n"
    "追加ã®ã‚¬ã‚¤ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¨ãªã‚‹ã€‚\n"
    "最も一般的ãª\"extra file\"ã¯READMEã§ã€\n"
    "ãれã¯ã€ã‚‚ã—ã‚ãªãŸã®ãƒ—ロジェクトã®ãƒ«ãƒ¼ãƒˆã®ä¸­ã§è¦‹ã¤ã‘ãŸå ´åˆã€YARDã«ã‚ˆã£ã¦è‡ªå‹•"
    "ã§æ¤œå‡ºã™ã‚‹ã€‚\n"
    "(`README*`ã§å§‹ã¾ã‚‹ä½•らã‹ã®ãƒ•ァイル)\n"
    "以下ã®ç”¨ã«ã€è¿½åŠ ã®ãƒ•ァイルã®å‰ã«'-'セパレータを記述ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦\n"
    "コマンドライン上ã§(åˆã¯,`.yardopts`ファイル内ã§)指定ã§ãる。"
    
    #: ../docs/GettingStarted.md:473
    msgid "    yardoc lib/**/*.rb ext/**/*.c - LICENSE.txt"
    msgstr "    yardoc lib/**/*.rb ext/**/*.c - LICENSE.txt"
    
    #: ../docs/GettingStarted.md:475
    msgid ""
    "Note that the README will automatically be picked up, so you do not need to\n"
    "specify it. If you don't want to modify the default file globs, you can "
    "ignore\n"
    "the first set of arguments:"
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "READMEã¯ã€è‡ªå‹•ã§é¸æŠžã•れる。\n"
    "従ã£ã¦ã€ãれを指定ã™ã‚‹å¿…è¦ã¯ãªã„。\n"
    "ã‚‚ã—デフォルトã®ãƒ•ァイルglobを変更ã—ãªã„ãªã‚‰\n"
    "最åˆã«è¨­å®šã™ã‚‹å¼•æ•°ã¯ç„¡è¦–ã§ãる。"
    
    #: ../docs/GettingStarted.md:479
    msgid "    yardoc - LICENSE.txt"
    msgstr "    yardoc - LICENSE.txt"
    
    #: ../docs/GettingStarted.md:481
    msgid ""
    "Below you can read about how to customize the look of these extra files, "
    "both\n"
    "with markup and pretty titles."
    msgstr ""
    "以é™ã¯è¿½åŠ ã®ãƒ•ァイルをカスタマイズã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦èª­ã‚€ã“ã¨ãŒã§ãる。\n"
    "ã“れã«ã‚ˆã£ã¦ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã‚„ã„ã„タイトル両方を使用ã§ãる。"
    
    #: ../docs/GettingStarted.md:484
    msgid "#### Adding Meta-Data to Extra Files"
    msgstr "#### 追加ã®ãƒ•ァイルã«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹"
    
    #: ../docs/GettingStarted.md:486
    msgid ""
    "You can add YARD-style `@tag` metadata to the top of any extra file if "
    "prefixed\n"
    "by a `#` hash comment. YARD allows for arbitrary meta-data, but pays "
    "special\n"
    "attention to the tags `@markup`, `@encoding`, and `@title`. Note that there\n"
    "cannot be any whitespace before the tags. Here is an example of some tag "
    "data\n"
    "in a README:"
    msgstr ""
    "`#`ã®ãƒãƒƒã‚·ãƒ¥ã‚³ãƒ¡ãƒ³ãƒˆã«ã‚ˆã£ã¦ãƒ—レフィックスã—ãŸå ´åˆã€\n"
    "ä»»æ„ã®è¿½åŠ ã®ãƒ•ァイルã®ãƒˆãƒƒãƒ—ã«YARDスタイルã®`@tag`メタデータを追加ã§ãる。\n"
    "YARDã¯ä»»æ„ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘入れる。\n"
    "ã—ã‹ã—`@markup`,`@encoding`,`@title`ã‚¿ã‚°ã«ã¯ç‰¹åˆ¥ãªæ³¨æ„を払ã‚ãªã‘れã°ãªã‚‰ãªã„。\n"
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "ã‚¿ã‚°ã®å‰ã«ç©ºç™½ãŒã‚ã£ã¦ã¯ãªã‚‰ãªã„。\n"
    "ã“れã¯READMEã®ä¸­ã®ã„ãã¤ã‹ã®ã‚¿ã‚°ãƒ‡ãƒ¼ã‚¿ã®ä¾‹:"
    
    #: ../docs/GettingStarted.md:492
    msgid ""
    "    # @markup markdown\n"
    "    # @title The Best Library in the World!\n"
    "    # @author The Author Name"
    msgstr ""
    "    # @markup markdown\n"
    "    # @title The Best Library in the World!\n"
    "    # @author The Author Name"
    
    #: ../docs/GettingStarted.md:496
    msgid "    This is the best library you will ever meet. Lipsum ..."
    msgstr "    ã“れã¯ã‚ãªãŸãŒå‡ºä¼šã†æœ€é«˜ã®ãƒ©ã‚¤ãƒ–ラリã¨ãªã‚‹ã€‚以下略..."
    
    #: ../docs/GettingStarted.md:498
    msgid ""
    "The `@markup` tag allows you to specify a markup format to use for the "
    "file,\n"
    "including \"markdown\", \"textile\", \"rdoc\", \"ruby\", \"text\", \"html\", "
    "or \"none\"\n"
    "(no markup). This can be used when the markup cannot be auto-detected using\n"
    "the extension of the filename, if the file has no extension, or if you want\n"
    "to override the auto-detection."
    msgstr ""
    "`@markup`ã‚¿ã‚°ã¯ã€\"markdown\", \"textile\", \"rdoc\", \"ruby\", \n"
    "\"text\", \"html\", \"none\"(no markup)ã‚’å«ã‚“ã§ã„るファイルを扱ãˆã‚‹ã‚ˆã†ã€\n"
    "マークアップ書å¼ã®æŒ‡å®šã‚’å¯èƒ½ã«ã™ã‚‹ã€‚\n"
    "ã“ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã¯ãƒ•ァイルåã®æ‹¡å¼µå­ã‚’自動検出ã§ããªã‹ã£ãŸæ™‚ã‚„ã€\n"
    "ファイルåã®æ‹¡å¼µå­ãŒãªã„時やã€\n"
    "ã‚ãªãŸãŒ(æ‹¡å¼µå­ã®)自動検出を上書ãã—ãŸã„時ã«ä½¿ã‚れる。"
    
    #: ../docs/GettingStarted.md:504
    msgid ""
    "By using `@encoding` you can specify a non-standard encoding. Note that\n"
    "`yardoc --charset` sets the global encoding (for all comments / files),\n"
    "so if you are using unicode across all your files, you can specify it "
    "there.\n"
    "Using the `@encoding` tag might be used to override the default global\n"
    "charset, say, if you had a localized `README.jp` file with SJIS data.\n"
    "Also note that this only affects Ruby 1.9.x, as Ruby 1.8 is not properly\n"
    "encoding aware."
    msgstr ""
    "`@encoding`を使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€\n"
    "ã‚ãªãŸã¯éžæ¨™æº–ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’指定ã§ãる。\n"
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "`yardoc --charset`ã¯å…¨ä½“ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’設定ã™ã‚‹(å…¨ã¦ã®ã‚³ãƒ¡ãƒ³ãƒˆ/ファイル)ã€\n"
    "ãªã®ã§ã€ã‚‚ã—ã‚ãªãŸãŒå…¨ã¦ã®ãƒ•ァイルã§ãƒ¦ãƒ‹ã‚³ãƒ¼ãƒ‰ã‚’使ã£ã¦ã„ã‚‹ãªã‚‰ã“れを指定ã§ãる。\n"
    "例ãˆã°ã€ãƒ­ãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã—ãŸ`README.jp`ファイルã¨SJISデータをもã£ã¦ã„ãŸã‚‰\n"
    "`@encoding`タグを使ã†ã“ã¨ã«ã‚ˆã£ã¦ã€default global charsetを上書ãã™ã‚‹ç‚ºã«\n"
    "使ã†ã“ã¨ãŒã§ãる。\n"
    "åˆã€ã“れã¯Ruby1.9.xã«ã ã‘作用ã™ã‚‹ã€\n"
    "Ruby1.8ã«ã¤ã„ã¦ã¯é©åˆ‡ãªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã«ãªã£ã¦ã„ãªã„。"
    
    #: ../docs/GettingStarted.md:512
    msgid ""
    "The `@title` tag allows you to specify a full title name for the document.\n"
    "By default, YARD uses the filename as the title of the document and lists\n"
    "it in the file list in the index and file menu. In some cases, the file "
    "name\n"
    "might not be descriptive enough, so YARD allows you to specify a full title:"
    msgstr ""
    "`@title`ã‚¿ã‚°ã¯ãã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ãƒ•ルタイトルåã«ã‚ˆã‚‹æŒ‡å®šã‚’許å¯ã™ã‚‹ã€‚\n"
    "デフォルトã§ã¯ã€YARDã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚¿ã‚¤ãƒˆãƒ«ã«ãƒ•ァイルåを使ã†ã€‚\n"
    "ãã—ã¦ã€ãƒ•ァイルリストã®ä¸­ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚„ファイルメニューを列挙ã™ã‚‹ã€‚\n"
    "一部ã®ä¾‹ã§ã¯ã€ãƒ•ァイルåã¯å分ã«èª¬æ˜Žã§ããªã„ã‹ã‚‚ã—れãªã„ã€\n"
    "ãã®ç‚ºã€YARDã¯ã‚ãªãŸãŒãƒ•ルタイトルを指定ã™ã‚‹ã“ã¨ã‚’èªã‚ã¦ã„る。"
    
    #: ../docs/GettingStarted.md:517
    msgid ""
    "    contents of TITLE.txt:\n"
    "    # @title The Title of The Document"
    msgstr ""
    "    contents of TITLE.txt:\n"
    "    # @title The Title of The Document"
    
    #: ../docs/GettingStarted.md:520
    msgid ""
    "Currently all other meta-data is hidden from view, though accessible\n"
    "programmatically using the {YARD::CodeObjects::ExtraFileObject} class."
    msgstr ""
    "ç¾åœ¨ã®å…¨ã¦ã®ä»–ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯ä¸€è¦§ã‹ã‚‰éš ã•れる。ãã†ã¯ã„ã†ã‚‚ã®ã®ã€\n"
    "{YARD::CodeObjects::ExtraFileObject}クラスã«ã‚ˆã£ã¦ãƒ—ログラムã«ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚る。"
    
    #: ../docs/GettingStarted.md:523
    msgid ""
    msgstr ""
    
    #: ../docs/GettingStarted.md:525
    msgid "## Configuring YARD"
    msgstr "## YARDã‚’æ§‹æˆã™ã‚‹"
    
    #: ../docs/GettingStarted.md:527
    msgid ""
    "YARD (0.6.2+) supports a global configuration file stored in `~/.yard/"
    "config`.\n"
    "This file is stored as a YAML file and can contain arbitrary keys and "
    "values\n"
    "that can be used by YARD at run-time. YARD defines specific keys that are "
    "used\n"
    "to control various features, and they are listed in {YARD::Config::"
    "DEFAULT_CONFIG_OPTIONS}.\n"
    "A sample configuration file might look like:"
    msgstr ""
    "YARD (0.6.2)以é™ã¯`~/.yard/config`ã®ä¸­ã«æ ¼ç´ã—ãŸå…¨ä½“æ§‹æˆãƒ•ァイルをサãƒãƒ¼ãƒˆã™"
    "る。\n"
    "ã“ã®ãƒ•ァイルã¯YAMLファイルã®ã‚ˆã†ã«æ ¼ç´ã•れã€\n"
    "ä»»æ„ã®ã‚­ãƒ¼ã¨å®Ÿè¡Œæ™‚ã«YARDã«ã‚ˆã£ã¦åˆ©ç”¨ã§ãる値をå«ã‚€ã“ã¨ãŒã§ãる。\n"
    "YARDã¯æ§˜ã€…ãªæ©Ÿèƒ½ã‚’制御ã™ã‚‹ç‚ºã«ä½¿ã‚れるã®ã§ç‰¹å®šã®ã‚­ãƒ¼ã‚’定義ã™ã‚‹ã€‚\n"
    "ãれã¯{YARD::Config::DEFAULT_CONFIG_OPTIONS}ã®ä¸­ã§åˆ—挙ã•れる。\n"
    "サンプルã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:533 ../docs/WhatsNew.md:759
    msgid ""
    "    :load_plugins: false\n"
    "    :ignored_plugins:\n"
    "      - my_plugin\n"
    "      - my_other_plugin\n"
    "    :autoload_plugins:\n"
    "      - my_autoload_plugin\n"
    "    :safe_mode: false"
    msgstr ""
    "    :load_plugins: false\n"
    "    :ignored_plugins:\n"
    "      - my_plugin\n"
    "      - my_other_plugin\n"
    "    :autoload_plugins:\n"
    "      - my_autoload_plugin\n"
    "    :safe_mode: false"
    
    #: ../docs/GettingStarted.md:541
    msgid ""
    "You can also view and edit these configuration options from the commandline\n"
    "using the `yard config` command. To list your configuration, use `yard "
    "config --list`.\n"
    "To view a key, use `yard config ITEM`, and to set it, use `yard config ITEM "
    "VALUE`."
    msgstr ""
    "`yard config`コマンドを使ã£ã¦èª¿ã¹ãŸã‚Šã€æ§‹æˆè¨­å®šã‚’編集ã™ã‚‹ã“ã¨ã‚‚ã§ãる。\n"
    "æ§‹æˆã‚’リストã™ã‚‹ã«ã¯ã€`yard config --list`を使ã†ã€‚\n"
    "キーを調ã¹ã‚‹ã«ã¯ã€`yard config ITEM`, ã‚„ã€ãã®å€¤ã‚’設定ã™ã‚‹ç‚ºã«`yard config "
    "ITEM VALUE`を使ã†ã€‚"
    
    #: ../docs/GettingStarted.md:545
    msgid ""
    msgstr ""
    
    #: ../docs/GettingStarted.md:547
    msgid "## Extending YARD"
    msgstr "## YARDã‚’æ‹¡å¼µã™ã‚‹"
    
    #: ../docs/GettingStarted.md:549
    msgid ""
    "There are many ways to extend YARD to support non-standard Ruby syntax "
    "(DSLs),\n"
    "add new meta-data tags or programmatically access the intermediate metadata\n"
    "and documentation from code. An overview of YARD's full architecture can be\n"
    "found in the {file:docs/Overview.md} document."
    msgstr ""
    "éžæ¨™æº–ã®Rubyæ§‹æ–‡(DSL)をサãƒãƒ¼ãƒˆã™ã‚‹ã®ã«YARDã‚’æ‹¡å¼µã™ã‚‹ãŸã‚ã®æ²¢å±±ã®æ–¹æ³•ãŒã‚る。\n"
    "æ–°ã—ã„メタデータタグã®è¿½åŠ ã‚„\n"
    "プログラム的ã«ä¸­é–“ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã€\n"
    "コードã‹ã‚‰è¨˜è¿°ã™ã‚‹æ–¹æ³•ãªã©ã€‚\n"
    "YARDã®å…¨ä½“æ§‹é€ ã®æ¦‚è¦ã¯ã€\n"
    "{file:docs/Overview.md}ドキュメントã®ä¸­ã§è¦‹ã¤ã‘られる。"
    
    #: ../docs/GettingStarted.md:554
    msgid ""
    "For information on adding support for Ruby DSLs, see the {file:docs/Handlers."
    "md}\n"
    "and {file:docs/Parser.md} architecture documents."
    msgstr ""
    "RubyDSLサãƒãƒ¼ãƒˆã‚’追加ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€\n"
    "{file:docs/Handlers.md}ã‚„{file:docs/Parser.md}構造ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚照。"
    
    #: ../docs/GettingStarted.md:557
    msgid "For information on adding extra tags, see {file:docs/Tags.md}."
    msgstr "特別ãªã‚¿ã‚°ã‚’追加ã™ã‚‹æ–¹æ³•ã¯{file:docs/Tags.md}ã‚’å‚照。"
    
    #: ../docs/GettingStarted.md:559
    msgid ""
    "For information on accessing the data YARD stores about your documentation,\n"
    "look at the {file:docs/CodeObjects.md} architecture document."
    msgstr ""
    "ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã¤ã„ã¦æ ¼ç´ã—ãŸYARDã®ãƒ‡ãƒ¼ã‚¿ãŒã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã¯ã€\n"
    "{file:docs/CodeObjects.md}構造ドキュメントå‚照。"
    
    #: ../docs/GettingStarted.md:562
    msgid ""
    msgstr ""
    
    #: ../docs/GettingStarted.md:564
    msgid "## Templating YARD"
    msgstr "## YARDã®ãƒ†ãƒ³ãƒ—レートを作る"
    
    #: ../docs/GettingStarted.md:566
    msgid ""
    "In many cases you may want to change the style of YARD's templates or add "
    "extra\n"
    "information after extending it. The {file:docs/Templates.md} architecture\n"
    "document covers the basics of how YARD's templating system works."
    msgstr ""
    "多ãã®å ´åˆã€ã‚ãªãŸãŒYARDテンプレートã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’変ãˆã‚‹ç‚ºã‚„\n"
    "ç‰¹åˆ¥ãªæƒ…å ±ã‚’å¾Œã§æ‹¡å¼µã—追加ã™ã‚‹ç‚ºã«å¿…è¦ã ã‚ã†ã€‚\n"
    "{file:docs/Templates.md}構造ドキュメントã¯ã€\n"
    "YARDテンプレートシステム作業ã®åŸºæœ¬ã‚’ã‚«ãƒãƒ¼ã™ã‚‹ã€‚"
    
    #: ../docs/GettingStarted.md:570
    msgid ""
    msgstr ""
    
    #: ../docs/GettingStarted.md:572
    msgid "## Plugin Support"
    msgstr "## プラグインサãƒãƒ¼ãƒˆ"
    
    #: ../docs/GettingStarted.md:574
    msgid ""
    "As of 0.4, YARD will automatically load any gem named with the prefix of\n"
    "`yard-` or `yard_`. You can use this to load a custom plugin that\n"
    "[extend](#extending) YARD's functionality. A good example of this\n"
    "is the [yard-rspec][yard-rspec] plugin, which adds [RSpec][rspec] "
    "specifications\n"
    "to your documentation (`yardoc` and `yri`). You can try it out by "
    "installing\n"
    "the gem or cloning the project and trying the example:"
    msgstr ""
    "0.4以é™ã€YARDã¯`yard-`ã‚„ `yard_`ã‹ã‚‰å§‹ã¾ã‚‹åå‰ã®gemã‚’\n"
    "自動ã§ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã ã‚ã†ã€‚ã‚ãªãŸã¯ã‚«ã‚¹ã‚¿ãƒ ãƒ—ラグインをロードã™ã‚‹ç‚ºã«\n"
    "YARDã®æ©Ÿèƒ½ã®[extend](#extending)を使ãˆã‚‹ã€‚\n"
    "ã“れã®è‰¯ã„例ã¯[yard-rspec][yard-rspec] プラグインã§ã€\n"
    "ドキュメント(`yardoc` and `yri`)ã«[RSpec][rspec]ã®ä»•様を追加ã™ã‚‹ã€‚\n"
    "gemをインストールã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€\n"
    "ã¾ãŸã¯ãƒ—ロジェクトをクローンã™ã‚‹ã“ã¨ã§è©¦ã™ã“ã¨ãŒã§ãる。\n"
    "例を以下ã«ç¤ºã™ã€‚"
    
    #: ../docs/GettingStarted.md:581
    msgid ""
    "    $ gem install yard-rspec -s http://gemcutter.org\n"
    "    or\n"
    "    $ git clone git://github.com/lsegal/yard-spec-plugin"
    msgstr ""
    "    $ gem install yard-rspec -s http://gemcutter.org\n"
    "    or\n"
    "    $ git clone git://github.com/lsegal/yard-spec-plugin"
    
    #: ../docs/GettingStarted.md:585
    msgid ""
    "YARD also provides a way to temporarily disable plugins on a per-user "
    "basis.\n"
    "To disable a plugin create the file `~/.yard/ignored_plugins` with a list\n"
    "of plugin names separated by newlines. Note that the `.yard` directory "
    "might\n"
    "not exist, so you may need to create it."
    msgstr ""
    "YARDã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã”ã¨ã®åŸºæœ¬ã®ãƒ—ラグインを\n"
    "一時的ã«ç„¡åйã«ã™ã‚‹æ–¹æ³•ã‚‚æä¾›ã™ã‚‹ã€‚\n"
    "プラグインを無効ã«ã™ã‚‹ç‚ºã«ã¯ã€\n"
    "`~/.yard/ignored_plugins`ファイルを作り\n"
    "改行ã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚ŒãŸã€ãƒ—ラグインåをリストã™ã‚‹ã€‚\n"
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "`.yard`ディレクトリã¯å­˜åœ¨ã—ãªã„å ´åˆã€\n"
    "作æˆã™ã‚‹å¿…è¦ãŒã‚る。"
    
    #: ../docs/GettingStarted.md:590
    msgid ""
    "[graphviz]:http://www.graphviz.org\n"
    "[yard-rspec]:http://github.com/lsegal/yard-spec-plugin\n"
    "[rspec]:http://rspec.info"
    msgstr ""
    "[graphviz]:http://www.graphviz.org\n"
    "[yard-rspec]:http://github.com/lsegal/yard-spec-plugin\n"
    "[rspec]:http://rspec.info"
    
    # title
    #: ../docs/Handlers.md:1
    msgid "Handlers Architecture"
    msgstr "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼æ§‹é€ "
    
    #: ../docs/Handlers.md:3
    msgid "# Handlers Architecture"
    msgstr "# ãƒãƒ³ãƒ‰ãƒ©ãƒ¼æ§‹é€ "
    
    #: ../docs/Handlers.md:5
    msgid ""
    "Handlers allow the processing of parsed source code. Handling is done after\n"
    "parsing to abstract away the implementation details of lexical and semantic\n"
    "analysis on source and to only deal with the logic regarding recognizing\n"
    "source statements as {file:docs/CodeObjects.md code objects}."
    msgstr ""
    "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã€ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’è§£æžã—ãŸå‡¦ç†ã‚’å—ã‘入れる。\n"
    "ã“れã®å‡¦ç†ã¯ã€å®Ÿè¡Œã™ã‚‹å˜èªžã®è©³ç´°ã®æŠ½è±¡åŒ–ã‚’è§£æžã®å¾Œã§è¡Œã†ã€‚\n"
    "ãã—ã¦ã€æ„味ã®ã‚るソースã®åˆ†æžã‚„ã€\n"
    "ロジックã«é–¢ã—ã¦ã¯{file:docs/CodeObjects.md code objects}ã®ã‚ˆã†ãª\n"
    "ソースステートメントã®å—ã‘入れã ã‘ã§æ‰±ã†ã€‚"
    
    #: ../docs/Handlers.md:10
    msgid ""
    "![Handlers Architecture Class Diagram](images/handlers-class-diagram.png)"
    msgstr "![Handlers Architecture Class Diagram](images/handlers-class-diagram.png)"
    
    #: ../docs/Handlers.md:12
    msgid "## The Pipeline"
    msgstr "## パイプライン"
    
    #: ../docs/Handlers.md:14
    msgid ""
    "After the {file:docs/Parser.md parser component} finishes analyzing the\n"
    "source, it is handed off for post-processing to the {YARD::Handlers::"
    "Processor}\n"
    "class, which is responsible for traversing the set of statements given by\n"
    "the parser and delegating them to matching handlers. Handlers match when "
    "the\n"
    "{YARD::Handlers::Base.handles?} method returns true for a given statement.\n"
    "The handler can then perform any action after being invoked by the "
    "`process`\n"
    "method."
    msgstr ""
    "{file:docs/Parser.md parser component}ãŒã‚½ãƒ¼ã‚¹ã‚’è§£æžã™ã‚‹ã¨ã€\n"
    "後処ç†ã™ã‚‹ç‚ºã«{YARD::Handlers::Processor} ã‚¯ãƒ©ã‚¹ã«æ¸¡ã™ã€‚\n"
    "ãã—ã¦ãƒ‘ーサーã«ã‚ˆã£ã¦ä¸Žãˆã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®è¨­å®šã‚’辿ã£ãŸã‚Šã€\n"
    "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒãƒžãƒƒãƒã—ã¦ã„るステートメントを委譲ã™ã‚‹è²¬ä»»ãŒã‚る。\n"
    "{YARD::Handlers::Base.handles?}メソッドãŒtrueã‚’è¿”ã™æ™‚ã€\n"
    "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒãƒžãƒƒãƒã—ã¦ã„るステートメントを与ãˆã‚‹ã€‚\n"
    "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯`process`メソッドã«ã‚ˆã£ã¦å‘¼ã³å‡ºã—ãŸå¾Œã§ä»»æ„ã®å‡¦ç†ã‚’実行ã§ãる。"
    
    #: ../docs/Handlers.md:22
    msgid "## The Processor Class"
    msgstr "## プロセッサークラス"
    
    #: ../docs/Handlers.md:24
    msgid ""
    "The main purpose of the processor, as mentioned above, is to traverse "
    "through\n"
    "the list of statements given to it by the parser. The processor also keeps\n"
    "state about what is being processed. For instance, the processor is what "
    "keeps\n"
    "track of the current namespace (the module or class an object is being "
    "defined\n"
    "in), scope (class or instance), file and owner. The owner refers to the "
    "object\n"
    "that is most directly responsible for the source statement being processed. "
    "This\n"
    "is most often the same as the namespace, except when parsing the body of a "
    "method,\n"
    "where the namespace would be the class/module the method is defined in and "
    "the\n"
    "owner would be the method object itself."
    msgstr ""
    "主ãªãƒ—ロセッサーã®ç›®çš„ã¯ã€ä¸Šã§è¿°ã¹ãŸã‚ˆã†ã«ã€\n"
    "パーサーã«ã‚ˆã£ã¦ä¸Žãˆã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã‚’通ã˜ã¦è¾¿ã‚‹ã“ã¨ã§ã‚る。\n"
    "プロセッサーã¯å‡¦ç†ã•れã¦ã„る状態ã«ã¤ã„ã¦ç®¡ç†ã™ã‚‹ã€‚\n"
    "例ãˆã°ã€ãƒ—ロセッサーã¯ç¾åœ¨ã®\n"
    "ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹(モジュールやオブジェクトã®ã‚¯ãƒ©ã‚¹ãŒå®šç¾©ã•れる)ã€\n"
    "スコープ(クラスやインスタンス)ã€ãƒ•ァイルã¨ã‚ªãƒ¼ãƒŠãƒ¼\n"
    "を追跡ã™ã‚‹ã€‚\n"
    "オーナーã¯ã€ã‚ªãƒ–ジェクトをå‚ç…§ã™ã‚‹ã€‚\n"
    "ãã®ã‚ªãƒ–ジェクトã¯å‡¦ç†ã•ã‚Œã‚‹ã‚½ãƒ¼ã‚¹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«æœ€ã‚‚直接的ãªè²¬ä»»ã‚’æŒã¤ã€‚\n"
    "ã“れã¯(å‚ç…§ã™ã‚‹ã‚ªãƒ–ジェクトã®å¯¾è±¡ã¯)ã€å¤šãã®å ´åˆãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ã¨åŒã˜ã§ã€\n"
    "ãƒ¡ã‚½ãƒƒãƒ‰ã®æœ¬ä½“ã‚’è§£æžã—ãŸæ™‚を除ãã€\n"
    "ãã®ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚„モジュール,メソッドãŒå®šç¾©ã•れる。\n"
    "ãã—ã¦ã‚ªãƒ¼ãƒŠãƒ¼ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚ªãƒ–ジェクト自体ã¨ãªã‚‹ã€‚"
    
    #: ../docs/Handlers.md:34
    msgid "## Implementing a Handler"
    msgstr "## ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’実装ã™ã‚‹"
    
    #: ../docs/Handlers.md:36
    msgid ""
    "This section covers the basics of implementing a *new-style* Ruby handler. "
    "For\n"
    "details on implementing a legacy handler, see the \"API Differences\" "
    "section below."
    msgstr ""
    "ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ *æ–°ã—ã„スタイル* Rubyãƒãƒ³ãƒ‰ãƒ©ãƒ¼å‡¦ç†ã®åŸºæœ¬ã‚’ã‚«ãƒãƒ¼ã™ã‚‹ã€‚\n"
    "レガシーãªãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®è©³ç´°ã¯ã€\"API Differences\" セクション以下をå‚照。"
    
    #: ../docs/Handlers.md:39
    msgid ""
    "a Ruby handler can be implemented simply by subclassing the {YARD::Handlers::"
    "Ruby::Base}\n"
    "class and declaring what node types or source to process with the {YARD::"
    "Handlers::Base.handles handles}\n"
    "class method. A very simple handler that handles a module definition would "
    "be:"
    msgstr ""
    "Rubyãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯å‡¦ç†ã®ç‚ºã«ã€\n"
    "{YARD::Handlers::Base.handles handles}クラスメソッドを用ã„ã€\n"
    "{YARD::Handlers::Ruby::Base}サブクラスやã€\n"
    "ノードタイプやソースを宣言ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦å®Ÿè¡Œã•れる。\n"
    "モジュール定義ã®å‡¦ç†ã¯æ¬¡ã®ã‚ˆã†ãªéžå¸¸ã«ç°¡å˜ãªãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã§ã‚る。"
    
    #: ../docs/Handlers.md:43
    msgid ""
    "    class MyModuleHandler < YARD::Handlers::Ruby::Base\n"
    "      handles :module"
    msgstr ""
    "    class MyModuleHandler < YARD::Handlers::Ruby::Base\n"
    "      handles :module"
    
    #: ../docs/Handlers.md:46
    msgid ""
    "      def process\n"
    "        puts \"Handling a module named #{statement[0].source}\"\n"
    "      end\n"
    "    end"
    msgstr ""
    "      def process\n"
    "        puts \"Handling a module named #{statement[0].source}\"\n"
    "      end\n"
    "    end"
    
    #: ../docs/Handlers.md:51
    msgid ""
    "For details on what nodes are, and what node types are, see the\n"
    "{file:docs/Parser.md parser architecture document}."
    msgstr ""
    "ノードやノードã®åž‹ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€\n"
    "{file:docs/Parser.md パーサー構造ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ}ã‚’å‚照。"
    
    #: ../docs/Handlers.md:54
    msgid ""
    "In this case the node type being handled is the `:module` type. More than "
    "one\n"
    "node type or `handles` declarations may describe a single handler, for "
    "instance,\n"
    "a handler that handles class definitions should handle the `:class` and `:"
    "sclass`\n"
    "node types respectively (the latter refers to classes defined as `class << "
    "Something`).\n"
    "The {YARD::Handlers::Base#statement statement} attribute refers to the "
    "current\n"
    "node (or statement) that is being handled by the handler."
    msgstr ""
    "ã“ã®ã‚±ãƒ¼ã‚¹ã®å ´åˆã€å‡¦ç†ã•れるノードタイプ㯠`:module` タイプã§ã‚る。\n"
    "複数ã®ãƒŽãƒ¼ãƒ‰ã‚¿ã‚¤ãƒ—ã‚„ `handles` 宣言ã¯ä¸€ã¤ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’記述ã™ã‚‹ã€‚\n"
    "例ãˆã°ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯handlesクラス定義㌠`:class` ã‚„\n"
    "`:sclass` ノードタイプãれãžã‚Œã‚’処ç†ã™ã‚‹ã€‚\n"
    "(後者ã®:sclass㯠`class << Something` ã®ã‚ˆã†ã«ã‚¯ãƒ©ã‚¹å®šç¾©ã‚’å‚ç…§ã™ã‚‹ã€‚)\n"
    "{YARD::Handlers::Base#statement statement}属性ã¯ã€\n"
    "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ã‚ˆã£ã¦å‡¦ç†ã•れるç¾åœ¨ã®ãƒŽãƒ¼ãƒ‰(やステートメントを)å‚ç…§ã™ã‚‹ã€‚"
    
    #: ../docs/Handlers.md:61
    msgid "### Handling a Method Call"
    msgstr "### メソッド呼ã³å‡ºã—ã®å‡¦ç†"
    
    #: ../docs/Handlers.md:63
    msgid ""
    "In some cases, a developer might need to handle a method call. The parser "
    "can\n"
    "express a method call in many AST forms, so to simplify this process, a "
    "method\n"
    "call can be handled by declaring the following in a `handles` statement:"
    msgstr ""
    "å ´åˆã«ã‚ˆã£ã¦é–‹ç™ºè€…ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—æ“作を必è¦ã¨ã™ã‚‹ã‹ã‚‚ã—れãªã„。\n"
    "パーサーã¯å¤šãã®ASTåž‹(Abstract Syntax Tree)ã®ä¸­ã§ã€\n"
    "メソッド呼ã³å‡ºã—を表ç¾ã§ãる。ãã—ã¦ã€ã“ã®å‡¦ç†ã‚’簡素化ã™ã‚‹ç‚ºã«ã€\n"
    "メソッド呼ã³å‡ºã—ã¯ã€æ¬¡ã®ã‚ˆã†ãª`handles`ステートメントã®ä¸­ã§å®£è¨€ã•れる事ã«ã‚ˆã£ã¦å‡¦ç†ã•れる。"
    
    #: ../docs/Handlers.md:67
    msgid ""
    "    class MyHandler < YARD::Handlers::Ruby::Base\n"
    "      handles method_call(:describe)"
    msgstr ""
    "    class MyHandler < YARD::Handlers::Ruby::Base\n"
    "      handles method_call(:describe)"
    
    #: ../docs/Handlers.md:70
    msgid ""
    "      def process\n"
    "        # Process the method call\n"
    "      end\n"
    "    end"
    msgstr ""
    "      def process\n"
    "        # メソッド呼ã³å‡ºã—を処ç†ã™ã‚‹\n"
    "      end\n"
    "    end"
    
    #: ../docs/Handlers.md:75
    msgid ""
    "In this case we handle any of the method calls to method name `describe` "
    "with\n"
    "the following syntaxes:"
    msgstr ""
    "ã“ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ç§é”ã¯ãƒ¡ã‚½ãƒƒãƒ‰å`describe`メソッドã®å‘¼ã³å‡ºã—ã‚’\n"
    "æ¬¡ã®æ§‹æ–‡ã®ã‚ˆã†ã«å‡¦ç†ã§ãる。"
    
    #: ../docs/Handlers.md:78
    msgid ""
    "    describe(something)\n"
    "    describe arg1, arg2, arg3\n"
    "    describe(something) { perform_a_block }\n"
    "    describe \"Something\" do\n"
    "      a_block\n"
    "    end"
    msgstr ""
    "    describe(something)\n"
    "    describe arg1, arg2, arg3\n"
    "    describe(something) { perform_a_block }\n"
    "    describe \"Something\" do\n"
    "      a_block\n"
    "    end"
    
    #: ../docs/Handlers.md:85
    msgid "### Creating a new Code Object"
    msgstr "### æ–°ã—ã„コードオブジェクトを作æˆã™ã‚‹"
    
    #: ../docs/Handlers.md:87
    msgid ""
    "Usually (but not always) handling is performed to create new code objects to "
    "add\n"
    "to the registry (for information about code objects, see {file:docs/"
    "CodeObjects.md this document}).\n"
    "Code objects should simply be created and added to the existing `namespace`. "
    "This\n"
    "will be enough to add them to the registry. There is also a convenience\n"
    "{YARD::Handlers::Base#register register} method which quickly sets standard "
    "attributed\n"
    "on the newly created object, such as the file, line, source and docstring of "
    "the\n"
    "object. This method will be seen in the next example."
    msgstr ""
    "通常(ã—ã‹ã—ã€ã„ã¤ã‚‚ã§ã¯ãªã„)ã®å‡¦ç†ã¯ã€\n"
    "レジストリーを追加ã™ã‚‹æ–°ã—ã„コードオブジェクトã®ä½œæˆã™ã‚‹ç‚ºã«å®Ÿè¡Œã•れる。\n"
    "(コードオブジェクトã«ã¤ã„ã¦ã¯{file:docs/CodeObjects.md ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ}ã‚’å‚ç…§)\n"
    "コードオブジェクトã¯å˜ç´”ã«æ—¢å­˜ã® `namespace` ã«ä½œæˆã•れ追加ã•れる。\n"
    "ã“れã¯ã€ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã«ãれらを追加ã™ã‚‹ãŸã‚ã«å分ã§ã‚る。\n"
    "便利ãª{YARD::Handlers::Base#register register}メソッドãŒã‚りã€\n"
    "ã“ã‚Œã¯æ–°ãŸã«ä½œæˆã•れるオブジェクトã€ãƒ•ァイルã€è¡Œã€\n"
    "ソースやオブジェクトã®docstringã®ã‚ˆã†ãªæ¨™æº–属性を素早ã設定ã™ã‚‹ã€‚\n"
    "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ¬¡ã®ä¾‹ã®ä¸­ã§è¦‹ã‚‰ã‚Œã‚‹ã ã‚ã†ã€‚"
    
    #: ../docs/Handlers.md:95
    msgid "### Handling an Inner Block"
    msgstr "### 内部ã®ãƒ–ãƒ­ãƒƒã‚¯ã®æ“作"
    
    #: ../docs/Handlers.md:97
    msgid ""
    "By default, the parser gives the processor class a list of all the top "
    "level\n"
    "statements and the processor parses only those top level statements. If an "
    "inner\n"
    "block of a module, class, method declaration or even a block passed to a "
    "method call\n"
    "needs to be handled, the {YARD::Handlers::Base#parse_block parse_block} "
    "method must be called on the list of statements\n"
    "to parse. This will send the list to the processor to continue processing on "
    "that\n"
    "statement list. The source tree can be selectively parsed in this manner by "
    "parsing\n"
    "only the inner blocks that are relevant to documentation."
    msgstr ""
    "デフォルトã§ãƒ‘ーサーã¯å…¨ã¦ã®ãƒˆãƒƒãƒ—レベルステートメントã‹ã‚‰ã€\n"
    "プロセッサークラスã®ãƒªã‚¹ãƒˆã‚’与ãˆã‚‹ã€‚\n"
    "ãã—ã¦ã€ãƒ—ロセッサーã¯ã€ãƒˆãƒƒãƒ—レベルステートメントã ã‘è§£æžã™ã‚‹ã€‚\n"
    "モジュールã€ã‚¯ãƒ©ã‚¹ã€ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ãƒ–ロックãŒå®£è¨€ã•れる場åˆã‚„ã€\n"
    "ブロックãŒå‡¦ç†ã•れるメソッド呼ã³å‡ºã—ã‚’è§£æžã—ãŸå ´åˆã§ã•ãˆã€\n"
    "{YARD::Handlers::Base#parse_block parse_block}メソッドã¯ã€\n"
    "è§£æžã®ç‚ºã«ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã‚’呼ã³å‡ºã•ãªã‘れã°ãªã‚‰ãªã„。\n"
    "ã“れã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã®å‡¦ç†ã‚’継続ã™ã‚‹ãƒ—ロセッサーã«ãƒªã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ã€‚\n"
    "ソースツリーã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã«é–¢é€£ã—ãŸãƒ–ロック内ã ã‘è§£æžã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€\n"
    "ã“ã®å½¢å¼ã®ä¸­ã§é¸æŠžã•れ抜粋ã•れる。"
    
    #: ../docs/Handlers.md:105
    msgid ""
    "For example, the module handler parses the inner body of a module by "
    "performing\n"
    "the following commands:"
    msgstr ""
    "例ãˆã°ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã€\n"
    "以下ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‹ã‚‰å†…éƒ¨ã®æœ¬ä½“ã‚’è§£æžã™ã‚‹ã€‚"
    
    #: ../docs/Handlers.md:108
    msgid ""
    "    class YARD::Handlers::Ruby::ModuleHandler < YARD::Handlers::Ruby::Base\n"
    "      handles :module"
    msgstr ""
    "    class YARD::Handlers::Ruby::ModuleHandler < YARD::Handlers::Ruby::Base\n"
    "      handles :module"
    
    #: ../docs/Handlers.md:111
    msgid ""
    "      def process\n"
    "        modname = statement[0].source\n"
    "        mod = register ModuleObject.new(namespace, modname)\n"
    "        parse_block(statement[1], :namespace => mod)\n"
    "      end\n"
    "    end"
    msgstr ""
    "      def process\n"
    "        modname = statement[0].source\n"
    "        mod = register ModuleObject.new(namespace, modname)\n"
    "        parse_block(statement[1], :namespace => mod)\n"
    "      end\n"
    "    end"
    
    #: ../docs/Handlers.md:118
    msgid ""
    "In this case `statement[1]` refers to a list of extra statements, the block "
    "we\n"
    "wish to parse. Note here that when parsing objects like modules and "
    "classes,\n"
    "we set the namespace for the duration of the block parsing by setting "
    "options\n"
    "on the `parse_block` method."
    msgstr ""
    "ã“ã®å ´åˆ`statement[1]`ã¯è¿½åŠ ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã€\n"
    "ç§é”ãŒè§£æžã™ã‚‹ãƒ–ロックã®ãƒªã‚¹ãƒˆã‚’å‚ç…§ã™ã‚‹ã€‚\n"
    "ã“ã“ã«ã‚るよã†ã«ã€\n"
    "モジュールやクラスã®ã‚ˆã†ã«ã‚ªãƒ–ジェクトを解æžã™ã‚‹æ™‚ã€\n"
    "ç§é”ã¯`parse_block`メソッドã®ã‚ªãƒ—ションãŒè¨­å®šã•れるã“ã¨ã«ã‚ˆã£ã¦\n"
    "è§£æžã—ã¦ã„るブロックã®ç¯„囲をãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ã«è¨­å®šã™ã‚‹ã€‚"
    
    #: ../docs/Handlers.md:123
    msgid "### API Differences for Legacy Handler"
    msgstr "### Legacy Handler用ã®APIã®ç›¸é•点"
    
    #: ../docs/Handlers.md:125
    msgid ""
    "Because the legacy handler uses the legacy parser and therefore a different "
    "kind\n"
    "of AST, there are subtle differences in the handler API. Most importantly, "
    "the\n"
    "`handles` method usually deals with either lexical tokens or source code as "
    "a string\n"
    "or RegExp object. The statement object, similarly, is made up of lexical "
    "tokens instead\n"
    "of semantically parsed nodes (this is described in the {file:docs/Parser.md "
    "parser document})."
    msgstr ""
    "レガシーãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ãƒ¬ã‚¬ã‚·ãƒ¼ãƒ‘ーサーを使ã„,\n"
    "ãれã«ä¼´ã„異る種類ã®ASTãŒã‚ã‚‹ã®ã§ãƒãƒ³ãƒ‰ãƒ©ãƒ¼APIã«å¾®å¦™ãªé•ã„ãŒã‚る。\n"
    "最もé‡è¦ãªã“ã¨ã ãŒã€ `handles` メソッドã¯é€šå¸¸ã€\n"
    "å˜èªžã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚„ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã€æ–‡å­—列やRegExpオブジェクトã¨å…±ã«å‡¦ç†ã™ã‚‹ã€‚\n"
    "ステートメントã®ã‚ªãƒ–ジェクトã¨åŒæ§˜ã€æ„味ã®ã‚ã‚‹è§£æžã•れるノードã®ä»£ã‚りã«ã€\n"
    "å˜èªžã®ãƒˆãƒ¼ã‚¯ãƒ³ã‹ã‚‰æ§‹æˆã•れる。\n"
    "(ã“れã¯{file:docs/Parser.md パーサーã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ}ã®ä¸­ã§è¨˜è¿°ã•れる)"
    
    #: ../docs/Handlers.md:131
    msgid ""
    "The module example above can be rewritten as a legacy handler as follows:"
    msgstr ""
    "上記ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ä¾‹ã¯ã€æ¬¡ã®ã‚ˆã†ãªãƒ¬ã‚¬ã‚·ãƒ¼ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ã‚ˆã£ã¦å†æ›¸è¾¼ã¿ã•れる。"
    
    #: ../docs/Handlers.md:133
    msgid ""
    "    class YARD::Handlers::Ruby::Legacy::ModuleHandler < YARD::Handlers::"
    "Ruby::Legacy::Base\n"
    "      handles TkMODULE"
    msgstr ""
    "    class YARD::Handlers::Ruby::Legacy::ModuleHandler < YARD::Handlers::Ruby::Legacy::Base\n"
    "      handles TkMODULE"
    
    #: ../docs/Handlers.md:136
    msgid ""
    "      def process\n"
    "        modname = statement.tokens.to_s[/^module\\s+(#{NAMESPACEMATCH})/, "
    "1]\n"
    "        mod = register ModuleObject.new(namespace, modname)\n"
    "        parse_block(:namespace => mod)\n"
    "      end\n"
    "    end"
    msgstr ""
    "      def process\n"
    "        modname = statement.tokens.to_s[/^module\\s+(#{NAMESPACEMATCH})/, 1]\n"
    "        mod = register ModuleObject.new(namespace, modname)\n"
    "        parse_block(:namespace => mod)\n"
    "      end\n"
    "    end"
    
    #: ../docs/Handlers.md:143
    msgid "A few notes on the differences:"
    msgstr "標準ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¨ã®é•ã„ã«é–¢ã™ã‚‹ã„ãã¤ã‹ã®æ³¨æ„。"
    
    #: ../docs/Handlers.md:145
    msgid ""
    "  * We inherit from `Legacy::Base` instead of the standard Ruby Base handler "
    "class.\n"
    "  * We exchange node type `:module` for `TkMODULE`, which represents the\n"
    "    first token in the statement.\n"
    "  * We perform direct string manipulation to get the module name.\n"
    "  * `parse_block` does not take a list of statements. In the old parser "
    "API,\n"
    "    each statement has a `block` attribute which defines the list of\n"
    "    statements within that statement, if any. Therefore, `parse_block` will\n"
    "    always parse the `statement.block` if it exists."
    msgstr ""
    "  * 標準ã®RubyBaseãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚¯ãƒ©ã‚¹ã®ä»£ã‚り㫠`Legacy::Base` ã‹ã‚‰ç¶™æ‰¿ã™ã‚‹ã€‚\n"
    "  * ノードタイプ `:module` ã‚’ `TkMODULE` ã¸äº¤æ›ã™ã‚‹ã€\n"
    "    ãれã¯ã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ä¸­ã®æœ€åˆã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’表ã™ã€‚\n"
    "  * モジュールåã‚’å–å¾—ã™ã‚‹ç‚ºã«ç›´æŽ¥æ–‡å­—列æ“作を実行ã™ã‚‹ã€‚\n"
    "  * `parse_block`ã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã—ãªã„。\n"
    "    å¤ã„パーサーã®ä¸­ã®APIã§ã€\n"
    "    ãれãžã‚Œã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ `block` 属性をæŒã£ã¦ã„ãŸã‚‰\n"
    "    ステートメントã®ä¸­ã«ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã‚’定義ã™ã‚‹ã€\n"
    "    従ã£ã¦ã€ `parse_block` ã¯ã€ `statement.block` ãŒå­˜åœ¨ã™ã‚Œã°è§£æžã™ã‚‹ã€‚"
    
    # title
    #: ../docs/Overview.md:1
    msgid "Architecture Overview"
    msgstr "åŸºæœ¬è¨­è¨ˆæ¦‚å¿µã®æ¦‚è¦"
    
    #: ../docs/Overview.md:3
    msgid "# Architecture Overview"
    msgstr "# åŸºæœ¬è¨­è¨ˆæ¦‚å¿µã®æ¦‚è¦"
    
    #: ../docs/Overview.md:5
    msgid ""
    "YARD is separated in three major components, each of which allows YARD to "
    "be\n"
    "extended for a separate purpose. The split also emphasizes YARD's design "
    "choice\n"
    "to explicitly separate data gathering from HTML document generation, "
    "something\n"
    "that tools like RDoc do not do. These components are:"
    msgstr ""
    "YARDã¯ä¸»ãªæ§‹æˆã¨ã—ã¦ä¸‰ã¤ã«åˆ†ã‘られる。\n"
    "ã„ãšã‚Œã‚‚ã€ç›®çš„æ¯Žã«æ‹¡å¼µã•れる為ã«YARDã«å—ã‘入れられる。\n"
    "ã“れã¯ã€HTMLドキュメント生æˆã‹ã‚‰é›†ã‚るデータを明確ã«åˆ†ã‘る為ã«\n"
    "YARD設計上ã®é¸æŠžã‚’é‡è¦–ã™ã‚‹ã€‚"
    
    #: ../docs/Overview.md:10
    msgid ""
    "* [Code Parsing & Processing Component](#parsing)\n"
    "* [Data Storage Component](#storage)\n"
    "* [Post Processing & Templating System](#templates)"
    msgstr ""
    "* [Code Parsing & Processing Component](#parsing)\n"
    "* [Data Storage Component](#storage)\n"
    "* [Post Processing & Templating System](#templates)"
    
    #: ../docs/Overview.md:14
    msgid ""
    "This separation is a major goal of the project, and means that YARD is not "
    "*just*\n"
    "a tool to generate HTML output. The expectation is that any subset of "
    "YARD's\n"
    "major components may be used, extended or modified independently. YARD may "
    "be\n"
    "used just as a data gathering tool (to parse and audit code), just as a "
    "data\n"
    "source (a webserver containing raw unformatted data about code), or just as "
    "a\n"
    "conventional HTML documentation generation tool (like RDoc)."
    msgstr ""
    "ã“ã®åŒºåˆ†ã¯ã€ãƒ—ロジェクトã®ä¸»è¦ãªç›®çš„ã§ã‚りã€\n"
    "YARDãŒHTMLã®å‡ºåŠ›ã‚’ç”Ÿæˆã™ã‚‹ãŸã ã®é“å…·ã§ã¯ç„¡ã„事をæ„味ã—ã¦ã„る。\n"
    "期待ã™ã‚‹ã“ã¨ã¯YARDã®ãƒ¡ã‚¸ãƒ£ãƒ¼ãªæ§‹æˆã®ã‚µãƒ–セットãŒç‹¬è‡ªã«åˆ©ç”¨,æ‹¡å¼µ,変更ã•れる事ã§ã‚る。\n"
    "YARDã¯ãƒ‡ãƒ¼ã‚¿åŽé›†ãƒ„ール(コードを解æž,検査),\n"
    "データã®å…ƒ(ウェブサーãƒãƒ¼ã¯ã‚³ãƒ¼ãƒ‰ã«ã¤ã„ã¦ãƒ•ォーマットã•れã¦ç„¡ã„生ã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã‚‹),\n"
    "便利ãªHTMLドキュメント作æˆãƒ„ール(RDocã®ã‚ˆã†ãª)ã¨ã—ã¦åˆ©ç”¨ã•れる。"
    
    #: ../docs/Overview.md:21
    msgid ""
    "The important classes and dependencies of these components are shown in the\n"
    "following class diagram:"
    msgstr "é‡è¦ãªã‚¯ãƒ©ã‚¹ã‚„ã“ã‚Œã‚‰ã®æ§‹æˆã®ä¾å­˜é–¢ä¿‚ã¯ã€æ¬¡ã®ã‚¯ãƒ©ã‚¹å›³ã®ä¸­ã§è¡¨ç¤ºã•れる。"
    
    #: ../docs/Overview.md:24
    msgid "![Overview Class Diagram](images/overview-class-diagram.png)"
    msgstr "![Overview Class Diagram](images/overview-class-diagram.png)"
    
    #: ../docs/Overview.md:26
    msgid ""
    msgstr ""
    
    #: ../docs/Overview.md:28
    msgid "## Code Parsing & Processing Component"
    msgstr "## コードã®è§£æžã¨å‡¦ç†ã®æ§‹æˆ"
    
    #: ../docs/Overview.md:30
    msgid ""
    "This component is made up of four sub-components, each of which have "
    "separate\n"
    "tasks during the data gathering process (*note: the tag architecture is "
    "not*\n"
    "*shown in the class diagram*). These sub-components are:"
    msgstr ""
    "ã“ã®æ§‹æˆã¯ã€4ã¤ã®ä¸‹ä½æ§‹æˆã‚’作り上ã’ã‚‹ã€\n"
    "ã„ãšã‚Œã‚‚ã€\n"
    "データåŽé›†å‡¦ç†ã®é–“,別々ã®ã‚¿ã‚¹ã‚¯ã‚’æŒã¤ã€‚\n"
    "(*注æ„: タグ構造ã¯ã‚¯ãƒ©ã‚¹å›³)\n"
    "䏋使§‹æˆã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚‹ã€‚"
    
    #: ../docs/Overview.md:34
    msgid ""
    "  * {file:docs/Parser.md}\n"
    "  * {file:docs/Handlers.md}\n"
    "  * {file:docs/CodeObjects.md}\n"
    "  * {file:docs/Tags.md}"
    msgstr ""
    "  * {file:docs/Parser.md}\n"
    "  * {file:docs/Handlers.md}\n"
    "  * {file:docs/CodeObjects.md}\n"
    "  * {file:docs/Tags.md}"
    
    #: ../docs/Overview.md:39
    msgid ""
    "The parser component reads source files and converts it into a set of "
    "statements\n"
    "which the handlers then process, creating code objects which in turn create "
    "tags\n"
    "(meta-data) attached to the objects. These objects are all added to the "
    "{YARD::Registry},\n"
    "the data store component."
    msgstr ""
    "ãƒ‘ãƒ¼ã‚µãƒ¼ã®æ§‹æˆã¯ã€ã‚½ãƒ¼ã‚¹ãƒ•ァイルを読ã¿è¾¼ã¿ã€\n"
    "ステートメントã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã¸ãれを変æ›ã™ã‚‹\n"
    "コードオブジェクトを作æˆã—,\n"
    "順番ã«ã‚ªãƒ–ジェクトを追加ã•れãŸã‚¿ã‚°(メタデータ)を作æˆã™ã‚‹ã€‚\n"
    "ã“れらã®ã‚ªãƒ–ジェクト㯠{YARD::Registry} ã«å…¨ã¦è¿½åŠ ã•れる。\n"
    "ãƒ‡ãƒ¼ã‚¿ã¯æ§‹æˆã‚’記録ã™ã‚‹ã€‚"
    
    #: ../docs/Overview.md:44
    msgid ""
    msgstr ""
    
    #: ../docs/Overview.md:46
    msgid "## Data Storage Component"
    msgstr "## データã®è¨˜éŒ²å†…容"
    
    #: ../docs/Overview.md:48
    msgid ""
    "This component is currently implemented as a simple Ruby marshalled flat "
    "namespace\n"
    "of object. The implementation is found in the single class {YARD::Registry}, "
    "which\n"
    "is the centralized repository for all data being parsed, stored and "
    "accessed. There\n"
    "are future plans to improve this storage mechanism to be backend agnostic "
    "and allow\n"
    "for more robust storage."
    msgstr ""
    "ã“ã®å†…容ã¯ç¾åœ¨ã®æ‰€ã€\n"
    "å˜ç´”ã«Rubyã®æ•´ç†ã•れãŸãƒ•ラットãªã‚ªãƒ–ジェクトã®namespaceã®ã‚ˆã†ã«å®Ÿè£…ã•れã¦ã„る。\n"
    "実装ã¯ã‚·ãƒ³ã‚°ãƒ«ã‚¯ãƒ©ã‚¹ã®{YARD::Registry}ã®ä¸­ã§è¦‹ã¤ã‘られる。\n"
    "å§‹ã‚ã«è§£æžã—,記憶,アクセスã•れる全ã¦ã®ãƒ‡ãƒ¼ã‚¿ç”¨ã«é›†ä¸­åŒ–ã•れãŸãƒªãƒã‚¸ãƒˆãƒªã¨ãªã‚‹ã€‚\n"
    "寛容ãªãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã«ã“ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’修正ã—ã€\n"
    "ãã—ã¦æ›´ãªã‚‹å …牢ãªã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚’å—ã‘入れる為ã®å°†æ¥ã®è¨ˆç”»ãŒã‚る。"
    
    #: ../docs/Overview.md:54
    msgid ""
    msgstr ""
    
    #: ../docs/Overview.md:56
    msgid "## Post Processing & Templating System"
    msgstr "## 後処ç†ã¨ãƒ†ãƒ³ãƒ—レートシステム"
    
    #: ../docs/Overview.md:58
    msgid ""
    "This component handles processing of objects from the registry through a "
    "templating\n"
    "engine that allows output to a variety of formats. Practically speaking, "
    "this is\n"
    "where templates can be implemented to change the design, output or structure "
    "of\n"
    "the data. See {file:docs/Templates.md Templates Architecture} for a complete "
    "overview."
    msgstr ""
    "ã“ã®æ§‹æˆã¯\n"
    "レジストリーã‹ã‚‰å¤šæ§˜ãªæ›¸å¼ã‚’出力å¯èƒ½ãªãƒ†ãƒ³ãƒ—レートエンジンã¾ã§\n"
    "オブジェクトã®å‡¦ç†ã‚’æ“作ã™ã‚‹ã€‚\n"
    "実際ã®è©±ã‚’ã™ã‚‹ã¨ã€ã“れã¯ã€è¨­è¨ˆã‚„å‡ºåŠ›ã‚„ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã‚’変更ã™ã‚‹ç‚ºã«\n"
    "テンプレートãŒå®Ÿè£…ã•れる場所ã¨ãªã‚‹ã€‚\n"
    "テンプレートã®è©³ç´°ãªèª¬æ˜Žã¯\n"
    "{file:docs/Templates.md Templates Architecture}å‚照。"
    
    # title
    #: ../docs/Parser.md:1
    msgid "Parser Architecture"
    msgstr "パーサー構造"
    
    #: ../docs/Parser.md:3
    msgid "# Parser Architecture"
    msgstr "# パーサー構造"
    
    #: ../docs/Parser.md:5
    msgid ""
    "The parser component of YARD is the first component in the data processing "
    "pipeline\n"
    "that runs before any handling is done on the source. The parser is meant to "
    "translate\n"
    "the source into a set of statements that can be understood by the {file:docs/"
    "Handlers.md Handlers}\n"
    "that run immediately afterwards."
    msgstr ""
    "YARDã®ãƒ‘ãƒ¼ã‚µãƒ¼ã®æ§‹æˆè¦ç´ ã¯ã€\n"
    "何らã‹ã®å‡¦ç†ãŒã‚½ãƒ¼ã‚¹ä¸Šã§è¡Œã‚れるå‰ã«å®Ÿè¡Œã•れ\n"
    "パイプラインã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã®ä¸­ã®æœ€åˆã®æ§‹æˆè¦ç´ ã¨ãªã‚‹ã€‚\n"
    "パーサーã¯ã‚½ãƒ¼ã‚¹ã‚’ã€\n"
    "後ã§ã™ã実行ã™ã‚‹{file:docs/Handlers.md Handlers}ã«ã‚ˆã£ã¦ç†è§£ã•れ\n"
    "ステートメントã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã¸å¤‰æ›ã™ã‚‹ã‚ˆã†æ„図ã•れã¦ã„る。"
    
    #: ../docs/Parser.md:10
    msgid ""
    "The important classes are described in the class diagram of the entire "
    "parser\n"
    "system below:"
    msgstr "é‡è¦ãªã‚¯ãƒ©ã‚¹ã¯ã€ä»¥ä¸‹ã®ãƒ‘ーサーã®å…¨ä½“ã®ã‚·ã‚¹ãƒ†ãƒ ã®ã‚¯ãƒ©ã‚¹å›³è¡¨ã®ä¸­ã§è¨˜è¿°ã™ã‚‹ã€‚"
    
    #: ../docs/Parser.md:13
    msgid "![Parser Class Diagram](images/parser-class-diagram.png)"
    msgstr "![Parser Class Diagram](images/parser-class-diagram.png)"
    
    #: ../docs/Parser.md:15
    msgid "(Note: the RubyToken classes are omitted from the diagram)"
    msgstr "(注æ„: RubyTokenクラスã¯ã€å›³è¡¨ã‹ã‚‰çœç•¥ã•れã¾ã™ã€‚)"
    
    #: ../docs/Parser.md:17
    msgid "## SourceParser"
    msgstr "## ソースパーサー"
    
    #: ../docs/Parser.md:19
    msgid ""
    "The main class {YARD::Parser::SourceParser} acts as a factory class, "
    "instantiating\n"
    "the correct parser class, an implementation of {YARD::Parser::Base}. The "
    "selected parser\n"
    "is chosen based on either the file extension or by selecting it explicitly "
    "(as an argument\n"
    "to parsing methods). YARD supports Ruby and C source files, but custom "
    "parsers can\n"
    "be implemented and registered for various other languages by subclassing "
    "`Parser::Base`\n"
    "and registering the parser with {YARD::Parser::SourceParser."
    "register_parser_type}."
    msgstr ""
    "主ãªã‚¯ãƒ©ã‚¹{YARD::Parser::SourceParser}ã¯ã€ãƒ•ァクトリークラスã®ã‚ˆã†ã«æŒ¯ã‚‹èˆž"
    "ã†ã€‚\n"
    "ãã—ã¦æ­£ç¢ºãªãƒ‘ーサークラスをインスタンス化ã™ã‚‹ã€‚ã“れã¯{YARD::Parser::Base}ã‹"
    "ら実装ã™ã‚‹ã€‚\n"
    "é¸ã°ã‚Œã‚‹ãƒ‘ーサーã¯ã€\n"
    "ファイル拡張å­ã‹ãƒ‘ãƒ¼ã‚µãƒ¼ã‚¿ã‚¤ãƒ—ã‚’æ˜Žç¢ºã«æŒ‡å®šã™ã‚‹äº‹ã«ã‚ˆã£ã¦ãƒ™ãƒ¼ã‚¹ãŒé¸ã°ã‚Œã‚‹ã€‚\n"
    "(メソッドã®è§£æžã®ç‚ºã®å¼•æ•°ã®ã‚ˆã†ã«)\n"
    "YARDã¯Rubyã‚„Cã®ã‚½ãƒ¼ã‚¹ãƒ•ァイルをサãƒãƒ¼ãƒˆã™ã‚‹ãŒã€‚\n"
    "カスタムパーサーãŒ\n"
    "`Parser::Base`をサブクラス化ã—\n"
    "{YARD::Parser::SourceParser.register_parser_type}を用ã„登録ã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n"
    "様々ãªä»–ã®è¨€èªžç”¨ã«å®Ÿè£…ã•れã€ç™»éŒ²ã•れる。"
    
    #: ../docs/Parser.md:26
    msgid ""
    "This factory class should always be used when parsing source files rather "
    "than\n"
    "the individual parser classes since it initiates the pipeline that runs the\n"
    "handlers on the parsed source. The parser used must also match the "
    "handlers,\n"
    "and this is coordinated by the `SourceParser` class as well."
    msgstr ""
    "ã“ã®ãƒ•ァクトリークラスã¯ã€å€‹ã€…ã®ãƒ‘ーサークラスを解æžã™ã‚‹æ™‚より\n"
    "ソースファイルを解æžã™ã‚‹æ™‚ã«æ¯Žå›žåˆ©ç”¨ã•れる。\n"
    "ãªã®ã§è§£æžã•れãŸã‚½ãƒ¼ã‚¹ä¸Šã§ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’èµ·å‹•ã™ã‚‹ãƒ‘イプラインを開始ã™ã‚‹ã€‚\n"
    "利用ã•れるパーサーã¯ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ãƒžãƒƒãƒã—ãªã‘れã°ãªã‚‰ãªã„ã€\n"
    "ã“れ㯠`SourceParser` クラスã«ã‚ˆã£ã¦åŒæ§˜ã«ã‚³ãƒ¼ãƒ‡ã‚£ãƒãƒ¼ãƒˆã•れる。"
    
    #: ../docs/Parser.md:31
    msgid "## Using the SourceParser Class"
    msgstr "## ソースパーサークラスを使ã†ã«ã¯"
    
    #: ../docs/Parser.md:33
    msgid ""
    "The `SourceParser` class API is optimized for parsing globs of files. As "
    "such,\n"
    "the main method to use the class is the `parse` class method, which takes "
    "an\n"
    "array of file globs or a single file glob."
    msgstr ""
    "`SourceParser` クラスAPIã¯ã€ãƒ•ァイルã®globã‚’è§£æžã™ã‚‹ç‚ºã«æœ€é©åŒ–ã•れる。\n"
    "クラスを使ã†ç‚ºã®ä¸»ãªãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ `parse` クラスメソッドã¨ãªã‚‹ã€‚\n"
    "ãã—ã¦ã€ãƒ•ァイルã®é…列やå˜ä¸€ã®ãƒ•ァイルglobã‚’å–る。"
    
    #: ../docs/Parser.md:37
    msgid ""
    "    YARD::Parser::SourceParser.parse('spec_*.rb')\n"
    "    YARD::Parser::SourceParser.parse(['spec_*.rb', '*_helper.rb'])"
    msgstr ""
    "    YARD::Parser::SourceParser.parse('spec_*.rb')\n"
    "    YARD::Parser::SourceParser.parse(['spec_*.rb', '*_helper.rb'])"
    
    #: ../docs/Parser.md:40
    msgid "This is equivalent to the convenience method {YARD.parse}:"
    msgstr "ã“れã¯ä»¥ä¸‹ã®ä¾¿å®œçš„ãªãƒ¡ã‚½ãƒƒãƒ‰{YARD.parse}ã¨åŒç­‰ã§ã‚る。"
    
    #: ../docs/Parser.md:42
    msgid "    YARD.parse('lib/**/*.rb')"
    msgstr "    YARD.parse('lib/**/*.rb')"
    
    #: ../docs/Parser.md:44
    msgid ""
    "In some cases (ie. for testing), it may be more helpful to parse a string of "
    "input\n"
    "directly. In such a case, the method {YARD::Parser::SourceParser."
    "parse_string} should be\n"
    "used:"
    msgstr ""
    "å ´åˆã«ã‚ˆã£ã¦ã¯(ã¤ã¾ã‚Šãƒ†ã‚¹ãƒˆã®ç‚º)ã€\n"
    "ãれã¯ç›´æŽ¥å…¥åŠ›ã®æ–‡å­—列を解æžã™ã‚‹ã®ã«ã¨ã¦ã‚‚役立ã¤ã ã‚ã†ã€‚\n"
    "ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯ã€\n"
    "以下ã®{YARD::Parser::SourceParser.parse_string}メソッドãŒä½¿ã‚れる。"
    
    #: ../docs/Parser.md:48
    msgid "    YARD::Parser::SourceParser.parse_string(\"def method(a, b) end\")"
    msgstr "    YARD::Parser::SourceParser.parse_string(\"def method(a, b) end\")"
    
    #: ../docs/Parser.md:50
    msgid "You can also provide the parser type explicitly as the second argument:"
    msgstr "ã‚ãªãŸã¯ã€ãƒ‘ーサーã®åž‹ã‚’第2引数ã®ã‚ˆã†ã«æä¾›ã§ãる。"
    
    #: ../docs/Parser.md:52
    msgid ""
    "    # Parses a string of C\n"
    "    YARD::Parser::SourceParser.parse_string(\"int main() { }\", :c)"
    msgstr ""
    "    # Cè¨€èªžã®æ–‡å­—列を解æžã™ã‚‹\n"
    "    YARD::Parser::SourceParser.parse_string(\"int main() { }\", :c)"
    
    #: ../docs/Parser.md:55
    msgid ""
    "Note that these two methods are aliased as {YARD.parse} and {YARD."
    "parse_string} for\n"
    "convenience."
    msgstr ""
    "以下ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "ã“れらã®äºŒã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ä¾¿åˆ©ã«ä½¿ã†ç‚ºã®\n"
    "{YARD.parse}ã‚„{YARD.parse_string}ã®ã‚ˆã†ãªåˆ¥åã¨ãªã‚‹ã€‚"
    
    #: ../docs/Parser.md:58
    msgid "## Implementing and Registering a Custom Parser"
    msgstr "## カスタムパーサーを実装åŠã³ç™»éŒ²ã™ã‚‹"
    
    #: ../docs/Parser.md:60
    msgid ""
    "To implement a custom parser, subclass {YARD::Parser::Base}. Documentation "
    "on which\n"
    "abstract methods should be implemented are documented in that class. After "
    "the class\n"
    "is implemented, it is registered with the {YARD::Parser::SourceParser} "
    "factory class\n"
    "to be called when a file of the right extension needs to be parsed, or when "
    "a user\n"
    "selects that parser type explicitly. To register your new parser class, call "
    "the\n"
    "method {YARD::Parser::SourceParser.register_parser_type}:"
    msgstr ""
    "カスタムパーサーを実装ã™ã‚‹ã«ã¯ã€{YARD::Parser::Base}をサブクラス化ã™ã‚‹ã€‚\n"
    "抽象的ãªãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã‚¯ãƒ©ã‚¹ã®ä¸­ã§è¨˜è¿°ã•れ実装ã•れる。\n"
    "クラスãŒå®Ÿè£…ã•れãŸã‚ã¨ã§ã€\n"
    "æ­£ã—ã„æ‹¡å¼µå­ã®ãƒ•ァイルãŒè§£æžã•れる為ã«å¿…è¦ã¨ãªã‚‹æ™‚ã‚„\n"
    "ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ˜Žç¤ºçš„ã«ãƒ‘ーサーã®ã‚¿ã‚¤ãƒ—ã‚’é¸æŠžã™ã‚‹æ™‚ã«\n"
    "呼ã³å‡ºã•れる為ã«{YARD::Parser::SourceParser}ファクトリークラスを用ã„記録ã•れる。\n"
    "ã‚ãªãŸã®æ–°ã—ã„パーサークラスを登録ã™ã‚‹ã«ã¯ã€\n"
    "ä»¥ä¸‹ã®æ§˜ã«{YARD::Parser::SourceParser.register_parser_type}メソッドを呼ã³å‡ºã™ã€‚"
    
    #: ../docs/Parser.md:67
    msgid ""
    "    SourceParser.register_parser_type(:my_parser, MyParser, 'my_parser_ext')"
    msgstr "    SourceParser.register_parser_type(:my_parser, MyParser, 'my_parser_ext')"
    
    #: ../docs/Parser.md:69
    msgid ""
    "The last argument can be a single extension, a list of extensions (Array), a "
    "single Regexp, or a\n"
    "list of Regexps. Do not include the '.' in the extension."
    msgstr ""
    "最後ã®å¼•æ•°ã¯ã€å˜ä¸€ã®æ‹¡å¼µã‹ã€æ‹¡å¼µã®ãƒªã‚¹ãƒˆã‹ã€å˜ç‹¬ã®æ­£è¦è¡¨ç¾ã‹ã€æ­£è¦è¡¨ç¾ã®ãƒªã‚¹"
    "トã«ãªã‚‹ã€‚\n"
    "æ‹¡å¼µã™ã‚‹ä¸­ã«'.'ã‚’å«ã‚ã‚‹ã“ã¨ã¯ã§ããªã„。"
    
    #: ../docs/Parser.md:73
    msgid "## The Two Ruby Parser Types"
    msgstr "## 2ã¤ã®Rubyパーサーã®åž‹"
    
    #: ../docs/Parser.md:75
    msgid ""
    "When parsing Ruby, the SourceParser can either instantiate the new {YARD::"
    "Parser::Ruby::RubyParser}\n"
    "class or the {YARD::Parser::Ruby::Legacy::StatementList} class. The first of "
    "the\n"
    "two, although faster, more robust and more efficient, is only available for\n"
    "Ruby 1.9. The legacy parser parser is available in both 1.8.x and 1.9, if\n"
    "compatibility is required. The choice of parser will affect which handlers\n"
    "ultimately get used, since new handlers can only use the new parser and the\n"
    "same requirement applies to the legacy parser & handlers."
    msgstr ""
    "Rubyを処ç†ã—ã¦ã„る時ã€\n"
    "SourceParserã¯ã€{YARD::Parser::Ruby::RubyParser}クラスã¾ãŸã¯ã€\n"
    "{YARD::Parser::Ruby::Legacy::StatementList}クラスをインスタンス化ã™ã‚‹ã€‚\n"
    "2ã¤ã®å†…ã®æœ€åˆã®ã€{YARD::Parser::Ruby::RubyParser}ã¯ã€\n"
    "高速ã§ã€æœ€ã‚‚å …ç‰¢ã§æœ€ã‚‚効率的ã ãŒã€Ruby 1.9ã®ã¿åˆ©ç”¨å¯èƒ½ã€‚\n"
    "ã‚‚ã—äº’æ›æ€§ãŒå¿…è¦ãªå ´åˆã€2番目ã®legacy parserパーサーãªã‚‰ã€\n"
    "1.8.xã¨1.9ã®ä¸¡æ–¹ã§åˆ©ç”¨å¯èƒ½ã€‚\n"
    "パーサーã®é¸æŠžã¯ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒæœ€çµ‚çš„ã«å–å¾—ã™ã‚‹æ‰€ã§å½±éŸ¿ã™ã‚‹ã€‚\n"
    "ã ã‹ã‚‰ã€æ–°ã—ã„ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯æ–°ã—ã„パーサーã ã‘を使ãˆã‚‹ã€‚\n"
    "ãã®æ¡ä»¶ã¯ãƒ¬ã‚¬ã‚·ãƒ¼ãƒ‘ーサーã¨ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚‚åŒæ§˜ã§ã‚る。"
    
    #: ../docs/Parser.md:83
    msgid "## Switching to Legacy Parser"
    msgstr "## レガシーパーサーã«åˆ‡æ›¿ãˆã‚‹"
    
    #: ../docs/Parser.md:85
    msgid ""
    "By default, running YARD under Ruby 1.9 will automatically select the new "
    "parser\n"
    "and new handlers by extension. Although YARD supports both handler styles, "
    "plugins\n"
    "may choose to only implement one of the two (though this is not "
    "recommended). If\n"
    "only the legacy handlers are implemented, the `SourceParser` class should "
    "force\n"
    "the use of the legacy parser by setting the `parser_type` attribute as such:"
    msgstr ""
    "デフォルトã§ã€ç¨¼å‹•中ã®Ruby1.9以下ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½¿ã‚れるYARDã¯ã€\n"
    "æ‹¡å¼µã«ã‚ˆã£ã¦æ–°ã—ã„ãƒ‘ãƒ¼ã‚µãƒ¼ã¨æ–°ã—ã„ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’自動ã§é¸æŠžã™ã‚‹ã€‚\n"
    "YARDãŒã©ã¡ã‚‰ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã‚‚サãƒãƒ¼ãƒˆã™ã‚‹ã‘れã©ã‚‚ã€\n"
    "プラグインã¯2ã¤ã®å†…一ã¤ã ã‘を実装ã™ã‚‹äº‹ã‚’é¸æŠžã™ã‚‹äº‹ã‚‚ã§ãる。\n"
    "(ã“ã®ã‚ˆã†ãªè€ƒãˆã¯æŽ¨å¥¨ã•れãªã„)\n"
    "ã‚‚ã—ã€ãƒ¬ã‚¬ã‚·ãƒ¼ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ã¿å®Ÿè£…ã™ã‚‹å ´åˆã€\n"
    "`SourceParser`クラスã¯ãƒ¬ã‚¬ã‚·ãƒ¼ãƒ‘ーサーã®ä½¿ç”¨ã‚’\n"
    "強制ã™ã¹ãã§ã‚る。\n"
    "例ã¨ã—ã¦ã€ä»¥ä¸‹ã®æ§˜ã«`parser_type`属性を設定ã™ã‚‹ã€‚"
    
    #: ../docs/Parser.md:91
    msgid "    YARD::Parser::SourceParser.parser_type = :ruby18"
    msgstr "    YARD::Parser::SourceParser.parser_type = :ruby18"
    
    #: ../docs/Parser.md:93
    msgid ""
    "The default value is `:ruby`. Note that this cannot be forced the other way "
    "around,\n"
    "a parser type of `:ruby` cannot be set under Ruby 1.8.x as the new parser is "
    "not\n"
    "supported under 1.8."
    msgstr ""
    "デフォルトã®å€¤ã¯ã€`:ruby`ã¨ãªã‚‹ã€‚\n"
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚`:ruby`ã«ã—ã¦ã‚‚強制ã•れるã‚ã‘ã§ã¯ãªã„。\n"
    "何故ãªã‚‰`:ruby`ã®ãƒ‘ーサーã®åž‹ã¯Ripperãƒ©ã‚¤ãƒ–ãƒ©ãƒªãŒæœªå®šç¾©ã®å ´åˆã€\n"
    "æ–°ã—ã„パーサーãŒ1.8.以下をサãƒãƒ¼ãƒˆã—ãªã„様ã«ã™ã‚‹ã®ã§ã€\n"
    "Ruby 1.8.x以下ã«ã¯è¨­å®šã•れãªã„ã‹ã‚‰ã§ã‚る。"
    
    #: ../docs/Parser.md:97
    msgid "## RubyParser (the New Parser)"
    msgstr "## Rubyパーサー(æ–°ã—ã„パーサー)"
    
    #: ../docs/Parser.md:99
    msgid ""
    "The new Ruby parser uses the Ripper library that is packaged as part of "
    "stdlib\n"
    "in Ruby 1.9. Because of this, it can generate an AST from a string of Ruby "
    "input\n"
    "that is similar to the style of other sexp libraries (such as ParseTree). "
    "Each\n"
    "node generated in the tree is of the base type {YARD::Parser::Ruby::"
    "AstNode},\n"
    "which has some subclasses for common node types."
    msgstr ""
    "æ–°ã—ã„Rubyパーサーã¯Ruby1.9ã®ä¸­ã®Ripperライブラリを使用ã™ã‚‹ã€‚\n"
    "ã“ã‚Œã¯æ¨™æº–ライブラリã®ä¸€éƒ¨ã¨ã—ã¦ãƒ‘ッケージã•れる。\n"
    "ãã‚“ãªè¨³ã§ã€Rubyã®å…¥åŠ›æ–‡å­—åˆ—ã‹ã‚‰ã®ASTを生æˆã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã‚‹ã€‚\n"
    "ã“れã¯ã€ä»–ã®Så¼ãƒ©ã‚¤ãƒ–ラリã®ã‚¹ã‚¿ã‚¤ãƒ«ã¨åŒæ§˜ã§ã‚る。\n"
    "ツリーã®ä¸­ã®ãれãžã‚Œã®ç”Ÿæˆã—ãŸãƒŽãƒ¼ãƒ‰ã¯ã€\n"
    "基準ã®åž‹{YARD::Parser::Ruby::AstNode}ã¨ãªã‚‹ã€‚\n"
    "ãã—ã¦ã€ä¸€èˆ¬çš„ãªãƒŽãƒ¼ãƒ‰ã®åž‹ç”¨ã®ã„ãã¤ã‹ã®ã‚µãƒ–クラスを\n"
    "æŒã£ã¦ã„る。"
    
    #: ../docs/Parser.md:105
    msgid "### AstNode Basics"
    msgstr "### AstNodeã®åŸºæœ¬"
    
    #: ../docs/Parser.md:107
    msgid ""
    "The `AstNode` class behaves like a standard Array class in which all of its "
    "data\n"
    "make up the list of elements in the array. Unlike other sexp style "
    "libraries, however,\n"
    "the node type is not the first element of the list. Instead, the node type "
    "is defined\n"
    "by the `#type` method. The following examples show some of the basic uses of "
    "`AstNode`:"
    msgstr ""
    "AstNodeクラスã¯ã€å…¨ã¦ã®ãƒ‡ãƒ¼ã‚¿ãŒé…列ã®ä¸­ã®è¦ç´ ã®ãƒªã‚¹ãƒˆã‚’\n"
    "作り上ã’ã‚‹æ‰€ã§æ¨™æº–ã®é…列クラスã®ã‚ˆã†ã«æŒ¯ã‚‹èˆžã†ã€‚\n"
    "ä»–ã®Så¼ã‚¹ã‚¿ã‚¤ãƒ«ã®ãƒ©ã‚¤ãƒ–ラリã¨ã¯ç•°ãªã£ã¦ã„る。ã—ã‹ã—ãªãŒã‚‰ã€\n"
    "ノードタイプã¯ã€ãƒªã‚¹ãƒˆã®æœ€åˆã®è¦ç´ ã§ã¯ç„¡ã„。\n"
    "ã‚€ã—ã‚ã€ãƒŽãƒ¼ãƒ‰ã‚¿ã‚¤ãƒ—ã¯`#type`メソッドã«ã‚ˆã£ã¦å®šç¾©ã•れる。\n"
    "以下ã®ä¾‹ã¯ã€ã„ãã¤ã‹ã®`AstNode`ã®åŸºæœ¬çš„ãªä½¿ç”¨æ³•を表ã™ã€‚"
    
    #: ../docs/Parser.md:112
    msgid ""
    "    # The sexp defines the statement `hello if 1`\n"
    "    node = s(:if_mod, s(:int, \"1\"), s(:var_ref, s(:ident, \"hello\")))\n"
    "    node.type  #=> :if_mod\n"
    "    node[0]    #=> s(:int, \"1\")\n"
    "    node[0][0] #=> \"1\""
    msgstr ""
    "    # Så¼ã¯ `hello if 1` ステートメントを定義ã™ã‚‹\n"
    "    node = s(:if_mod, s(:int, \"1\"), s(:var_ref, s(:ident, \"hello\")))\n"
    "    node.type  #=> :if_mod\n"
    "    node[0]    #=> s(:int, \"1\")\n"
    "    node[0][0] #=> \"1\""
    
    #: ../docs/Parser.md:118
    msgid ""
    "(Note the `s()` syntax is shorthand for `AstNode.new(...)`. `s()` with no "
    "type\n"
    "is shorthand for a node of type `:list`)"
    msgstr ""
    "(æ³¨æ„ `s()`æ§‹æ–‡ã¯`AstNode.new(...)`用ã®ç¸®ã‚ãŸè¡¨è¨˜ã¨ãªã‚‹ã€‚\n"
    "åž‹ãŒãªã„`s()`ã¯`:list`åž‹ã®ãƒŽãƒ¼ãƒ‰ç”¨ã®ç¸®ã‚ãŸè¡¨è¨˜ã¨ãªã‚‹ã€‚)"
    
    #: ../docs/Parser.md:121
    msgid ""
    "As shown, not all of the elements are AstNodes in themselves, some are "
    "String\n"
    "objects containing values. A list of only the AstNodes within a node can be\n"
    "accessed via the {YARD::Parser::Ruby::AstNode#children #children} method. "
    "Using\n"
    "the sexp declared above, we can do:"
    msgstr ""
    "示ã•れãŸã‚ˆã†ã«ã€è¦ç´ ã®å…¨ã¦ãŒãれら自身ã®ä¸­ã®AstNodeã§ã¯ç„¡ãã€\n"
    "ã„ãã¤ã‹ã¯ã€å€¤ã‚’å«ã‚“ã§ã„ã‚‹Stringオブジェクトã¨ãªã‚‹ã€‚\n"
    "ノード内部AstNodeã ã‘ã®ãƒªã‚¹ãƒˆã¯ã€\n"
    "{YARD::Parser::Ruby::AstNode#children #children}メソッド経由ã§ã‚¢ã‚¯ã‚»ã‚¹ã•れる。\n"
    "上ã§å®£è¨€ã•れãŸSå¼ã«ã‚ˆã£ã¦ä»¥ä¸‹ã®ã‚ˆã†ã«ã§ãる。"
    
    #: ../docs/Parser.md:126
    msgid ""
    "    node.children #=> [s(:int, \"1\"), s(:var_ref, s(:ident, \"hello\"))]"
    msgstr "    node.children #=> [s(:int, \"1\"), s(:var_ref, s(:ident, \"hello\"))]"
    
    #: ../docs/Parser.md:128
    msgid "### AstNode#source and #line"
    msgstr "### AstNode#source and #line"
    
    #: ../docs/Parser.md:130
    msgid ""
    "Every node defines the `#source` method which returns the source code that "
    "the\n"
    "node represents. One of the most common things to do with a node is to grab "
    "its\n"
    "source. The following example shows how this can be done:"
    msgstr ""
    "å…¨ã¦ã®ãƒŽãƒ¼ãƒ‰ã¯`#source`メソッドを定義ã™ã‚‹ã€‚\n"
    "ãã—ã¦ã€ãƒŽãƒ¼ãƒ‰ãŒæ„味ã™ã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’è¿”ã™ã€‚\n"
    "ノードを用ã„ãŸæœ€ã‚‚一般的ãªäº‹ã¯ã€ã‚½ãƒ¼ã‚¹ã‚’å–å¾—ã™ã‚‹äº‹ã¨ãªã‚‹ã€‚\n"
    "以下ã®ä¾‹ã¯ã€ã“れãŒã©ã®ã‚ˆã†ã«å®Ÿè¡Œã•れるã‹ã‚’表ã™ã€‚"
    
    #: ../docs/Parser.md:134
    msgid ""
    "    source = \"if 1 == 1 then\\n  raise Exception\\n end\"\n"
    "    ast = YARD::Parser::Ruby::RubyParser.parse(source).root\n"
    "    ast[0].condition.source  #=> \"1 == 1\"\n"
    "    ast[0].then_block.source #=> \"raise Exception\""
    msgstr ""
    "    source = \"if 1 == 1 then\\n  raise Exception\\n end\"\n"
    "    ast = YARD::Parser::Ruby::RubyParser.parse(source).root\n"
    "    ast[0].condition.source  #=> \"1 == 1\"\n"
    "    ast[0].then_block.source #=> \"raise Exception\""
    
    #: ../docs/Parser.md:139
    msgid ""
    "Note that this only works on source parsed from the RubyParser, not sexps\n"
    "declared using the `s()` syntax. This is because no source code is "
    "generated\n"
    "or stored by nodes. Instead, only the character ranges are stored, which "
    "are\n"
    "then looked up in the original full source string object. For example:"
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "RubyParserã‹ã‚‰è§£æžã•れるソース上ã ã‘ã§åƒãã€\n"
    "Så¼ãŒ`s()`æ§‹æ–‡ã«ã‚ˆã£ã¦å®£è¨€ã•れる時ã¯åƒã‹ãªã„。\n"
    "ã“れã¯ä½•æ•…ã‹ã¨ã„ã†ã¨ãƒŽãƒ¼ãƒ‰ã«ã‚ˆã£ã¦ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯ç”Ÿæˆã‚„æ ¼ç´ã•れãªã„ã‹ã‚‰ã§ã‚"
    "る。\n"
    "代ã‚りã«ã€æ–‡å­—列ã®ç¯„囲ã ã‘æ ¼ç´ã•れã€\n"
    "å…ƒã®å…¨ã¦ã®ã‚½ãƒ¼ã‚¹ã®characterオブジェクトã®ä¸­ã§æ¤œç´¢ã•れる。\n"
    "ä»¥ä¸‹ã®æ§˜ã«ãªã‚‹ã€‚"
    
    #: ../docs/Parser.md:144
    msgid ""
    "    # Following the code snippet above\n"
    "    ast[0].then_block.source_range #=> 17..31"
    msgstr ""
    "    # 上ã®ã‚³ãƒ¼ãƒ‰ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚(raise Exception部分ã®ãƒ¬ãƒ³ã‚¸)\n"
    "    ast[0].then_block.source_range #=> 17..31"
    
    #: ../docs/Parser.md:147
    msgid "We can also get the line and line ranges in a similar fashion:"
    msgstr "ç§é”ã¯ä»¥ä¸‹ã®æ–¹æ³•ã®æ§˜ã«ã€è¡Œã‚„行ã®ç¯„囲をå–å¾—ã§ãる。\n"
    
    #: ../docs/Parser.md:149
    msgid ""
    "    ast[0].type       #=> :if\n"
    "    ast[0].line       #=> 1\n"
    "    ast[0].line_range #=> 1..3 (note the newlines in the source)"
    msgstr ""
    "    ast[0].type       #=> :if\n"
    "    ast[0].line       #=> 1\n"
    "    ast[0].line_range #=> 1..3 (ã‚½ãƒ¼ã‚¹ä¸­ã®æ”¹è¡Œã«æ³¨æ„)"
    
    #: ../docs/Parser.md:153
    msgid "### AstNode#jump"
    msgstr "### AstNode#jump"
    
    #: ../docs/Parser.md:155
    msgid ""
    "Often the AST will be such that the node we care about might be buried "
    "arbitrarily\n"
    "deep in a node's hierarchy. The {YARD::Parser::Ruby::AstNode#jump} method "
    "exists\n"
    "to quickly get at a node of a specific type in such a situation:"
    msgstr ""
    "多ãã®å ´åˆAST処ç†ã®ä¸­ã§ãƒŽãƒ¼ãƒ‰ã«å¯¾ã—ç§é”ãŒæ°—を付ã‘る事ã¯ã€\n"
    "ä»»æ„ã§ãƒŽãƒ¼ãƒ‰ã®éšŽå±¤ã®ä¸­æ·±ãã«åŸ‹ã‚られるã‹ã‚‚ã—れãªã„ã¨ã„ã†äº‹ã§ã‚る。\n"
    "{YARD::Parser::Ruby::AstNode#jump}メソッドã¯ã€ä»¥ä¸‹ã®çжæ³ã«ãŠã„ã¦ç‰¹å®šã®åž‹ã®\n"
    "ノードã«ç´ æ—©ã到é”ã™ã‚‹ç‚ºã«å­˜åœ¨ã™ã‚‹ã€‚"
    
    #: ../docs/Parser.md:159
    msgid ""
    "    # Get the first identifier in the statement\n"
    "    ast = s(s(:int, \"1\"), s(s(:var_ref, s(:ident, \"hello\"))))\n"
    "    ast.jump(:ident)[0] #=> \"hello\""
    msgstr ""
    "    # Get the first identifier in the statement\n"
    "    ast = s(s(:int, \"1\"), s(s(:var_ref, s(:ident, \"hello\"))))\n"
    "    ast.jump(:ident)[0] #=> \"hello\""
    
    #: ../docs/Parser.md:163
    msgid ""
    "Multiple types can be searched for at once. If none are found, the original "
    "root\n"
    "node is returned so that it may be chained."
    msgstr ""
    "複数ã®ã‚¿ã‚¤ãƒ—ã¯ã€ã™ãã«æ¤œç´¢ã•れる。\n"
    "ã‚‚ã—ã€è¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ã¯ã€é€£éŽ–ã•れるよã†ã«è¿”ã•"
    "れる。"
    
    #: ../docs/Parser.md:166
    msgid "## The Legacy Parser"
    msgstr "## レガシーパーサー"
    
    #: ../docs/Parser.md:168
    msgid ""
    "The goal of the legacy parser is much the same as the new parser, but it is "
    "far\n"
    "more simplistic. Instead of a full-blown AST, the legacy parser simply "
    "groups\n"
    "together lists of \"statements\" called a {YARD::Parser::Ruby::Legacy::"
    "StatementList}.\n"
    "These statement lists are made up of {YARD::Parser::Ruby::Legacy::Statement} "
    "objects.\n"
    "A statement is any method call condition, loop, or declaration. Each "
    "statement\n"
    "may or may not have a block. In the case of a condition or loop, the block "
    "is\n"
    "the inner list of statements; in the case of a method call, the block is a "
    "do\n"
    "block (if provided). The statements themselves are made up of tokens, so "
    "instead\n"
    "of being semantic in nature like the new parser, statements are tied "
    "directly\n"
    "to the lexical tokens that make them up. To convert a statement into source, "
    "you\n"
    "simply join all the tokens together (this is done through the use of "
    "`#to_s`)."
    msgstr ""
    "レガシーパーサーã®ç›®çš„ã¯ã€æ–°ã—ã„ãƒ‘ãƒ¼ã‚µãƒ¼ã¨æ®†ã‚“ã©åŒæ§˜ã§ã‚ã‚‹ãŒã€\n"
    "ã—ã‹ã—ã€ãれã¯ã¯ã‚‹ã‹ã«å˜ç´”ã§ã‚る。\n"
    "完璧ãªASTã®ä»£ã‚りã«ã€\n"
    "レガシーパーサーã¯ã€å˜ç´”ã«\n"
    "{YARD::Parser::Ruby::Legacy::StatementList}ã§å‘¼ã³å‡ºã•れる\"ステートメント\"ã®ãƒªã‚¹ãƒˆã®\n"
    "グループを作る。\n"
    "ã“れらã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã¯ã€{YARD::Parser::Ruby::Legacy::Statement}\n"
    "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã§æ§‹æˆã•れã¦ã„る。\n"
    "ステートメントã¯ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§æ¡ä»¶,ループ,宣言を呼ã³å‡ºã™ã€‚\n"
    "ãれãžã‚Œã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ãƒ–ロックをæŒã£ã¦ã„ã‚‹ã‹ã‚ã‹ã‚‰ãªã„。\n"
    "æ¡ä»¶ã‚„ループã®å ´åˆã€ãƒ–ロックã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®å†…部ã®ãƒªã‚¹ãƒˆã«ãªã‚‹ã€‚\n"
    "メソッド呼ã³å‡ºã—ã®å ´åˆã€ãƒ–ロックã¯ãƒ–ロックを実行ã™ã‚‹ã€‚(ã‚‚ã—æä¾›ã•れるãªã‚‰)\n"
    "ステートメントãれ自体ã¯ã€ãƒˆãƒ¼ã‚¯ãƒ³ã§æ§‹æˆã•れã¦ã„る。\n"
    "ãã®ç‚ºã€æ–°ã—ã„パーサーã®ã‚ˆã†ã«è‡ªç„¶ãªæ„味ã«ãªã‚‹ä»£ã‚りã«ã€\n"
    "ステートメントã¯ãれらを作り上ã’ã‚‹å˜èªžã®ãƒˆãƒ¼ã‚¯ãƒ³ã«ç›´æŽ¥ç´ä»˜ã‘られる。\n"
    "ステートメントをソースã«å¤‰æ›ã™ã‚‹ç‚ºã«ã¯ã€\n"
    "å…¨ã¦ã®ãƒˆãƒ¼ã‚¯ãƒ³ã¨å…±ã«å˜ç´”ã«åŠ ãˆã‚Œã°ã„ã„。\n"
    "(ã“れã¯`#to_s`メソッドを使用ã—行ã‚れる。)"
    
    #: ../docs/Parser.md:180
    msgid ""
    "Note that because there is little semantic parsing, the legacy parser is "
    "less\n"
    "able to deal with certain Ruby syntaxes. Specifically, the `:if_mod` syntax\n"
    "seen above (\"hello if 1\") would be considered two statements with the new "
    "parser,\n"
    "but using the legacy parser it is only one statement:"
    msgstr ""
    "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "æ„味ã®ã‚ã‚‹è§£æžãŒã»ã¨ã‚“ã©ãªã„ã®ã§ã€\n"
    "レガシーパーサーã¯ã€ç‰¹å®šã®Rubyæ§‹æ–‡ã¨å…±ã«æ‰±ã†äº‹ãŒã§ããªã„。\n"
    "具体的ã«ã„ã†ã¨ã€\n"
    "上ã®(\"hello if 1\")ã§è¦‹ãŸ`:if_mod`æ§‹æ–‡ã¯ã€\n"
    "æ–°ã—ã„パーサーを用ã„ãŸäºŒã¤ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¨è€ƒãˆã‚‰ã‚Œã‚‹ã€‚\n"
    "ã—ã‹ã—ã€ãƒ¬ã‚¬ã‚·ãƒ¼ãƒ‘ーサーを使ã†ã¨ä»¥ä¸‹ã®ä¸€ã¤ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã ã‘ã«ãªã‚‹ã€‚"
    
    #: ../docs/Parser.md:185
    msgid ""
    "    stmts = ARD::Parser::Ruby::Legacy::StatementList.new(\"hello if 1\")\n"
    "    stmts[0].block       #=> nil\n"
    "    stmts[0].tokens.to_s #=> \"hello if 1\""
    msgstr ""
    "    stmts = ARD::Parser::Ruby::Legacy::StatementList.new(\"hello if 1\")\n"
    "    stmts[0].block       #=> nil\n"
    "    stmts[0].tokens.to_s #=> \"hello if 1\""
    
    #: ../docs/Parser.md:189
    msgid ""
    "In addition, this means that most handling still needs to be done via "
    "string\n"
    "manipulation and regular expression matching, making it considerably more\n"
    "difficult to use in edge case scenarios."
    msgstr ""
    "ã•らã«ã€ã»ã¨ã‚“ã©ã®å‡¦ç†ã¯æ–‡å­—列æ“作や正è¦è¡¨ç¾ãƒžãƒƒãƒçµŒç”±ã§è¡Œã†\n"
    "å¿…è¦ãŒã‚る事をæ„味ã—ã¦ã„る。\n"
    "ãれã«åˆã‚ã›ã¦ä½œã‚‹ã«ã¯ã€æ¥µç«¯ãªã‚·ãƒŠãƒªã‚ªã§åˆ©ç”¨ã™ã‚‹å ´åˆã€å¤§å¹…ã«é›£ã—ããªã‚‹ã€‚"
    
    # title
    #: ../docs/Tags.md:1
    msgid "Tags Overview"
    msgstr "ã‚¿ã‚°ã®æ¦‚è¦"
    
    #: ../docs/Tags.md:3
    msgid "# Tags Overview"
    msgstr "# ã‚¿ã‚°ã®æ¦‚è¦"
    
    #: ../docs/Tags.md:5
    msgid ""
    "Tags represent meta-data as well as behavioural data that can be added to\n"
    "documentation through the `@tag` style syntax. As mentioned, there are two\n"
    "basic types of tags in YARD, \"meta-data tags\" and \"behavioural tags\", "
    "the\n"
    "latter is more often known as \"directives\". These two tag types can be\n"
    "visually identified by their prefix. Meta-data tags have a `@` prefix,\n"
    "while directives have a prefix of `@!` to indicate that the directive\n"
    "performs some potentially mutable action on or with the docstring. The\n"
    "two tag types would be used in the following way, respectively:"
    msgstr ""
    "ã‚¿ã‚°ã¯`@tag`ã‚¹ã‚¿ã‚¤ãƒ«ã®æ§‹æ–‡ã‹ã‚‰ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’\n"
    "作æˆã™ã‚‹ãŸã‚ã«è¿½åŠ ã•れるデータã®è¡Œå‹•(behavioural)ã¨ã—ã¦ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’表ã™ã€‚\n"
    "上ã§è¿°ã¹ãŸã€\n"
    "YARDã®ä¸­ã§ã‚¿ã‚°ã«ã¯åŸºæœ¬çš„ãª2ã¤ã®æ–¹ãŒã‚りã€\n"
    "\"メタデータタグ\"ã¨\"行動(behavioural)ã‚¿ã‚°\"ãŒã‚る。\n"
    "後者ã¯ã€\"ディレクティブ\"ã¨ã—ã¦ã‚ˆã知られã¦ã„る。\n"
    "ã“れらã®2ã¤ã®ã‚¿ã‚°ã®åž‹ã¯\n"
    "ã“れらã®ãƒ—レフィックス(接頭辞)ã«ã‚ˆã£ã¦è¦–è¦šçš„ã«æŒ‡å®šã•れる。\n"
    "ディレクティブãŒdocstringã¨ä¸€ç·’ã«\n"
    "å¹¾ã¤ã‹ã®æ½œåœ¨çš„ã«å¤‰æ›´å¯èƒ½ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹æŒ‡ç¤ºã‚’ã™ã‚‹ç‚ºã«\n"
    "`@!`ã®ãƒ—レフィックスをæŒã¤é–“ã€\n"
    "メタデータタグã¯`@`プレフィックスをæŒã¤ã€‚\n"
    "2ã¤ã®ã‚¿ã‚°ã®åž‹ã¯ãれãžã‚Œæ¬¡ã®æ–¹æ³•ã§åˆ©ç”¨ã•れる:"
    
    #: ../docs/Tags.md:14
    msgid ""
    "    # @meta_data_tag some data\n"
    "    # @!directive_tag some data\n"
    "    class Foo; end"
    msgstr ""
    "    # @meta_data_tag some data\n"
    "    # @!directive_tag some data\n"
    "    class Foo; end"
    
    #: ../docs/Tags.md:18
    msgid ""
    "This document describes how tags can be specified, how they affect your\n"
    "documentation, and how to use specific built-in tags in YARD, as well\n"
    "as how to define custom tags."
    msgstr ""
    "ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã‚¿ã‚°ã«ã¤ã„ã¦\n"
    "ã©ã®ã‚ˆã†ã«æŒ‡å®šã•れるã‹ã€\n"
    "ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã©ã‚Œã»ã©å½±éŸ¿ã™ã‚‹ã‹ã€\n"
    "YARDã®æŒ‡å®šã®çµ„ã¿è¾¼ã¿ã‚¿ã‚°ã‚’ã©ã®ã‚ˆã†ã«ä½¿ã†ã®ã‹ã€\n"
    "ã©ã®ã‚ˆã†ã«ã‚«ã‚¹ã‚¿ãƒ ã‚¿ã‚°ã‚’定義ã™ã‚‹ã®ã‹ã‚’説明ã™ã‚‹"
    
    #: ../docs/Tags.md:22
    msgid "## Meta-Data Tags"
    msgstr "## メタデータタグ"
    
    #: ../docs/Tags.md:24
    msgid ""
    "Meta-data tags are useful to add arbitrary meta-data about a documented\n"
    "object. These tags simply add data to objects that can be looked up later,\n"
    "either programmatically, or displayed in templates. The benefit to "
    "describing\n"
    "objects using meta-data tags is that your documentation can be organized\n"
    "semantically. Rather than having a huge listing of text with no distinction\n"
    "of what each paragraph is discussing, tags allow you to focus in on "
    "specific\n"
    "elements of your documentation."
    msgstr ""
    "メタデータタグã¯è¨˜è¿°ã•れãŸã‚ªãƒ–ジェクトã«ã¤ã„ã¦\n"
    "ä»»æ„ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã‚る。\n"
    "ã“れらã®ã‚¿ã‚°ã¯\n"
    "ç°¡å˜ã«å¾Œã§æ¤œç´¢ã§ãã€å…¨ã¦ãƒ—ログラムã§ãã€ãƒ†ãƒ³ãƒ—レートã§è¡¨ç¤ºã§ãるよã†ã«\n"
    "オブジェクトã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã€‚\n"
    "メタデータタグを使ã†äº‹ã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトã®èª¬æ˜Žã®åˆ©ç‚¹ã¯ã€\n"
    "ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒæ„味をæŒã£ã¦æ•´ç†ã•れるã“ã¨ã§ã‚る。\n"
    "å€‹ã€…ã®æ®µè½ãŒã©ã“ã§è­°è«–ã•れるã‹\n"
    "区別ã—ãªã„ã§å·¨å¤§ãªãƒ†ã‚­ã‚¹ãƒˆã§ã®è¨˜è¿°ã™ã‚‹ã‚ˆã‚Šã€\n"
    "ã‚¿ã‚°ã¯ã‚ãªãŸãŒã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ç‰¹å®šã®å±žæ€§ã«é›†ä¸­ã™ã‚‹ã®ã‚’\n"
    "考慮ã—ã¦ã„る。"
    
    #: ../docs/Tags.md:32
    msgid ""
    "For example, describing parameters of a method can often be important to "
    "your\n"
    "documentation, but should not be mixed up with the documentation that "
    "describes\n"
    "what the method itself does. In this case, separating the parameter "
    "documentation\n"
    "into {tag:param} tags can yield much better organized documentation, both "
    "in\n"
    "source and in your output, without having to manually format the data using\n"
    "standard markup."
    msgstr ""
    "例ãˆã°ã€\n"
    "メソッドã®ãƒ‘ラメータã®èª¬æ˜Žã¯\n"
    "ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã—ã°ã—ã°å¿…è¦ã«ãªã‚‹ãŒã€\n"
    "ãã®ãƒ¡ã‚½ãƒƒãƒ‰è‡ªä½“ãŒä½•ã‚’ã™ã‚‹ã®ã‹èª¬æ˜Žã™ã‚‹\n"
    "ドキュメントã¨ä¸€ç·’ã«ã”ã¡ã‚ƒæ··ãœã«ã™ã¹ãã§ã¯ãªã„。\n"
    "ã“ã®å ´åˆã¯{tag:param}ã‚¿ã‚°ã¸ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒ‘ラメータを区切る事ã§\n"
    "ã‚ˆã‚Šã‚ˆãæ•´ç†ã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«yieldã§ãã€\n"
    "ソースã¨ã‚ãªãŸã®å‡ºåŠ›ä¸¡æ–¹ã§,\n"
    "手動ã§ãªãã¦ã‚‚標準ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã§ãƒ‡ãƒ¼ã‚¿ã‚’フォーマットã™ã‚‹ã€‚"
    
    #: ../docs/Tags.md:39
    msgid ""
    "All of this meta-data can be easily parsed by tools and used both in your "
    "templates\n"
    "as well as in code checker tools. An example of how you can leverage tags\n"
    "programmatically is shown in the {tag:todo} tag, which lists a small snippet "
    "of\n"
    "Ruby code that can list all of your TODO items, if they are properly tagged."
    msgstr ""
    "ã“ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®å…¨ã¦ã¯\n"
    "ツールã«ã‚ˆã£ã¦ç°¡å˜ã«è§£æžã•れã€\n"
    "ãれã¯ã‚ãªãŸã®ãƒ†ãƒ³ãƒ—レートã¨ã‚³ãƒ¼ãƒ‰ãƒã‚§ãƒƒã‚«ãƒ¼ãƒ„ールã®ä¸¡æ–¹ã§åˆ©ç”¨ã•れる。\n"
    "プログラムã§ã©ã®ã‚¿ã‚°ã‚’利用ã§ãã‚‹ã‹ã®ä¾‹ã¯{tag:todo}ã‚¿ã‚°ã§ä¸€è¦§ã§ãã€\n"
    "ã“れらãŒé©åˆ‡ã«ã‚¿ã‚°ä»˜ã‘られれã°ã€\n"
    "ã‚ãªãŸã®å…¨ã¦ã®TODOã®é …目をリストã•れå°ã•ã„Rubyã®ã‚³ãƒ¼ãƒ‰ã®ã‚¹ãƒ‹ãƒšãƒƒãƒˆã‚’記述ã™ã‚‹ã€‚"
    
    #: ../docs/Tags.md:44
    msgid ""
    "Custom meta-data tags can be added either programmatically or via the YARD\n"
    "command-line. This is discussed in the \"[Adding Custom Tags]"
    "(#Adding_Custom_Tags)\"\n"
    "section."
    msgstr ""
    "カスタムメタデータタグã¯ãƒ—ログラムã‹YARDã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã§è¿½åŠ ã•れる。\n"
    "ã“れã¯\"[カスタムタグã®è¿½åŠ ](#Adding_Custom_Tags)\"ã®é …ã®ä¸­ã§è­°è«–ã•れる。"
    
    #: ../docs/Tags.md:48
    msgid ""
    "A list of built-in meta-data tags are found below in the [Tag List]"
    "(#Tag_List)."
    msgstr "組ã¿è¾¼ã¿ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã¯ä¸‹ã® [タグリスト](#Tag_List) ã§è¦‹ã¤ã‘られる。"
    
    #: ../docs/Tags.md:50
    msgid "## Directives"
    msgstr "## ディレクティブ"
    
    #: ../docs/Tags.md:52
    msgid ""
    "Directives are similar to meta-data tags in the way they are specified, but "
    "they\n"
    "do not add meta-data to the object directly. Instead, they affect the "
    "parsing\n"
    "context and objects themselves, allowing a developer to create objects\n"
    "(like methods) outright, rather than simply add text to an existing object.\n"
    "Directives have a `@!` prefix to differentiate these tags from meta-data "
    "tags,\n"
    "as well as to indicate that the tag may modify or create new objects when\n"
    "it is called."
    msgstr ""
    "ディレクティブã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ãŒæŒ‡å®šã•れる方法ã¨ä¼¼ã¦ã„ã‚‹ãŒã€\n"
    "ã“れã¯ç›´æŽ¥ã‚ªãƒ–ジェクトã«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ãªã„。\n"
    "代ã‚りã«ã€\n"
    "ã“れらã¯è§£æžã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¨ãれ自身ã®ã‚ªãƒ–ジェクトã«å½±éŸ¿ã—ã€\n"
    "既存ã®ã‚ªãƒ–ジェクトã«ãƒ†ã‚­ã‚¹ãƒˆã‚’å˜ç´”ã«è¿½åŠ ã™ã‚‹ã‚ˆã‚Šã€\n"
    "完全ãªã‚ªãƒ–ジェクト(メソッドã®ã‚ˆã†ãª)を作æˆã™ã‚‹é–‹ç™ºè€…ã‚’å—ã‘入れる。\n"
    "ディレクティブã¯ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã‹ã‚‰ã“れらã®ã‚¿ã‚°ã‚’識別ã™ã‚‹ãŸã‚ã‚„\n"
    "ã‚¿ã‚°ãŒå¤‰æ›´ã•れる示ã™ãŸã‚ã‚„\n"
    "呼ã³å‡ºã•ã‚Œã‚‹æ™‚ã«æ–°ã—ã„オブジェクトを作æˆã™ã‚‹ã«\n"
    "`@!`プレフィックスをæŒã¤ã€‚"
    
    #: ../docs/Tags.md:60
    msgid ""
    "A list of built-in directives are found below in the [Directive List]"
    "(#Directive_List)."
    msgstr ""
    "組ã¿è¾¼ã¿ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã®ãƒªã‚¹ãƒˆã¯\n"
    "以下㮠[ディレクティブリスト](#Directive_List) メソッドã®ä¸­ã§å®šç¾©ã•れる。"
    
    #: ../docs/Tags.md:62
    msgid "## Tag Syntax"
    msgstr "## ã‚¿ã‚°æ§‹æ–‡"
    
    #: ../docs/Tags.md:64
    msgid ""
    "Tags begin with the `@` or `@!` prefix at the start of a comment line, "
    "followed\n"
    "immediately by the tag name, and then optional tag data (if the tag requires "
    "it).\n"
    "Unless otherwise specified by documentation for the tag, all \"description\" "
    "text\n"
    "is considered free-form data and can include any arbitrary textual data."
    msgstr ""
    "ã‚¿ã‚°ã¯ã‚³ãƒ¡ãƒ³ãƒˆè¡Œã®å§‹ã‚ã§`@`ã‚„`@!`ã®ãƒ—レフィックスã¨å…±ã«å§‹ã¾ã‚Šã€\n"
    "ã™ã次ã«ã‚¿ã‚°åã€ãã—ã¦ä»»æ„ã®ã‚¿ã‚°ãƒ‡ãƒ¼ã‚¿(ã‚‚ã—ã‚¿ã‚°ã«ãれãŒå¿…è¦ãªã‚‰)\n"
    "別ã«å¿…è¦ãªã„å ´åˆã¯\n"
    "タグ用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’指定ã—ã€\n"
    "å…¨ã¦ã®\"説明\"ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒ•リーフォームã®ãƒ‡ãƒ¼ã‚¿ã¨è¦‹ãªã•れã€\n"
    "ä»»æ„ã®åŽŸæ–‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€äº‹ãŒã§ãる。"
    
    #: ../docs/Tags.md:69
    msgid "### Multi-line Tags"
    msgstr "### 複数行ã®ã‚¿ã‚°"
    
    #: ../docs/Tags.md:71
    msgid ""
    "Tags can span multiple lines if the subsequent lines are indented by more "
    "than\n"
    "one space. The typical convention is to indent subsequent lines by 2 "
    "spaces.\n"
    "In the following example, `@tagname` will have the text *\"This is indented "
    "tag data\"*:"
    msgstr ""
    "ã‚¿ã‚°ã¯å¾Œç¶šã®è¡ŒãŒä¸€ã¤ä»¥ä¸Šã®ã‚¹ãƒšãƒ¼ã‚¹ã§ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れる場åˆã€è¤‡æ•°ã®è¡Œã«æ¸¡ã‚‹äº‹ã‚‚ã§ãる。\n"
    "ä¸€èˆ¬çš„ãªæ…£ç¿’ã¯2ã¤ã®ã‚¹ãƒšãƒ¼ã‚¹ã«ã‚ˆã£ã¦ç¶šã行をã™ã‚‹ã€‚\n"
    "次ã®ä¾‹ã®`@tagname`㯠*\"This is indented tag data\"* ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’æŒã¤:"
    
    #: ../docs/Tags.md:75
    msgid ""
    "    # @tagname This is\n"
    "    #   indented tag data\n"
    "    # but this is not"
    msgstr ""
    "    # @tagname This is\n"
    "    #   indented tag data\n"
    "    # but this is not"
    
    #: ../docs/Tags.md:79
    msgid ""
    "For most tags, newlines and indented data are not significant and do not "
    "impact\n"
    "the result of the tag. In other words, you can decide to span a tag onto "
    "multiple\n"
    "lines at any point by creating an indented block. However, some tags like\n"
    "{tag:example}, {tag:overload}, {tag:!macro}, {tag:!method}, and {tag:!"
    "attribute}\n"
    "rely on the first line for special information about the tag, and you "
    "cannot\n"
    "split this first line up. For instance, the {tag:example} tag uses the first "
    "line\n"
    "to indicate the example's title."
    msgstr ""
    "殆ã©ã®ã‚¿ã‚°ã§ã€æ”¹è¡Œã¨ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れãŸãƒ‡ãƒ¼ã‚¿ã¯\n"
    "é‡è¦ã§ãªã„ã—ã‚¿ã‚°ã®çµæžœã«å½±éŸ¿ã—ãªã„。\n"
    "ã¤ã¾ã‚Šã€ã‚ãªãŸã¯\n"
    "インデントã•れãŸãƒ–ロックを作æˆã™ã‚‹äº‹ã«ã‚ˆã£ã¦å…¨ã¦ã®ãƒã‚¤ãƒ³ãƒˆã§\n"
    "複数行ã®ä¸Šã®ã‚¿ã‚°ã«æ¸¡ã™ã®ã‚’決定ã§ãる。\n"
    "ã—ã‹ã—ãªãŒã‚‰ã€\n"
    "{tag:example}, {tag:overload}, {tag:!macro}, {tag:!method}, {tag:!attribute}ã®ã‚ˆã†ãªã€\n"
    "ã„ãã¤ã‹ã®ã‚¿ã‚°ã¯ã‚¿ã‚°ã«ã¤ã„ã¦ç‰¹åˆ¥ãªæƒ…å ±ç”¨ã«æœ€åˆã®è¡Œã‚’頼りã€\n"
    "ã‚ãªãŸã¯ã“ã®æœ€åˆã®è¡Œã‚’分割ã§ããªã„。\n"
    "例ãˆã°ã€{tag:example} ã‚¿ã‚°ã¯ä¾‹ã®ã‚¿ã‚¤ãƒˆãƒ«ã‚’指示ã™ã‚‹ãŸã‚ã«æœ€åˆã®è¡Œã‚’使ã†ã€‚"
    
    #: ../docs/Tags.md:87
    msgid "### Common Tag Syntaxes"
    msgstr "### 一般的ãªã‚¿ã‚°æ§‹æ–‡"
    
    #: ../docs/Tags.md:89
    msgid ""
    "Although custom tags can be parsed in any way, the built-in tags follow a "
    "few\n"
    "common syntax structures by convention in order to simplify the syntax. The\n"
    "following syntaxes are available:"
    msgstr ""
    "カスタムタグã¯ã©ã®æ–¹æ³•ã§ã‚‚è§£æžã•れã€\n"
    "ビルトインタグã¯ã€æ§‹æ–‡ã‚’ç°¡å˜ã«ã™ã‚‹ç‚ºã«å®šã‚られãŸ\n"
    "ã„ãã¤ã‹ã®å…±é€šã™ã‚‹æ§‹æ–‡æ§‹é€ ã«å¾“ã†ã€‚\n"
    "æ¬¡ã®æ§‹æ–‡ãŒç”¨æ„ã•れã¦ã„る。"
    
    #: ../docs/Tags.md:93
    msgid ""
    "1. **Freeform data** — In this case, any amount of textual data is "
    "allowed,\n"
    "  including no data. In some cases, no data is necessary for the tag.\n"
    "2. **Freeform data with a types specifier list** — Mostly freeform "
    "data\n"
    "  beginning with an *optional* types specifier list surrounded in `[brackets]"
    "`.\n"
    "  Note that for extensibility, other bracket types are allowed, such as "
    "`<>`,\n"
    "  `()` and `{}`. The contents of the list are discussed in detail below.\n"
    "3. **Freeform data with a name and types specifier list** — freeform\n"
    "  data beginning with an *optional* types list, as well as a name key. The\n"
    "  name key is *required*. Note that for extensibility, the name can be "
    "placed\n"
    "  *before* the types list, like: `name [Types] description`. In this case,\n"
    "  a separating space is not required between the name and types, and you\n"
    "  can still use any of the other brackets that the type specifier list "
    "allows.\n"
    "4. **Freeform data with title** — freeform data where the first line "
    "cannot\n"
    "  be split into multiple lines. The first line must also always refer to "
    "the\n"
    "  \"title\" portion, and therefore, if there is no title, the first line "
    "must\n"
    "  be blank. The \"title\" might occasionally be listed by another name in "
    "tag\n"
    "  documentation, however, you can identify this syntax by the existence of\n"
    "  a multi-line signature with \"Indented block\" on the second line."
    msgstr ""
    "1. **フリーフォームデータ** — ã“ã®å ´åˆã¯å…¨ã¦ã®å˜èªžã®ãƒ‡ãƒ¼ã‚¿ã®ç·é‡ã¯è¨±å¯ã•れã€\n"
    "データをå«ã¾ãªã„。場åˆã«ã‚ˆã£ã¦ã¯ãƒ‡ãƒ¼ã‚¿ç„¡ã—ã§ã¯ã‚¿ã‚°ã‚’å¿…è¦ã¨ã—ãªã„。\n"
    "2. **型指定ã®ãƒªã‚¹ãƒˆã‚’用ã„ãŸãƒ•リーフォームデータ** — 大抵ã®ãƒ•リーフォームデータã¯\n"
    "*optional(ä»»æ„ã®)* ã®`[brackets(括弧)]`ã§å›²ã¾ã‚ŒãŸåž‹æŒ‡å®šã®ãƒªã‚¹ãƒˆã‚’用ã„ã¦å§‹ã¾ã£ã¦ã„る。\n"
    "拡張用ã«ç•™æ„ã™ã‚‹äº‹ã¨ã—ã¦ã€\n"
    "`<>`ã€`()`ã€`{}`ãªã©ã¨ã—ã¦ä»–ã®ãƒ–ラケットã®åž‹ã¯è¨±å¯ã•れる。\n"
    "リストã®å†…容ã¯ä¸‹ã®è©³ç´°ã§è­°è«–ã•れる。    \n"
    "3. **åå‰ã¨åž‹æŒ‡å®šã®ãƒªã‚¹ãƒˆã‚’用ã„ãŸãƒ•リーフォームデータ** — フリーフォームデータã¯\n"
    "*optional(ä»»æ„ã®)*åž‹ã®ãƒªã‚¹ãƒˆã‚‚キーã®åå‰ã‚‚用ã„å§‹ã¾ã‚‹ãƒ‡ãƒ¼ã‚¿ã€‚\n"
    "キーã®åå‰ã¯ *å¿…é ˆ* ã§ã‚る。\n"
    "拡張性ã«ã¤ã„ã¦æ¬¡ã®ã“ã¨ã«ç•™æ„ã™ã‚‹ã€‚\n"
    "åå‰ã¯åž‹ã®ãƒªã‚¹ãƒˆã®å‰ã«ç½®ã事ãŒã§ãã‚‹:`name [Types] description`。\n"
    "ã“ã®å ´åˆã¯ã€åŒºåˆ‡ã‚Šã®ã‚¹ãƒšãƒ¼ã‚¹ã¯nameã¨typesã®é–“ã«å¿…è¦ã§ã¯ãªã„。\n"
    "ãã—ã¦ã‚ãªãŸåž‹æŒ‡å®šã®ãƒªã‚¹ãƒˆã®è¨±å¯ã®ä»–ã®bracket(括弧)ã®ä½•ã‹ã‚’使ã†äº‹ãŒã§ãる。\n"
    "4. **タイトルを用ã„ãŸãƒ•リーフォームデータ** — 最åˆã®è¡Œã®ã¨ã“ã‚ã®ãƒ•リーフォームデータã¯\n"
    "複数ã®è¡Œã¸åˆ†å‰²ã§ããªã„。\n"
    "最åˆã®è¡Œã¯å¸¸ã«\"title\"ã®å ´æ‰€ã¨ãれ自身をå‚ç…§ã—ãªã‘れã°ãªã‚‰ãªã„。\n"
    "タイトル無ã—ã®å ´åˆã¯ã€\n"
    "最åˆã®è¡Œã¯ãƒ–ランクã«ã—ãªã‘れã°ãªã‚‰ãªã„。\n"
    "\"title\"ã¯æ™‚々ã€ã‚¿ã‚°ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸­ã§ä»–ã®åå‰ã«ã‚ˆã£ã¦è¨˜è¿°ã•れる。\n"
    "ã—ã‹ã—ãªãŒã‚‰ã€ã‚ãªãŸã¯2番目ã®è¡Œã®\"インデントã•れãŸãƒ–ロック\"を用ã„\n"
    "複数行ã®ã‚·ã‚°ãƒãƒãƒ£ã®å­˜åœ¨ã«ã‚ˆã£ã¦ã“ã®æ§‹æ–‡ã‚’èªè¨¼ã§ãã‚‹"
    
    #: ../docs/Tags.md:112
    msgid ""
    "In the tag list below, the term \"description\" implies freeform data, `"
    "[Types]`\n"
    "implies a types specifier list, \"name\" implies a name key, and \"title\" "
    "implies\n"
    "the first line is a newline significant field that cannot be split into "
    "multiple\n"
    "lines."
    msgstr ""
    "下ã®ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã§ã¯ã€\n"
    "\"description\"ã®ç”¨èªžã¯ãƒ•リーフォームデータをæ„味ã—ã€\n"
    "`[Types]`ã¯åž‹æŒ‡å®šã®ãƒªã‚¹ãƒˆã‚’æ„味ã™ã‚‹ã€‚\n"
    "\"name\"ã¯ã‚­ãƒ¼ã®åå‰ã‚’æ„味ã—ã€\n"
    "最åˆã®è¡Œã‚’æ„味ã™ã‚‹\"title\"ã¯æ”¹è¡Œã§è¤‡æ•°è¡Œã¸åˆ†å‰²ã§ããªã„特殊ãªãƒ•ィールドã§ã‚ã‚‹"
    
    #: ../docs/Tags.md:117
    msgid "### Types Specifier List"
    msgstr "### 型指定ã®ãƒªã‚¹ãƒˆ"
    
    #: ../docs/Tags.md:119
    msgid ""
    "In some cases, a tag will allow for a \"types specifier list\"; this will be "
    "evident\n"
    "from the use of the `[Types]` syntax in the tag signature. A types specifier "
    "list\n"
    "is a comma separated list of types, most often classes or modules, but "
    "occasionally\n"
    "literals. For example, the following {tag:return} tag lists a set of types "
    "returned\n"
    "by a method:"
    msgstr ""
    "å¹¾ã¤ã‹ã®å ´åˆã€ã‚¿ã‚°ã¯\"型指定ã®ãƒªã‚¹ãƒˆ\"用ã«è¨±å¯ã™ã‚‹ã€‚\n"
    "ã“れã¯ã‚¿ã‚°ã®ã‚·ã‚°ãƒãƒãƒ£ã®ä¸­ã®`Types`ã®æ§‹æ–‡ã®åˆ©ç”¨ã‹ã‚‰æ˜Žã‚‰ã‹ã§ã‚る。\n"
    "型指定ã®ãƒªã‚¹ãƒˆã¯ã‚³ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸåž‹ã®ãƒªã‚¹ãƒˆã§ã‚る。\n"
    "ã»ã¨ã‚“ã©ã¯ã‚¯ãƒ©ã‚¹ã‚„モジュールã§ã€æ™‚々ã€ãƒªãƒ†ãƒ©ãƒ«ã§ã‚る。\n"
    "例ãˆã°ã€æ¬¡ã®{tag:return}ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã¯ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã£ã¦è¿”ã•れãŸåž‹ã®ã‚°ãƒ«ãƒ¼ãƒ—を記述ã™ã‚‹:"
    
    #: ../docs/Tags.md:125
    msgid ""
    "    # Finds an object or list of objects in the db using a query\n"
    "    # @return [String, Array, nil] the object or objects to\n"
    "    #   find in the database. Can be nil.\n"
    "    def find(query) finder_code_here end"
    msgstr ""
    "    # queryã«ã‚ˆã£ã¦dbã®ä¸­ã®ã‚ªãƒ–ジェクトやオブジェクトã®ãƒªã‚¹ãƒˆã‚’見ã¤ã‘ã‚‹\n"
    "    # @return [String, Array, nil] the object or objects to\n"
    "    #   find in the database. Can be nil.\n"
    "    def find(query) finder_code_here end"
    
    #: ../docs/Tags.md:130
    msgid ""
    "A list of conventions for type names is specified below. Typically, "
    "however,\n"
    "any Ruby literal or class/module is allowed here. Duck-types (method names\n"
    "prefixed with \"#\") are also allowed."
    msgstr ""
    "åž‹ã®åå‰ç”¨ã®æ…£ç¿’çš„ãªãƒªã‚¹ãƒˆã¯ä¸‹ã§æŒ‡å®šã•れる。\n"
    "ã—ã‹ã—ãªãŒã‚‰ä¸€èˆ¬çš„ã«Rubyã®ãƒªãƒ†ãƒ©ãƒ«ã‚„クラス/モジュールã¯ã“ã“ã§è¨±å¯ã•れる。\n"
    "ダックタイピング(プレフィックスã•れãŸãƒ¡ã‚½ãƒƒãƒ‰åを用ã„ãŸ\"#\")も許å¯ã•れる。"
    
    #: ../docs/Tags.md:134
    msgid ""
    "Note that the type specifier list is always an optional field and can be "
    "omitted\n"
    "when present in a tag signature. This is the reason why it is surrounded by\n"
    "brackets. It is also a freeform list, and can contain any list of values, "
    "though\n"
    "a set of conventions for how to list types is described below."
    msgstr ""
    "ç•™æ„ã™ã‚‹äº‹ã¨ã—ã¦æ¬¡ã®äº‹ãŒã‚る。\n"
    "型指定ã®ãƒªã‚¹ãƒˆã¯å¸¸ã«ä»»æ„ã®ãƒ•ィールドã¨ãªã‚Š\n"
    "ã‚¿ã‚°ã®ã‚·ã‚°ãƒãƒãƒ£ã‚’ç¤ºã™æ™‚ã«ã‚¿ã‚°æ§‹æ–‡ã®ä¸­ã§æ®‹ã•れる。\n"
    "ã“れãŒbracket(括弧)ã«ã‚ˆã£ã¦ã¨ã‚Šã‹ã“ã¾ã‚Œã‚‹ç†ç”±ã§ã‚る。\n"
    "フリーフォームã®ãƒªã‚¹ãƒˆã‚‚ã€ä»»æ„ã®ãƒªã‚¹ãƒˆã®å€¤ã‚’å«ã‚€äº‹ãŒã§ãる。\n"
    "ã©ã‚“ãªåž‹ã‚’リストã«ã™ã‚‹ã‹ã®æ…£ç¿’ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯ä¸‹ã§èª¬æ˜Žã•れる。"
    
    #: ../docs/Tags.md:139
    msgid "### Type List Conventions"
    msgstr "### åž‹ã®ãƒªã‚¹ãƒˆã®æ…£ç¿’"
    
    #: ../docs/Tags.md:141
    msgid ""
    "

    \n" " A list of examples of common type listings and what they translate into " "is\n" " available at http://yardoc.org/types.\n" "

    " msgstr "" "

    \n" " A list of examples of common type listings and what they translate into is\n" " available at http://yardoc.org/types.\n" "

    " #: ../docs/Tags.md:146 msgid "" "Typically, a type list contains a list of classes or modules that are " "associated\n" "with the tag. In some cases, however, certain special values are allowed or " "required\n" "to be listed. This section discusses the syntax for specifying Ruby types " "inside of\n" "type specifier lists, as well as the other non-Ruby types that are accepted " "by\n" "convention in these lists." msgstr "" "一般的ã«ã€åž‹ã®ãƒªã‚¹ãƒˆã¯ã‚¿ã‚°ã«é–¢é€£ä»˜ã‘られるクラスやモジュールã®ãƒªã‚¹ãƒˆã‚’å«ã‚“ã§ã„る。\n" "ã—ã‹ã—ãªãŒã‚‰ã€å¹¾ã¤ã‹ã®ç‰¹åˆ¥ãªå€¤ã¯è¨˜è¿°ã•れる為ã«è¨±å¯ã•れ,å—入られる。\n" "ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯åž‹ã®æŒ‡å®šã®ãƒªã‚¹ãƒˆã®å†…部ã®Rubyã®åž‹ã®æŒ‡å®šç”¨ã®æ§‹æ–‡ã‚‚ã€\n" "ã“れらã®ãƒªã‚¹ãƒˆã®ä¸­ã®æ…£ä¾‹ã«ã‚ˆã£ã¦èªã‚られる他ã®Rubyã§ã¯ãªã„型も議論ã™ã‚‹ã€‚" #: ../docs/Tags.md:152 msgid "" "It's important to realize that the conventions listed here may not always " "adequately\n" "describe every type signature, and is not meant to be a complete syntax. " "This is\n" "why the types specifier list is freeform and can contain any set of values. " "The\n" "conventions defined here are only conventions, and if they do not work for " "your\n" "type specifications, you can define your own appropriate conventions." msgstr "" "ã“ã“ã§æ…£ä¾‹ã§è¨˜è¿°ã•れãŸã‚‚ã®ã¯å¸¸ã«\n" "å…¨ã¦ã®åž‹ã®ã‚·ã‚°ãƒãƒãƒ£ã‚’説明ã—ãªã„ã®ã¨\n" "å®Œç’§ãªæ§‹æ–‡ã§ã‚ã‚‹ã¨ã„ã†ã®ã¯æ„味ã—ãªã„ã¨ã„ã†äº‹ã‚’\n" "ç†è§£ã™ã‚‹ã®ãŒé‡è¦ã§ã‚る。\n" "åž‹ã®æŒ‡å®šã®ãƒªã‚¹ãƒˆãŒãƒ•リーフォームãªã®ã¯ä»»æ„ã®å€¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’å«ã‚€ã“ã¨ãŒã§ãã‚‹ã‹ã‚‰ã§ã‚る。\n" "ã“ã“ã§å®šç¾©ã•ã‚ŒãŸæ…£ä¾‹ã¯ã“ã“ã ã‘ã®æ…£ä¾‹ã§ã€ã“れã¯ã‚ãªãŸã®åž‹ã®æŒ‡å®šç”¨ã«ã¯å‹•作ã—ãªã„。\n" "ã‚ãªãŸã¯è‡ªèº«ã®é©åˆ‡ãªæ…£ä¾‹ã‚’定義ã§ãる。" #: ../docs/Tags.md:158 msgid "" "Note that a types specifier list might also be used for non-Type values. In " "this\n" "case, the tag documentation will describe what values are allowed within " "the\n" "type specifier list." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "åž‹ã®æŒ‡å®šã®ãƒªã‚¹ãƒˆã¯åž‹ã§ã¯ãªã„値ã«ã‚‚使ã‚れるã‹ã‚‚ã—れãªã„。\n" "ã“ã®å ´åˆã¯,ã‚¿ã‚°ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯\n" "ã©ã®å€¤ãŒåž‹ã®æŒ‡å®šã®ãƒªã‚¹ãƒˆã®ä¸­ã§è¨±å¯ã•れるã®ã‹ã‚’説明ã™ã‚‹ã€‚" #: ../docs/Tags.md:162 msgid "#### Class or Module Types" msgstr "#### クラスやモジュールã®åž‹" #: ../docs/Tags.md:164 msgid "" "Any Ruby type is allowed as a class or module type. Such a type is simply " "the name\n" "of the class or module." msgstr "" "Rubyã®åž‹ã¯ã‚¯ãƒ©ã‚¹ã‚„モジュールをå—ã‘入れる。\n" "タイプãªã©ã¯å˜ç´”ã«ã‚¯ãƒ©ã‚¹ã‚„モジュールã®åå‰ã§ã‚る。" #: ../docs/Tags.md:167 msgid "" "Note that one extra type that is accepted by convention is the `Boolean` " "type,\n" "which represents both the `TrueClass` and `FalseClass` types. This type does " "not\n" "exist in Ruby, however." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "`Boolean`ã®åž‹ã¯æ…£ä¾‹ã«ã‚ˆã£ã¦å—入れられる追加ã®åž‹ã§\n" "`TrueClass`ã¨`FalseClass`ã®åž‹ã®ä¸¡æ–¹ã‚’表ã™ã€‚\n" "ã“ã®åž‹ã¯Rubyã®ä¸­ã«å­˜åœ¨ã—ãªã„。" #: ../docs/Tags.md:171 msgid "#### Parametrized Types" msgstr "#### パラメータ化ã•れãŸåž‹" #: ../docs/Tags.md:173 msgid "" "In addition to basic types (like String or Array), YARD conventions allow " "for\n" "a \"generics\" like syntax to specify container objects or other " "parametrized types.\n" "The syntax is `Type`. For instance, an Array " "might\n" "contain only String objects, in which case the type specification would be\n" "`Array`. Multiple parametrized types can be listed, separated by " "commas." msgstr "" "基本ã®åž‹(Stringã‚„Arrayã®ã‚ˆã†ãª)ã«æ›´ã«ã€YARDã®æ…£ä¾‹ã¯\n" "コンテナオブジェクトや他ã®ãƒ‘ラメータ化ã•れãŸåž‹ã‚’指定ã™ã‚‹ãŸã‚ã®æ§‹æ–‡ã®ã‚ˆã†ãª\n" "\"generics(ç·ç§°çš„ãª)\"ã®ç‚ºã«è¨±å¯ã™ã‚‹ã€‚\n" "æ§‹æ–‡ã¯`Type`ã¨ãªã‚‹\n" "例ãˆã°ã€é…åˆ—ã¯æ–‡å­—列オブジェクトã ã‘ã‚’å«ã‚“ã§ã„ã‚‹ã‹ã‚‚ã—れãªã„。\n" "ãã®å ´åˆã®åž‹ã®æŒ‡å®šã¯`Array`ã«ãªã‚‹ã€‚\n" "複数ã®ãƒ‘ラメータ化ã•れãŸåž‹ã¯ã‚«ãƒ³ãƒžã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚Œè¨˜è¿°ã•れる。" #: ../docs/Tags.md:179 msgid "" "Note that parametrized types are typically not order-dependent, in other " "words,\n" "a list of parametrized types can occur in any order inside of a type. An " "array\n" "specified as `Array` can contain any amount of Strings or " "Fixnums,\n" "in any order. When the order matters, use \"order-dependent lists\", " "described below." msgstr "" "次ã®ã“ã¨ã«ç•™æ„ã™ã‚‹ã€‚\n" "パラメータ化ã•れãŸåž‹ã¯ä¸€èˆ¬çš„ã«é †ç•ªã«ä¾å­˜ã›ãšã€\n" "ã„ã„ã‹ãˆã‚Œã°ã€ãƒ‘ラメータ化ã•れãŸåž‹ã®ãƒªã‚¹ãƒˆã¯\n" "åž‹ã®å†…部ã§å¥½ããªã®é †ç•ªã«ãŠã事ãŒã§ãる。\n" "`Array` ãªã©ã¨ã—ã¦æŒ‡å®šã•れãŸé…列ã¯Stringã‚„Fixnumã®ç·é‡ã‚’\n" "ä»»æ„ã®é †ç•ªã§å«ã‚€äº‹ãŒã§ãる。\n" "順番ãŒå•題ã«ãªã‚‹æ™‚ã¯ã€\n" "下ã§èª¬æ˜Žã•れる\"order-dependent lists(順番ä¾å­˜ã®ãƒªã‚¹ãƒˆ)\"を使ã†:" #: ../docs/Tags.md:184 msgid "#### Duck-Types" msgstr "#### ダックタイピング" #: ../docs/Tags.md:186 msgid "" "Duck-types are allowed in type specifier lists, and are identified by " "method\n" "names beginning with the \"#\" prefix. Typically, duck-types are " "recommended\n" "for {tag:param} tags only, though they can be used in other tags if needed.\n" "The following example shows a method that takes a parameter of any type\n" "that responds to the \"read\" method:" msgstr "" "ダックタイピングã¯åž‹æŒ‡å®šã®ãƒªã‚¹ãƒˆã‚’å—入れã€\n" "\"#\"プレフィックス(接頭辞)を用ã„ãŸæœ€åˆã®ãƒ¡ã‚½ãƒƒãƒ‰åã«ã‚ˆã£ã¦ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れる。\n" "一般的ã«ãƒ€ãƒƒã‚¯ã‚¿ã‚¤ãƒ”ング㯠{tag:param} ã‚¿ã‚°ã ã‘ã«æŽ¨å¥¨ã•れã¦ã„ã‚‹ãŒã€\n" "å¿…è¦ãªã‚‰ä»–ã®ã‚¿ã‚°ã§åˆ©ç”¨ã™ã‚‹äº‹ã‚‚ã§ãる。\n" "次ã®ä¾‹ã¯\"read\"メソッドã«è¿”事をã™ã‚‹ä»»æ„ã®åž‹ã®ãƒ‘ラメータを\n" "å–å¾—ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’一覧ã§ãã‚‹:" #: ../docs/Tags.md:192 msgid "" " # Reads from any I/O object.\n" " # @param [#read] io the input object to read from\n" " def read(io) io.read end" msgstr "" " # ä»»æ„ã®I/O オブジェクトã‹ã‚‰èª­ã¿è¾¼ã‚€\n" " # @param [#read] io the input object to read from\n" " def read(io) io.read end" #: ../docs/Tags.md:196 msgid "#### Hashes" msgstr "#### ãƒãƒƒã‚·ãƒ¥" #: ../docs/Tags.md:198 msgid "" "Hashes can be specified either via the parametrized type discussed above,\n" "in the form `Hash`, or using the hash specific syntax:\n" "`Hash{KeyTypes=>ValueTypes}`. In the latter case, KeyTypes or ValueTypes " "can\n" "also be a list of types separated by commas." msgstr "" "ãƒãƒƒã‚·ãƒ¥ã¯ä¸Šã§è­°è«–ã•れãŸãƒ‘ラメータ化ã•れãŸåž‹ã€\n" "`Hash` å½¢å¼çµŒç”±ã‹\n" "ã‚‚ã—ãã¯æ¬¡ã®æŒ‡å®šã®ãƒãƒƒã‚·ãƒ¥æ§‹æ–‡ã‚’使ã†:\n" "`Hash{KeyTypes=>ValueTypes}` \n" "後者ã®å ´åˆã€KeyTypesã‚„ValueTypesã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸåž‹ã®ãƒªã‚¹ãƒˆã«ã‚‚ã§ãる。" #: ../docs/Tags.md:203 msgid "#### Order-Dependent Lists" msgstr "#### Order-Dependent Lists(順番ä¾å­˜ã®ãƒªã‚¹ãƒˆ)" #: ../docs/Tags.md:205 msgid "" "An order dependent list is a set of types surrounded by \"()\" and separated " "by\n" "commas. This list must contain exactly those types in exactly the order " "specified.\n" "For instance, an Array containing a String, Fixnum and Hash in that order " "(and\n" "having exactly those 3 elements) would be listed as: `Array<(String, Fixnum, " "Hash)>`." msgstr "" "順番ä¾å­˜ã®ãƒªã‚¹ãƒˆã¯\"()\"ã«ã‚ˆã£ã¦å›²ã‚れãŸåž‹ã®ã‚°ãƒ«ãƒ¼ãƒ—ã§ã‚りã€\n" "カンマã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚Œã‚‹ã€‚\n" "ã“ã®ãƒªã‚¹ãƒˆã¯æ­£ç¢ºã«é †ç•ªã®æŒ‡å®šã•れãŸä¸­ã§æ­£ç¢ºã«ãれらã®åž‹ã‚’å«ã¾ãªã‘れã°ãªã‚‰ãªã„。\n" "例ãˆã°String,Fixnum,Hashã®é †ç•ªã®(ãれã¯3ã¤ã®å±žæ€§ã‚’ã‚‚ã£ã¦ã„ã‚‹)é…列ã¯ã€\n" "`Array<(String, Fixnum, Hash)>` ã¨ã—ã¦è¨˜è¿°ã•れる。" #: ../docs/Tags.md:210 msgid "#### Literals" msgstr "#### リテラル" #: ../docs/Tags.md:212 msgid "" "Some literals are accepted by virtue of being Ruby literals, but also by " "YARD\n" "conventions. Here is a non-exhaustive list of certain accepted literal " "values:" msgstr "" "å¹¾ã¤ã‹ã®ãƒªãƒ†ãƒ©ãƒ«ã¯Rubyã®ãƒªãƒ†ãƒ©ãƒ«ã«ã‚る利点をå—ã‘入れるãŒã€\n" "YARDã«ã‚ˆã‚‹æ…£ä¾‹ã‚‚ã‚る。\n" "ã“ã“ã§ç´¹ä»‹ã™ã‚‹ã®ã¯æ˜Žç¢ºã«å—入れられãŸãƒªãƒ†ãƒ©ãƒ«ã®ç¶²ç¾…çš„ãªãƒªã‚¹ãƒˆã§ã¯ãªã„。" #: ../docs/Tags.md:215 msgid "" "* `true`, `false`, `nil` — used when a method returns these explicit " "literal\n" " values. Note that if your method returns both `true` or `false`, you " "should use\n" " the `Boolean` conventional type instead.\n" "* `self` — has the same meaning as Ruby's \"self\" keyword in the " "context of\n" " parameters or return types. Recommended mostly for {tag:return} tags that " "are\n" " chainable.\n" "* `void` — indicates that the type for this tag is explicitly " "undefined.\n" " Mostly used to specify {tag:return} tags that do not care about their " "return\n" " value. Using a `void` return tag is recommended over no type, because it " "makes\n" " the documentation more explicit about what the user should expect. YARD " "will\n" " also add a note for the user if they have undefined return types, making " "things\n" " clear that they should not use the return value of such a method." msgstr "" "* `true`, `false`, `nil` — メソッドãŒã“ã‚Œã‚‰ã®æ˜Žç¢ºãªãƒªãƒ†ãƒ©ãƒ«å€¤ã‚’è¿”ã™æ™‚ã«\n" " 利用ã•れる。次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" " ã‚ãªãŸã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒ `true` ã‚„ `false` 両方を返ã™å ´åˆã€\n" " 代ã‚りã«ã‚ãªãŸã¯ `Boolean` ã®æ…£ä¾‹ã®åž‹ã‚’使ã‚ãªã‘れã°ãªã‚‰ãªã„。\n" "* `self` — パラメータや戻りã®åž‹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§Rubyã®\"self\"キーワードã®ã‚ˆã†ã«\n" " åŒã˜æ„味をæŒã¤ã€‚\n" " 大体ã¯ãƒã‚§ãƒ¼ãƒ³å¯èƒ½ãª {tag:return} ã‚¿ã‚°ãŒæŽ¨å¥¨ã•れる。\n" "* `void` — ã“ã®ã‚¿ã‚°ãŒæ˜Žç¢ºã«æœªå®šç¾©ã¨ã•れる型を指示ã™ã‚‹ã€‚\n" " 一般的ã«ãã‚Œã‚‰ã®æˆ»ã‚Šå€¤ã«ã¤ã„ã¦æ°—ã«ã—ãªã„ {tag:return} ã‚¿ã‚°ã«åˆ©ç”¨ã•れる。\n" " `void` return タグを使ã†äº‹ã«ã‚ˆã£ã¦ã€åž‹ãŒãªã„事を知らã›ã€\n" " ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæœŸå¾…ã™ã‚‹äº‹ã«ã¤ã„ã¦ã®æ˜Žç¢ºãªæƒ…å ±ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’作れる。\n" " æœªå®šç¾©ã®æˆ»ã‚Šã®åž‹ã‚’æŒã¤å ´åˆã€YARDã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç‚ºã«æ³¨é‡ˆã‚‚追加ã—ã€\n" " ãれらã®ãƒ¡ã‚½ãƒƒãƒ‰ãªã©ã®æˆ»ã‚Šå€¤ã‚’使ã‚ãªã„ã‚‚ã®ã‚’明らã‹ã«ã™ã‚‹ã€‚" #: ../docs/Tags.md:228 msgid "" msgstr "" #: ../docs/Tags.md:232 msgid "" "

    \n" " Reference tag syntax applies only to meta-data tags, not directives.\n" "

    " msgstr "" "

    \n" " Reference tag syntax applies only to meta-data tags, not directives.\n" "

    " #: ../docs/Tags.md:236 msgid "" "If a tag's data begins with `(see OBJECT)` it is considered a \"reference tag" "\".\n" "A reference tag literally copies the tag data by the given tag name from " "the\n" "specified OBJECT. For instance, a method may copy all {tag:param} tags from\n" "a given object using the reference tag syntax:" msgstr "" "`(see OBJECT)` を用ã„å§‹ã¾ã‚‹ã‚¿ã‚°ãƒ‡ãƒ¼ã‚¿ã®å ´åˆ\"å‚ç…§ã‚¿ã‚°\"ã¨è¦‹ãªã™ã€‚\n" "å‚ç…§ã‚¿ã‚°ã¯æ–‡å­—通り指定ã•れãŸã‚ªãƒ–ジェクトã‹ã‚‰ä¸Žãˆã‚‰ã‚ŒãŸã‚¿ã‚°åã«ã‚ˆã£ã¦\n" "タグデータをコピーã™ã‚‹ã€‚\n" "例ãˆã°ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ¬¡ã®å‚ç…§ã‚¿ã‚°æ§‹æ–‡ã«ã‚ˆã£ã¦\n" "与ãˆã‚‰ã‚ŒãŸã‚ªãƒ–ジェクトã‹ã‚‰å…¨ã¦ã® {tag:param} タグをコピーã™ã‚‹ã€‚" #: ../docs/Tags.md:241 msgid "" " # @param [String] user the username for the operation\n" " # @param [String] host the host that this user is associated with\n" " # @param [Time] time the time that this operation took place\n" " def clean(user, host, time = Time.now) end" msgstr "" " # @param [String] user the username for the operation\n" " # @param [String] host the host that this user is associated with\n" " # @param [Time] time the time that this operation took place\n" " def clean(user, host, time = Time.now) end" #: ../docs/Tags.md:246 msgid "" " # @param (see #clean)\n" " def activate(user, host, time = Time.now) end" msgstr "" " # @param (see #clean)\n" " def activate(user, host, time = Time.now) end" #: ../docs/Tags.md:249 msgid "## Adding Custom Tags" msgstr "## Adding Custom Tags" #: ../docs/Tags.md:251 msgid "" "

    If a tag is specific to a given project, consider " "namespacing\n" " it by naming it in the form projectname.tagname, ie.,\n" " yard.tag_signature.

    " msgstr "" "

    If a tag is specific to a given project, consider namespacing\n" " it by naming it in the form projectname.tagname, ie.,\n" " yard.tag_signature.

    " #: ../docs/Tags.md:255 msgid "" "Custom tags can be added to YARD either via the command-line or " "programmatically.\n" "The programmatic method is not discussed in this document, but rather in " "the\n" "{file:docs/TagsArch.md} document." msgstr "" "カスタムタグã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‹ãƒ—ログラム経由ã§YARDã«è¿½åŠ ã•れる。\n" "プログラム的ãªãƒ¡ã‚½ãƒƒãƒ‰ã¯ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸­ã§è­°è«–ã—ãªã„ãŒã€\n" "{file:docs/TagsArch.md} ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§å‚ç…§ã§ãる。" #: ../docs/Tags.md:259 msgid "" "To add a custom tag via the command-line or .yardopts file, you can use the\n" "`--*-tag` options. A few different options are available for the common tag\n" "syntaxes described above. For example, to add a basic freeform tag, use:" msgstr "" "コマンドラインや.yardoptsファイル経由ã§ã‚«ã‚¹ã‚¿ãƒ ã‚¿ã‚°ã‚’追加ã™ã‚‹ã«ã¯ã€\n" "`--*-tag` オプションを使ã†äº‹ãŒã§ãる。\n" "å°‘æ•°ã®ç•°ãªã‚‹ã‚ªãƒ—ションã¯ä¸Šã§è­°è«–ã•れãŸä¸€èˆ¬çš„ãªã‚¿ã‚°æ§‹æ–‡ç”¨ã«åˆ©ç”¨å¯èƒ½ã§ã‚る。\n" "例ãˆã°ã€åŸºæœ¬ã®ãƒ•リーフォームタグã«è¿½åŠ ã™ã‚‹ã«ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹:" #: ../docs/Tags.md:263 msgid "" " !!!sh\n" " $ yard doc --tag rest_url:\"REST URL\"" msgstr "" " !!!sh\n" " $ yard doc --tag rest_url:\"REST URL\"" #: ../docs/Tags.md:266 msgid "" "This will register the `@rest_url` tag for use in your documentation and " "display\n" "this tag in HTML output wherever it is used with the heading \"REST URL\".\n" "Note that the tag title should follow the tag name with a colon (`:`). " "Other\n" "tag syntaxes exist, such as the type specifier list freeform tag\n" "(`--type-tag`), or a named key tag with types (`--type-name-tag`)." msgstr "" "ã“れã¯ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§åˆ©ç”¨ã™ã‚‹ãŸã‚ `@rest_url` ã‚¿ã‚°ãŒè¿½åŠ ã•れã€\n" "\"REST URL\"ã®è¡¨é¡Œã¨ä¸€ç·’ã«HTML出力ã§ã“ã®ã‚¿ã‚°ã‚’表示ã™ã‚‹ã€‚\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã‚¿ã‚°ã‚¿ã‚¤ãƒˆãƒ«ã¯æ¬¡ã®ã‚³ãƒ­ãƒ³ã‚’用ã„ãŸ(`:`)ã‚¿ã‚°åã«ã—ãªã‘れã°ãªã‚‰ãªã„。\n" "ä»–ã®ã‚¿ã‚°æ§‹æ–‡ã¯åž‹æŒ‡å®šã®ãƒªã‚¹ãƒˆã®ãƒ•リーフォームタグã®(`--type-tag`)ã‚„\n" "(`--type-name-tag`)ã®åž‹ã‚’用ã„るキーåã®ã‚¿ã‚°ãªã©ãŒå­˜åœ¨ã™ã‚‹ã€‚" #: ../docs/Tags.md:272 msgid "" "If you want to create a tag but not display it in output (it is only for\n" "programmatic use), add `--hide-tag tagname` after the definition:" msgstr "" "ã‚ãªãŸãŒã‚¿ã‚°ã‚’作æˆã™ã‚‹ç‚ºã«ã»ã—ã„å ´åˆ\n" "ã—ã‹ã—ãã®å‡ºåŠ›ã§è¡¨ç¤ºã—ãªã„å ´åˆ(プログラム的ã«ã ã‘利用ã™ã‚‹)\n" "定義ã®å¾Œã§ `--hide-tag tagname` を追加ã™ã‚‹:" #: ../docs/Tags.md:275 msgid "" " !!!sh\n" " $ yard doc --tag complexity:\"McCabe Complexity\" --hide-tag complexity" msgstr "" " !!!sh\n" " $ yard doc --tag complexity:\"McCabe Complexity\" --hide-tag complexity" #: ../docs/Tags.md:278 msgid "" "Note that you might not need a tag title if you are hiding it. The title\n" "part can be omitted." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã‚ãªãŸã¯ã‚¿ã‚°ã‚¿ã‚¤ãƒˆãƒ«éš ã™å ´åˆã¯å¿…è¦ã¨ã—ãªã„ã‹ã‚‚ã—れãªã„。\n" "タイトルã®ä¸€éƒ¨ã¯é™¤å¤–ã§ãる。" #: ../docs/Tags.md:281 msgid "{yard:include_tags}" msgstr "{yard:include_tags}" # title #: ../docs/TagsArch.md:1 msgid "Tags Architecture" msgstr "タグ構造" #: ../docs/TagsArch.md:3 msgid "# Tags Architecture" msgstr "# タグ構造" #: ../docs/TagsArch.md:5 msgid "## Programmatic API" msgstr "## プログラムã®API" #: ../docs/TagsArch.md:7 msgid "### Accessing Tag Information" msgstr "### ã‚¿ã‚°ã®æƒ…報を使ã†" #: ../docs/TagsArch.md:9 msgid "" "Tag metadata is added when a {YARD::Docstring} is added to a {file:docs/" "CodeObjects.md code object}\n" "using the {YARD::CodeObjects::Base#docstring=} attribute. In addition to " "adding\n" "conventional comments, tags are parsed and associated with the object. The " "easiest\n" "way to access tags on an object is to use the {YARD::CodeObjects::Base#tag} " "and `#tags`\n" "methods, for example:" msgstr "" "ã‚¿ã‚°ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã¯{YARD::Docstring}ãŒ\n" "{YARD::CodeObjects::Base#docstring=} 属性を用ã„\n" "{file:docs/CodeObjects.md コードオブジェクト} ã®ç‚ºã«è¿½åŠ ã•れる時ã€è¿½åŠ ã•れる。\n" "通常型ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’ã¤ã‘ã‚‹ã“ã¨ã«åŠ ãˆã¦ã€ã‚¿ã‚°ã¯è§£æžã•れã€ã‚ªãƒ–ジェクトã¨é–¢ä¿‚付ã‘られる。\n" "オブジェクトã®ã‚¿ã‚°ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã®ã«æœ€ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€\n" "{YARD::CodeObjects::Base#tag} ã‚„ `#tags` メソッドを利用ã™ã‚‹ã“ã¨ã§ã‚る。\n" "例ãˆã°:" #: ../docs/TagsArch.md:15 msgid "" " # Using the Foo class object from above\n" " obj.tags(:tagname).first.text #=> \"some data\"" msgstr "" " # 上ã‹ã‚‰Fooクラスオブジェクトを使ã†\n" " obj.tags(:tagname).first.text #=> \"some data\"" #: ../docs/TagsArch.md:18 msgid "" "Because multiple tags can be stored with the same name, they are stored as a " "list\n" "of tags. The `#tag` method is an alias for the first item in the list of " "tags.\n" "Also note that the `#tag`, `#tags` and `#has_tag?` methods are all " "convenience\n" "methods that delegate to the {YARD::Docstring} object described above." msgstr "" "åŒã˜åå‰ã®è¤‡æ•°ã®ã‚¿ã‚°ãŒæ ¼ç´ã•れるã“ã¨ã‚‚ã‚ã‚‹ã®ã§ã€\n" "ãれらã¯ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã¨ãªã£ã¦ã„る。\n" "`#tag` メソッドã¯ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã«ãŠã‘る最åˆã®ã‚¢ã‚¤ãƒ†ãƒ ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã‚る。\n" "ã¾ãŸã€the `#tag`ã«ã¤ã„ã¦ã‚‚è¿°ã¹ã¦ãŠã。\n" "`#tags` 㨠`#has_tag?` ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ä¸Šã§è¨˜è¿°ã•れãŸ{YARD::Docstring}\n" "オブジェクトを委譲ã™ã‚‹ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰ã§ã‚る。" #: ../docs/TagsArch.md:23 msgid "### Adding Custom Tags" msgstr "### カスタムタグを付ã‘ã‚‹" #: ../docs/TagsArch.md:25 msgid "" "The `@tagname` tag used in the above examples is clearly not part of the " "tags\n" "that come with YARD. If such a tag would actually be part of documentation " "under\n" "a default install, YARD would raise a warning that the tag does not exist. " "It is,\n" "however, trivial to add this tag to be recognized by YARD." msgstr "" "å‰è¨˜ã®ä¾‹ãªã©ã§ä½¿ã‚れã¦ã„ã‚‹@tagnemeã‚¿ã‚°ã¯æ˜Žã‚‰ã‹ã«YARDã«å­˜åœ¨ã™ã‚‹ã‚¿ã‚°ã®ä¸€éƒ¨ã§ã¯" "ãªã„。\n" "ã‚‚ã—ãã®ã‚ˆã†ãªã‚¿ã‚°ãŒãƒ‡ãƒ•ォルトã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸€éƒ¨ã§ã‚れ" "ã°ã€\n" "YARDã¯ãã®ã‚ˆã†ãªã‚¿ã‚°ã¯å­˜åœ¨ã—ã¦ã„ãªã„ã¨ã„ã†è­¦å‘Šã‚’出ã™ã ã‚ã†ã€‚\n" "ã¤ã¾ã‚Šã€YARDã«ã‚ˆã£ã¦èªè­˜ã•れるãŸã‚ã®ã‚¿ã‚°ã‚’付ã‘ã‚‹ã“ã¨ã¯ã€\n" "é‡è¦ã§ã¯ãªã„。" #: ../docs/TagsArch.md:30 msgid "" "All tags in YARD are added to the {YARD::Tags::Library tag library} which " "makes\n" "use of a tag factory class to parse the data inside the tags. To simply add " "a\n" "tag that stores simple text like our `@tagname` tag above, use:" msgstr "" "YARDã®ã™ã¹ã¦ã®ã‚¿ã‚°ã¯{YARD::Tags::Library tag library}ã«è¿½åŠ ã•れる。\n" "{YARD::Tags::Library tag library}ã¯ã‚¿ã‚°ã®ä¸­ã®ãƒ‡ãƒ¼ã‚¿ã‚’è§£æžã™ã‚‹ç‚ºã«ã€\n" "タグファクトリークラスを利用ã—ã¦ã„る。\n" "@tagnameã‚¿ã‚°ã®ã‚ˆã†ã«å˜ç´”ãªãƒ†ã‚­ã‚¹ãƒˆã‚’åŽç´ã—ãŸã‚¿ã‚°ã‚’追加ã™ã‚‹ãªã‚‰ã€\n" "次ã®ã‚ˆã†ã«ãªã‚‹:" #: ../docs/TagsArch.md:34 msgid " YARD::Tags::Library.define_tag(\"A Sample Tag\", :tagname)" msgstr " YARD::Tags::Library.define_tag(\"A Sample Tag\", :tagname)" #: ../docs/TagsArch.md:36 msgid "" "This will now allow YARD to add the metadata from `@tagname` to the " "docstring." msgstr "docstringã«`@tagname`ã‹ã‚‰ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’ã¤ã‘ã‚‹ã“ã¨ã‚’YARDã«è¨±å¯ã™ã‚‹ã€‚" #: ../docs/TagsArch.md:38 msgid "## Tag Factory Architecture" msgstr "## タグファクトリー構造" #: ../docs/TagsArch.md:40 msgid "" "Recognizing a tag is one part of the process. Parsing the tag contents is " "the\n" "second step. YARD has a tag architecture that allows developers to add or " "completely\n" "change the way tags contents can be parsed." msgstr "" "ã‚¿ã‚°ã‚’èªè­˜ã™ã‚‹ã“ã¨ã¯ãƒ—ロセスã®ä¸€éƒ¨ã§ã‚る。\n" "ã‚¿ã‚°ã®ä¸­èº«ã‚’è§£æžã™ã‚‹ã®ã¯ç¬¬äºŒæ®µéšŽã¨ãªã‚‹ã€‚\n" "YARDã¯ã‚¿ã‚°ã®æ§‹é€ ã‚’æŒã£ã¦ã„る。\n" "ã‚¿ã‚°ã®æ§‹é€ ã«ã‚ˆã£ã¦ã€\n" "開発者ã¯ä¸­èº«ãŒè§£æžå¯èƒ½ãªã‚¿ã‚°ã‚’加ãˆãŸã‚Šå¤‰æ›´ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãる。\n" #: ../docs/TagsArch.md:44 msgid "" "The separation of registration and tag creation can be seen in the " "following\n" "class diagram:" msgstr "登録ã®åˆ†é›¢ã‚„タグ作æˆã¯æ¬¡ã®è¡¨ã®é€šã‚Šã€‚" #: ../docs/TagsArch.md:47 msgid "![Tags Architecture Class Diagram](images/tags-class-diagram.png)" msgstr "![Tags Architecture Class Diagram](images/tags-class-diagram.png)" #: ../docs/TagsArch.md:49 msgid "### DefaultFactory" msgstr "### デフォルトファクトリー" #: ../docs/TagsArch.md:51 msgid "" "By default, YARD has a few standard syntaxes that can be parsed for tags. " "These\n" "are all implemented by the {YARD::Tags::DefaultFactory} class. These " "syntaxes\n" "are:" msgstr "" "デフォルトã§ã€YARDã¯ã‚¿ã‚°ã‚’è§£æžã™ã‚‹ã„ãã¤ã‹ã®æ¨™æº–ã®æ§‹æ–‡ã‚’æŒã£ã¦ã„る。\n" "ãれらã¯ã™ã¹ã¦ {YARD::Tags::DefaultFactory}クラスã§å®Ÿè£…ã•れã¦ã„る。\n" "ã“ã‚Œã‚‰ã®æ§‹æ–‡ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã€‚\n" #: ../docs/TagsArch.md:55 msgid "" " * Standard text: no parsing is done, but text is stripped of newlines and\n" " multiple spaces." msgstr "" " * Standard text: è§£æžã•れã¦ã„ãªã„。\n" " ã—ã‹ã—ãƒ†ã‚­ã‚¹ãƒˆã¯æ–°ã—ã„行や多é‡ã®ã‚¹ãƒšãƒ¼ã‚¹ãŒå–り除ã‹ã‚Œã¦ã„る。" #: ../docs/TagsArch.md:58 msgid "" " * Raw text: does no parsing at all, no stripping of newlines or spaces. " "This\n" " is best used for code snippets." msgstr "" " * Raw text: ã¾ã£ãŸãè§£æžã—ã¦ã„ãªã„ã€æ–°ã—ã„行やスペースã¯å–り除ã‹ã‚Œã¦ã„ãªã„。\n" " ã“れã¯ã‚³ãƒ¼ãƒ‰ã‚¹ãƒ‹ãƒšãƒƒãƒˆã«ã‚ˆã使ã‚れる。" #: ../docs/TagsArch.md:61 msgid "" " * Raw text with title: does no parsing on the text but extracts the first " "line\n" " of the metadata as the \"title\", useful for tags such as `@example`:" msgstr "" " * Raw text with title: テキストã®ä¸Šã§ã¯è§£æžã—ã¦ã„ãªã„ãŒã€\n" " ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®æœ€åˆã®è¡Œã‚’\"title\"ã¨ã—ã¦æŠ½å‡ºã™ã‚‹ã€‚以下㮠`@example` ã®ã‚ˆã†ãªã‚¿ã‚°ã§ä¾¿åˆ©ã§ã‚ã‚‹:" #: ../docs/TagsArch.md:64 msgid "" " # @example Inspect an element\n" " # myobj.inspect #=> #" msgstr "" " # @example Inspect an element\n" " # myobj.inspect #=> #" #: ../docs/TagsArch.md:67 msgid "" " * Text with types: parses a list of types at the beginning of the text. " "Types\n" " are optional. The standard syntax is in the form `[type1, type2, ...]`,\n" " for example:" msgstr "" " * Text with types: ãƒ†ã‚­ã‚¹ãƒˆã®æœ€åˆã®éƒ¨åˆ†ã§åž‹ã®ãƒªã‚¹ãƒˆã‚’è§£æžã™ã‚‹ã€‚åž‹ã¯ä»»æ„ã§æŒ‡å®šã§ãる。\n" "æ¨™æº–çš„ãªæ§‹æ–‡ã¯`[type1, type2, ...]`ã¨ã„ã†åž‹ã‚’ã—ã¦ã„る。例ãˆã°:" #: ../docs/TagsArch.md:71 msgid "" " # @return [String, Symbol] a description here\n" " # @return description here with no types" msgstr "" " # @return [String, Symbol] a description here\n" " # @return description here with no types" #: ../docs/TagsArch.md:74 msgid "" " * Text with types and a name: parses a list of types at the beginning of " "text\n" " followed by a name and extra descriptive text. For example:" msgstr "" " * Text with types and a name: åå‰ã‚„説明文ãŒç¶šããƒ†ã‚­ã‚¹ãƒˆã®æœ€åˆã®éƒ¨åˆ†ã§\n" "åž‹ã®ãƒªã‚¹ãƒˆã‚’è§£æžã™ã‚‹ã€‚例ãˆã°:" #: ../docs/TagsArch.md:77 msgid "" " # @param [String] str the string to reverse\n" " def reverse(str) '...' end" msgstr "" " # @param [String] str the string to reverse\n" " def reverse(str) '...' end" #: ../docs/TagsArch.md:80 msgid "" "As mentioned above, this syntax is implemented by the `DefaultFactory` which " "can\n" "be swapped out for any factory. In some cases, a developer may want to " "change\n" "the type declaration syntax to be in the form:" msgstr "" "上述ã®ã‚ˆã†ã«ã€ã“ã®æ§‹æ–‡ã¯DefaultFactoryã§å®Ÿè£…ã•れã¦ã„る。\n" "DefaultFactoryã¯ä»»æ„ã®factoryã«äº¤æ›ã•れるã“ã¨ãŒã§ãる。\n" "時ã«ã¯ã€é–‹ç™ºè€…ã¯factory構造ã®åž‹å®£è¨€æ§‹æ–‡ã‚’変ãˆã‚‹ã“ã¨ãŒã§ãる。" #: ../docs/TagsArch.md:84 msgid " # @tagname name description" msgstr " # @tagname åå‰ <åž‹..., here> 説明" #: ../docs/TagsArch.md:86 msgid "" "This can be done by simply implementing a new factory that parses the data " "in\n" "this form." msgstr "" "ã“ã®ãƒ•ォームã®ä¸­ã§ãƒ‡ãƒ¼ã‚¿ã‚’è§£æžã™ã‚‹æ–°ã—ã„ファクトリーを実装ã™ã‚‹ã ã‘ã§ã‚ˆã„。" #: ../docs/TagsArch.md:89 msgid "### Implementing a Factory" msgstr "### ファクトリー実装ã™ã‚‹" #: ../docs/TagsArch.md:91 msgid "" "Factories should implement the method `parse_tag` as well as any " "`parse_tag_SUFFIX`\n" "method where SUFFIX refers to the suffix added when declaring the tag. For " "example,\n" "a tag can also be declared as follows:" msgstr "" "ファクトリーã¯ã‚¿ã‚°ãŒå®£è¨€ã•れる時ã«ã€ `parse_tag_SUFFIX` メソッドã®ã‚ˆã†ã«\n" "`parse_tag` メソッドãŒå®Ÿè£…ã•れる。例ãˆã°ã€æ¬¡ã®ã‚ˆã†ã«ã‚¿ã‚°ã‚’定義ã§ãる。" #: ../docs/TagsArch.md:95 msgid " YARD::Tags::Library.define_tag \"Parameter\", :param, :with_types" msgstr " YARD::Tags::Library.define_tag \"Parameter\", :param, :with_types" #: ../docs/TagsArch.md:97 msgid "" "In such a case, the factory will be called with method " "`parse_tag_with_types`. In\n" "all cases, the method should return a new {YARD::Tags::Tag} object. " "Generally,\n" "the `parse_tag` methods take 2 or 3 parameters. A simple tag can be " "implemented\n" "as:" msgstr "" "上ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒ•ァクトリー㯠`parse_tag_with_types` ã¨ã¨ã‚‚ã«å‘¼ã³å‡ºã•れる。\n" "ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ–°ã—ã„{YARD::Tags::Tag}オブジェクトを必ãšè¿”ã•ãªã‘れã°ãªã‚‰ãªã„。\n" "一般ã«ã€ `parse_tag` メソッドã¯2ã¤ã‹3ã¤ã®å¼•æ•°ã‚’å–å¾—ã™ã‚‹ã€‚\n" "å˜ç´”ãªã‚¿ã‚°ã¯æ¬¡ã®ã‚ˆã†ã«å®Ÿè£…ã™ã‚‹ã“ã¨ãŒã§ãる。" #: ../docs/TagsArch.md:102 msgid "" " def parse_tag(tag_name, text)\n" " Tag.new(tag_name, text)\n" " end" msgstr "" " def parse_tag(tag_name, text)\n" " Tag.new(tag_name, text)\n" " end" #: ../docs/TagsArch.md:106 msgid "" "The text parameter contains pre-parsed text with extra spaces and newlines " "removed.\n" "If required, the method could also be declared with a third parameter " "containing\n" "unmodified raw text:" msgstr "" "テキストパラメータã¯ã€\n" "余分ãªç©ºç™½ã¨æ”¹è¡Œã‚’削除ã™ã‚‹ã‚ˆã†äº‹å‰è§£æžã—ãŸãƒ†ã‚­ã‚¹ãƒˆãŒå«ã¾ã‚Œã¦ã„る。\n" "ã‚‚ã—å¿…è¦ãªã‚‰ä»¥ä¸‹ã®ã‚ˆã†ã«ã€\n" "3ã¤ç›®ã®å¼•数を用ã„ã¦ä¿®æ­£ã•れã¦ã„ãªã„生テキストをå«ã‚ã¦å®£è¨€ã§ãる。" #: ../docs/TagsArch.md:110 msgid "" " def parse_tag_with_raw_text(tag_name, text, raw_text)\n" " Tag.new(tag_name, raw_text)\n" " end" msgstr "" " def parse_tag_with_raw_text(tag_name, text, raw_text)\n" " Tag.new(tag_name, raw_text)\n" " end" #: ../docs/TagsArch.md:114 msgid "" "Note that this method would be invoked for a tag declared with the `:" "with_raw_text`\n" "suffix." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯with_raw_text suffixã¨ã¨ã‚‚ã«å®£è¨€ã•れãŸã‚¿ã‚°ã®ãŸã‚ã«å‘¼ã³å‡ºã•れ" "る。" #: ../docs/TagsArch.md:117 msgid "### Changing the Factory" msgstr "### ファクトリーを変更ã™ã‚‹" #: ../docs/TagsArch.md:119 msgid "" "To change the factory, set the {YARD::Tags::Library.default_factory} " "attribute:" msgstr "" "ファクトリーを変更ã™ã‚‹ç‚ºã«ã¯ã€\n" "ä»¥ä¸‹ã®æ§˜ã«{YARD::Tags::Library.default_factory}属性を設定ã™ã‚‹ã€‚" #: ../docs/TagsArch.md:121 msgid " YARD::Tags::Library.default_factory = MyFactory" msgstr " YARD::Tags::Library.default_factory = MyFactory" #: ../docs/TagsArch.md:123 msgid "" "This must be done before any parsing is done, or the factory will not be " "used." msgstr "" "ã“れã¯è§£æžãŒå®Œäº†ã™ã‚‹å‰ã«ã—ãªã‘れã°ãªã‚‰ãªã„ã€ã§ãªã‘れã°factoryã¯ä½¿ãˆãªã„。" # title #: ../docs/Templates.md:1 msgid "Templates Architecture" msgstr "テンプレート構造" #: ../docs/Templates.md:3 msgid "# Templates Architecture" msgstr "# テンプレート構造" #: ../docs/Templates.md:5 msgid "" "Templates are the main component in the output rendering process of YARD,\n" "which is invoked when conventional HTML/text output needs to be rendered\n" "for a set of code objects." msgstr "" "テンプレートã¯ã€YARDã®å‡¦ç†ã‚’表示出力ã™ã‚‹ã®ãŒä¸»ãªå†…容ã¨ãªã‚‹ã€‚\n" "ãã—ã¦ã€ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®é›†ã¾ã‚Šã‚’表示ã™ã‚‹ç‚ºã«\n" "従æ¥ã®HTML/text出力ãŒå¿…è¦ãªæ™‚呼ã³å‡ºã•れる。" #: ../docs/Templates.md:9 msgid "## Design Goals" msgstr "## 設計目標" #: ../docs/Templates.md:11 msgid "" "The general design attempts to be as abstracted from actual content and " "templates\n" "as possible. Unlike RDoc which uses one file to describe the entire " "template,\n" "YARD splits up the rendering of code objects into small components, " "allowing\n" "template modification for smaller subsets of a full template without having " "to\n" "duplicate the entire template itself. This is necessary because of YARD's " "support\n" "for plugins. YARD is designed for extensibility by external plugins, and " "because\n" "of this, no one plugin can be responsible for the entire template because " "no\n" "one plugin knows about the other plugins being used. For instance, if an " "RSpec\n" "plugin was added to support and document specifications in class templates,\n" "this information would need to be transparently added to the template to " "work\n" "in conjunction with any other plugin that performed similar template " "modifications.\n" "The design goals can be summarized as follows:" msgstr "" "ãŠãŠã¾ã‹ãªè¨­è¨ˆç›®æ¨™ã¯\n" "テンプレートã§ã€ã§ãã‚‹ã‹ãŽã‚Šå®Ÿéš›ã®å†…容ã‹ã‚‰æŠ½è±¡åŒ–ã™ã‚‹ã®ã‚’試ã¿ã‚‹äº‹ã§ã‚る。\n" "RDocã¨ã¯é•ã£ã¦ã€\n" "YARDã¯ã€å…¨ã¦ã®ãƒ†ãƒ³ãƒ—レートを説明ã™ã‚‹ç‚ºã«ä¸€ã¤ã®ãƒ•ァイルを利用ã—ã€\n" "コードオブジェクトã®è¡¨ç¤ºã‚’分割ã—å°ã•ã„æ§‹æˆã¨ã™ã‚‹ã€‚\n" "ãã—ã¦ã€ãƒ†ãƒ³ãƒ—レートã¯\n" "å…¨ã¦ã®ãƒ†ãƒ³ãƒ—レートãŒé‡è¤‡ç„¡ã—ã«\n" "最å°ã®ãƒ†ãƒ³ãƒ—レートã®éƒ¨åˆ†æ¯Žã®ä¿®æ­£ã‚’å—ã‘入れる\n" "ã“れã¯ã€ãƒ—ラグインã®YARDã®ã‚µãƒãƒ¼ãƒˆã®ç‚ºã«\n" "å¿…é ˆã¨ãªã‚Šã¾ã™ã€‚\n" "YARDã¯ã€å¤–部ã®ãƒ—ラグインã«ã‚ˆã‚‹æ‹¡å¼µæ€§ã‚’考ãˆè¨­è¨ˆã•れã¦ã„る。\n" "ãã‚“ãªã‚ã‘ã§ã€ãƒ—ラグイン無ã—ã§å…¨ã¦ã®ãƒ†ãƒ³ãƒ—レートを実行ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã‚‹ã€‚\n" "何故ãªã‚‰ã€ãƒ—ラグインãŒç„¡ã„å ´åˆã¯ã€\n" "ä»–ã®ãƒ—ラグインãŒåˆ©ç”¨ã•れる事ã«ã¤ã„ã¦\n" "識別ã™ã‚‹ã‹ã‚‰ã§ã‚る。\n" "例ãˆã°ã€RSpecプラグインã®å ´åˆã€\n" "サãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れãŸã‚Šã€\n" "クラステンプレートã®ä¸­ã®ä»•様ãŒè¨˜è¿°ã•れる。\n" "åŒæ§˜ã®ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã®æ”¹è‰¯ã‚’æ–½ã—ãŸ\n" "ä»–ã®ã©ã‚“ãªãƒ—ラグインを用ã„ã¦ã‚‚ã€\n" "連æºã™ã‚‹ã§ãるよã†ã€ãƒ†ãƒ³ãƒ—レートãŒ\n" "é€éŽçš„ã«è¿½åŠ ã•れるã“ã¨ã‚’å¿…è¦ã¨ã™ã‚‹ã€‚\n" "設計目標ã¯ã€ä»¥ä¸‹ã®æ§˜ã«è¦ç´„ã•れる。" #: ../docs/Templates.md:24 msgid "" " 1. Output should be able to be rendered for any arbitrary format with " "little\n" " modification to YARD's source code. The addition of extra templates " "should\n" " be sufficient.\n" " 2. The output rendered for an object should independently rendered data\n" " from arbitrary sources. These independent components are called " "\"sections\".\n" " 3. Sections should be able to be inserted into any object without " "affecting\n" " any existing sections in the document. This allows for easy " "modification\n" " of templates by plugins." msgstr "" " 1. 出力ã¯YARDã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¸ã®å°‘ãªã„変更ã§\n" " å…¨ã¦ä»»æ„ã®ãƒ•ォーマット用ã«è¡¨ç¤ºå¯èƒ½ã«ã™ã¹ãã§ã‚る。\n" " テンプレートã®è¿½åŠ ã¯å……分ãªã‚‚ã®ã«ã™ã¹ãã§ã‚る。\n" "\n" " 2. オブジェクト用ã«è¡¨ç¤ºã•れる出力ã¯ã€ä»»æ„ã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ç‹¬è‡ªã«ãƒ‡ãƒ¼ã‚¿ã‚’\n" " 表示ã™ã‚‹ã¹ãã§ã‚る。\n" " ã“れらã®ç‹¬è‡ªæ§‹æˆã¯\"sections\"を呼ã³å‡ºã™ã€‚\n" "\n" " 3. セクションã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸­ã®ä»»æ„ã®å­˜åœ¨ã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®å½±éŸ¿ç„¡ã—ã§\n" " ä»»æ„ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æŒ¿å…¥ã•れる事をå¯èƒ½ã«ã™ã‚‹ã¹ãã§ã‚る。\n" " ã“れã¯ãƒ—ラグインã«ã‚ˆã‚‹ãƒ†ãƒ³ãƒ—レートã®ç°¡å˜ãªå¤‰æ›´ã‚’å—ã‘入れる。" #: ../docs/Templates.md:33 msgid "## Templates" msgstr "## テンプレート" #: ../docs/Templates.md:35 msgid "" "Template modules are the objects used to orchestrate the design goals " "listed\n" "above. Specifically, they organize the sections and render the template " "contents\n" "depending on the format." msgstr "" "テンプレートモジュールã¯ä¸Šã§è¨˜è¿°ã—ãŸè¨­è¨ˆç›®æ¨™ã‚’実ç¾ã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れるオブジェクトã¨ãªã‚‹ã€‚\n" "具体的ã«ã„ã†ã¨ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’組織化ã—ãŸã‚Šã€\n" "フォーマットã«ä¾å­˜ã™ã‚‹ãƒ†ãƒ³ãƒ—レートã®å†…容を表示ã™ã‚‹ã€‚" #: ../docs/Templates.md:39 msgid "## Engine" msgstr "## エンジン" #: ../docs/Templates.md:41 msgid "" "The Engine class orchestrates the creation and rendering of Template modules " "and\n" "handles serialization or specific rendering scenarios (like HTML). To " "create\n" "a template, use the {YARD::Templates::Engine.template template} method. The " "two most\n" "common methods used to initiate output are the {YARD::Templates::Engine." "render render}\n" "and {YARD::Templates::Engine.generate generate} methods which generate and\n" "optionally serialize output to a file. The latter, `#generate`, is used\n" "specially to generate HTML documentation and copy over assets that may be\n" "needed. For instance, an object may be rendered with:" msgstr "" "エンジンクラスã¯ã€\n" "作æˆã¨ãƒ†ãƒ³ãƒ—レートモジュールã®è¡¨ç¤ºã‚„シリアライズ処ç†ã‚„\n" "特定ã®è¡¨ç¤º(HTMLã®ã‚ˆã†ãª)ã‚’çµ±åˆã™ã‚‹ã€‚\n" "テンプレートを作æˆã™ã‚‹ç‚ºã«ã¯ã€\n" "{YARD::Templates::Engine.template template}メソッドを使用ã™ã‚‹ã€‚\n" "出力を開始ã™ã‚‹ãŸã‚ã«ä½¿ã‚れる二ã¤ã®ä¸€èˆ¬çš„ãªãƒ¡ã‚½ãƒƒãƒ‰ã¯\n" "{YARD::Templates::Engine.render render} ã¨\n" "{YARD::Templates::Engine.generate generate} メソッドã§\n" "生æˆã—ファイルã«ä»»æ„ã§å‡ºåŠ›ã‚’ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã™ã‚‹ã€‚\n" "ãã®å¾Œã§ã€ `#generate` メソッドã¯ã€\n" "HTMLドキュメントを生æˆã™ã‚‹ãŸã‚ã®ç‰¹åˆ¥ã«ä½¿ç”¨ã•れ,\n" "å¿…è¦ã¨ã•れる資産をコピーã™ã‚‹ã€‚\n" "例ãˆã°,ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¬¡ã®ä¾‹ã‚’用ã„表示ã•れる場åˆ:" #: ../docs/Templates.md:50 msgid " YARD::Templates::Engine.render(:object => myobject)" msgstr " YARD::Templates::Engine.render(:object => myobject)" #: ../docs/Templates.md:52 msgid "A set of objects may be rendered into HTML documentation by using:" msgstr "" "オブジェクトã®è¨­å®šã¯ã€ä»¥ä¸‹ã®è¨˜æ³•を用ã„る事ã«ã‚ˆã£ã¦HTMLドキュメントã§è¡¨ç¤ºã•れ" "る。" #: ../docs/Templates.md:54 msgid "" " # all_objects is an array of module and class objects\n" " # options includes a :serializer key to copy output to the file system\n" " YARD::Templates::Engine.generate(all_objects, options)" msgstr "" " # all_objects ã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®é…列やクラスオブジェクトã¨ãªã‚‹\n" " # options ã¯ãƒ•ァイルシステムã«ã‚³ãƒ”ー出力ã™ã‚‹ã®ç‚ºã«:serializerキーをå«ã‚“ã§" "ã„る。\n" " YARD::Templates::Engine.generate(all_objects, options)" #: ../docs/Templates.md:58 msgid "" "Note that these methods should not be called directly. The {YARD::" "CodeObjects::Base}\n" "class has a {YARD::CodeObjects::Base#format #format} helper method to render " "an\n" "object. For instance, the above render example is equivalent to the simple\n" "call `myobject.format`. The `generate` method is a special kind of render\n" "and is called from the {YARD::CLI::Yardoc} command line utility." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ç›´æŽ¥å‘¼ã³å‡ºã•れるã¹ãã§ã¯ãªã„。\n" "{YARD::CodeObjects::Base}クラスã¯\n" "オブジェクトを表示ã™ã‚‹ç‚ºã®\n" "{YARD::CodeObjects::Base#format #format} helper メソッドを\n" "æŒã£ã¦ã„る。\n" "例ãˆã°ã€ä¸Šã®è¡¨ç¤ºã®ä¾‹ã¯ã€\n" "å˜ç´”ãª`myobject.format`呼ã³å‡ºã—ã¨åŒç­‰ã§ã‚る。\n" "`generate`メソッドã¯ã€ç‰¹åˆ¥ãªè¡¨ç¤ºã‚’ã—ã€\n" "ãã—ã¦ãれã¯ã€{YARD::CLI::Yardoc}コマンドラインã‹ã‚‰å‘¼ã³å‡ºã›ã‚‹ã€‚" #: ../docs/Templates.md:64 msgid "## Template Options" msgstr "## テンプレートオプション" #: ../docs/Templates.md:66 msgid "" "A template keeps state when it is rendering output. This state is kept in\n" "an options hash which is initially passed to it during instantiation. Some\n" "default options set the template style (`:template`), the output format (`:" "format`),\n" "and the serializer to use (`:serializer`). This options hash is modifiable\n" "from all methods seen above. For example, initializing a template to output " "as\n" "HTML instead of text can be done as follows:" msgstr "" "テンプレートã¯ãれãŒå‡ºåŠ›è¡¨ç¤ºã®æ™‚ã«çŠ¶æ…‹ã‚’ä¿æŒã™ã‚‹ã€‚\n" "ã“ã®çŠ¶æ…‹ã¯ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã®ä¸­ã§ä¿æŒã•れる。\n" "ãã—ã¯æœ€åˆã«ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•ã‚Œã‚‹é–“ã«æ¸¡ã•れる。\n" "å¹¾ã¤ã‹ã®ãƒ‡ãƒ•ォルトã®ã‚ªãƒ—ションã¯ãƒ†ãƒ³ãƒ—レートスタイル(`:template`)\n" "ã¨å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ(`:format`)ã¨(`:serializer`)を使ã†ãŸã‚ã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ãƒ¼ã‚’設定ã™ã‚‹ã€‚\n" "ã“ã®ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã¯ä¸Šã§è¦‹ã‚‰ã‚ŒãŸå…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å¤‰æ›´å¯èƒ½\n" "例ãˆã°ãƒ†ã‚­ã‚¹ãƒˆã®ä»£ã‚りã«HTMLã¨ã—ã¦å‡ºåŠ›ã™ã‚‹ãŸã‚ã«ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã‚’åˆæœŸã™ã‚‹ã«ã¯ã€æ¬¡ã®æ§˜ã«ã§ãる。" #: ../docs/Templates.md:73 msgid " myobject.format(:format => :html)" msgstr " myobject.format(:format => :html)" #: ../docs/Templates.md:75 msgid "## Serializer" msgstr "## シリアライザー" #: ../docs/Templates.md:77 msgid "" "This class abstracts the logic involved in deciding how to serialize data " "to\n" "the expected endpoint. For instance, there is both a {YARD::Serializers::" "StdoutSerializer StdoutSerializer}\n" "and {YARD::Serializers::FileSystemSerializer FileSystemSerializer} class " "for\n" "outputting to console or to a file respectively. When endpoints with " "locations\n" "are used (like files or URLs), the serializer implements the {YARD::" "Serializers::Base#serialized_path #serialized_path}\n" "method. This allows the translation from a code object to its path at the " "endpoint,\n" "which enables inter-document linking." msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯æœŸå¾…ã•れãŸå‡ºåŠ›å…ˆã¸\n" "データをシリアライズã™ã‚‹ç‚ºã«ã€\n" "決定方法,関連ã™ã‚‹ãƒ­ã‚¸ãƒƒã‚¯ã‚’抽象化ã™ã‚‹ã€‚\n" "例ãˆã°ã€ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã‚„個々ã®ãƒ•ァイルã®ç‚ºã®å‡ºåŠ›ç”¨ã®\n" "{YARD::Serializers::StdoutSerializer StdoutSerializer}ã¨ã€\n" "{YARD::Serializers::FileSystemSerializer FileSystemSerializer} クラスãŒã‚" "る。\n" "å‡ºåŠ›å…ˆãŒæŒ‡å®šã•れる時(ファイルやURLã®ã‚ˆã†ãª)ã€\n" "シリアライザーã¯ã€{YARD::Serializers::Base#serialized_path #serialized_path}" "メソッドを実装ã™ã‚‹ã€‚\n" "ã“れã¯ã€ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã‹ã‚‰å‡ºåŠ›å…ˆã®ãƒ‘スã¾ã§ã®ç¿»è¨³ã‚’å—ã‘入れã€\n" "ãã—ã¦ã€å†…部ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒªãƒ³ã‚¯ã‚’å¯èƒ½ã«ã™ã‚‹ã€‚" #: ../docs/Templates.md:85 msgid "" "Rendered objects are automatically serialized using the object if present,\n" "otherwise the rendered object is returned as a string to its parent. Nested\n" "Templates automatically set the serializer to nil so that they return\n" "as a String to their parent." msgstr "" "表示ã•れるオブジェクトãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯,\n" "オブジェクトã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れる。\n" "ãれ以外ã®å ´åˆ,表示ã•れるオブジェクトã¯ãã®è¦ªã«æ–‡å­—列ã¨ã—ã¦è¿”ã•れる。\n" "ãƒã‚¹ãƒˆã•れãŸãƒ†ãƒ³ãƒ—レートã¯nilã«è‡ªå‹•çš„ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ãƒ¼ã‚’設定ã™ã‚‹ã€‚\n" "ãªã®ã§ã“れã¯ãれらã®è¦ªã«æ–‡å­—列ã¨ã—ã¦è¿”ã•れる。" #: ../docs/Templates.md:90 msgid "## Creating a Template" msgstr "## テンプレート作æˆ" #: ../docs/Templates.md:92 msgid "" "Templates are represented by a directory inside the {YARD::Templates::Engine." "template_paths}\n" "on disk. A standard template directory looks like the following tree:" msgstr "" "テンプレートã¯\n" "ディスク上ã®{YARD::Templates::Engine.template_paths}ã®ä¸­ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚ˆã£ã¦è¡¨ã•れる。\n" "標準的ãªãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã¯æ¬¡ã®æœ¨æ§‹é€ ã®ã‚ˆã†ã«ãªã‚‹ã€‚" #: ../docs/Templates.md:95 msgid "" " (Assuming templates/ is a template path)\n" " templates\n" " `-- default\n" " |-- class\n" " | |-- dot\n" " | | |-- setup.rb\n" " | | `-- superklass.erb\n" " | |-- html\n" " | | |-- constructor_details.erb\n" " | | |-- setup.rb\n" " | | `-- subclasses.erb\n" " | |-- setup.rb\n" " | `-- text\n" " | |-- setup.rb\n" " | `-- subclasses.erb\n" " |-- docstring\n" " | |-- html\n" " | | |-- abstract.erb\n" " | | |-- deprecated.erb\n" " | | |-- index.erb\n" " | | `-- text.erb\n" " | |-- setup.rb\n" " | `-- text\n" " | |-- abstract.erb\n" " | |-- deprecated.erb\n" " | |-- index.erb\n" " | `-- text.erb" msgstr "" " (Assuming templates/ is a template path)\n" " templates\n" " `-- default\n" " |-- class\n" " | |-- dot\n" " | | |-- setup.rb\n" " | | `-- superklass.erb\n" " | |-- html\n" " | | |-- constructor_details.erb\n" " | | |-- setup.rb\n" " | | `-- subclasses.erb\n" " | |-- setup.rb\n" " | `-- text\n" " | |-- setup.rb\n" " | `-- subclasses.erb\n" " |-- docstring\n" " | |-- html\n" " | | |-- abstract.erb\n" " | | |-- deprecated.erb\n" " | | |-- index.erb\n" " | | `-- text.erb\n" " | |-- setup.rb\n" " | `-- text\n" " | |-- abstract.erb\n" " | |-- deprecated.erb\n" " | |-- index.erb\n" " | `-- text.erb" #: ../docs/Templates.md:123 msgid "" "The path `default` refers to the template style (:template key in options " "hash)\n" "and the directories at the next level (such as `class`) refer to template\n" "`:type` (options hash key) for a template. The next directory refers to the\n" "output format being used defined by the `:format` template option." msgstr "" "パス㮠`default` ã¯ãƒ†ãƒ³ãƒ—レートスタイル(:template key in options hash)ã‚’å‚ç…§ã—\n" "次ã®éšŽå±¤ã§ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯(例ãˆã° `class` ãªã©)\n" "テンプレート用ã®ãƒ†ãƒ³ãƒ—レート㮠`:type` (ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションキー)ã‚’å‚ç…§ã™ã‚‹ã€‚\n" "次ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯\n" "`:format` テンプレートオプションã«ã‚ˆã£ã¦å®šç¾©ã•れã€\n" "利用ã•れる出力フォーマットをå‚ç…§ã™ã‚‹ã€‚" #: ../docs/Templates.md:128 msgid "" "As we saw in the above example, the format option can be set to `:html`, " "which\n" "would use the `html/` directory instead of `text/`. Finally, the individual ." "erb\n" "files are the sections that make up the template." msgstr "" "ã ã‚Œã‚‚ãŒä¸Šã®ä¾‹ã§è¦‹ãŸé€šã‚Šã€\n" "フォーマットオプション㯠`:html` ã«è¨­å®šã§ãã€\n" "`text/` ã®ä»£ã‚り㫠`html/` ディレクトリを利用ã™ã‚‹ã€‚\n" "最終的ã«å€‹ã€…ã®.erbファイルã¯ã€ãƒ†ãƒ³ãƒ—レートを作り上ã’るセクションã§ã‚る。" #: ../docs/Templates.md:132 msgid "" "Note that the subdirectory `html/` is also its own \"template\" that " "inherits\n" "from the parent directory. We will see more on this later." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "`html/` サブディレクトリã¯\n" "ãれ自身ãŒè¦ªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ç¶™æ‰¿ã™ã‚‹\"テンプレート\"ã§ã‚‚ã‚る。\n" "ã“ã®å¾Œã®é …ã§è©³ç´°ãŒã•れる。" #: ../docs/Templates.md:135 msgid "## setup.rb" msgstr "## setup.rb" #: ../docs/Templates.md:137 msgid "" "Every template should have at least one `setup.rb` file that defines the\n" "{YARD::Templates::Template#init #init} method to set the\n" "{YARD::Templates::Template#sections #sections} used by the template. If\n" "a setup.rb is not defined in the template itself, there should be a " "template\n" "that is inherited (via parent directory or explcitly) that sets the " "sections\n" "on a newly created template." msgstr "" "常ã«ãƒ†ãƒ³ãƒ—レートã¯å°‘ãªãã¨ã‚‚\n" "テンプレートã«ã‚ˆã£ã¦åˆ©ç”¨ã—ãŸ{YARD::Templates::Template#sections #sections}を設定ã™ã‚‹ãŸã‚ã«\n" "{YARD::Templates::Template#init #init}メソッドを定義ã™ã‚‹\n" "`setup.rb` ファイルをæŒã¤ã€‚\n" "setup.rbãŒãƒ†ãƒ³ãƒ—レートã®ä¸­ã§æœªå®šç¾©ã®å ´åˆã¯ã€\n" "æ–°è¦ã«ä½œæˆã•れãŸãƒ†ãƒ³ãƒ—レート上ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’設定ã—ã€\n" "継承ã•れる(親ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚„明示的ã«)テンプレートã«ãªã‚‹ã¹ãã§ã‚る。" #: ../docs/Templates.md:144 msgid "A standard setup.rb file looks like:" msgstr "標準的ãªsetup.rbファイルã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¦‹ãˆã‚‹ã€‚" #: ../docs/Templates.md:146 msgid "" " def init\n" " sections :section1, :section2, :section3\n" " end" msgstr "" " def init\n" " sections :section1, :section2, :section3\n" " end" #: ../docs/Templates.md:150 msgid "## Sections" msgstr "## セクション" #: ../docs/Templates.md:152 msgid "" "Sections are smaller components that correlate to template\n" "fragments. Practically speaking, a section can either be a template " "fragment\n" "(a conventional .erb file or other supported templating language), a method\n" "(which returns a String) or another {YARD::Templates::Template} (which in " "turn has its own\n" "list of sections)." msgstr "" "セクションã¯ãƒ†ãƒ³ãƒ—レートフラグã«é–¢é€£ã™ã‚‹ã‚ˆã‚Šå°ã•ã„æ§‹æˆè¦ç´ ã§ã‚る。\n" "事実上ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ã„ã¥ã‚Œã‹ã®\n" "テンプレートã®\n" "フラグ(慣習ã§.erbファイルや他ã«ã‚µãƒãƒ¼ãƒˆã•れãŸãƒ†ãƒ³ãƒ—レート言語),\n" "メソッド(文字列を返ã™)ã‚„ãれ以外{YARD::Templates::Template}ã«ã§ãã‚‹\n" "(è¨€ã„æ›ãˆã‚Œã°ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®è‡ªèº«ã®ãƒªã‚¹ãƒˆã‚’æŒã¤)" #: ../docs/Templates.md:158 msgid "## Nested Sections" msgstr "## ãƒã‚¹ãƒˆã—ãŸã‚»ã‚¯ã‚·ãƒ§ãƒ³" #: ../docs/Templates.md:160 msgid "" "Sections often require the ability to encapsulate a set of sub-sections in " "markup\n" "(HTML, for instance). Rather than use heavier Template subclass objects, a " "more\n" "lightweight solution is to nest a set of sub-sections as a list that " "follows\n" "a section, for example:" msgstr "" "ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯æ™‚々マークアップã§\n" "サブセクションã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’è¦ç´„ã™ã‚‹ã®ã«èƒ½åŠ›ã‚’å¿…è¦ã¨ã™ã‚‹ã€‚(例ãˆã°HTML)\n" "サブクラスオブジェクトã®ã‚ˆã‚Šé‡ã„テンプレートを使ã†ã‚ˆã‚Šã€\n" "より軽ã„ç­”ãˆãŒ\n" "次ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒªã‚¹ãƒˆã¨ã—ã¦ã‚µãƒ–セクションã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’ãƒã‚¹ãƒˆã™ã‚‹äº‹ã§ã‚る。\n" "例ãˆã°:" #: ../docs/Templates.md:165 msgid "" " def init\n" " sections :header, [:section_a, :section_b]\n" " end" msgstr "" " def init\n" " sections :header, [:section_a, :section_b]\n" " end" #: ../docs/Templates.md:169 msgid "" "The above example nests `section_a` and `section_b` within the `header` " "section.\n" "Practically speaking, these sections can be placed in the result by " "`yield`ing\n" "to them. A sample header.erb template might contain:" msgstr "" "上ã®ä¾‹ã¯ã€ `header` セクションã®ä¸­ã«\n" "`section_a` 㨠`section_b` ã‚’ãƒã‚¹ãƒˆã™ã‚‹ã€‚\n" "具体的ã«ã¯ã€ã“れらã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€\n" "`yield` ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ãã®çµæžœã®ä¸­ã«ç½®ã‹ã‚Œã‚‹ã€‚\n" "例ã®header.erbテンプレートã¯ä»¥ä¸‹ã‚’å«ã‚“ã§ã„ã‚‹" #: ../docs/Templates.md:173 msgid "" "

    Header

    \n" "
    \n" " <%= yieldall %>\n" "
    " msgstr "" "

    Header

    \n" "
    \n" " <%= yieldall %>\n" "
    " #: ../docs/Templates.md:178 msgid "" "This template code would place the output of `section_a` and `section_b` " "within\n" "the above div element. Using `yieldall`, we can also change the object that " "is being\n" "rendered. For example, we may want to yield the first method of the class.\n" "We can do this like so:" msgstr "" "ã“ã®ãƒ†ãƒ³ãƒ—レートã®ã‚³ãƒ¼ãƒ‰ã¯ã€\n" "上ã®div属性ã®ä¸­ã§ `section_a` 㨠`section_b` ã®\n" "出力ををセットã™ã‚‹ã€‚\n" "`yieldall` ã«ã‚ˆã£ã¦ç§é”ã¯ã€\n" "表示ã•れるオブジェクトを変更もã§ãる。\n" "例ãˆã°ã‚¯ãƒ©ã‚¹ã®æœ€åˆã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’yieldã®ç‚ºã«ã—ãŸã„ã¨ã™ã‚‹ã¨ã€\n" "以下ã®ã‚ˆã†ã«ã§ãる。" #: ../docs/Templates.md:183 msgid "" "

    First method

    \n" " <%= yieldall :object => object.meths.first %>" msgstr "" "

    First method

    \n" " <%= yieldall :object => object.meths.first %>" #: ../docs/Templates.md:186 msgid "" "This would run the nested sections for the method object instead of the " "class." msgstr "" "ã“れã¯ã€ã‚¯ãƒ©ã‚¹ã®ä»£ã‚りã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚ªãƒ–ジェクト用ã®ãƒã‚¹ãƒˆã•れãŸã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’èµ·å‹•" "ã™ã‚‹ã€‚" #: ../docs/Templates.md:188 msgid "" "Note that `yieldall` yields to all subsections, whereas `yield` will yield\n" "to each individually (in order) until there are no more left to yield to.\n" "In the vast majority of cases, you'd want to use `yieldall`, since `yield`\n" "makes it hard for users to override your template." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "`yieldall` ã¯å…¨ã¦ã®ä¸‹ä½ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’yieldã™ã‚‹ã®ã«å¯¾ã—ã¦ã€\n" "`yield` ã¯ã€è¦ç´ ãŒç„¡ããªã‚‹ã¾ã§å€‹ã€…ã«(順番ã«)yieldã™ã‚‹ã€‚\n" "多ãã®å ´åˆã‚ãªãŸã¯ `yieldall` を使ã„ãŸã„ã¨æ€ã£ãŸã ã‚ã†ã€‚\n" "`yield` ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚ãªãŸã®ãƒ†ãƒ³ãƒ—レートを上書ãã™ã‚‹ç‚ºã«\n" "確実ã«å®Ÿè¡Œã™ã‚‹ã‹ã‚‰ã§ã‚る。" #: ../docs/Templates.md:193 msgid "## Inheriting Templates" msgstr "## 継承ã™ã‚‹ãƒ†ãƒ³ãƒ—レート" #: ../docs/Templates.md:195 msgid "" "Parent directory templates are automatically inherited (or mixed in, to be\n" "more accurate) by the current template. This means that the 'default/class/" "html'\n" "template automatically inherits from 'default/class'. This also means that " "anything\n" "defined in 'default/class/setup.rb' can be overridden by 'default/class/html/" "setup.rb'." msgstr "" "親ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ãƒ†ãƒ³ãƒ—レートã¯\n" "ç¾åœ¨ã®ãƒ†ãƒ³ãƒ—レートã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ç¶™æ‰¿ã•れる。\n" "(ã¾ãŸã¯ã€æ­£ç¢ºã«ã¯mix-inã•れる)\n" "ã¤ã¾ã‚Š 'default/class/html' テンプレートã¯ã€\n" "'default/class'ã‹ã‚‰è‡ªå‹•çš„ã«ç¶™æ‰¿ã™ã‚‹ã€‚\n" "ãã—㦠'default/class/setup.rb' ã®ä¸­ã«å®šç¾©ã•れるもã®å…¨ã¦ã¯ã€\n" "'default/class/html/setup.rb' ã«ã‚ˆã£ã¦ä¸Šæ›¸ãã•れるã“ã¨ã‚‚æ„味ã™ã‚‹ã€‚\n" "(yard/lib以下ã®è©±ã§ã¯ãªãyard/templetes以下ã®è©±)" #: ../docs/Templates.md:200 msgid "" "Since the Template module is a module, and not a class, they can be mixed " "in\n" "explicitly (via include/extend) from other templates, which allows " "templates\n" "to share erb files or helper logic. The 'default/class' template explicitly\n" "mixes in the 'default/module' template, since it uses much of the same " "sections.\n" "This is done with the helper {YARD::Templates::Template::ClassMethods#T T} " "method, which\n" "is simply a shorthand for {YARD::Templates::Engine.template Engine." "template}.\n" "It can then override (using standard inheritance) the sections from the " "module\n" "template and insert sections pertaining to classes. This is one of the " "design\n" "goals described above." msgstr "" "Templateモジュールã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ã‚り,クラスã§ã¯ãªã„。\n" "ä»–ã®ãƒ†ãƒ³ãƒ—レートã‹ã‚‰(include/extend経由)æ˜Žç¤ºçš„ã«æ··ãœã‚‰ã‚Œã€\n" "erbファイルやヘルパーロジックを共有ã™ã‚‹ãŸã‚ã«ãƒ†ãƒ³ãƒ—レートをå—ã‘入れる。\n" "'default/class'ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã¯æ˜Žç¤ºçš„ã«'default/module'テンプレートã®ä¸­ã§æ··ãœã‚‰ã‚Œã€\n" "åŒã˜ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’使ã†ã€‚\n" "ã“れã¯ãƒ˜ãƒ«ãƒ‘ーメソッド㮠{YARD::Templates::Template::ClassMethods#T T} を用ã„完了ã—ã€\n" "ãれã¯å˜ç´”ã«{YARD::Templates::Engine.template Engine.template}用ã®ç•¥è¨˜æ³•ã§ã€\n" "ãã®æ™‚モジュールã®ãƒ†ãƒ³ãƒ—レートã‹ã‚‰ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’上書ã(標準ã®ç¶™æ‰¿ã‚’使ã†äº‹ã«ã‚ˆã£ã¦)ã§ãã‚‹\n" "ãã—ã¦ã‚¯ãƒ©ã‚¹ã«ä»˜éšã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’挿入ã™ã‚‹ã€‚\n" "ã“れã¯ä¸Šã§èª¬æ˜Žã•れãŸè¨­è¨ˆç›®æ¨™ã®ä¸€ã¤ã§ã‚る。" #: ../docs/Templates.md:210 msgid "For instance, the first line in `default/class/html/setup.rb` is:" msgstr "例ãˆã° `default/class/html/setup.rb` ã®ä¸­ã®æœ€åˆã®è¡Œã¯ä»¥ä¸‹ã®ã‚ˆã†ã«:" #: ../docs/Templates.md:212 msgid " include T('default/module/html')" msgstr " include T('default/module/html')" #: ../docs/Templates.md:214 msgid "" "This includes the 'default/module/html', which means it also includes " "'default/module'\n" "by extension. This allows class to make use of any of module's erb files." msgstr "" "ã“ã®'default/module/html'ã®includeã¯ã€\n" "æ‹¡å¼µã«ã‚ˆã£ã¦'default/module'ã‚’å«ã‚ã‚‹æ„味ã¨ãªã‚‹ã€‚\n" "ã“ã®æ‹¡å¼µã¯ä»»æ„ã§erbモジュールã®ãƒ•ァイルã‹ã‚‰åˆ©ç”¨ã™ã‚‹ã‚¯ãƒ©ã‚¹ã‚’å—ã‘入れる。" #: ../docs/Templates.md:217 msgid "## Inserting and Traversing Sections" msgstr "## 挿入ã¨ãƒˆãƒ©ãƒãƒ¼ã‚¹(辿る)セクション" #: ../docs/Templates.md:219 msgid "" "The ability to insert sections was mentioned above. The class template, for\n" "instance, will modify the #init method to insert class specific sections:" msgstr "" "æŒ¿å…¥ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®æ©Ÿèƒ½ã¯ä¸Šã§è¿°ã¹ãŸã€‚\n" "テンプレートクラスã€ä¾‹ãˆã°ã€\n" "以下ã®ã‚¯ãƒ©ã‚¹ã®ç‰¹å®šã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’挿入ã™ã‚‹ç‚ºã«#initメソッドを変更ã™ã‚‹:" #: ../docs/Templates.md:222 msgid "" " def init\n" " super\n" " sections.place(:subclasses).before(:children)\n" " sections.delete(:children)\n" " sections.place([:constructor_details, [T('method_details')]]).before(:" "methodmissing)\n" " end" msgstr "" " def init\n" " super\n" " sections.place(:subclasses).before(:children)\n" " sections.delete(:children)\n" " sections.place([:constructor_details, [T('method_details')]]).before(:methodmissing)\n" " end" #: ../docs/Templates.md:229 msgid "" "Observe how sections has been modified after the super method was called " "(the\n" "super method would have been defined in `default/module/setup.rb`). The\n" "`sections` object is of the {YARD::Templates::Section} class and allows " "sections to be inserted\n" "before or after another section using {Array#place} by it's given name " "rather\n" "than index. This allows the overriding of templates in a way that does not\n" "depend on where the section is located (since it may have been overriden by\n" "another module)." msgstr "" "superメソッドãŒå‘¼ã³å‡ºã•れãŸå¾Œã§ã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒå¤‰æ›´ã•れãŸã‹ç¢ºèªã™ã‚‹ã€‚\n" "(superメソッド㯠`default/module/setup.rb` ã§å®šç¾©ã•れã¦ã„ã‚‹)\n" "`sections`オブジェクトã¯{YARD::Templates::Section}クラスã®ã§ã‚りã€\n" "インデックスより与ãˆã‚‰ã‚ŒãŸåå‰ã«ã‚ˆã£ã¦\n" "{Array#place}を使ã†äº‹ã«ã‚ˆã£ã¦\n" "ä»–ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®å‰å¾Œã§æŒ¿å…¥ã•れるセクションをå—ã‘入れる\n" "ã“れã¯ã‚»ã‚¯ã‚·ãƒ§ãƒ³ãŒç¤ºã•れるã¨ã“ã‚ã«ä¾å­˜ã—ãªã„方法ã§\n" "テンプレートã®ä¸Šæ›¸ãã‚’å—ã‘入れる。\n" "(ãªã®ã§ä»–ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã«ã‚ˆã£ã¦ä¸Šæ›¸ãã•れるã‹ã‚‚ã—れãªã„)" #: ../docs/Templates.md:237 msgid "" "You can also use `sections[:name]` to find the first child section named `:" "name`.\n" "For instance, with the following sections declaration:" msgstr "" "ã‚ãªãŸã¯ã€ `:name` ã¨å付ã‘ã‚‰ã‚ŒãŸæœ€åˆã®å­ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³åを探ã™ç‚ºã«\n" "`sections[:name]` を利用ã§ãる。\n" "例ãˆã°ã€æ¬¡ã®ã‚ˆã†ãªã‚»ã‚¯ã‚·ãƒ§ãƒ³å®£è¨€ã‚’用ã„る。" #: ../docs/Templates.md:240 msgid " sections :a, [:b, :c, [:d]]" msgstr " sections :a, [:b, :c, [:d]]" #: ../docs/Templates.md:242 msgid "You can get to the :d section with:" msgstr "次ã®ã‚ˆã†ã«ã™ã‚‹ã¨ã€:dセクションをå–å¾—ã§ãる。" #: ../docs/Templates.md:244 msgid " sections[:a][:c][:d]" msgstr " sections[:a][:c][:d]" #: ../docs/Templates.md:246 msgid "" "You can use this to insert a section inside a nested set without using " "indexed\n" "access. The following command would result in `[:a, [:b, :c, [:d, :e]]]`:" msgstr "" "アクセスを索引ã—ãªã„ã§ã€\n" "ãƒã‚¹ãƒˆã—ãŸé›†åˆã®å†…部ã®\n" "セクションを挿入ã™ã‚‹ç‚ºã«\n" "ã“れを利用ã§ãる。<\n" "次ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ `[:a, [:b, :c, [:d, :e]]]` ã®æ§˜ãªçµæžœã«ãªã‚‹ã€‚" #: ../docs/Templates.md:249 msgid " sections[:a][:c].place(:e).after(:d)" msgstr " sections[:a][:c].place(:e).after(:d)" #: ../docs/Templates.md:251 msgid "" "There are also two methods, {Insertion#before_any} and " "{Insertion#after_any},\n" "which allow you to insert sections before or after the first matching " "section name\n" "recursively. The above example could simply be rewritten as:" msgstr "" "二ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã€{Insertion#before_any}ã¨{Insertion#after_any}ãŒã‚る。\n" "ã“れã¯ã€å†å¸°çš„ã«æœ€åˆã«ãƒžãƒƒãƒã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³åã®å‰å¾Œã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®æŒ¿å…¥ã‚’å¯èƒ½" "ã«ã™ã‚‹ã€‚\n" "上ã®ä¾‹ã¯ã€å˜ç´”ã«æ¬¡ã®ã‚ˆã†ã«æ›¸ãæ›ãˆã§ããŸã€‚" #: ../docs/Templates.md:255 msgid " sections.place(:e).after_any(:d)" msgstr " sections.place(:e).after_any(:d)" #: ../docs/Templates.md:257 msgid "## Overriding Templates by Registering a Template Path" msgstr "## テンプレートパスを記録ã—テンプレートを上書ã" #: ../docs/Templates.md:259 msgid "" "Inheriting templates explicitly is useful when creating a customized " "template\n" "that wants to take advantage of code re-use. However, most users who want\n" "to customize YARD templates will want to override existing behaviour " "without\n" "creating a template from scratch." msgstr "" "明示的ã«ç¶™æ‰¿ã™ã‚‹ãƒ†ãƒ³ãƒ—レートã¯ã€\n" "å†åˆ©ç”¨ã—ãŸã„コードã®ãƒ†ãƒ³ãƒ—レートを\n" "カスタマイズã—作æˆã™ã‚‹æ™‚ã«ä¾¿åˆ©ã§ã‚る。\n" "ã—ã‹ã—ãªãŒã‚‰ã€ä¸€èˆ¬çš„ãªYARDテンプレートをカスタマイズã—ãŸã„ユーザーã¯ã€\n" "下書ãã‹ã‚‰ãƒ†ãƒ³ãƒ—レートã®ä½œæˆç„¡ã—ã§æ—¢å­˜ã®æŒ™å‹•を上書ãã—ãŸã„ã ã‚ã†ã€‚" #: ../docs/Templates.md:264 msgid "" "YARD solves this problem by allowing other template paths to be registered.\n" "Because template modules are represented by a relative path such as 'default/" "class',\n" "they can be found within any of the registered template paths. A new " "template\n" "path is registered as:" msgstr "" "YARDã¯è¨˜éŒ²ã•れる他ã®ãƒ†ãƒ³ãƒ—レートパスを\n" "å—ã‘入れる事ã«ã‚ˆã£ã¦ã“ã®å•題を解決ã™ã‚‹ã€‚\n" "何故ãªã‚‰ã€ãƒ†ãƒ³ãƒ—レートモジュールã¯ã€\n" "'default/class'ã®ã‚ˆã†ãªã€ç›¸å¯¾ãƒ‘スã«ã‚ˆã£ã¦è¡¨ã•れる。\n" "ãれã¯ã€ãƒ†ãƒ³ãƒ—レートパスã®è¨˜éŒ²ã•れる全ã¦ã®ä¸­ã§è¦‹ã‚‰ã‚Œã‚‹\n" "æ–°ã—ã„テンプレートã¯ã€æ¬¡ã®ã‚ˆã†ã«è¨˜éŒ²ã•れる。" #: ../docs/Templates.md:269 msgid "" " YARD::Templates::Engine.register_template_path '/path/to/mytemplates'" msgstr " YARD::Templates::Engine.register_template_path '/path/to/mytemplates'" #: ../docs/Templates.md:271 msgid "" "At this point, any time the 'default/class' template is loaded, the " "template\n" "will first be looked for inside the newly registered template path. If " "found,\n" "it will be used as the template module, with the modules from the other\n" "template paths implicitly mixed in." msgstr "" "ã“ã®å ´æ‰€ã§ã€æ¯Žå›žã€'default/class'テンプレートã¯ã€ãƒ­ãƒ¼ãƒ‰ã•れる。\n" "テンプレートã¯\n" "æ–°ã—ã記録ã—ãŸãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆãƒ‘ã‚¹å†…éƒ¨ã«æœ€åˆã«å›ºå®šã•れる。\n" "ã‚‚ã—見ã¤ã‹ã£ãŸå ´åˆã€\n" "æš—é»™ã®å†…ã«mix-inã•れる他ã®ãƒ†ãƒ³ãƒ—レートパスã‹ã‚‰ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¨å…±ã«ã€\n" "テンプレートモジュールã®ã‚ˆã†ã«åˆ©ç”¨ã•れる。" #: ../docs/Templates.md:276 msgid "" "Therefore, by using the same directory structure as a builtin YARD " "template,\n" "a user can customize or override individual templates as if the old ones " "were\n" "inherited. A real world example would further modify the 'default/class' " "template\n" "seen above by creating such a path in our '/path/to/mytemplates' custom " "template\n" "path:" msgstr "" "従ã£ã¦çµ„ã¿è¾¼ã¿ã®YARDã®ãƒ†ãƒ³ãƒ—レートã¨ã—ã¦åŒã˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªæ§‹é€ ä½“ã‚’\n" "使ã†ã“ã¨ã«ã‚ˆã£ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã§ããŸã‚Šã€\n" "å¤ã„ã‚‚ã®ãŒç¶™æ‰¿ã•れる場åˆãªã©å€‹ã€…ã®ãƒ†ãƒ³ãƒ—レートを上書ãã§ãる。\n" "実際ã®ä¾‹ã¯ã€\n" "æ›´ã«ä¾‹ã®'/path/to/mytemplates'ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ†ãƒ³ãƒ—レートパスã®ä¸­ã®ãƒ‘スãªã©ä½œæˆã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦\n" "上ã§è¦‹ãŸ'default/class'テンプレートを変更ã™ã‚‹ã€‚" #: ../docs/Templates.md:282 msgid "" " /path/to/mytemplates/:\n" " |-- class\n" " | |-- html\n" " | | |-- customsection.erb\n" " | |-- setup.rb" msgstr "" " /path/to/mytemplates/:\n" " |-- class\n" " | |-- html\n" " | | |-- customsection.erb\n" " | |-- setup.rb" #: ../docs/Templates.md:288 msgid "The `setup.rb` file would look like:" msgstr "`setup.rb` ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ¬¡ã®æ§˜ã«ãªã‚‹ã€‚" #: ../docs/Templates.md:290 msgid "" " def init\n" " super\n" " sections.push :customsection\n" " end" msgstr "" " def init\n" " super\n" " sections.push :customsection\n" " end" #: ../docs/Templates.md:295 msgid "" "Now, when a class object is formatted as HTML, our customsection.erb will " "be\n" "appended to the rendered data." msgstr "" "クラスオブジェクトãŒHTMLã¨ã—ã¦ãƒ•ォーマットã•れる時ã¯ã€\n" "例ã®customsection.erbã¯è¡¨ç¤ºã•れるデータã«é©ç”¨ã•れる。" #: ../docs/Templates.md:299 msgid "### Overriding Stylesheets and Javascripts" msgstr "### スタイルシートã¨Javascriptsを上書ãã™ã‚‹ã€‚" #: ../docs/Templates.md:301 msgid "" "Template authors can override existing stylesheets and javascripts by " "creating\n" "a file with the same name as existing files within the `fulldoc` template. " "The\n" "documentation output will utilize the new replacement file." msgstr "" "テンプレートã®è‘—者ã¯\n" "`fulldoc` テンプレートã®ä¸­ã§æ—¢å­˜ã®ãƒ•ァイルã®ã‚ˆã†ãªåŒã˜åå‰ã‚’用ã„ã€\n" "ファイルを作æˆã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n" "既存ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¨javascriptã‚’\n" "上書ãã§ãる。\n" "ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå‡ºåŠ›ã¯æ–°ã—ãç½®æ›ã™ã‚‹ãƒ•ァイルを利用ã™ã‚‹ã€‚" #: ../docs/Templates.md:305 msgid "YARD's `fulldoc` template defines three stylesheets:" msgstr "YARDã® `fulldoc` テンプレートã¯ãƒ„リーã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’定義ã™ã‚‹ã€‚" #: ../docs/Templates.md:307 msgid "" " /yard/templates/default/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- css\n" " | | | |-- common.css\n" " | | | |-- full_list.css\n" " | | | |-- style.css" msgstr "" " /yard/templates/default/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- css\n" " | | | |-- common.css\n" " | | | |-- full_list.css\n" " | | | |-- style.css" #: ../docs/Templates.md:315 msgid "The `style.css` is the primary stylesheet for the HTML output." msgstr "`style.css` ã¯ã€HTML出力用ã®ä¸»è¦ãªã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¨ãªã‚‹ã€‚" #: ../docs/Templates.md:317 msgid "" "The `full_list.css` is an additional stylesheet loaded specifically for the\n" "search field menus (i.e. class list, method list, and file list)." msgstr "" "追加ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã® `full_list.css` ã¯ã€å޳坆ã«ã„ãˆã°æ¤œç´¢ãƒ•ィールドメニューã®ç‚ºã«ãƒ­ãƒ¼ãƒ‰ã•れる。\n" "(ã™ãªã‚ã¡ã€ã‚¯ãƒ©ã‚¹ãƒªã‚¹ãƒˆã€ãƒ¡ã‚½ãƒƒãƒ‰ãƒªã‚¹ãƒˆã€ãƒ•ァイルリスト)" #: ../docs/Templates.md:320 msgid "" "The `common.css` is an empty css file that an template author can easily " "override\n" "to provide custom styles for their plugin. However, if a user installs " "multiple\n" "plugins that utilize this same file to deliver styles, it is possible that " "they\n" "will be overridden." msgstr "" "`common.css` ã¯ã€\n" "テンプレートã®è‘—者ãŒãƒ—ラグイン用ã®\n" "カスタムスタイルをæä¾›ã™ã‚‹ç‚ºã«\n" "ç°¡å˜ã«ä¸Šæ›¸ãã™ã‚‹ç©ºã®cssファイルã¨ãªã‚‹ã€‚\n" "ã—ã‹ã—ãªãŒã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¹ã‚¿ã‚¤ãƒ«ã‚’実行ã™ã‚‹ã®ã«ã€\n" "åŒã˜ãƒ•ァイルを利用ã™ã‚‹è¤‡æ•°ã®ãƒ—ラグインをインストールã—ãŸå ´åˆã€\n" "上書ãã•れる事ãŒå•題ã«ãªã‚‹ã€‚" #: ../docs/Templates.md:325 msgid "YARD's `fulldoc` template defines three javascript files:" msgstr "YARDã® `fulldoc` ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã¯æ¬¡ã®æ§˜ã«ãƒ„リー上ã®javascriptファイルを定義ã™ã‚‹ã€‚" #: ../docs/Templates.md:327 msgid "" " /yard/templates/default/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- js\n" " | | | |-- app.js\n" " | | | |-- full_list.js\n" " | | | |-- jquery.js" msgstr "" " /yard/templates/default/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- js\n" " | | | |-- app.js\n" " | | | |-- full_list.js\n" " | | | |-- jquery.js" #: ../docs/Templates.md:335 msgid "The `app.js` is the primary javascript file for the HTML output." msgstr "`app.js` ã¯HTML出力用ã®ä¸»è¦ãªjavascriptファイルã¨ãªã‚‹ã€‚" #: ../docs/Templates.md:337 msgid "" "The `full_list.js` defines additional javascript loaded specifically for " "the\n" "search field menus (i.e. class list, method list, and file list)." msgstr "" "追加ã®javascriptを定義ã™ã‚‹ `full_list.js` ã¯ã€\n" "厳密ã«ã„ãˆã°æ¤œç´¢ãƒ•ィールドメニュー用ã«ãƒ­ãƒ¼ãƒ‰ã•れる。\n" "(ã™ãªã‚ã¡ã€ã‚¯ãƒ©ã‚¹ãƒªã‚¹ãƒˆã€ãƒ¡ã‚½ãƒƒãƒ‰ãƒªã‚¹ãƒˆã€ãƒ•ァイルリスト)" #: ../docs/Templates.md:340 msgid "The `jquery.js` is copy of the jquery javascript library." msgstr "`jquery.js` ã¯jquery javascriptライブラリをコピーã™ã‚‹ã€‚" #: ../docs/Templates.md:342 msgid "### Adding a Custom Stylesheet or Javascript" msgstr "### カスタムスタイルシートã¨Javascritpを追加ã™ã‚‹" #: ../docs/Templates.md:344 msgid "" "To load additional stylesheets and javascripts with every page (except the " "search\n" "field menus) generated from the base `layout` template:" msgstr "" "基本㮠`layout` テンプレートã‹ã‚‰ç”Ÿæˆã—ãŸ\n" "å…¨ã¦ã®ãƒšãƒ¼ã‚¸ã¨å…±ã«ã€\n" "追加ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¨javascriptをロードã™ã‚‹ã«ã¯\n" "(但ã—ã€æ¤œç´¢ãƒ•ィールドメニューを除ã):\n" #: ../docs/Templates.md:347 msgid "" " 1. Define your own custom stylesheet and/or javascript file\n" " (default/ is the default template name inside of the /template root " "directory):" msgstr "" " 1. 自分ã®ã‚«ã‚¹ã‚¿ãƒ ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚„javascriptファイルを定義ã™ã‚‹ã€‚\n" " (デフォルトã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯/templateルートディレクトリã®å†…部ã®ãƒ‡ãƒ•ォルトã®ãƒ†ãƒ³ãƒ—レートåã§ã‚ã‚‹):" #: ../docs/Templates.md:350 msgid "" " /template/default/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- css\n" " | | | |-- custom.css\n" " | | |-- js\n" " | | | |-- custom.js" msgstr "" " /template/default/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- css\n" " | | | |-- custom.css\n" " | | |-- js\n" " | | | |-- custom.js" #: ../docs/Templates.md:358 msgid "" " 2. Create a `setup.rb` in the `layout` template directory and override the " "methods\n" " `stylesheets` and `javascripts`. The path to the template would be:" msgstr "" " 2. `layout` テンプレートディレクトリã®ä¸­ã® `setup.rb` を作æˆã—ã¦\n" " `javascripts` 㨠`stylesheets` メソッドを上書ãã™ã‚‹ã€‚\n" " テンプレートã®ãƒ‘ã‚¹ã¯æ¬¡ã®æ§˜ã«ãªã‚‹:" #: ../docs/Templates.md:361 msgid "" " /template/default/:\n" " |-- layout\n" " | |-- html\n" " | | |-- setup.rb" msgstr "" " /template/default/:\n" " |-- layout\n" " | |-- html\n" " | | |-- setup.rb" #: ../docs/Templates.md:366 msgid " And the code would look like:" msgstr " ãã—ã¦ã‚³ãƒ¼ãƒ‰ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚" #: ../docs/Templates.md:368 msgid "" " def stylesheets\n" " # Load the existing stylesheets while appending the custom one\n" " super + %w(css/custom.css)\n" " end" msgstr "" " def stylesheets\n" " # カスタムã®cssãŒè¿½åŠ ã•れる間ã€å­˜åœ¨ã™ã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’ロードã™ã‚‹\n" " super + %w(css/custom.css)\n" " end" #: ../docs/Templates.md:373 msgid "" " def javascripts\n" " # Load the existing javascripts while appending the custom one\n" " super + %w(js/custom.js)\n" " end" msgstr "" " def javascripts\n" " # カスタムã®javascriptãŒè¿½åŠ ã•れる間ã€å­˜åœ¨ã™ã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’ロードã™ã‚‹\n" " super + %w(js/custom.js)\n" " end" #: ../docs/Templates.md:379 msgid "" "To load additional stylesheets and javascripts for the search menus loaded " "from\n" "the `fulldoc` template:" msgstr "" "`fulldoc` テンプレートã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã•ã‚ŒãŸæ¤œç´¢ãƒ¡ãƒ‹ãƒ¥ãƒ¼ç”¨ã®\n" "追加ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¨javascriptをロードã™ã‚‹ã«ã¯:" #: ../docs/Templates.md:382 msgid " 1. Define your own custom stylesheet and/or javascript file." msgstr " 1. 自分ã®ã‚«ã‚¹ã‚¿ãƒ ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¨javascriptファイルを定義ã™ã‚‹ã€‚" #: ../docs/Templates.md:384 msgid "" " /path/to/mytemplates/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- css\n" " | | | |-- custom_full_menu.css\n" " | | |-- js\n" " | | | |-- custom_full_menu.js" msgstr "" " /path/to/mytemplates/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- css\n" " | | | |-- custom_full_menu.css\n" " | | |-- js\n" " | | | |-- custom_full_menu.js" #: ../docs/Templates.md:393 msgid "" " 3. Override the methods `stylesheets_full_list` and " "`javascripts_full_list`\n" " in the `setup.rb` file inside fulldoc/html." msgstr "" " 3. fulldoc/html内㮠`setup.rb` ファイルã®ä¸­ã®\n" " `stylesheets_full_list` 㨠`javascripts_full_list` メソッドを上書ãã™ã‚‹ã€‚" #: ../docs/Templates.md:396 msgid "" " def stylesheets_full_list\n" " # Load the existing stylesheets while appending the custom one\n" " super + %w(css/custom.css)\n" " end" msgstr "" " def stylesheets_full_list\n" " # カスタムã®cssãŒè¿½åŠ ã•れる間ã€å­˜åœ¨ã™ã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’ロードã™ã‚‹\n" " super + %w(css/custom.css)\n" " end" #: ../docs/Templates.md:401 msgid "" " def javascripts_full_list\n" " # Load the existing javascripts while appending the custom one\n" " super + %w(js/custom.js)\n" " end" msgstr "" " def javascripts_full_list\n" " # カスタムã®javascriptãŒè¿½åŠ ã•れる間ã€å­˜åœ¨ã™ã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’ロードã™ã‚‹\n" " # Load the existing javascripts while appending the custom one\n" " super + %w(js/custom.js)\n" " end" #: ../docs/Templates.md:406 msgid "### Overriding Search Menus" msgstr "### 検索メニューを上書ãã™ã‚‹ã€‚" #: ../docs/Templates.md:408 ../docs/Templates.md:443 msgid "By default YARD's `fulldoc` template generates three search fields:" msgstr "デフォルトã§YARDã® `fulldoc` ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã¯æ¬¡ã®ã‚ˆã†ãªæ¤œç´¢ãƒ•ィールドã®ãƒ„リーを生æˆã™ã‚‹ã€‚" #: ../docs/Templates.md:410 ../docs/Templates.md:445 msgid "" " * Class List\n" " * Method List\n" " * File List" msgstr "" " * Class List\n" " * Method List\n" " * File List" #: ../docs/Templates.md:414 msgid "Their contents are rendered in methods within the `fulldoc` template:" msgstr "ãã®å†…容ã¯ã€ `fulldoc` テンプレートã®ä¸­ã§ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸­ã‚’表示ã™ã‚‹ã€‚" #: ../docs/Templates.md:416 msgid "" " * `generate_class_list`\n" " * `generate_method_list`\n" " * `generate_file_list`" msgstr "" " * `generate_class_list`\n" " * `generate_method_list`\n" " * `generate_file_list`" #: ../docs/Templates.md:420 msgid "To override these lists you will need to:" msgstr "ã“れらã®ãƒªã‚¹ãƒˆä¸Šæ›¸ãã™ã‚‹ã«ã¯:" #: ../docs/Templates.md:422 msgid "" " 1. Create a `setup.rb` in the `fulldoc` template directory and override " "the\n" " particular method." msgstr "" " 1. `fulldoc` テンプレートディレクトリã®ä¸­ã® `setup.rb` を作æˆã—ã€\n" " メソッドã®è©³ç´°ã‚’上書ãã™ã‚‹ã€‚" #: ../docs/Templates.md:425 ../docs/Templates.md:477 msgid "" " /path/to/mytemplates/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- setup.rb" msgstr "" " /path/to/mytemplates/:\n" " |-- fulldoc\n" " | |-- html\n" " | | |-- setup.rb" #: ../docs/Templates.md:430 msgid "" " def generate_method_list\n" " @items = prune_method_listing(Registry.all(:method), false)\n" " @items = @items.reject {|m| m.name.to_s =~ /=$/ && m." "is_attribute? }" msgstr "" " def generate_method_list\n" " @items = prune_method_listing(Registry.all(:method), false)\n" " @items = @items.reject {|m| m.name.to_s =~ /=$/ && m.is_attribute? }" #: ../docs/Templates.md:434 msgid "" " # Here we changed the functionality to reverse the order of " "displayed methods\n" " @items = @items.sort_by {|m| m.name.to_s }.reverse\n" " @list_title = \"Method List\"\n" " @list_type = \"methods\"\n" " asset('method_list.html', erb(:full_list))\n" " end" msgstr "" " # ã“ã“ã§ãƒ¡ã‚½ãƒƒãƒ‰ã‚’表示ã™ã‚‹é †ç•ªã‚’逆ã«ã™ã‚‹ç‚ºã®æ©Ÿèƒ½ã‚’変更ã™ã‚‹\n" " @items = @items.sort_by {|m| m.name.to_s }.reverse\n" " @list_title = \"Method List\"\n" " @list_type = \"methods\"\n" " asset('method_list.html', erb(:full_list))\n" " end" #: ../docs/Templates.md:441 msgid "### Adding Additional Search Menus" msgstr "### è¿½åŠ ã®æ¤œç´¢ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’追加ã™ã‚‹ã€‚" #: ../docs/Templates.md:449 msgid "" "These are defined in the `layout` template method `menu_lists` and pulled " "into\n" "the `fulldoc` template through a similarly named method." msgstr "" "ã“れら㯠`layout` テンプレートメソッドã®ä¸­ã® `menu_lists` を定義ã•れる。\n" "ãã—ã¦åŒæ§˜ã«å付ã‘られãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’通ã˜ã¦ `fulldoc` テンプレートã«ç½®ã‹ã‚Œã‚‹ã€‚" #: ../docs/Templates.md:452 msgid "To load an additional menu item:" msgstr "追加ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …目をロードã™ã‚‹ã«ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹:" #: ../docs/Templates.md:455 msgid "" " 1. Create a `setup.rb` in the `layout` template directory and override the " "methods\n" " `menu_lists`. The `type` informs the search field the name of the file.\n" " The `title` is the name that appears above the section when viewed in " "frames.\n" " The `search_title` is the name that appears in the search field tab on " "the page." msgstr "" " 1. `layout` テンプレートディレクトリã®ä¸­ã§ `setup.rb` を作æˆã— `menu_lists` メソッドを上書ãã™ã‚‹ã€‚\n" " `type` ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ¤œç´¢ãƒ•ィールドå通知ã™ã‚‹ã€‚\n" " `title` ã¯ãƒ•レームã®ãªã‹ã§è¡¨ç¤ºã•ã‚ŒãŸæ™‚ã«ä¸Šã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«ç™»å ´ã™ã‚‹åå‰ã§ã‚る。\n" " `search_title` ã¯ãƒšãƒ¼ã‚¸ã®æ¤œç´¢ãƒ•ィールドタブã®ä¸­ã§ç™»å ´ã™ã‚‹åå‰ã§ã‚る。" #: ../docs/Templates.md:461 msgid "" " /path/to/mytemplates/:\n" " |-- layout\n" " | |-- html\n" " | | |-- setup.rb" msgstr "" " /path/to/mytemplates/:\n" " |-- layout\n" " | |-- html\n" " | | |-- setup.rb" #: ../docs/Templates.md:466 msgid "" " def menu_lists\n" " # Load the existing menus\n" " super + [ { :type => 'feature', :title => 'Features', :" "search_title => 'Feature List' } ]\n" " end" msgstr "" " def menu_lists\n" " # 既存ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’ロードã™ã‚‹\n" " super + [ { :type => 'feature', :title => 'Features', :search_title => 'Feature List' } ]\n" " end" #: ../docs/Templates.md:471 msgid "" " 2. Create a `setup.rb` in the `fulldoc` template directory and create a " "method\n" " to generate a menu for the specified `type`.\n" " The method `generate_assets` will look for a function with a signature " "prefixed\n" " with `generate`, the type value specified, and the suffix `list`. " "Within that\n" " method you can configure and load the specific objects you wish to " "display." msgstr "" " 2. `fulldoc` ã®ãƒ†ãƒ³ãƒ—レートディレクトリã®ä¸­ã§ `setup.rb` を作æˆã—ã€\n" " 指定ã•れ㟠`type` 用ã«ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’生æˆã™ã‚‹ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’作æˆã™ã‚‹\n" " `generate_assets` メソッドã¯ã€ `generate` ã§å§‹ã¾ã‚Š,é–“ã«å›ºæœ‰ã®å€¤,末尾㌠`list` ã®ã‚·ã‚°ãƒãƒãƒ£ã‚’探ã™ã€‚\n" " メソッドã®ä¸­ã‚’ã‚ãªãŸãŒæ§‹æˆã§ãã€è¡¨ç¤ºã™ã‚‹ãŸã‚ã«ã‚ãªãŸãŒæœ›ã‚€ç‰¹å®šã®ã‚ªãƒ–ジェクトをロードã™ã‚‹ã€‚" #: ../docs/Templates.md:482 msgid " def generate_feature_list" msgstr " def generate_feature_list" #: ../docs/Templates.md:484 msgid "" " # load all the features from the Registry\n" " @items = Registry.all(:feature)\n" " @list_title = \"Feature List\"\n" " @list_type = \"feature\"" msgstr "" " # レジストリーã‹ã‚‰å…¨ã¦ã®æ©Ÿèƒ½ã‚’ロードã™\n" " @items = Registry.all(:feature)\n" " @list_title = \"Feature List\"\n" " @list_type = \"feature\"" #: ../docs/Templates.md:489 msgid "" " # optional: the specified stylesheet class\n" " # when not specified it will default to the value of @list_type\n" " @list_class = \"class\"" msgstr "" " # optional: the specified stylesheet class\n" " # when not specified it will default to the value of @list_type\n" " @list_class = \"class\"" #: ../docs/Templates.md:493 msgid "" " # Generate the full list html file with named feature_list.html\n" " # @note this file must be match the name of the type\n" " asset('feature_list.html', erb(:full_list))\n" " end" msgstr "" " # feature_list.htmlã®åå‰ã¨å…±ã«å®Œå…¨ãªHTMLファイルã®ãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹\n" " # @note this file must be match the name of the type\n" " asset('feature_list.html', erb(:full_list))\n" " end" # title #: ../docs/WhatsNew.md:1 msgid "What's New?" msgstr "What's New?" #: ../docs/WhatsNew.md:3 msgid "# What's New in 0.8.x?" msgstr "# What's New in 0.8.x?" #: ../docs/WhatsNew.md:5 msgid "" "1. **Directives (new behavioural tag syntax)** (0.8.0)\n" "2. **Added `--embed-mixin(s)` to embed mixins into class docs** (0.8.0)\n" "3. **Internationalization (I18n) support for translating docs** (0.8.0)\n" "4. **New C parser / handlers architecture** (0.8.0)\n" "5. **YARD will now warn if `@param` name not in method params** (0.8.0)\n" "6. **Added support for `module_function` calls in Ruby code** (0.8.0)\n" "7. **Greatly improved tag documentation using custom template** (0.8.0)\n" "8. **Tags can now contain '.' for namespacing** (0.8.0)\n" "9. **Added \"frames\" links for non-framed pages for better nav** (0.8.0)\n" "10. **Added Gemfile support to YARD server for local gem sets** (0.8.0)\n" "11. **Server now displays README on index route like static docs** (0.8.0)\n" "12. **Added line numbers to `yard stats --list-undoc --compact`** (0.8.0)\n" "13. **Single object db now default (multi-object db unsupported)** (0.8.0)\n" "14. **Added `--api` tag to generate documentation for API sets** (0.8.1)" msgstr "" "1. **ディレクティブ (ã‚¿ã‚°æ§‹æ–‡ã®æ–°ã—ã„行動)** (0.8.0)\n" "2. **クラスã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸­ã«mixinを埋ã‚込むã®ã« `--embed-mixin(s)` ãŒè¿½åŠ ã•れãŸ** (0.8.0)\n" "3. **翻訳ドキュメント用ã®å›½éš›åŒ– (I18n) サãƒãƒ¼ãƒˆ** (0.8.0)\n" "4. **æ–°ã—ã„ C パーサー / ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ アーキテクãƒãƒ£** (0.8.0)\n" "5. **YARDã¯ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒ‘ラメータã®ä¸­ã«`@param`åãŒç„¡ã„å ´åˆã€è­¦å‘Šã‚’出ã™ã‚ˆã†ã«ãªã£ãŸã€‚\n" "6. **`module_function` ãŒRubyã®ã‚³ãƒ¼ãƒ‰ã‚’呼ã³å‡ºã™ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れãŸ** (0.8.0)\n" "7. **カスタムテンプレートã«ã‚ˆã£ã¦å¤§ããタグドキュメントãŒä¿®æ­£ã•れãŸ** (0.8.0)\n" "8. **ã‚¿ã‚°ãŒãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ç”¨ã® '.' ã‚’å«ã‚€ã‚ˆã†ã«ãªã£ãŸ** (0.8.0)\n" "9. **より良ã„ナビをã™ã‚‹ã®ã«ãƒ•レームã§ãªã„ページ用ã«\"フレーム\"ã®ãƒªãƒ³ã‚¯ãŒè¿½åŠ ã•れãŸ** (0.8.0)\n" "10. **ローカルã®gemã®ã‚°ãƒ«ãƒ¼ãƒ—用ã«YARDサーãƒãƒ¼ã«Gemfileã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れãŸ** (0.8.0)\n" "11. **サーãƒãƒ¼ã¯é™çš„ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚ˆã†ã«ãƒ«ãƒ¼ãƒˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä¸Šã®READMEを表示ã™ã‚‹ã‚ˆã†ã«ãªã£ãŸ** (0.8.0)\n" "12. **`yard stats --list-undoc --compact`ã«è¡Œæ•°ãŒè¿½åŠ ã•れãŸ** (0.8.0)\n" "13. **å˜ä¸€ã®ã‚ªãƒ–ジェクトdbãŒãƒ‡ãƒ•ォルトã«ãªã£ãŸ (マルãƒã‚ªãƒ–ジェクトdbã¯æœªã‚µãƒãƒ¼ãƒˆ)** (0.8.0)\n" "14. **API用ã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã®ã« `--api` ã‚¿ã‚°ãŒè¿½åŠ ã•れãŸ** (0.8.1)" #: ../docs/WhatsNew.md:20 msgid "## Directives (new behavioural tag syntax) (0.8.0)" msgstr "## ディレクティブ (ã‚¿ã‚°æ§‹æ–‡ã®æ–°ã—ã„行動) (0.8.0)" #: ../docs/WhatsNew.md:22 msgid "" "

    \n" " The tags {tag:!macro}, {tag:!method}, {tag:!attribute}, {tag:!group},\n" " {tag:!endgroup}, {tag:!scope} and {tag:!visibility} have been changed\n" " from meta-data tags to directives. This means they should now be called\n" " with the \"@!\" prefix instead of \"@\". Note however that for \n" " backward compatibility, the old \"@macro\", \"@method\", etc.,\n" " syntax for all of these tags will still work and is supported.\n" "

    " msgstr "" "

    \n" " The tags {tag:!macro}, {tag:!method}, {tag:!attribute}, {tag:!group},\n" " {tag:!endgroup}, {tag:!scope} and {tag:!visibility} have been changed\n" " from meta-data tags to directives. This means they should now be called\n" " with the \"@!\" prefix instead of \"@\". Note however that for \n" " backward compatibility, the old \"@macro\", \"@method\", etc.,\n" " syntax for all of these tags will still work and is supported.\n" "

    " #: ../docs/WhatsNew.md:31 msgid "" "

    \n" " Some backwards incompatible changes were made to {tag:!" "macro} syntax.\n" " Please read this section carefully if you are using this tag.\n" "

    " msgstr "" "

    \n" " Some backwards incompatible changes were made to {tag:!macro} syntax.\n" " Please read this section carefully if you are using this tag.\n" "

    " #: ../docs/WhatsNew.md:36 msgid "" "YARD 0.8.0 adds a new tag syntax called \"directives\" using the `@!`\n" "prefix. These directive tags can be used to modify parser state while\n" "processing objects, or even create new objects on the fly. A plugin\n" "API is available similar to tags, and directives should be registered\n" "in the {YARD::Tags::Library} class using {YARD::Tags::Library." "define_directive}." msgstr "" "YARD 0.8.0ã§è¿½åŠ ã•ã‚ŒãŸæ–°ã—ã„ã‚¿ã‚°æ§‹æ–‡ã¯\n" "`@!` プレフィックス(接頭辞)ã«ã‚ˆã£ã¦\"directives(ディレクティブ)\"を呼ã³å‡ºã™ã€‚\n" "ã“れらã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã‚¿ã‚°ã¯ã€\n" "オブジェクトを処ç†ã—ã¦ã„ã‚‹é–“ã‚„ã‚ªãƒ³ã‚¶ãƒ•ãƒ©ã‚¤ã§æ–°ã—ãオブジェクトを作æˆã™ã‚‹æ™‚ã§ã•ãˆã€\n" "パーサーã®çŠ¶æ…‹ã‚’å¤‰æ›´ã™ã‚‹ã®ã«åˆ©ç”¨ã§ãる。\n" "プラグインAPIã¯ã‚¿ã‚°åŒæ§˜ã«å¯èƒ½ã§ã€\n" "ディレクティブ㯠{YARD::Tags::Library.define_directive} ã«ã‚ˆã£ã¦\n" "{YARD::Tags::Library} クラスã®ãªã‹ã«ç™»éŒ²ã•れる。" #: ../docs/WhatsNew.md:42 msgid "" "To use a directive, simply call it the same way as any tag. Tag syntax\n" "is documented in {file:docs/Tags.md}." msgstr "" "ディレクティブを使ã†ã«ã¯ã€å˜ç´”ã«ã‚¿ã‚°ãªã©ã¨åŒã˜æ–¹æ³•ã§å‘¼ã³å‡ºã™ã€‚\n" "タグ構文㯠{file:docs/Tags.md} ã§è¨˜è¿°ã•れる。" #: ../docs/WhatsNew.md:45 msgid "### Notable features of directives" msgstr "### è‘—åãªãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã®æ©Ÿèƒ½" #: ../docs/WhatsNew.md:47 msgid "#### Directives do not need to be attached to object docstrings" msgstr "#### ディレクティブã¯ã‚ªãƒ–ジェクトã®docstringã«è¿½åŠ ã™ã‚‹ã®ã«å¿…è¦ãªã„" #: ../docs/WhatsNew.md:49 msgid "" "Unlike meta-data tags which apply to created objects, directives\n" "do not need to be attached to an object in order to be used. This\n" "means you can have free-standing comments with directives, such as:" msgstr "" "メタデータタグã¨ã¯é•ã£ã¦ä½œæˆã•れãŸã‚ªãƒ–ジェクトã«è¿½åŠ ã•れã€\n" "ディレクティブã¯åˆ©ç”¨ã•れる順番ã§è¿½åŠ ã•れる必è¦ã¯ãªã„。\n" "ã“ã‚Œã¯æ¬¡ã®ã‚ˆã†ãªãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–を用ã„自由ãªä½ç½®ã«ã‚³ãƒ¡ãƒ³ãƒˆã§ãる事をæ„味ã™ã‚‹:" #: ../docs/WhatsNew.md:53 msgid "" " # @macro mymacro\n" " # A new macro, not attached to any docstring" msgstr "" " # @macro mymacro\n" " # A new macro, not attached to any docstring" #: ../docs/WhatsNew.md:56 msgid " # ...other Ruby code here..." msgstr " # ...other Ruby code here..." #: ../docs/WhatsNew.md:58 msgid "" " # Using the macro:\n" " # @macro mymacro\n" " def mymethod; end" msgstr "" " # 上ã®ãƒžã‚¯ãƒ­ã‚’呼ã³å‡ºã™:\n" " # @macro mymacro\n" " def mymethod; end" #: ../docs/WhatsNew.md:62 msgid "" "You can do the same to define methods and attributes, as discussed\n" "below." msgstr "" "下ã®é …ã§è­°è«–ã•れるよã†ã«\n" "ã‚ãªãŸã¯ãƒ¡ã‚½ãƒƒãƒ‰ã¨å±žæ€§ã‚’定義ã™ã‚‹ã®ã‚’åŒã˜ã‚ˆã†ã«ã§ãる。" #: ../docs/WhatsNew.md:65 msgid "#### `@!method` and `@!attribute` directives improved" msgstr "#### 改良ã•れ㟠`@!method` 㨠`@!attribute` ディレクティブ" #: ../docs/WhatsNew.md:67 msgid "" "The method and attribute directives can now be used to create multiple\n" "objects in a single docstring. Previously a `@method` or `@attribute`\n" "tag would only create one method per docstring. In 0.8.0, you could\n" "attach multiple methods to the same block of Ruby source, such as:" msgstr "" "メソッドã¨å±žæ€§(attribute)ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã¯\n" "å˜ä¸€ã®docstringã§è¤‡æ•°ã®ã‚ªãƒ–ジェクトを作æˆã™ã‚‹ã®ã«åˆ©ç”¨ã§ãるよã†ã«ãªã£ãŸã€‚\n" "以å‰ã¯ `@method` ã‚„ `@attribute` ã‚¿ã‚°ã¯\n" "メソッド一ã¤ã§å€‹ã€…ã®docstringã ã‘作æˆã—ã¦ã„ãŸã€‚\n" "0.8.0ã§ã¯Rubyã®ã‚½ãƒ¼ã‚¹ã®åŒã˜ãƒ–ロックã«è¤‡æ•°ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’追加ã§ãる。\n" "次ã®ã‚ˆã†ã«ãªã‚‹:" #: ../docs/WhatsNew.md:72 msgid "" " # @!method foo(a, b, c)\n" " # @!method bar(x, y, z)\n" " # Docstring for code\n" " some_ruby_source" msgstr "" " # @!method foo(a, b, c)\n" " # @!method bar(x, y, z)\n" " # コード用ã®docstring\n" " some_ruby_source" #: ../docs/WhatsNew.md:77 msgid "" "The above creates #foo and #bar and the source listing for both will\n" "be `some_ruby_source` with \"Docstring for code\" as the docstring." msgstr "" "上ã®ä¾‹ã¯\n" "両方ãŒdocstringã¨ã—ã¦\"コード用ã®docstring\"ã¨ä¸€ç·’ã«\n" "`some_ruby_source` ã®èª¬æ˜Žã«ãªã‚‹ã‚ˆã†ã«ã€\n" "#fooメソッドã¨#barメソッドã¨ã‚½ãƒ¼ã‚¹ã®ãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:80 msgid "" "The attribute directive can take advantage of this functionality as well.\n" "Note that these directives also do not need to be attached to a line of\n" "code to be recognized; they can be in free-standing comments if the\n" "methods are defined dynamically and not associated with any code." msgstr "" "属性ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã¯ã•らã«ã“ã®æ©Ÿèƒ½ã®å¹³å‡ã‚’å–å¾—ã§ãる。\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã“れらã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã¯èªè­˜ã•れるã®ã«ã‚³ãƒ¼ãƒ‰ã®è¡Œã«è¿½åŠ ã•れる必è¦ã‚‚ãªã„。\n" "ã¤ã¾ã‚Šã€ã“れã¯ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‹•çš„ã«å®šç¾©ã•れる場åˆ\n" "自由ãªå ´æ‰€ã«ã‚³ãƒ¡ãƒ³ãƒˆã§ãã€ä»»æ„ã®ã‚³ãƒ¼ãƒ‰ã¨ä¸€ç·’ã«é–¢é€£ã¥ã‘られãªã„。" #: ../docs/WhatsNew.md:85 msgid "#### New `@!parse` directive to parse Ruby code" msgstr "#### Rubyã®ã‚³ãƒ¼ãƒ‰ã‚’è§£æžã™ã‚‹ç‚ºã®æ–°ã—ã„ `@!parse` ディレクティブ" #: ../docs/WhatsNew.md:87 msgid "" "A new {tag:!parse} directive was added that allows a developer to have\n" "YARD parse code that might not necessarily be parseable in its original\n" "form. This is useful when using `instance_eval` and other dynamic\n" "meta-programming techniques to define methods or perform functionality.\n" "For instance, a common case of the \"self.included\" callback in module\n" "to extend a module on a class might be in the form:" msgstr "" "æ–°ã—ã„ {tag:!parse} ディレクティブã¯\n" "YARDãŒå…ƒã®å½¢å¼ã§è§£æžã™ã‚‹å¿…è¦ã¯ãªã„コードã®è§£æžã‚’開発者ã«\n" "許å¯ã™ã‚‹ã®ã«è¿½åŠ ã•れãŸã€‚\n" "ã“れã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã™ã‚‹æ™‚や機能を実行ã™ã‚‹æ™‚ã«\n" " `instance_eval` ã¨ä»–ã®å‹•çš„ãªãƒ¡ã‚¿ãƒ—ログラミングã®ãƒ†ã‚¯ãƒ‹ãƒƒã‚¯ã‚’ä½¿ã†æ™‚ã«ä¾¿åˆ©ã§ã‚る。\n" "例ãˆã°ã€æ¬¡ã®å½¢å¼ã§ã‚¯ãƒ©ã‚¹ä¸Šã§ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’æ‹¡å¼µã™ã‚‹ã®ã«\n" "モジュールã®ä¸­ã®\"self.included\"コールãƒãƒƒã‚¯ã®ä¸€èˆ¬çš„ãªã‚±ãƒ¼ã‚¹:" #: ../docs/WhatsNew.md:94 msgid "" " def self.included(mod)\n" " mod.extend(self)\n" " end" msgstr "" " def self.included(mod)\n" " mod.extend(self)\n" " end" #: ../docs/WhatsNew.md:98 msgid "" "Unfortunately, this does not get picked up by YARD, but on the original\n" "class, we can add:" msgstr "" "ã‚ã„ã«ãã€ã“れã¯YARDã«ã‚ˆã£ã¦å–å¾—ã§ããªã„ãŒã€\n" "å…ƒã®ã‚¯ãƒ©ã‚¹ä¸Šã§æ¬¡ã®ã‚ˆã†ã«è¿½åŠ ã§ãã‚‹:" #: ../docs/WhatsNew.md:101 msgid "" " class MyClass\n" " # @!parse extend TheDynamicModule\n" " include TheDynamicModule\n" " end" msgstr "" " class MyClass\n" " # @!parse extend TheDynamicModule\n" " include TheDynamicModule\n" " end" #: ../docs/WhatsNew.md:106 msgid "" "YARD will then parse the code `extend TheDynamicModule` as if\n" "it were in the source file." msgstr "" "ãれãŒã‚½ãƒ¼ã‚¹ãƒ•ァイルã®ä¸­ã ã£ãŸå ´åˆãªã©\n" "YARD㌠`extend TheDynamicModule` ã®ã‚³ãƒ¼ãƒ‰ã‚’è§£æžã™ã‚‹æ™‚" #: ../docs/WhatsNew.md:109 msgid "" "You can also use this technique to register regular methods as\n" "attributes, if you did not define them with `attr_*` methods:" msgstr "" "ã“れら㮠`attr_*` メソッドを用ã„ã¦å®šç¾©ã—ãªã‹ã£ãŸå ´åˆã€\n" "ã‚ãªãŸã¯å±žæ€§ã¨ã—ã¦æ¨™æº–ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’登録ã™ã‚‹ã®ã«ã“ã®ãƒ†ã‚¯ãƒ‹ãƒƒã‚¯ã‚’使ã†äº‹ãŒã§ãる。" #: ../docs/WhatsNew.md:112 msgid "" " def foo; @foo end\n" " def foo=(v) @foo = v end" msgstr "" " def foo; @foo end\n" " def foo=(v) @foo = v end" #: ../docs/WhatsNew.md:115 msgid "" " # Register them as methods:\n" " # @!parse attr_accessor :foo" msgstr "" " # メソッドã¨ã—ã¦ãれらを登録ã™ã‚‹\n" " # @!parse attr_accessor :foo" #: ../docs/WhatsNew.md:118 msgid "### Backward incompatible changes to `@!macro` directive" msgstr "### å¾Œæ–¹äº’æ›æ€§ã®ãªã„ `@!macro` ディレクティブã«å¤‰æ›´ã™ã‚‹" #: ../docs/WhatsNew.md:120 msgid "" "Unfortunately, in order to create the new directives architecture,\n" "some previously supported syntax in `@macro` tags are no longer supported.\n" "Specifically, macros can no longer expand text on an entire docstring.\n" "Instead, macros only expand the data that is indented inside of the tag\n" "text." msgstr "" "ã‚ã„ã«ãã€æ–°ã—ã„ディレクティブアーキテクãƒãƒ£ã‚’作æˆã™ã‚‹ç‚ºã®é †ç•ªã€\n" "`@macro` ã‚¿ã‚°ã®ä¸­ã§ã„ãã¤ã‹å‰ã«ã‚µãƒãƒ¼ãƒˆã•ã‚ŒãŸæ§‹æ–‡ã¯ã€ã‚‚ã†ã‚µãƒãƒ¼ãƒˆã•れãªã„。\n" "ã™ãªã‚ã¡ã€ãƒžã‚¯ãƒ­ã¯å…¨ã¦ã®docstring上ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’展開ã™ã‚‹ã“ã¨ã¯ã§ããªã„。\n" "代ã‚りã«ã€ãƒžã‚¯ãƒ­ã¯ã‚¿ã‚°ã®ãƒ†ã‚­ã‚¹ãƒˆã®å†…部ã®ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れãŸãƒ‡ãƒ¼ã‚¿ã ã‘展開ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:126 msgid "This syntax is **no longer supported**:" msgstr "This syntax is **no longer supported**:" #: ../docs/WhatsNew.md:128 msgid "" " # @macro mymacro\n" " # Expanding text $1 $2 $3\n" " property :a, :b, :c" msgstr "" " # @macro mymacro\n" " # Expanding text $1 $2 $3\n" " property :a, :b, :c" #: ../docs/WhatsNew.md:132 msgid "" "In 0.7.0 to 0.7.5, the above would have created a method with the docstring\n" "\"Expanding text a b c\". This will not work in 0.8.0. Instead, you must\n" "indent all the macro expansion data so that it is part of the `@macro`\n" "tag as follows:" msgstr "" "0.7.0 ~ 0.7.5ã§ã€\n" "上ã¯ã®ä¾‹ã¯docstring \"Expanding text a b c\"ã¨ä¸€ç·’ã«ä½œæˆã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’æŒã¤ã€‚\n" "ã“れã¯ã€0.8.0ã§ã¯å‹•ã‹ãªã„。\n" "代ã‚りã«ã€ã‚ãªãŸã¯å…¨ã¦ã®ãƒžã‚¯ãƒ­å±•é–‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’インデントã—ãªã‘れã°ãªã‚‰ãªã„。\n" "ã¤ã¾ã‚Š `@macro` ã‚¿ã‚°ã®ä¸€éƒ¨ã‚’次ã®ã‚ˆã†ã«ã™ã‚‹:" #: ../docs/WhatsNew.md:137 msgid "" " # @!macro mymacro\n" " # Expanding text $1 $2 $3\n" " property :a, :b, :c" msgstr "" " # @!macro mymacro\n" " # Expanding text $1 $2 $3\n" " property :a, :b, :c" #: ../docs/WhatsNew.md:141 msgid "" "Note that we also use the recommended `@!macro` syntax, though `@macro`\n" "is still supported." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "æˆ‘ã€…ã¯æŽ¨å¥¨ã•れ㟠`@!macro` 構文を使ã†ã‘れã©ã‚‚ã€\n" "`@macro` ã¯ã¾ã ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る。" #: ../docs/WhatsNew.md:144 msgid "## Added `--embed-mixin(s)` to embed mixins into class docs (0.8.0)" msgstr "## クラスã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«mixinを埋ã‚込むã®ã« `--embed-mixin(s)` ãŒè¿½åŠ ã•れ㟠(0.8.0)" #: ../docs/WhatsNew.md:146 msgid "" "Methods from mixins can now be embedded directly into the documentation\n" "output for a class by using `--embed-mixin ModuleName`, or `--embed-mixins`\n" "for all mixins. This enables a documentation writer to refactor methods\n" "into modules without worrying about them showing up in separate files\n" "in generated documentation. When mixin methods are embedded, they\n" "show up in both the original module page and the pages of the classes\n" "they are mixed into. A note is added to the method signature telling the\n" "user where the method comes from." msgstr "" "mixinã‹ã‚‰ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯\n" "å…¨ã¦ã®mixin用㫠`--embed-mixin ModuleName` ã‚„ `--embed-mixins` 用ã®\n" "ドキュメント出力ã®ä¸­ã¸ç›´æŽ¥åŸ‹ã‚è¾¼ã¾ã‚Œã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚\n" "ã“れã¯ç”Ÿæˆã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸­ã®åˆ†å‰²ã•れãŸãƒ•ァイルã®ãªã‹ã®\n" "ãã®æ™‚ã®ä¸€è¦§ã«ã¤ã„ã¦è­¦å‘Šç„¡ã—ã§ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ä¸­ã®\n" "メソッドをリファクタリングã™ã‚‹ç‚ºã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’書ã‘る。\n" "mixinメソッドãŒåŸ‹ã‚è¾¼ã¾ã‚ŒãŸæ™‚ã€\n" "ã“れã¯å…ƒã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ãƒšãƒ¼ã‚¸ã¨ã“ã‚Œã‚‰ã®æ··ã˜ã£ãŸã‚¯ãƒ©ã‚¹ã®ãƒšãƒ¼ã‚¸ã®ä¸¡æ–¹ã‚’一覧ã™ã‚‹ã€‚\n" "noteã¯ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚·ã‚°ãƒãƒãƒ£ãŒãƒ¡ã‚½ãƒƒãƒ‰ãŒã©ã“ã‹ã‚‰ãã‚‹ã‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«çŸ¥ã‚‰ã›ã‚‹ã®ã«è¿½åŠ ã•れãŸã€‚" #: ../docs/WhatsNew.md:155 msgid "" "The `--embed-mixin` command-line option can also take wildcard values\n" "in order to match specific namespaces. For instance, you can embed\n" "only mixins inside of a \"Foo::Bar\" namespace by doing:" msgstr "" "`--embed-mixin` コマンドラインオプションã¯ã€\n" "指定ã®ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ã«ãƒžãƒƒãƒã™ã‚‹ã®ã«ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã®å€¤ã‚‚å–å¾—ã§ãる。\n" "例ãˆã°ã€æ¬¡ã®æ§˜ã«ã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n" "\"Foo::Bar\"ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ã®å†…部ã«mixinã ã‘埋ã‚込むã“ã¨ãŒã§ãる。" #: ../docs/WhatsNew.md:159 msgid "" " !!!sh\n" " $ yard doc --embed-mixin \"Foo::Bar::*\"" msgstr "" " !!!sh\n" " $ yard doc --embed-mixin \"Foo::Bar::*\"" #: ../docs/WhatsNew.md:162 msgid "## Internationalization (I18n) support for translating docs" msgstr "## 翻訳ドキュメント用ã®å›½éš›åŒ–(I18n)サãƒãƒ¼ãƒˆ" #: ../docs/WhatsNew.md:164 msgid "" "YARD now ships with the beginnings of internationalization support\n" "for translating documentation into multiple languages. The\n" "`yard i18n` command now allows you to generate \".pot\" and ultimately\n" "\".po\" files for translation with [gettext](http://www.gnu.org/software/" "gettext)." msgstr "" "YARDã¯è¤‡æ•°ã®è¨€èªžã«ç¿»è¨³ã—ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆç”¨ã«å›½éš›åŒ–サãƒãƒ¼ãƒˆã‚’é€ã‚Šã ã™ã“ã¨ã«ãªã£ãŸã€‚\n" "`yard i18n` コマンドã¯\n" "ã‚ãªãŸãŒ[gettext](http://www.gnu.org/software/gettext)を用ã„ãŸç¿»è¨³ç”¨ã®\n" "\".pot\"ã¨æœ€å¾Œã«\".po\"ファイルを生æˆã™ã‚‹ã®ã‚’許å¯ã™ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:169 msgid "" "Note that this tool is a small step in the larger transition for\n" "proper I18n support in YARD. We still have to add proper gettext\n" "support to our templates for proper generation in multiple languages,\n" "but this tool allows you to get started in translating your\n" "documents. Improved I18n support will come throughout the 0.8.x series." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã“ã®ãƒ„ールã¯YARDã®æ­£å½“ãªI18nサãƒãƒ¼ãƒˆã®å°ã•ãªä¸€æ­©ã§ã‚る。\n" "我々ã¯ã¾ã è¤‡æ•°ã®è¨€èªžã®é©åˆ‡ãªç”Ÿæˆã®ç‚ºã«ã€\n" "例ã®ãƒ†ãƒ³ãƒ—レートã«é©åˆ‡ãªgettextサãƒãƒ¼ãƒˆã‚’追加ã™ã‚‹ä»•äº‹ãŒæ®‹ã£ã¦ã„る。\n" "ã ãŒã“ã®ãƒ„ールã¯ã‚ãªãŸãŒç¿»è¨³ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å§‹ã‚ã‚‹ã®ã‚’å—ã‘入れる。\n" "改良ã•れãŸI18nサãƒãƒ¼ãƒˆã¯0.8.xシリーズã«è‡³ã‚‹ä¸­ã§ç™»å ´ã™ã‚‹ã ã‚ã†ã€‚" #: ../docs/WhatsNew.md:175 msgid "## New C parser / handlers architecture (0.8.0)" msgstr "## æ–°ã—ã„ Cパーサー / ãƒãƒ³ãƒ‰ãƒ©ãƒ¼æ§‹é€  (0.8.0)" #: ../docs/WhatsNew.md:177 msgid "" "The C parser was completely rewritten to take advantage of YARD's\n" "parser and handler architecture. This means more YARD will be more robust\n" "when parsing failures occur, tags and directives will now work consistently\n" "across Ruby and CRuby files ({tag:!group} will now work, for instance),\n" "and developers can now write custom handlers that target CRuby source files." msgstr "" "YARDパーサーã®å¹³å‡ã¨ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã‚’å–å¾—ã™ã‚‹ã®ã«\n" "C パーサーã¯å®Œå…¨ã«æ›¸ãç›´ã•れãŸã€‚\n" "ã“れã¯YARDãŒè§£æžç•°å¸¸ãŒèµ·ããŸæ™‚ã«ã•らã«å …牢ã«ãªã‚‹äº‹ã‚’æ„味ã—\n" "ã‚¿ã‚°ã¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã¯Rubyã¨CRubyã®ãƒ•ァイル(例ãˆã° {tag:!group} ãŒå‹•ãよã†ã«ãªã£ãŸ)\n" "全域ã§å …実ã«å‹•ãæ§˜ã«ãªã£ãŸã€‚\n" "ãã—ã¦ã€é–‹ç™ºè€…ã¯CRubyã®ã‚½ãƒ¼ã‚¹ãƒ•ァイルを目的ã«ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒ ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’書ã‘る様ã«ãªã£ãŸã€‚\n" #: ../docs/WhatsNew.md:183 msgid "## YARD will now warn if `@param` name not in method params (0.8.0)" msgstr "## YARDã¯ãƒ¡ã‚½ãƒƒãƒ‰ãƒ‘ラメーターã®ä¸­ã«`@param`åãŒãªã„å ´åˆã€è­¦å‘Šã‚’出ã™ã‚ˆã†ã«ãªã£ãŸ(0.8.0)" #: ../docs/WhatsNew.md:185 msgid "" "YARD will now give you a warning if you use a `@param` tag in your\n" "source but give an invalid parameter name. This should catch a lot of\n" "common documentation errors and help keep your documentation consistent." msgstr "" "YARDã¯ã‚ãªãŸã®ã‚½ãƒ¼ã‚¹ã®ä¸­ã® `@param` タグを使ã†å ´åˆã€ã‚ãªãŸãŒè­¦å‘Šã‚’出ã›ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚\n" "ã—ã‹ã—有効ãªãƒ‘ラメータåを与ãˆã‚‹ã€‚\n" "ã“ã‚Œã¯æ²¢å±±ã®ä¸€èˆ¬çš„ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚¨ãƒ©ãƒ¼ã‚’キャッãƒã—ã€\n" "ã‚ãªãŸã®ä¸€è²«ã—ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¿å®ˆã‚’助ã‘る。" #: ../docs/WhatsNew.md:189 msgid "## Added support for `module_function` calls in Ruby code (0.8.0)" msgstr "## `module_function` ãŒRubyã®ã‚³ãƒ¼ãƒ‰ã®ä¸­ã§å‘¼ã³å‡ºã•れるサãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れ㟠(0.8.0)" #: ../docs/WhatsNew.md:191 msgid "" "The `module_function` command in Ruby is now supported in Ruby files.\n" "It defines two separate methods, one class and one instance method,\n" "both having the exact same docstring, and marks the instance method\n" "as private." msgstr "" "Rubyã® `module_function` コマンドã¯\n" "Rubyã®ãƒ•ァイルã§ã‚µãƒãƒ¼ãƒˆã•れるよã†ã«ãªã£ãŸã€‚\n" "ãれã¯\"区切られãŸãƒ¡ã‚½ãƒƒãƒ‰\"ã¨\n" "\"一ã¤ã®ã‚¯ãƒ©ã‚¹ã¨ä¸€ã¤ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰\"二ã¤ã‚’定義ã—ã€\n" "正確ãªåŒã˜docstring両方ã€\n" "privateã¨ã—ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’マークã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:196 msgid "## Greatly improved tag documentation using custom template (0.8.0)" msgstr "## カスタムテンプレートã«ã‚ˆã£ã¦å¤§ããæ”¹è‰¯ã•れãŸã‚¿ã‚°ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ (0.8.0)" #: ../docs/WhatsNew.md:198 msgid "" "We have completely revamped the {docs/Tags.md} to include documentation\n" "for each meta-data tag and directive with at least one useful example\n" "for each one. This was done using template customization and extension\n" "available within YARD." msgstr "" "我々ã¯å€‹ã€…ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã¨ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–用ã®\n" "ドキュメントをå«ã‚ã‚‹ã®ã« {docs/Tags.md} ã‚’\n" "å°‘ãªãã¨ã‚‚å„々一ã¤ä¾¿åˆ©ãªä¾‹ã‚’用ã„完全ã«åˆ·æ–°ã—ã¾ã—ãŸã€‚\n" "ã“れã¯YARDã®ä¸­ã§ãƒ†ãƒ³ãƒ—レートã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã¨æ‹¡å¼µãŒå¯èƒ½ã«ãªã‚‹äº‹ã«ã‚ˆã£ã¦\n" "行ãªã‚れãŸã€‚" #: ../docs/WhatsNew.md:203 msgid "## Tags can now contain '.' for namespacing (0.8.0)" msgstr "## ã‚¿ã‚°ã¯ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ç”¨ã® '.' ã‚’å«ã‚る事ã§ãるよã†ã«ãªã£ãŸ (0.8.0)" #: ../docs/WhatsNew.md:205 msgid "" "Prior to 0.8.0, tags could only contain alphanumeric characters and\n" "underscore. YARD now allows the '.' character in tag names, and it\n" "is now recommended for namespacing project-specific custom tags.\n" "YARD has its own set of custom tags that are namespaced in this\n" "way (using the \"yard.tagname\" namespace). The namespace recommendation\n" "is to use \"projectname.tagname\", or \"projectname.component.tagname\"." msgstr "" "0.8.0以å‰ã®ã‚¿ã‚°ã¯ã‚¢ãƒ«ãƒ•ァベット文字列ã¨ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã ã‘å«ã‚る事ãŒã§ããŸã€‚\n" "YARDã¯ã‚¿ã‚°åã§ '.' ã®æ–‡å­—ã‚’å—ã‘入れるよã†ã«ãªã‚Šã€\n" "ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã®æŒ‡å®šã®ã‚«ã‚¹ã‚¿ãƒ ã‚¿ã‚°ã®ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ç”¨ã«æŽ¨å¥¨ã™ã‚‹ã€‚\n" "YARDã¯è‡ªèº«ã®ã‚«ã‚¹ã‚¿ãƒ \n" "ã“ã®æ–¹æ³•ã§ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹(åå‰ä»˜ã‘)ã•れるタグã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’æŒã¤ã€‚\n" "ãŠã™ã™ã‚ã®ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹ã¯\n" "\"projectname.tagname\" ã‚„ \"projectname.component.tagname\"を使ã†" #: ../docs/WhatsNew.md:212 msgid "## Added \"frames\" links for non-framed pages for better nav (0.8.0)" msgstr "## ãƒŠãƒ“ã®æ”¹è‰¯ã®ç‚ºãƒ•レームã®ãªã„ページ用ã«ãƒ•レームã®ãƒªãƒ³ã‚¯ãŒè¿½åŠ ã•れ㟠(0.8.0)" #: ../docs/WhatsNew.md:214 msgid "" "Frames navigation has always had a \"(no frames)\" link to get rid\n" "of the frameset. YARD 0.8.0 introduces a \"(frames)\" link on non-framed\n" "pages to reverse this, allowing you to navigate between framed and\n" "frameless pages seamlessly." msgstr "" "フレームã®ãƒŠãƒ“ゲーションã¯\n" "フレームセットをå–り除ãã®ã‚’å–å¾—ã™ã‚‹ã®ã«å¸¸ã«\"(no frames)\"ã®ãƒªãƒ³ã‚¯ã‚’æŒã£ã¦ã„ãŸã€‚\n" "YARD 0.8.0ã¯ã“ã‚Œã‚’ç½®ãæ›ãˆã‚‹ã®ã«ãƒ•レームã®ç„¡ã„ページã§\n" "\"(frames)\"ã®ãƒªãƒ³ã‚¯ã‚’å°Žå…¥ã™ã‚‹\n" "フレームã¨ãƒ•レーム無ã—ã®ãƒšãƒ¼ã‚¸é–“ã‚’\n" "シームレスã«ãƒŠãƒ“ゲートã™ã‚‹ã®ã«è¨±å¯ã•れる。" #: ../docs/WhatsNew.md:219 msgid "## Added Gemfile support to YARD server for local gem sets (0.8.0)" msgstr "## ローカルgemã®ã‚°ãƒ«ãƒ¼ãƒ—用ã«YARDサーãƒãƒ¼ã«Gemfileã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れ㟠(0.8.0)" #: ../docs/WhatsNew.md:221 msgid "" "The `yard server` command now supports `--gemfile` to serve gems\n" "from a Gemfile.lock, instead of all system-wide gems." msgstr "" "å…¨ã¦ã®ã‚·ã‚¹ãƒ†ãƒ å´ã®gemã®ä»£ã‚りã«Gemfile.lockã‹ã‚‰gemã‚’æä¾›ã™ã‚‹ã®ã«ã€\n" "`yard server` コマンドã¯ã€`--gemfile` をサãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:224 msgid "## Server now displays README on index route like static docs (0.8.0)" msgstr "## サーãƒãƒ¼ã¯é™çš„ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚ˆã†ãªãƒ«ãƒ¼ãƒˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä¸Šã§READMEを表示ã™ã‚‹(0.8.0)" #: ../docs/WhatsNew.md:226 msgid "" "The `yard server` command will now behave like static docs regarding\n" "the index action for a project, listing the README file if present\n" "before displaying the alphabetic index. Note that the route for\n" "the alphabetic index page has now moved to the explicit '/index' action." msgstr "" "`yard server` コマンドã¯\n" "プロジェクト用ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®å‹•作ã«ã¤ã„ã¦\n" "é™çš„ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚ˆã†ãªæŒ™å‹•ã«ãªã‚Šã€\n" "アルファベットã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’表示ã™ã‚‹å‰ã«ä¸Žãˆã‚‹å ´åˆã€\n" "READMEファイルを記述ã™ã‚‹ã€‚\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "アルファベット順ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒšãƒ¼ã‚¸ç”¨ã®ãƒ«ãƒ¼ãƒˆã¯\n" "明示的㪠'/index' ã®å‹•作ã«ç§»ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:231 msgid "## Added line numbers to `yard stats --list-undoc --compact` (0.8.0)" msgstr "## `yard stats --list-undoc --compact` ã«è¡Œæ•°ãŒè¿½åŠ ã•れ㟠(0.8.0)" #: ../docs/WhatsNew.md:233 msgid "" "Line numbers are now listed in the compact listing of undocumented objects\n" "so that they can be more easily located in the files." msgstr "" "行数ã¯ã‚³ãƒ³ãƒ‘クトãªã‚¢ãƒ³ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãªã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã§è¨˜è¿°ã•れるよã†ã«ãªã£ãŸã€‚\n" "ãªã®ã§ã“れらã¯ã•らã«ç°¡å˜ã«ãƒ•ァイルã®ä¸­ã‚’示ã™äº‹ãŒã§ãる。" #: ../docs/WhatsNew.md:236 msgid "## Single object db now default (multi-object db unsupported) (0.8.0)" msgstr "" #: ../docs/WhatsNew.md:238 msgid "" "YARD previously would split the .yardoc db into multiple marshal files\n" "for load-time performance reasons if it grew past a specific number of\n" "objects. This check is now disabled, and YARD will never automatically\n" "switch to a multi-object DB. YARD will now always use the single object\n" "db unless explicitly set with `--no-single-db`. If YARD is taking a\n" "long time to load your .yardoc database, you can try using this\n" "option to split your database into multiple files, but note that this\n" "can cause problems with certain codebases (specifically, if you\n" "have class methods using the same name as a module/class)." msgstr "" #: ../docs/WhatsNew.md:248 msgid "## Added `--api` tag to generate documentation for API sets (0.8.1)" msgstr "" #: ../docs/WhatsNew.md:250 msgid "" "You can now use `yardoc --api APINAME` to generate documentation only\n" "for objects with the `@api APINAME` tag (or any parent namespace objects,\n" "since this tag is transitive). Multiple `--api` switches may be used to\n" "generate documentation for multiple APIs together. The following generates\n" "documentation for both the \"public\" and \"developer\" APIs, also " "including\n" "any objects with undefined API (via `--no-api`):" msgstr "" #: ../docs/WhatsNew.md:257 msgid " $ yard doc --api public --api developer --no-api" msgstr " $ yard doc --api public --api developer --no-api" #: ../docs/WhatsNew.md:259 msgid "" "Note that if you use `--api`, you must ensure that you also add `@api`\n" "tags to your namespace objects (modules and classes), not just your " "methods.\n" "If you do not want to do this, you can also include all objects with *no*\n" "`@api` tag by using `--no-api` as shown above." msgstr "" #: ../docs/WhatsNew.md:264 msgid "" "Remember that applying an `@api` tag to a class or module will apply it\n" "to all children that do not have this tag already defined, so you can\n" "declare an entire class public by applying it to the class itself. Note\n" "also that these tags can be overridden by child elements if the tag is\n" "re-applied to the individual object." msgstr "" #: ../docs/WhatsNew.md:270 msgid "" "This feature is a simplified version of the more powerful `--query`\n" "switch. The query to display the same API documentation as the\n" "above example would be:" msgstr "" #: ../docs/WhatsNew.md:274 msgid " $ yard doc --query '!@api || @api.text =~ /^(public|private)$/'" msgstr " $ yard doc --query '!@api || @api.text =~ /^(public|private)$/'" #: ../docs/WhatsNew.md:276 msgid "" "But note that `--query` does not work when YARD is in \"safe mode\"\n" "due to security concerns, whereas `--api` works in either mode.\n" "This enables `--api` to function on remote documentation sites like\n" "[rubydoc.info](http://rubydoc.info)." msgstr "" #: ../docs/WhatsNew.md:282 msgid "# What's New in 0.7.x?" msgstr "# What's New in 0.7.x?" #: ../docs/WhatsNew.md:284 msgid "" "1. **Macro support and detection of DSL methods** (0.7.0)\n" "2. **Inherited attributes now show in HTML output** (0.7.0)\n" "3. **The 'app' directory is now parsed by default** (0.7.0)\n" "4. **Added support for metadata (@title, @markup) in extra files/readmes** " "(0.7.0)\n" "5. **Added `yard list` command (alias for `yardoc --list`)** (0.7.0)\n" "6. **Added Git support in `yard diff`** (0.7.0)\n" "7. **Added `{include:file:FILENAME}` syntax** (0.7.0)\n" "8. **Added `{render:OBJECT}` syntax to embed object docs in extra files** " "(0.7.0)\n" "9. **Added improved templates API for custom CSS/JS/menus** (0.7.0)\n" "10. **Added Ruby markup type (`-m ruby`)** (0.7.0)\n" "11. **Added state tracking variables to Parser/Handler architecture** " "(0.7.0)\n" "12. **Added before/after callbacks to SourceParser** (0.7.0)\n" "13. **Can now use `--yardopts FILE` to specify a custom yardopts file** " "(0.7.0)\n" "14. **Added new `-t guide` template for guide based docs** (0.7.0)\n" "15. **Github Flavoured Markdown now works out-of-box** (0.7.4)\n" "16. **Added `-m textile_strict` and `-m pre` markup types** (0.7.4)\n" "17. **Reorganized markup types 'text' and 'none'** (0.7.4)\n" "18. **Add support for `rb_define_alias`** (0.7.4)" msgstr "" "1. **マクロã®ã‚µãƒãƒ¼ãƒˆã¨DSLãƒ¡ã‚½ãƒƒãƒ‰ã®æ¤œçŸ¥** (0.7.0)\n" "2. **継承ã•れãŸå±žæ€§ã¯ã™ãHTML出力ã§ä¸€è¦§ã§ãã‚‹** (0.7.0)\n" "3. **'app'ディレクトリã¯ã€ã™ãデフォルトã§è§£æžã•れる** (0.7.0)\n" "4. **追加ã®ãƒ•ァイル/readmesã§ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ç”¨(@title,@markup)ã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れ" "ãŸ** (0.7.0)\n" "5. **`yard list`コマンドãŒè¿½åŠ ã•れãŸ(`yardoc --list`用ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹)** " "(0.7.0)\n" "6. **`yard diff`ã§Gitサãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れãŸ** (0.7.0)\n" "7. **`{include:file:FILENAME}`æ§‹æ–‡** (0.7.0)\n" "8. **追加ã®ãƒ•ァイルã§ã‚ªãƒ–ジェクトã®docsを組ã¿è¾¼ã‚€ç‚ºã®`{render:OBJECT}`æ§‹æ–‡ãŒ" "追加ã•れãŸ** (0.7.0)\n" "9. **カスタムCSS/JS/ãƒ¡ãƒ‹ãƒ¥ãƒ¼ç”¨ã®æ”¹è‰¯ã•れãŸãƒ†ãƒ³ãƒ—レートAPIãŒè¿½åŠ ã•れãŸ** " "(0.7.0)\n" "10. **Rubyã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®åž‹(`-m ruby`)ãŒè¿½åŠ ã•れãŸ** (0.7.0)\n" "11. **パーサー/ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã«ãƒˆãƒ©ãƒƒã‚­ãƒ³ã‚°ã®çŠ¶æ…‹å¤‰æ•°ãŒè¿½åŠ ã•れãŸ" "** (0.7.0)\n" "12. **SourceParserã«before/afterã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ãŒè¿½åŠ ã•れãŸ** (0.7.0)\n" "13. **カスタムyardoptsファイルを指定ã™ã‚‹ã®ã«ã€`--yardopts FILE`ã§ã™ãã«ã€ä½¿ã†" "事ãŒå‡ºæ¥ã‚‹** (0.7.0)\n" "14. **基底ã¨ãªã‚‹docstringをガイドã™ã‚‹ã®ã«ã€`-t guide`テンプレートを新ã—ã追加" "ã™ã‚‹** (0.7.0)<\n" "15. **Github風ã®MarkdownãŒå¸¸è­˜ç ´ã‚Šã®ä»•事をã™ã‚‹ã‚ˆã†ã«ãªã£ãŸ** (0.7.4)\n" "16. **`-m textile_strict`ã¨`-m pre`マークアップã®åž‹ãŒè¿½åŠ ã•れãŸ** (0.7.4)\n" "17. **'text'ã¨'none'ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—åž‹ãŒå†ç·¨æˆã•れãŸ** (0.7.4)\n" "18. **`rb_define_alias`用ã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れãŸ** (0.7.4)" #: ../docs/WhatsNew.md:303 msgid "## Macro support and detection of DSL methods (0.7.0)" msgstr "## マクロã®ã‚µãƒãƒ¼ãƒˆã¨DSLãƒ¡ã‚½ãƒƒãƒ‰ã®æ¤œçŸ¥ (0.7.0)" #: ../docs/WhatsNew.md:305 msgid "" "YARD will now automatically detect class level method calls, similar to the\n" "way it knows what an `attr_accessor` is. By simply adding documentation to\n" "your class level declarations, YARD can automatically detect them as " "methods\n" "or attributes in your class. Consider DataMapper's \"property\" declaration:" msgstr "" "YARDã¯è‡ªå‹•ã§ã‚¯ãƒ©ã‚¹ãƒ¬ãƒ™ãƒ«ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—を検知ã™ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚\n" "'attr_accessor'何ãªã®ã‹çŸ¥ã‚‹ã®ã¨ä¼¼ã¦ã„る。\n" "ç°¡å˜ã«ã‚ãªãŸã®ã‚¯ãƒ©ã‚¹ãƒ¬ãƒ™ãƒ«å®£è¨€ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’追加ã™ã‚‹ã€‚\n" "DataMapperã®\"property\"宣言を考慮ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:310 msgid "" " class Post\n" " # @attribute\n" " # @return [String] the title of the post\n" " property :title, String\n" " end" msgstr "" " class Post\n" " # @attribute\n" " # @return [String] the title of the post\n" " property :title, String\n" " end" #: ../docs/WhatsNew.md:316 msgid "" "The above declaration would be created as the `Post#title`. The optional\n" "`@attribute` tag tells YARD that the property is an \"attribute\", and not " "just\n" "a regular method." msgstr "" "上ã®å®£è¨€ã¯ã€`Post#title`メソッドã¨ã—ã¦ä½œæˆã•れるã ã‚ã†ã€‚\n" "ä»»æ„ã®`@attribute`ã‚¿ã‚°ãŒYARDã®\"property\"ã«ä¼ãˆã‚‹ã®ã¯ã€\"attribute\"ã§ã‚" "りã€\n" "ãã‚Œã¯æ­£è¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ãªã„。" #: ../docs/WhatsNew.md:320 msgid "" "In addition to basic DSL method detection, YARD also supports macros to " "create\n" "docstrings that can be copies to other objects; these macros can also be\n" "\"attached\" to class level methods to create implicit documentation for " "macros." msgstr "" "æ›´ã«åŸºæœ¬ã®DSLメソッド検知ã«åŠ ãˆã¦ã€\n" "YARDã¯ä»–ã®ã‚ªãƒ–ジェクトã«ã‚³ãƒ”ーã§ãã‚‹docstringを作æˆã™ã‚‹ãƒžã‚¯ãƒ­ã‚‚サãƒãƒ¼ãƒˆã™ã‚‹ã€‚\n" "ã“れらã®ãƒžã‚¯ãƒ­ã¯ãƒžã‚¯ãƒ­ç”¨ã«æš—é»™ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’作æˆã™ã‚‹ãŸã‚ã«\n" "クラスレベルメソッドã«\"追加\"(attached)ã‚‚ã§ãる。" #: ../docs/WhatsNew.md:324 msgid "" "Macros and DSL method detection are discussed in much more detail in the\n" "{file:docs/GettingStarted.md}, so you should read about them there if " "you're\n" "interested in this feature." msgstr "" "マクロã¨DSLメソッド宣言ã®è©³ç´°ã¯{file:docs/GettingStarted.md}ã§èª¬æ˜Žã•れるã®ã§ã€\n" "ã‚ãªãŸãŒã“ã®æ©Ÿèƒ½ã«èˆˆå‘³ãŒã‚ã‚‹å ´åˆã€ãã“ã§èª­ã‚€äº‹ãŒã§ãる。" #: ../docs/WhatsNew.md:328 msgid "## Inherited attributes now show in HTML output (0.7.0)" msgstr "## 継承ã•れãŸå±žæ€§ã‚’HTML出力ã§ã™ãã«èª¿ã¹ã‚‰ã‚Œã‚‹ã‚ˆã†ã«ãªã£ãŸ (0.7.0)" #: ../docs/WhatsNew.md:330 msgid "" "Inherited attributes will now show up in HTML documentation using the " "default\n" "template in the same manner that inherited methods do." msgstr "" "継承ã•れãŸå±žæ€§ã¯ã€\n" "継承ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã¨åŒã˜å½¢å¼ã§\n" "デフォルトã®ãƒ†ãƒ³ãƒ—レートã«ã‚ˆã£ã¦\n" "HTMLドキュメントã§ã™ãã«ç¾ã‚Œã‚‹ã ã‚ã†ã€‚" #: ../docs/WhatsNew.md:333 msgid "## The 'app' directory is now parsed by default (0.7.0)" msgstr "## デフォルトã§'app'ディレクトリã¯ã™ãã«è§£æžã•れる (0.7.0)" #: ../docs/WhatsNew.md:335 msgid "" "YARD tries to follow the \"It Just Works\" attitude in writing developer " "tools,\n" "and therefore has added `app/**/*.rb` to the default list of globs that it\n" "searches for code in. You no longer need to create a `.yardopts` just to\n" "list your app directory when documenting your code on rubydoc.info.\n" "We should have done this a while ago! And don't worry, YARD still checks\n" "lib and ext by default, too." msgstr "" "YARDã¯é–‹ç™ºè€…ã®ãƒ„ãƒ¼ãƒ«ã§æ›¸ã‹ã‚Œã¦ã„ã‚‹\\\"ã¡ã‚ƒã‚“ã¨å‹•ã\\\"姿勢をフォローã—よã†ã¨ã™ã‚‹ã€\n" "従ã£ã¦ã€ãれãŒã‚³ãƒ¼ãƒ‰ç”¨ã«æ¤œç´¢ã™ã‚‹globã®ãƒ‡ãƒ•ォルトã®ãƒªã‚¹ãƒˆã«\n" "追加ã•れãŸ`app/**/*.rb`ã‚’æŒã¤\n" "ã‚ãªãŸã¯ã‚‚ã¯ã‚„rubydoc.infoã§ã‚ãªãŸã®ã‚³ãƒ¼ãƒ‰ã‚’記述ã™ã‚‹æ™‚ã«\n" "ã‚ãªãŸã®ã‚¢ãƒ—リã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªè¨˜è¿°ã™ã‚‹ã®ã«`.yardopts`を作æˆã™ã‚‹å¿…è¦ã¯ãªã„。\n" "ã¡ã‚‡ã£ã¨å‰ã«ã“れãŒå®Œæˆã—ãŸãŒã€å¿ƒé…ã—ãªã„ã§ã€\n" "YARDã¯ã¾ã ãƒ‡ãƒ•ォルトã§libã¨extã‚‚ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:342 msgid "" "## Added support for metadata (@title, @markup) in extra files/readmes " "(0.7.0)" msgstr "" "## 追加ã®ãƒ•ァイルã¨READMEã®ä¸­ã§ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿(@title,@markup)用ã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•" "れãŸ(0.7.0)" #: ../docs/WhatsNew.md:344 msgid "" "Extra files (READMEs, ChangeLogs, LICENSE files, and other guides) now " "support\n" "metadata tags, just like docstrings in code comments. By adding @tag values\n" "to the top of a file (no whitespace preceding it) inside of a `# comment` " "line,\n" "YARD will detect and parse these tags and store it for later usage." msgstr "" "追加ã®ãƒ•ァイル(README,ChangeLogs,LICENSEファイルや他ã®ã‚¬ã‚¤ãƒ‰)ã¯ã€\n" "ã™ãã«ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã‚’サãƒãƒ¼ãƒˆã™ã‚‹(コードã®ã‚³ãƒ¡ãƒ³ãƒˆä¸­ã®docstringã®ã‚ˆã†" "ã«)。\n" "`# comment`行ã®ä¸­ã®ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€åˆã«@tagã®å€¤ã‚’追加ã™ã‚‹äº‹ã§ã€\n" "YARDã¯ã€ã“ã®ã‚¿ã‚°ã‚’検知,è§£æžã—ã€æœ€æ–°ã®æ–¹æ³•ã§ãれを記録ã™ã‚‹ã ã‚ã†ã€‚" #: ../docs/WhatsNew.md:349 msgid "" "Tags can contain arbitrary data as well as arbitrary tag names, however the\n" "tag names @title and @markup are reserved to specify the document title and\n" "markup format respectively. The title will be used in the file list menu,\n" "index page, as well as any linking of the file via the `{file:Filename}`\n" "syntax. An example of a document with metadata would be:" msgstr "" "ã‚¿ã‚°ã¯ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ã‚‚ä»»æ„ã®ã‚¿ã‚°åã‚‚å«ã‚る事ãŒã§ãã‚‹ã€\n" "ã—ã‹ã—ãªãŒã‚‰ã€ã‚¿ã‚°åã®@titleã¨@markupã¯ã€\n" "ドキュメントã®ã‚¿ã‚¤ãƒˆãƒ«ã¨ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’å€‹åˆ¥ã«æŒ‡å®šã™ã‚‹ç‚ºã«ç”¨æ„ã•れる。\n" "タイトルã¯ãƒ•ァイルリストメニューや\n" "index pageã‚‚`{file:Filename}`構文経由ã®ä»»æ„ã®ãƒ•ァイルã¸ã®ãƒªãƒ³ã‚¯ã§ã‚‚利用ã•れる。\n" "次ã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’用ã„ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¾‹:" #: ../docs/WhatsNew.md:355 msgid "" " # @title The Best Project Ever!\n" " # @markup rdoc\n" " # @author Foo Bar (custom tag, does not display in templates)" msgstr "" " # @title The Best Project Ever!\n" " # @markup rdoc\n" " # @author Foo Bar (custom tag, does not display in templates)" #: ../docs/WhatsNew.md:359 msgid " = This Project Rules" msgstr " = This Project Rules" #: ../docs/WhatsNew.md:361 msgid " == Contents" msgstr " == Contents" #: ../docs/WhatsNew.md:363 msgid " ..." msgstr " ..." #: ../docs/WhatsNew.md:365 msgid "" "Note that previous versions of YARD recommended specifying the markup of an\n" "extra file with the `#!markup` shebang, but the `@markup` metadata tag is " "now\n" "the \"best practice\" for specifying the markup format of an extra file." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "YARDã®å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€\n" "`#!markup`ã®shebangを用ã„ãŸè¿½åŠ ã®ãƒ•ァイルã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®æŒ‡å®šãŒ\n" "推奨ã•れãŸã€‚\n" "ã—ã‹ã—ã€ä»Šã¯`@markup`メタデータタグãŒã€\n" "追加ã®ãƒ•ァイルã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—フォーマットを指定ã™ã‚‹ã®ã«æœ€å–„ã®æ–¹æ³•ã§ã‚る。" #: ../docs/WhatsNew.md:369 msgid "## Added `yard list` command (alias for `yardoc --list`) (0.7.0)" msgstr "" "## `yard list`コマンドを追加ã™ã‚‹ã€‚(`yardoc --list`用ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹) (0.7.0)" #: ../docs/WhatsNew.md:371 msgid "" "The `yardoc --list` command is used to list objects that are parsed from\n" "a codebase. This can be used to grep methods/classes in a codebase from the\n" "command line. `yard list` now calls `yardoc --list` as a convenience command." msgstr "" "`yardoc --list`コマンドã¯ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‹ã‚‰è§£æžã•れるリストオブジェクトã®ç‚ºã«åˆ©" "用ã•れる。\n" "ã“れã¯ã€ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®ä¸­ã§ãƒ¡ã‚½ãƒƒãƒ‰/クラスをgrepã™ã‚‹ç‚ºã«åˆ©ç”¨ã§ãる。\n" "`yard list`ã¯ã€ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦`yardoc --list`を呼ã³å‡ºã™ã‚ˆã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:375 msgid "" "Note that the `yardoc --list` command may eventually be replaced by a more\n" "feature-filled `yard list` command, so `yard list` should be used instead " "of\n" "`yardoc --list` when possible." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚`yardoc --list`コマンドã¯ã€\n" "å°†æ¥ã€ã‚ˆã‚Šå¤šãã®æ©Ÿèƒ½ã§æº€ãŸã•れãŸ`yard list`コマンドã«åˆ‡ã‚Šæ›¿ã‚ã‚‹ã ã‚ã†ã€‚\n" "ãªã®ã§å¯èƒ½ã§ã‚れã°`yardoc --list`ã®ä»£ã‚りã«ã€`yard list`を利用ã™ã‚‹æ–¹ãŒã‚ˆã„。" #: ../docs/WhatsNew.md:379 msgid "## Added Git support in `yard diff` (0.7.0)" msgstr "## `yard diff`ã§Gitã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れ㟠(0.7.0)" #: ../docs/WhatsNew.md:381 msgid "" "The `yard diff` command can now perform object diffing on git repositories.\n" "Provide the `--git` switch to `yard diff` with 2 commit/branches like so:" msgstr "" "`yard diff`コマンドã¯ã€ã™ãã«ã€gitリãƒã‚¸ãƒˆãƒªä¸Šã§ã‚ªãƒ–ジェクトã®diffを実行ã™" "る。\n" "`yard diff`ã«åˆ‡ã‚Šæ›¿ãˆã‚‹`--git`ã‚’æä¾›ã™ã‚‹ã€‚\n" "次ã®ã‚ˆã†ã«ã€2ã¤ã®commitã¨brancheを切り替ãˆã‚‹ã€‚" #: ../docs/WhatsNew.md:384 msgid "" " $ yard diff --git HEAD~5 HEAD\n" " Added objects:" msgstr "" " $ yard diff --git HEAD~5 HEAD\n" " Added objects:" #: ../docs/WhatsNew.md:387 msgid "" " YARD::Parser::SourceParser#contents\n" " YARD::Parser::SourceParser#globals\n" " ..." msgstr "" " YARD::Parser::SourceParser#contents\n" " YARD::Parser::SourceParser#globals\n" " ..." #: ../docs/WhatsNew.md:391 msgid "## Added `{include:file:FILENAME}` syntax (0.7.0)" msgstr "## `{include:file:FILENAME}`æ§‹æ–‡ (0.7.0)" #: ../docs/WhatsNew.md:393 msgid "" "You can now use the `{include:file:FILENAME}` syntax to embed the contents\n" "of an extra file marked up in its markup format. This syntax supports " "embedding\n" "Ruby source files and performing syntax highlighting on the code." msgstr "" "ã‚ãªãŸã¯ã™ãã«ã€\n" "マークアップã•れãŸè¿½åŠ ã®ãƒ•ァイルã®å†…容を埋ã‚込む為ã®\n" "`{include:file:FILENAME}`構文を利用ã§ãる。\n" "ã“ã®æ§‹æ–‡ã¯ã€Rubyã®ã‚½ãƒ¼ã‚¹ãƒ•ァイルã®åŸ‹ã‚è¾¼ã¿ã¨æ§‹æ–‡ã®ã‚³ãƒ¼ãƒ‰ãƒã‚¤ãƒ©ã‚¤ãƒˆã®å®Ÿè¡Œã‚’サ" "ãƒãƒ¼ãƒˆã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:397 msgid "" "## Added `{render:OBJECT}` syntax to embed object docs in extra files (0.7.0)" msgstr "" "## 追加ã®ãƒ•ァイルã§docsオブジェクトを埋ã‚込む為ã«`{render:OBJECT}`構文を追加" "ã—㟠(0.7.0)" #: ../docs/WhatsNew.md:399 msgid "" "You can now use the `{render:Object}` syntax to embed the documentation\n" "rendering of an entire object (method, class, module) inside of an extra " "file.\n" "This is useful when writing non-API based guides that might require listing\n" "a few helper methods or classes. The {file:docs/GettingStarted.md} " "discussed\n" "this syntax in more detail (with example usage)." msgstr "" "ã‚ãªãŸã¯ã€è¿½åŠ ã®ãƒ•ァイルã®ä¸­ã®å…¨ã¦ã®ã‚ªãƒ–ジェクト(メソッド,クラス,モジュール)ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆè¡¨ç¤ºã‚’\n" "埋ã‚込む為ã«`{render:Object}`構文を利用ã§ãる。\n" "ã“れã¯ã„ãã¤ã‹ã®ãƒ˜ãƒ«ãƒ‘ーメソッドや\n" "クラスを記述ã™ã‚‹å¿…è¦ãŒã‚ã‚‹APIベースã§ã¯ãªã„ã‚¬ã‚¤ãƒ‰ã‚’æ›¸ãæ™‚ã«ä¾¿åˆ©ã§ã‚る。\n" "ã“ã®æ§‹æ–‡ã®æ›´ãªã‚‹è©³ç´°(例や使用法)ã¯ã€\n" "{file:docs/GettingStarted.md}ã§èª¬æ˜Žã•れる。" #: ../docs/WhatsNew.md:405 msgid "## Added improved templates API for custom CSS/JS/menus (0.7.0)" msgstr "## CSS/JS/ãƒ¡ãƒ‹ãƒ¥ãƒ¼ç”¨ã«æ”¹è‰¯ã•れãŸãƒ†ãƒ³ãƒ—レートAPIãŒè¿½åŠ ã•れ㟠(0.7.0)" #: ../docs/WhatsNew.md:407 msgid "" "Plugin & template developers can now more easily insert custom stylesheet\n" "or JavaScript files in their customized templates, thanks to an abstraction\n" "of the template API. This is documented in the {docs/Templates.md} " "document.\n" "In addition to custom CSS/JS, developers can also create custom menu tabs\n" "in both the framed and non framed version of the default theme." msgstr "" "プラグインã¨ãƒ†ãƒ³ãƒ—レートã®é–‹ç™ºè€…ã¯ã€\n" "template APIã®æŠ½è±¡åŒ–ã®ãŠã‹ã’ã§ã€\n" "カスタマイズã•れãŸãƒ†ãƒ³ãƒ—レートã§\n" "スタイルシートやJavaScriptã®ãƒ•ァイルを挿入ã§ãるよã†ã«ãªã£ãŸã€‚\n" "ã“れã¯ã€{docs/Templates.md}ドキュメントã®ä¸­ã§è¨˜è¿°ã•れる。\n" "ã•らã«ã€ã‚«ã‚¹ã‚¿ãƒ CSS/JSã§ã€é–‹ç™ºè€…ã¯ã€\n" "フレーム有ã¨ãƒ‡ãƒ•ォルトテーマã®ãƒ•レーム無ã—ã®ä¸¡æ–¹ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚¿ãƒ–ã‚’\n" "作æˆã™ã‚‹äº‹ã‚‚ã§ãる。" #: ../docs/WhatsNew.md:413 msgid "## Added Ruby markup type (`-m ruby`) (0.7.0)" msgstr "## Rubyマークアップ型(`-m ruby`)ãŒè¿½åŠ ã•れ㟠(0.7.0)" #: ../docs/WhatsNew.md:415 msgid "" "The Ruby markup type (`-m ruby`) will now use syntax highlighting for all\n" "formatting. This is probably not useful as a global switch, but can be used\n" "on individual extra files using the metadata markup specification discussed\n" "above." msgstr "" "Rubyマークアップ型ã®(`-m ruby`)ã¯ã€ã™ãã«ã€\n" "å…¨ã¦ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆç”¨ã«æ§‹æ–‡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’利用ã™ã‚‹ã€‚\n" "ã“れã¯å…¨ä½“ã®åˆ‡ã‚Šæ›¿ãˆã¨ã—ã¦ã¯ã€æã‚‰ã便利ã§ã¯ãªã„ãŒã€\n" "上ã§èª¬æ˜Žã•れãŸãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®æŒ‡å®šã«ã‚ˆã£ã¦\n" "個々ã®è¿½åŠ ã®ãƒ•ァイル上ã§åˆ©ç”¨ã§ãる。" #: ../docs/WhatsNew.md:420 msgid "" "## Added state tracking variables to Parser/Handler architecture (0.7.0)" msgstr "" "## Parser/Handlerアーキテクãƒãƒ£ã«ãƒˆãƒ©ãƒƒã‚­ãƒ³ã‚°å¤‰æ•°ã®çŠ¶æ…‹ãŒè¿½åŠ ã•れ㟠(0.7.0)" #: ../docs/WhatsNew.md:422 msgid "" "The parser and handler architecture now contain state variables\n" "{YARD::Handlers::Base#extra_state} and {YARD::Handlers::Processor#globals}\n" "to share data across handlers and the entire processing phase. " "`#extra_state`\n" "provided a place to store per-file data, while `#globals` gives the " "developer\n" "access to inter-file state when parsing multiple files at once." msgstr "" "パーサーã¨ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã¯ã€\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¨å…¨ã¦ã®å‡¦ç†æ®µéšŽã«æ¸¡ã£ã¦å…±æœ‰ã™ã‚‹ç‚ºã«\n" "{YARD::Handlers::Base#extra_state} 㨠{YARD::Handlers::Processor#globals}ã®\n" "変数ã®çŠ¶æ…‹ã‚’å«ã‚€ã‚ˆã†ã«ãªã£ãŸã€‚\n" "`#extra_state`メソッドã¯ã€ãƒ•ァイル毎ã«ãƒ‡ãƒ¼ã‚¿ã‚’記録ã™ã‚‹ç‚ºã®å ´æ‰€ã‚’æä¾›ã—ã€\n" "`#globals`メソッドã¯ã€ä¸€æ°—ã«è¤‡æ•°ã®ãƒ•ァイルを解æžã™ã‚‹æ™‚ã«å†…部ã®ãƒ•ァイルã®çŠ¶æ…‹ã«\n" "開発者ãŒã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹äº‹ã‚’許å¯ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:428 msgid "## Added before/after callbacks to SourceParser (0.7.0)" msgstr "## SourceParserã«beforeã¨afterã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ãŒè¿½åŠ ã•れ㟠(0.7.0)" #: ../docs/WhatsNew.md:430 msgid "" "The {YARD::Parser::SourceParser} class can now register callbacks to " "execute\n" "code before and after parsing of file globs, as well as before and after\n" "parsing of individual files. This allows plugin developers to perform\n" "setup/teardown (and set global state or update the {YARD::Registry})." msgstr "" "{YARD::Parser::SourceParser}クラスã¯ã€\n" "ファイルグロブã®è§£æžã®å‰å¾Œã®ã‚³ãƒ¼ãƒ‰ã‚‚個々ã®ãƒ•ァイルã®è§£æžã®å‰å¾Œã‚‚\n" "実行ã™ã‚‹ç‚ºã«ã™ãã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’記録ã§ãる。\n" "ã“れã¯ã€ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—/開発(全体ã®çŠ¶æ…‹ã‚„{YARD::Registry}ã®æ›´æ–°)を実行ã™ã‚‹ç‚ºã€\n" "開発者ã®ãƒ—ラグインをå—入れる。" #: ../docs/WhatsNew.md:435 msgid "See the documentation for the following methods:" msgstr "次ã®ãƒ¡ã‚½ãƒƒãƒ‰ç”¨ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚ç…§:" #: ../docs/WhatsNew.md:437 msgid "" "* {YARD::Parser::SourceParser.before_parse_list}\n" "* {YARD::Parser::SourceParser.after_parse_list}\n" "* {YARD::Parser::SourceParser.before_parse_file}\n" "* {YARD::Parser::SourceParser.after_parse_file}" msgstr "" "* {YARD::Parser::SourceParser.before_parse_list}\n" "* {YARD::Parser::SourceParser.after_parse_list}\n" "* {YARD::Parser::SourceParser.before_parse_file}\n" "* {YARD::Parser::SourceParser.after_parse_file}" #: ../docs/WhatsNew.md:442 msgid "" "## Can now use `--yardopts FILE` to specify a custom yardopts file (0.7.0)" msgstr "" "## カスタムyardoptsファイルを指定ã™ã‚‹ã®ã«ã€`--yardopts FILE`を利用ã§ãるよã†" "ã«ãªã£ãŸ (0.7.0)" #: ../docs/WhatsNew.md:444 msgid "" "The `yardoc` command now supports `--yardopts FILE` to specify custom ." "yardopts\n" "options files. This is useful if you have multiple documentation sets, such\n" "as a guide documentation set and an API documentation set." msgstr "" "`yardoc`コマンドã¯ã€ã™ãã«\n" "カスタム.yardopts設定ファイルを指定ã™ã‚‹ã®ã«ã€\n" "`--yardopts FILE`をサãƒãƒ¼ãƒˆã™ã‚‹ã€‚\n" "ã“れã¯ã€ã‚¬ã‚¤ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚„APIドキュメントã®ã‚ˆã†ãª\n" "複数ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã€ä¾¿åˆ©ã§ã‚る。" #: ../docs/WhatsNew.md:448 msgid "## Added new `-t guide` template for guide based docs (0.7.0)" msgstr "" "## docstringベースã®ã‚¬ã‚¤ãƒ‰ç”¨ã«`-t guide`ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆãŒæ–°ã—ã追加ã•れ㟠" "(0.7.0)" #: ../docs/WhatsNew.md:450 msgid "" "You can now write guide style documentation using a new 'guide' template " "that\n" "only generates documentation for extra files. You would use it in the form:" msgstr "" "ã‚ãªãŸã¯ã€è¿½åŠ ã®ãƒ•ァイル用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã ã‘生æˆã™ã‚‹\n" "æ–°ã—ã追加ã•れãŸ'guide'テンプレートã«ã‚ˆã£ã¦\n" "ã™ãã«ã‚¬ã‚¤ãƒ‰ã‚¹ã‚¿ã‚¤ãƒ«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’書ã事ãŒã§ãる。\n" "ã‚ãªãŸã¯ã€æ¬¡ã®ã‚ˆã†ãªå½¢å¼ã§åˆ©ç”¨ã§ãる。" #: ../docs/WhatsNew.md:453 msgid " yardoc -t guide - README GettingStarted FAQ TroubleShooting LICENSE" msgstr " yardoc -t guide - README GettingStarted FAQ TroubleShooting LICENSE" #: ../docs/WhatsNew.md:455 msgid "" "This creates the sections for the readme, a getting started, frequently " "asked\n" "questions, trouble shooting and license page." msgstr "" "ã“れã¯ã€README,GettingStarted,FAQ,トラブルシューティング,ライセンスページ用ã®" "セクションを生æˆã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:458 msgid "" "If you need to refer to class / method documentation, you can embed API " "documentation\n" "using the `{render:Object}` tag discussed above." msgstr "" "クラスã¨ãƒ¡ã‚½ãƒƒãƒ‰ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«å‚ç…§ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€\n" "APIドキュメントを上ã§èª¬æ˜Žã•れãŸ`{render:Object}`ã‚¿ã‚°ã«ã‚ˆã£ã¦åŸ‹ã‚込む事ãŒå‡ºæ¥" "る。" #: ../docs/WhatsNew.md:461 msgid "## Github Flavoured Markdown now works out-of-box (0.7.4)" msgstr "" #: ../docs/WhatsNew.md:463 msgid "" "Due to the growing popularity of Github-Flavoured-Markdown (GFM), YARD now " "uses\n" "the Redcarpet library as the default Markdown formatting library with GFM " "fenced\n" "code blocks enabled. This means that you can use fenced code blocks inside " "of\n" "Markdown files with redcarpet installed without any extra code. Previously, " "users\n" "who wanted GFM in their Markdown would have to specify `-m markdown -M " "redcarpet`,\n" "but this is now the default behaviour for YARD." msgstr "" #: ../docs/WhatsNew.md:470 msgid "" "Note that you can still specify language types in code blocks without GFM in " "YARD\n" "by using the \"!!!lang\" prefix syntax. For example (plain means no markup):" msgstr "" #: ../docs/WhatsNew.md:473 msgid "" " !!!plain\n" " !!!plain\n" " Some code\n" " block here." msgstr "" " !!!plain\n" " !!!plain\n" " Some code\n" " block here." #: ../docs/WhatsNew.md:478 msgid "The GFM version would be:" msgstr "" #: ../docs/WhatsNew.md:480 msgid "" " !!!plain\n" " ```plain\n" " Some code\n" " block here.\n" " ```" msgstr "" " !!!plain\n" " ```plain\n" " Some code\n" " block here.\n" " ```" #: ../docs/WhatsNew.md:486 msgid "## Added `-m textile_strict` and `-m pre` markup types (0.7.4)" msgstr "" #: ../docs/WhatsNew.md:488 msgid "" "A new \"textile_strict\" markup type was added which behaves exactly like " "\"textile\"\n" "except it enables hard breaks, so newlines behave as line breaks in the " "HTML\n" "(using `
    ` tags). This option is added for users who want the classic " "textile\n" "behaviour." msgstr "" #: ../docs/WhatsNew.md:493 msgid "## Reorganized markup types 'text' and 'none' (0.7.4)" msgstr "" #: ../docs/WhatsNew.md:495 msgid "" "Due to the new pre markup type, the behaviour for text and none were " "slightly\n" "reorganized to be more intuitive. The following behaviours now represent " "these\n" "markup types:" msgstr "" #: ../docs/WhatsNew.md:499 msgid "" " * pre: Used to wrap text inside `
    ` tags\n"
    " * text: No formatting except for hard breaks (`
    `) on newlines\n" " * none: No formatting at all." msgstr "" #: ../docs/WhatsNew.md:503 msgid "" "In all cases, HTML is escaped from input. If you want no HTML escaping, use " "the\n" "html markup type." msgstr "" #: ../docs/WhatsNew.md:506 msgid "## Add support for `rb_define_alias` (0.7.4)" msgstr "## `rb_define_alias`用ã®ã‚µãƒãƒ¼ãƒˆãŒè¿½åŠ ã•れ㟠(0.7.4)" #: ../docs/WhatsNew.md:508 msgid "" "CRuby code can now make use of the `rb_define_alias` function. " "Documentation\n" "for aliases is not supported, however." msgstr "" #: ../docs/WhatsNew.md:511 msgid "# What's New in 0.6.x?" msgstr "" #: ../docs/WhatsNew.md:513 msgid "" "1. **Local documentation server for RubyGems or projects (`yard server`)** " "(0.6.0)\n" "2. **Groups support for method listing** (0.6.0)\n" "3. **Single file template (`--one-file`) support** (0.6.0)\n" "4. **`yard` CLI executable with pluggable commands** (0.6.0)\n" "5. **`yard diff` command to object-diff two versions of a project** (0.6.0)\n" "6. **Added `--asset` option to `yardoc`** (0.6.0)\n" "7. **New template API** (0.6.0)\n" "8. **HTML template now adds inline Table of Contents for extra files pages** " "(0.6.0)\n" "9. **Removed `--incremental` in favour of `--use-cache`** (0.6.0)\n" "10. **Ad-hoc tag registration via `yardoc` CLI (`--tag`, etc.)** (0.6.0)\n" "11. **Added `--transitive-tags` to register transitive tags** (0.6.0)\n" "12. **`yardoc` now displays RDoc-like statistics (`--no-stats` to hide)** " "(0.6.0)\n" "13. **`yri` now works on constants** (0.6.0)\n" "14. **Plugins are no longer auto-loaded (added `--plugin` switch)** (0.6.2)\n" "15. **Added `YARD::Config` API and `~/.yard/config` configuration file** " "(0.6.2)\n" "16. **Added `yard config` command to view/edit configuration** (0.6.2)\n" "17. **Added `yard server -t` template path switch** (0.6.2)\n" "18. **Added `YARD::Server.register_static_path` for static server assets** " "(0.6.2)\n" "19. **YARD::Registry is now thread local** (0.6.5)\n" "20. **Support for ripper gem in Ruby 1.8.7** (0.6.5)" msgstr "" "1. **RubyGemsやプロジェクト用ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼(`yard server`)** " "(0.6.0)\n" "2. **メソッド記述用ã®ã‚µãƒãƒ¼ãƒˆã‚’グループ化ã™ã‚‹** (0.6.0)\n" "3. **å˜ä¸€ã®ãƒ•ァイルã®ãƒ†ãƒ³ãƒ—レートã®ã‚µãƒãƒ¼ãƒˆ(`--one-file`)** (0.6.0)\n" "4. **`yard` ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ—ラグインコマンドを用ã„実行å¯èƒ½ã¨ãªã‚‹** (0.6.0)\n" "5. **プロジェクトã®äºŒã¤ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚ªãƒ–ジェクトã®diffを見る為ã®`yard diff`" "コマンド** (0.6.0)\n" "6. **`yardoc`ã«`--asset`オプションãŒè¿½åŠ ã•れãŸ** (0.6.0)\n" "7. **æ–°ã—ã„テンプレートAPI** (0.6.0)\n" "8. **HTMLテンプレートã¯è¿½åŠ ã®ãƒ•ァイルã®ãƒšãƒ¼ã‚¸ã®å†…容ã®ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ãƒ†ãƒ¼ãƒ–ルを追加" "ã™ã‚‹** (0.6.0)\n" "9. **`--use-cache`ã®ãŠã‹ã’ã§`--incremental`ã¯å‰Šé™¤ã•れãŸ** (0.6.0)\n" "10. **`yardoc`CLI経由ã§è‡¨æ™‚ã®ã‚¿ã‚°ã®è¨˜éŒ²(`--tag`, etc.)** (0.6.0)\n" "11. **éŽæ¸¡çš„ãªã‚¿ã‚°ã‚’記録ã™ã‚‹ç‚ºã«ã€`--transitive-tags`ãŒè¿½åŠ ã•れãŸ** (0.6.0)\n" "12. **`yardoc`ãŒRDocã®ã‚ˆã†ã«çµ±è¨ˆå€¤ã‚’表示ã™ã‚‹ã‚ˆã†ã«ãªã£ãŸ(éš ã™ã«ã¯ã€`--no-" "stats`)**\n" "13. **`yri`定数ã§åƒãよã†ã«ãªã£ãŸ** (0.6.0)\n" "14. **プラグインã¯ã€è‡ªå‹•ロードã•れãªããªã£ãŸ(`--plugin`引数ãŒè¿½åŠ ã•れãŸ)** " "(0.6.2)\n" "15. **`YARD::Config`APIã¨`~/.yard/config`設定ファイルãŒè¿½åŠ ã•れãŸ** (0.6.2)\n" "16. **設定ã®èª¿æŸ»/編集ã®ç‚ºã®`yard config`コマンドãŒè¿½åŠ ã•れãŸ** (0.6.2)\n" "17. **`yard server -t`テンプレートã®ãƒ‘スã®å¼•æ•°ãŒè¿½åŠ ã•れãŸ** (0.6.2)\n" "18. **é™çš„ãªã‚µãƒ¼ãƒãƒ¼è³‡æºç”¨ã«`YARD::Server.register_static_path`ãŒè¿½åŠ ã•れãŸ" "** (0.6.2)\n" "19. **YARD::RegistryãŒã‚¹ãƒ¬ãƒƒãƒ‰ãƒ­ãƒ¼ã‚«ãƒ«ã«ãªã£ãŸ** (0.6.5)\n" "20. **Ruby 1.8.7ã§gemã®ripper用ã®ã‚µãƒãƒ¼ãƒˆ** (0.6.5)" #: ../docs/WhatsNew.md:534 msgid "" "## Local documentation server for RubyGems or projects (`yard server`) " "(0.6.0)" msgstr "" "## RubyGemsåˆã¯ãƒ—ロジェクト用ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼(`yard server`) " "(0.6.0)" #: ../docs/WhatsNew.md:536 msgid "" "The new `yard server` command spawns a documentation server that can serve\n" "either documentation for a local project or installed RubyGems. The server\n" "will host (by default) on http://localhost:8808." msgstr "" "æ–°ã—ã„`yard server`コマンドã¯\n" "ローカルプロジェクトや既存ã®RubyGems用ã®å…¨ã¦ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’æä¾›ã§ãã‚‹\n" "ドキュメントサーãƒãƒ¼ã‚’生ã¿ã ã™ã€‚\n" "サーãƒãƒ¼ã¯http://localhost:8808ã®ãƒ›ã‚¹ãƒˆ(デフォルトã§)ã«ãªã‚‹ã€‚" #: ../docs/WhatsNew.md:540 msgid "" "To serve documentation for the active project (in the current directory):" msgstr "" "アーカイブã®ãƒ—ロジェクト用ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’æä¾›ã™ã‚‹ã«ã¯ã€(ç¾åœ¨ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®" "中ã®)" #: ../docs/WhatsNew.md:544 msgid "" "The server can also run in \"incremental\" mode for local projects. In this\n" "situation, any modified sources will immediately be updated at each " "request,\n" "ensuring that the server always serve the code exactly as it is on disk.\n" "Documenting your code in this fashion essentially gives you an efficient a\n" "live preview without running a separate command everytime you make a " "change.\n" "To serve documentation for the active project in incremental mode:" msgstr "" "サーãƒãƒ¼ã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ—ロジェクト用㮠\"incremental\" モードã§ã‚‚èµ·å‹•ã§ãる。\n" "ã“ã®å ´åˆã€ä»»æ„ã®å¤‰æ›´ã•れるソースã¯å€‹ã€…ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ã™ãã«æ›´æ–°ã•れã€\n" "サーãƒãƒ¼ãŒå¸¸ã«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ç¢ºå®Ÿã«ã‚³ãƒ¼ãƒ‰ã‚’æä¾›ã™ã‚‹ã“ã¨ã‚’ä¿è¨¼ã™ã‚‹ã€‚\n" "基本的ã«ã“ã®ã‚„り方ã§ã‚ãªãŸã®ã®ã‚³ãƒ¼ãƒ‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯\n" "毎回ã‚ãªãŸãŒå¤‰æ›´ã™ã‚‹ãŸã³ã«\n" "区切られãŸã‚³ãƒžãƒ³ãƒ‰ç„¡ã—ã§åŠ¹çŽ‡çš„ã«å‹•ã„ãŸã¾ã¾ãƒ—レビューã§ãる。\n" "インクリメンタルモードã§\n" "アクティブãªãƒ—ロジェクトã®ãŸã‚ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’æä¾›ã™ã‚‹ã«ã¯:" #: ../docs/WhatsNew.md:551 msgid " $ yard server --reload" msgstr " $ yard server --reload" #: ../docs/WhatsNew.md:553 msgid "" "Note that in incremental mode, objects or method " "groupings\n" " cannot be removed. If you have removed objects or modified groupings, you\n" " will need to flush the cache by deleting `.yardoc` and (optionally)\n" " restarting the server." msgstr "" "Note that in incremental mode, objects or method groupings\n" " cannot be removed. If you have removed objects or modified groupings, you\n" " will need to flush the cache by deleting `.yardoc` and (optionally)\n" " restarting the server." #: ../docs/WhatsNew.md:558 msgid "" "The documentation server can also serve documentation for all installed " "gems\n" "on your system, similar to `gem server`, but using YARD's functionality and\n" "templates. To serve documentation for installed gems:" msgstr "" "ドキュメントサーãƒãƒ¼ã¯ã‚ãªãŸã®ã‚·ã‚¹ãƒ†ãƒ ã§\n" "`gem server`ã¨åŒæ§˜ã«YARDã®æ©Ÿèƒ½ã¨ãƒ†ãƒ³ãƒ—レートを使ã†äº‹ã«ã‚ˆã£ã¦\n" "既存ã®å…¨ã¦ã®gem用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚‚æä¾›ã§ãã‚‹\n" "既存ã®gem用ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’æä¾›ã™ã‚‹ã«ã¯:" #: ../docs/WhatsNew.md:564 msgid "" "Documentation for the gem need not be previously " "generated\n" " at install-time. If documentation for the gem has not been generated, " "YARD\n" " will do this for you on-the-fly. It is therefore possible to speed up " "your\n" " gem installs by using `gem install GEMNAME --no-rdoc` without " "repercussion.\n" " You can also add this switch to your `~/.gemrc` file so that you don't " "need\n" " to re-type it each time. See [this link](http://stackoverflow.com/" "questions/1789376/how-do-i-make-no-ri-no-rdoc-the-default-for-gem-install)\n" " for exact instructions." msgstr "" "Documentation for the gem need not be previously generated\n" " at install-time. If documentation for the gem has not been generated, YARD\n" " will do this for you on-the-fly. It is therefore possible to speed up your\n" " gem installs by using `gem install GEMNAME --no-rdoc` without repercussion.\n" " You can also add this switch to your `~/.gemrc` file so that you don't need\n" " to re-type it each time. See [this link](http://stackoverflow.com/questions/1789376/how-do-i-make-no-ri-no-rdoc-the-default-for-gem-install)\n" " for exact instructions." #: ../docs/WhatsNew.md:572 msgid "## Groups support for method listing (0.6.0)" msgstr "## メソッドã®è¨˜è¿°ç”¨ã®ã‚µãƒãƒ¼ãƒˆã‚’グループ化ã™ã‚‹ (0.6.0)" #: ../docs/WhatsNew.md:574 msgid "" "You can now organize methods in a class/module into logical separated " "groups.\n" "These groups apply lexically and are listed in the order they are defined.\n" "For instance, to define a group:" msgstr "" "ã‚ãªãŸã¯è«–ç†çš„ã«åˆ†ã‘られãŸã‚°ãƒ«ãƒ¼ãƒ—ã¸\n" "class/moduleã®ä¸­ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ã¾ã¨ã‚られるよã†ã«ãªã£ãŸã€‚\n" "ã“れらã®ã‚°ãƒ«ãƒ¼ãƒ—ã¯å˜èªžçš„ã«é©ç”¨ã•れã€\n" "ã“れらã®å‘½ä»¤ãŒå®šç¾©ã•れる中ã§è¨˜è¿°ã•れる。\n" "例ãˆã°ã‚°ãƒ«ãƒ¼ãƒ—を定義ã™ã‚‹ã«ã¯:" #: ../docs/WhatsNew.md:578 msgid " # @group Rendering an Object" msgstr " # @group Rendering an Object" #: ../docs/WhatsNew.md:580 msgid "" " # Documentation here\n" " def foo; end" msgstr "" " # Documentation here\n" " def foo; end" #: ../docs/WhatsNew.md:583 msgid "" " # Extra documentation...\n" " def bar; end" msgstr "" " # Extra documentation...\n" " def bar; end" #: ../docs/WhatsNew.md:586 msgid " # @group Another Group" msgstr " # @group Another Group" #: ../docs/WhatsNew.md:588 msgid " def aaa; end" msgstr " def aaa; end" #: ../docs/WhatsNew.md:590 msgid "" "Note that these `@group` and `@endgroup` declarations " "are\n" " not \"tags\" and should always be separated with at least 1 line of " "whitespace\n" " from any other documentation or code." msgstr "" "Note that these `@group` and `@endgroup` declarations are\n" " not \"tags\" and should always be separated with at least 1 line of whitespace\n" " from any other documentation or code." #: ../docs/WhatsNew.md:594 msgid "" "In the above example, \"Rendering an Object\" will be listed with \"foo\" " "and\n" "\"bar\" above \"Another Group\", even though \"aaa\" comes before the two " "other\n" "methods, alphabetically. To end a group, use `@endgroup`. It is not " "necessary\n" "to end a group to start a new one, only if there is an object following the\n" "group that should not belong in any group." msgstr "" "上ã®ä¾‹ã§ \"表示ã•れるオブジェクトã¯\"\n" "\"Another Group\" ã®ä¸Šã® \"foo\" 㨠\"bar\"ã®\n" "二ã¤ã®ä»–ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‰ã«ã‚ã‚‹ã‘れã©ã‚‚\n" "実際ã«ã¯ã‚¢ãƒ«ãƒ•ァベット順ã§\"aaa\"ãŒæ¥ã¦è¨˜è¿°ã•れる。\n" "グループを終りã«ã¯`@endgroup`を使ã†ã€‚\n" "ã“ã‚Œã¯æ–°ã—ãグループを作るã®ã«ã‚°ãƒ«ãƒ¼ãƒ—を終了ã™ã‚‹å¿…è¦ã¯ãªã„。\n" "ä»»æ„ã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã«æ‰€å±žã™ã¹ãã§ã¯ãªã„グループã«ç¶šãオブジェクトãŒã‚ã‚‹å ´åˆã ã‘ã§ã‚る。" #: ../docs/WhatsNew.md:600 msgid " # @group Group 1" msgstr " # @group Group 1" #: ../docs/WhatsNew.md:602 msgid " def foo; end" msgstr " def foo; end" #: ../docs/WhatsNew.md:604 msgid " # @endgroup" msgstr " # @endgroup" #: ../docs/WhatsNew.md:606 msgid "" " # This method should not be listed in any group\n" " def bar; end" msgstr "" " # This method should not be listed in any group\n" " def bar; end" #: ../docs/WhatsNew.md:609 msgid "## Single file template (`--one-file`) support (0.6.0)" msgstr "## å˜ä¸€ã®ãƒ•ァイルã®ãƒ†ãƒ³ãƒ—レート (`--one-file`)ã®ã‚µãƒãƒ¼ãƒˆ (0.6.0)" #: ../docs/WhatsNew.md:611 msgid "" "`yardoc` now has the `--one-file` option to generate a single-file template\n" "for small scripts and libraries. In this case, any comments at the top of\n" "the script file will be recognized as a README." msgstr "" "`yardoc`ã¯ã€å°ã•ã„スクリプトやライブラリ用ã®\n" "å˜ä¸€ã®ãƒ•ァイルã®ãƒ†ãƒ³ãƒ—レートを生æˆã™ã‚‹`--one-file`オプションãŒè¿½åŠ ã•れãŸã€‚\n" "ã“ã®å ´åˆã€ä»»æ„ã®å†…容ã®\n" "スクリプトファイルã®ãƒˆãƒƒãƒ—ã§ã®ä»»æ„ã®ã‚³ãƒ¡ãƒ³ãƒˆã¯ã€READMEã¨ã—ã¦èªè­˜ã•れる。" #: ../docs/WhatsNew.md:615 msgid "## `yard` CLI executable with pluggable commands (0.6.0)" msgstr "## `yard` CLI ãŒãƒ—ラグインå¯èƒ½ãªã‚³ãƒžãƒ³ãƒ‰ã¨ã—ã¦å®Ÿè¡Œå¯èƒ½ã«ãªã‚‹ (0.6.0)" #: ../docs/WhatsNew.md:617 msgid "" "The `yardoc` and `yri` commands are not deprecated and " "can\n" " continue to be used. They are shortcuts for `yard doc` and `yard ri`\n" " respectively. However, `yard-graph` has been removed." msgstr "" "The `yardoc` and `yri` commands are not deprecated and can\n" " continue to be used. They are shortcuts for `yard doc` and `yard ri`\n" " respectively. However, `yard-graph` has been removed." #: ../docs/WhatsNew.md:621 msgid "" "YARD now has a `yard` executable which combines all pre-existing and new\n" "commands into a single pluggable command that is both easier to remember " "and\n" "access. To get a list of commands, type `yard --help`." msgstr "" "YARDã¯æ—¢å­˜ã®ã‚‚ã®ã¨æ–°ãŸãªã‚³ãƒžãƒ³ãƒ‰ã‚’一体化ã—ã€\n" "æ€ã„出ã—ã¨ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã‚’ç°¡å˜ã«ä¸¡ç«‹ã™ã‚‹å˜ä¸€ã®ä»˜ã‘外ã—自由ãª\n" "`yard`コマンドをæŒã¤ã‚ˆã†ã«ãªã£ãŸã€‚\n" "コマンドã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ã«ã¯`yard --help`ã¨ã‚¿ã‚¤ãƒ—ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:625 msgid "" "If you are a plugin developer, you can create your own `yard` command by " "first\n" "subclassing the {YARD::CLI::Command} class and then registering this class\n" "with the {YARD::CLI::CommandParser.commands} list. For instance:" msgstr "" "ã‚ãªãŸãŒãƒ—ラグイン開発者ãªã‚‰ã€\n" "先㫠{YARD::CLI::Command} クラスをサブクラス化ã™ã‚‹äº‹ã«ã‚ˆã£ã¦`yard`コマンドを\n" "ã‚ãªãŸè‡ªèº«ã®æ‰‹ã«ã‚ˆã£ã¦ä½œæˆã§ãる。\n" "ãã®æ™‚ {YARD::CLI::CommandParser.commands} ã®ãƒªã‚¹ãƒˆã‚’用ã„ã“ã®ã‚¯ãƒ©ã‚¹ã‚’登録ã™ã‚‹ã€‚\n" "例ãˆã°:" #: ../docs/WhatsNew.md:629 msgid " YARD::CLI::CommandParser.commands[:my_command] = MyCommandClass" msgstr " YARD::CLI::CommandParser.commands[:my_command] = MyCommandClass" #: ../docs/WhatsNew.md:631 msgid "" "The above line will enable the user to execute `yard my_command [options]`." msgstr "" "上ã®è¡Œã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ`yard my_command [options]`を実行ã™ã‚‹äº‹ãŒå¯èƒ½ã¨ãªã‚‹ã€‚" #: ../docs/WhatsNew.md:633 msgid "## `yard diff` command to object-diff two versions of a project (0.6.0)" msgstr "" "## プロジェクトã®äºŒã¤ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’オブジェクトã®diffã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã€`yard " "diff` (0.6.0)" #: ../docs/WhatsNew.md:635 msgid "" "One of the built-in commands that comes with the new `yard` executable is " "the\n" "ability to do object-oriented diffing across multiple versions of the same\n" "project, either by 2 versions of a gem, or 2 working copies. Just like\n" "regular diffing tells you which lines have been added/removed in a file,\n" "object diffing allows you to see what classes/methods/modules have been\n" "added/removed between versions of a codebase." msgstr "" "æ–°ã—ã実行å¯èƒ½ãª`yard`ã¯ã€\n" "gemã®äºŒã¤ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚„ã€2ã¤ã®ä½œæ¥­ä¸­ã®ã‚³ãƒ”ーã®ã‚ˆã†ãªã€\n" "åŒã˜ãƒ—ロジェクトã®è¤‡æ•°ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«æ¸¡ã£ã¦ã‚ªãƒ–ジェクトæ€è€ƒã®diffã‚’ã™ã‚‹æ©Ÿèƒ½ã§ã€\n" "組ã¿è¾¼ã¿ã‚³ãƒžãƒ³ãƒ‰ã®ä¸€ã¤ã§ã‚る。\n" "普通ã®diffã®ã‚ˆã†ã«ã€\n" "ファイルã§è¿½åŠ /削除ã•れãŸè¡ŒãŒè¡¨ç¤ºã•れる。\n" "diffã®ã‚ªãƒ–ジェクトã¯ã€\n" "コードã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§è¿½åŠ /削除ã•れãŸã‚¯ãƒ©ã‚¹/メソッド/モジュールã®å‚ç…§ã‚’å—ã‘入れる。" #: ../docs/WhatsNew.md:642 msgid "" "For an overview of how to use `yard diff`, see [YARD Object Oriented Diffing]" "(http://gnuu.org/2010/06/26/yard-object-oriented-diffing/)." msgstr "For an overview of how to use `yard diff`, see [YARD Object Oriented Diffing](http://gnuu.org/2010/06/26/yard-object-oriented-diffing/)." #: ../docs/WhatsNew.md:644 msgid "## `yard stats` to display statistics and undocumented objects (0.6.0)" msgstr "" "## 統計値を表示ã™ã‚‹`yard stats`ã¨ãれを表示ã—ãªã„オブジェクトãŒè¿½åŠ ã•れ㟠" "(0.6.0)" #: ../docs/WhatsNew.md:646 msgid "YARD now outputs the following statistics when `yard stats` is run:" msgstr "YARDã¯ã€`yard stats`ãŒèµ·å‹•ã™ã‚‹æ™‚ã«ç¶šã統計値を出力ã™ã‚‹ã€‚(次ã®ã‚ˆã†ã«)" #: ../docs/WhatsNew.md:648 msgid "" " Files: 125\n" " Modules: 35 ( 4 undocumented)\n" " Classes: 139 ( 29 undocumented)\n" " Constants: 53 ( 20 undocumented)\n" " Methods: 602 ( 70 undocumented)\n" " 85.16% documented" msgstr "" " Files: 125\n" " Modules: 35 ( 4 undocumented)\n" " Classes: 139 ( 29 undocumented)\n" " Constants: 53 ( 20 undocumented)\n" " Methods: 602 ( 70 undocumented)\n" " 85.16% documented" #: ../docs/WhatsNew.md:655 msgid "" "Note that these statistics are based on what you have set to show in your\n" "documentation. If you use `@private` tags and/or do not display\n" "private/protected methods in your documentation, these will not show up as\n" "undocumented. Therefore this metric is contextual." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã“れらã®çµ±è¨ˆã¯ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸­ã‚’調ã¹ã‚‰ã‚ŒãŸè¨­å®šãŒåŸºæº–ã¨ãªã‚‹ã€‚\n" "`@private`タグを使ã†å ´åˆã‚„ã‚ãªãŸã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãªã‹ã§private/protectedメソッドを\n" "表示ã—ãªã„å ´åˆã¯ã€undocumentã¨ã—ã¦ã“れらã¯è¡¨ç¤ºã—ãªã„。\n" "従ã£ã¦ã“ã®è¨ˆæ¸¬ã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆæ¬¡ç¬¬ã§ã‚る。" #: ../docs/WhatsNew.md:660 msgid "" "You can also specifically list all undocumented objects (and their file\n" "locations) with the `--list-undoc` option." msgstr "" "ã‚ãªãŸã¯`--list-undoc`オプションを用ã„\n" "å…¨ã¦ã®æœªè¨˜è¼‰ã®ã‚ªãƒ–ジェクト(ã¨ãã®ãƒ•ァイルã®å ´æ‰€)を明示的ã«è¨˜è¿°ã§ãる。" #: ../docs/WhatsNew.md:663 msgid "## Added `--asset` option to `yardoc` (0.6.0)" msgstr "## `yardoc`ã«`--asset`オプションãŒè¿½åŠ ã•れãŸ(0.6.0)" #: ../docs/WhatsNew.md:665 msgid "" "The `yardoc` command can now take the `--asset` option to copy over\n" "files/directories (recursively) to the output path after generating\n" "documentation. The format of the argument is \"from:to\" where from is the\n" "source path and to is the destination. For instance, YARD uses the " "following\n" "syntax in the `.yardopts` file to copy over image assets from the\n" "'docs/images' directory into the 'images' directory after generating HTML:" msgstr "" "`yardoc`コマンドã¯ã€\n" "ドキュメント生æˆã®å¾Œã§å‡ºåŠ›ã™ã‚‹ãƒ‘スã«\n" "files/directories(å†å¸°çš„ã«)全域をコピーã™ã‚‹ãŸã‚ã®\n" "`--asset`オプションãŒè¿½åŠ ã•れãŸã€‚\n" "引数ã®ãƒ•ォーマットã¯\n" "fromãŒã‚½ãƒ¼ã‚¹ãƒ‘スã§toãŒç›®çš„ã«ãªã‚‹å ´æ‰€ã€\n" "å½¢å¼ã¯\"from:to\"ã¨ãªã‚‹ã€‚\n" "例ãˆã°ã€HTML生æˆã®å¾Œã§ã€\n" "'images'ディレクトリã®ä¸­ã¸\n" "'docs/images'ディレクトリã‹ã‚‰ã‚¤ãƒ¡ãƒ¼ã‚¸ã®è³‡ç”£å…¨éƒ¨ã‚’コピーã™ã‚‹ãŸã‚ã«\n" "`.yardopts`ファイルã®ä¸­ã«æ¬¡ã®æ§‹æ–‡ã‚’使ã†:" #: ../docs/WhatsNew.md:672 msgid " --asset docs/images:images" msgstr " --asset docs/images:images" #: ../docs/WhatsNew.md:674 msgid "## New template API (0.6.0)" msgstr "## æ–°ã—ããªã£ãŸãƒ†ãƒ³ãƒ—レートAPI (0.6.0)" #: ../docs/WhatsNew.md:676 msgid "" "The new template API allows for easier insertion of sections within an\n" "inherited template. You should no longer need to insert by index, an\n" "error-prone process that could break when a template is updated. Instead of:" msgstr "" "æ–°ãŸãªãƒ†ãƒ³ãƒ—レートAPIã¯\n" "継承ã•れãŸãƒ†ãƒ³ãƒ—レートã®ä¸­ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ç°¡å˜ãªæŒ¿å…¥ç”¨ã«è¨±å¯ã™ã‚‹ã€‚\n" "ã‚ãªãŸã¯ã‚‚ã¯ã‚„indexã§æŒ¿å…¥ã™ã‚‹å¿…è¦ã¯ãªã„ã€\n" "エラー傾å‘ã¯\n" "ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆãŒæ›´æ–°ã•れる時ã«ä¸­æ–­ã•れ処ç†ã™ã‚‹ã€‚\n" "代ã‚りã«:" #: ../docs/WhatsNew.md:680 msgid " sections.last.place(:my_section).before(:another_section)" msgstr " sections.last.place(:my_section).before(:another_section)" #: ../docs/WhatsNew.md:682 msgid "use:" msgstr "use:" #: ../docs/WhatsNew.md:684 msgid " sections.place(:my_section).before_any(:another_section)" msgstr " sections.place(:my_section).before_any(:another_section)" #: ../docs/WhatsNew.md:686 msgid "" "You can see more in the {file:docs/Templates." "md#Inserting_and_Traversing_Sections}\n" "document." msgstr "" "ã‚ãªãŸã¯{file:docs/Templates.md#Inserting_and_Traversing_Sections}ドキュメン" "トã§ã€\n" "æ›´ã«è©³ç´°ã‚’見る事ãŒå‡ºæ¥ã‚‹ã€‚" #: ../docs/WhatsNew.md:689 msgid "" "## HTML template now adds inline Table of Contents for extra files pages " "(0.6.0)" msgstr "" "## HTML テンプレートã¯è¿½åŠ ã®ãƒ•ァイルã®ãƒšãƒ¼ã‚¸ç”¨ã«ã€\n" "ãã®å†…容ã®ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ãƒ†ãƒ¼ãƒ–ルãŒè¿½åŠ ã•れãŸ(0.6.0)" #: ../docs/WhatsNew.md:691 msgid "" "A table of contents is now generated dynamically using JavaScript for extra\n" "file pages (such as README's, or this document). It is generated based off " "the\n" "headers (h1,h2,... tags) used in the document, and can be floated to the\n" "right or listed inline on the page." msgstr "" "コンテンツã®ãƒ†ãƒ¼ãƒ–ルã¯è¿½åŠ ã®ãƒ•ァイルã®ãƒšãƒ¼ã‚¸ç”¨ã«ã€\n" "JavaScriptã«ã‚ˆã£ã¦å‹•çš„ã«ç”Ÿæˆã•れるよã†ã«ãªã£ãŸ(READMEã‚„ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚ˆã†ã«)。\n" "ã“れã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§åˆ©ç”¨ã•れãŸãƒ˜ãƒƒãƒ€ãƒ¼(h1,h2,... tags)ãŒã®ãžã‹ã‚ŒãŸ\n" "ベースを生æˆã—å³å´ã«æ·»ãˆã‚‰ã‚Œã‚‹ã‹ã€åˆã¯ã€ãƒšãƒ¼ã‚¸ä¸Šã§ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ãŒè¨˜è¿°ã•れる。" #: ../docs/WhatsNew.md:696 msgid "## Ad-hoc tag registration via `yardoc` CLI (`--tag`, etc.) (0.6.0)" msgstr "## `yardoc`CLI(`--tag`, etc.)経由ã§ã®è‡¨æ™‚ã®ã‚¿ã‚°ã®è¨˜éŒ² (0.6.0)" #: ../docs/WhatsNew.md:698 msgid "" "Simple meta-data tags can now be added at the command-line and registered " "to\n" "display in templates in a number of pre-defined ways. For instance, to " "create\n" "a freeform text tag, use the following:" msgstr "" "å˜ç´”ãªãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã¯\n" "コマンドラインã§è¿½åŠ ã•れã€äº‹å‰ã«å®šç¾©ã•れãŸã„ãã¤ã‹æ–¹æ³•ã§\n" "テンプレートã®ä¸­ã§è¡¨ç¤ºã•れるãŸã‚ã«ç™»éŒ²ã•れるよã†ã«ãªã£ãŸã€‚\n" "例ãˆã°ãƒ•リーフォームテキストã®ã‚¿ã‚°ã‚’作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«ãªã‚‹:" #: ../docs/WhatsNew.md:702 msgid " --tag my_tag_name:\"My Tag Title\"" msgstr " --tag my_tag_name:\"My Tag Title\"" #: ../docs/WhatsNew.md:704 msgid "" "You can also create a \"typed\" tag (similar to `@return`), a typed named " "tag\n" "(similar to `@param`) as well as various combinations. The full list of\n" "options are listed in `yardoc --help` under the \"Tag Options\" section." msgstr "" "ã‚ãªãŸã¯\"åž‹\"ã®ã‚¿ã‚°(`@return`ã¨åŒæ§˜ã«)ã‚‚\n" "åž‹ã®ã‚¿ã‚°å(`@param`ã¨åŒæ§˜ã«)も様々ãªçµ„ã¿åˆã‚ã›ã‚‚を作æˆã™ã‚‹äº‹ã‚‚ã§ãる。\n" "オプションã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯\n" "`yardoc --help`ã® \"Tag Options\" ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚ˆã‚Šã§è¨˜è¿°ã•れる。" #: ../docs/WhatsNew.md:708 msgid "" "If you wish to create a tag to store data but do not wish to show this data\n" "in the templates, use the `--hide-tag` option to hide it from generated " "output:" msgstr "" "ã‚ãªãŸãŒãƒ‡ãƒ¼ã‚¿ã‚’登録ã™ã‚‹ãŸã‚ã«ã‚¿ã‚°ã‚’作æˆã™ã‚‹ã“ã¨ã‚’望むãŒã€\n" "テンプレートã®ä¸­ã®ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚’一覧ã—ãŸããªã„å ´åˆã€\n" "生æˆã•れãŸå‡ºåŠ›ã‹ã‚‰ãれを隠ã™ã«ã¯`--hide-tag`オプションを使ã†ã€‚\n" "\n" #: ../docs/WhatsNew.md:711 msgid " --hide-tag my_tag_name" msgstr " --hide-tag my_tag_name" #: ../docs/WhatsNew.md:713 msgid "## Added `--transitive-tags` to register transitive tags (0.6.0)" msgstr "## éŽæ¸¡çš„ãªã‚¿ã‚°ã‚’記録ã™ã‚‹ã®ã«ã€`--transitive-tags`を追加ã•れ㟠(0.6.0)" #: ../docs/WhatsNew.md:715 msgid "" "Transitive tags are tags that apply to all descendants of a namespace " "(class\n" "or module) when documented on that namespace. For instance, the `@since` " "tag\n" "is a transitive tag. Applying `@since` to a class will automatically apply\n" "`@since` to all methods in the class. Creating a `@since` tag directly on a\n" "method will override the inherited value." msgstr "" "transitiveã‚¿ã‚°ã¯ã€namespace上(クラスåˆã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«)ã§è¨˜è¿°ã•ã‚ŒãŸæ™‚ã€\n" "å…¨ã¦ã®namespaceã®å­å­«ã«é©ç”¨ã™ã‚‹ã‚¿ã‚°ã§ã‚る。\n" "例ãˆã°ã€`@since`ã‚¿ã‚°ã¯Transitiveã‚¿ã‚°ã§ã‚る。\n" "クラスã«`@since`ã‚¿ã‚°ã‚’é©ç”¨ã™ã‚‹ã¨ã€\n" "クラスã®ä¸­ã®å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«è‡ªå‹•çš„ã«`@since`ãŒé©ç”¨ã•れる\n" "メソッドã§ç›´æŽ¥`@since`タグを作æˆã™ã‚‹ã¨ç¶™æ‰¿ã•れãŸå€¤ã‚’オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:721 msgid "" "You can specify transitive tags on the command-line by using this option. " "Note\n" "that the tags must already exist (built-in or created with the `--tag` " "option)\n" "to be specified as transitive. If you wish to do this programmatically, see\n" "the {YARD::Tags::Library.transitive_tags} attribute." msgstr "" "ã“ã®ã‚ªãƒ—ションã«ã‚ˆã£ã¦\n" "コマンドラインã®ã‚¿ã‚°ã‚’éŽæ¸¡çš„ã«æŒ‡å®šã§ãã‚‹\n" "transitiveã¨ã—ã¦æŒ‡å®šã•れる\n" "ã‚¿ã‚°ã¯æ—¢ã«å­˜åœ¨ã—ãªã‘れã°ãªã‚‰ãªã„。\n" "(組ã¿è¾¼ã¿ã‚„`--tag`オプションã«ã‚ˆã£ã¦ä½œæˆã•れãŸ)\n" "ã‚ãªãŸãŒã“ã®ãƒ—ログラムを実行ã—ãŸã„ãªã‚‰ã€ {YARD::Tags::Library.transitive_tags} 属性をå‚ç…§ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:726 msgid "" "## `yardoc` now displays RDoc-like statistics (`--no-stats` to hide) (0.6.0)" msgstr "" "## `yardoc`ã¯ã€RDocã®ã‚ˆã†ãªçµ±è¨ˆå€¤ã®è¡¨ç¤ºã™ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚(`--no-stats`ã§éš " "ã™) (0.6.0)" #: ../docs/WhatsNew.md:728 msgid "" "As seen in the `yard stats` feature overview, `yardoc` displays RDoc-like\n" "statistics when it is run. The output is equivalent to typing `yard stats`.\n" "To hide this output when yardoc is run, use `--no-stats`." msgstr "" "上記ã®ã‚ˆã†ã«`yard stats`æ©Ÿèƒ½ã®æ¦‚è¦ã¯\n" "`yardoc`ãŒèµ·å‹•ã™ã‚‹æ™‚ã«RDocã®ã‚ˆã†ã«çµ±è¨ˆã‚’表示ã™ã‚‹\n" "出力ã¯`yard stats`をタイプã™ã‚‹ã®ã¨åŒæ§˜ã§ã‚る。\n" "yardocãŒèµ·å‹•ã™ã‚‹æ™‚ã«ã“ã®å‡ºåŠ›ã‚’éš ã™ã«ã¯ã€\n" "`--no-stats`を使ã†" #: ../docs/WhatsNew.md:732 msgid "## `yri` now works on constants (0.6.0)" msgstr "## `yri`定数ã®å‡¦ç†ã‚’ã§ãるよã†ã«ãªã£ãŸ (0.6.0)" #: ../docs/WhatsNew.md:734 msgid "" "Templates have now been added for text view of constants, which displays " "any\n" "documentation and the constant value." msgstr "" "テンプレートã¯å®šæ•°ã®ä¸€è¦§ã‚’作æˆã™ã‚‹ãŸã‚追加ã•れるよã†ã«ãªã£ãŸã€‚\n" "ã“れã¯ä»»æ„ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¨å®šæ•°ã‚’表示ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:737 msgid "## Plugins are no longer auto-loaded (added `--plugin` switch) (0.6.2)" msgstr "" "## プラグインã¯è‡ªå‹•ã§ãƒ­ãƒ¼ãƒ‰ã•れãªããªã£ãŸã€‚(`--plugin`引数ã§è¿½åŠ ã§ãã‚‹) " "(0.6.2)" #: ../docs/WhatsNew.md:739 msgid "" "This is a backwards-incompatible change that disables plugins from " "automatically\n" "loading when YARD starts up. From now on, you should manually declare which\n" "plugins your project is using by adding `--plugin PLUGINNAME` to a `." "yardopts`\n" "file in the root of your project. You can also re-enable autoloaded plugins\n" "by setting `load_plugins` to true in your configuration file (`yard config " "load_plugins true`,\n" "see next item). You can also set `autoload_plugins` to a list of plugins\n" "to be automatically loaded on start." msgstr "" "ã“れã¯YARDã®ã‚¹ã‚¿ãƒ¼ãƒˆã‚¢ãƒƒãƒ—ã™ã‚‹æ™‚ã®è‡ªå‹•çš„ãªãƒ­ãƒ¼ãƒ‰ã‹ã‚‰\n" "プラグインを無効化ã™ã‚‹éžå¾Œæ–¹äº’æ›ãªå¤‰æ›´ã§ã‚る。\n" "今後ã¯ã‚ãªãŸã¯æ‰‹å‹•ã§å®£è¨€ã—ãªã‘れã°ãªã‚‰ãªã„ã€\n" "ãれã¯ã‚ãªãŸã®ãƒ—ロジェクトã®ãƒ—ラグインãŒ\n" "ã‚ãªãŸã®ãƒ—ロジェクトã®rootã§`.yardopts`ファイルã«\n" "`--plugin PLUGINNAME`を追加ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦åˆ©ç”¨ã•れる。\n" "ã‚ãªãŸã®è¨­å®šãƒ•ァイルã®ä¸­ã§`load_plugins`ã‚’trueã«è¨­å®šã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n" "自動ã§ãƒ­ãƒ¼ãƒ‰ã•れるプラグインをå†åº¦æœ‰åйã«ã§ãる。\n" "(`yard config load_plugins true`, 事項å‚ç…§)\n" "ã‚ãªãŸã¯ã€èµ·å‹•時ã«è‡ªå‹•çš„ã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ç‚ºã«ãƒ—ラグインã®ãƒªã‚¹ãƒˆã«\n" "`autoload_plugins`ã«è¨­å®šã™ã‚‹äº‹ã‚‚出æ¥ã‚‹ã€‚" #: ../docs/WhatsNew.md:747 msgid "" "If you are a YARD plugin author, please make sure to inform your users of " "these\n" "changes." msgstr "" "ã‚ãªãŸãŒYARDプラグインã®ä½œè€…ã®å ´åˆã€\n" "ã“れらã®å¤‰æ›´ã‚’ã‚ãªãŸã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é€šçŸ¥ã™ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。" #: ../docs/WhatsNew.md:750 msgid "" "Note that `--plugin` switches passed on the commandline (not via `." "yardopts`)\n" "are parsed before commands are loaded, and therefore can add in new CLI " "commands." msgstr "" "次ã®ã“ã¨ã«ç•™æ„ã™ã‚‹ã€‚\n" "コマンドライン(`.yardopts`経由ã§ã¯ãªã„)ã§æ¸¡ã•れãŸ--pulugin引数ã¯ã‚³ãƒžãƒ³ãƒ‰ãŒãƒ­ãƒ¼ãƒ‰ã•れるå‰ã«è§£æžã•れã€\n" "ãã®çµæžœã€æ–°ã—ã„CLIコマンドã®ä¸­ã§è¿½åŠ ã§ãる。" #: ../docs/WhatsNew.md:753 msgid "" "## Added `YARD::Config` API and `~/.yard/config` configuration file (0.6.2)" msgstr "" "## `YARD::Config` APIã¨`~/.yard/config`設定ファイルãŒè¿½åŠ ã•れãŸã€‚ (0.6.2)" #: ../docs/WhatsNew.md:755 msgid "" "There is a new global configuration API that can be accessed " "programmatically\n" "and set via the `~/.yard/config` file. The file is encoded as a YAML file,\n" "and looks like:" msgstr "" "ã“れらã¯ã€ãƒ—ログラムã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹æ–°ã—ã„グローãƒãƒ«è¨­å®šAPIã¨ãªã‚Šã€\n" "`~/.yard/config`ファイル経由ã§è¨­å®šã•れる。\n" "ファイルã¯YAMLファイルã¨ã—ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•ã‚Œã‚‹ã€æ¬¡ã®ã‚ˆã†ã«ãªã‚‹" #: ../docs/WhatsNew.md:767 msgid "" "You can also set configuration options via the command-line (see next item)." msgstr "ã‚ãªãŸã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³çµŒç”±ã§è¨­å®šã‚ªãƒ—ションを設定ã§ãる。(次項å‚ç…§)" #: ../docs/WhatsNew.md:769 msgid "## Added `yard config` command to view/edit configuration (0.6.2)" msgstr "## 設定を一覧/編集ã™ã‚‹ç‚ºã«`yard config` コマンドãŒè¿½åŠ ã•れ㟠(0.6.2)" #: ../docs/WhatsNew.md:771 msgid "" "A new `yard config` command was created to view or edit the configuration\n" "file via the commandline." msgstr "" "æ–°ã—ã„`yard config`コマンドãŒã€\n" "コマンドライン経由ã§è¨­å®šãƒ•ァイルを一覧・編集ã™ã‚‹ç‚ºã«ä½œæˆã•れãŸã€‚" #: ../docs/WhatsNew.md:774 msgid "" "* To view the current configuration use `yard config --list`.\n" "* To view a specific item use `yard config ITEMNAME`\n" "* To modify an item value use `yard config ITEMNAME VALUE`" msgstr "" "* ç¾åœ¨ã®è¨­å®šã‚’一覧ã™ã‚‹ã«ã¯ã€`yard config --list`を使ã†\n" "* 特定ã®é …ç›®(item)を一覧ã™ã‚‹ã«ã¯ã€`yard config ITEMNAME`を使ã†\n" "* é …ç›®ã®å€¤ã‚’変更ã™ã‚‹ã«ã¯ã€`yard config ITEMNAME VALUE`を使ã†" #: ../docs/WhatsNew.md:778 msgid "## Added `yard server -t` template path switch (0.6.2)" msgstr "## `yard server -t`テンプレートパス引数ãŒè¿½åŠ ã•れ㟠(0.6.2)" #: ../docs/WhatsNew.md:780 msgid "" "The `yard server` command now accepts `-t` or `--template-path` to register\n" "a new template path for template customization." msgstr "" "`yard server` コマンドã¯ã€\n" "テンプレートをカスタマイズã™ã‚‹ç‚ºã«æ–°ã—ã„テンプレートパスを記録ã™ã‚‹ç‚ºã€\n" "`-t`ã€åˆã¯ã€`--template-path`ã‚’å—ã‘入れる。" #: ../docs/WhatsNew.md:783 msgid "" "## Added `YARD::Server.register_static_path` for static server assets (0.6.2)" msgstr "" "## é™çš„ãªã‚µãƒ¼ãƒãƒ¼è³‡æºç”¨ã«`YARD::Sever.register_static_path`ãŒè¿½åŠ ã•れãŸã€‚ " "(0.6.2)" #: ../docs/WhatsNew.md:785 msgid "" "The server now supports a command to register static asset paths. If you " "are\n" "extending the YARD::Server modules, make sure to register your asset paths\n" "through this method." msgstr "" "サーãƒãƒ¼ã¯é™çš„ãªè³‡æºã®ãƒ‘スを記録ã™ã‚‹ç‚ºã®ã‚³ãƒžãƒ³ãƒ‰ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†ã«ãªã£" "ãŸã€‚\n" "ã‚ãªãŸãŒã€YARD::Serverモジュールを拡張ã™ã‚‹å ´åˆã¯ã€\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’通ã—ã¦ã‚ãªãŸã®è³‡æºã®ãƒ‘スを記録ã™ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。" #: ../docs/WhatsNew.md:789 msgid "## YARD::Registry is now thread local (0.6.5)" msgstr "## YARD::Registryã¯ã‚¹ãƒ¬ãƒƒãƒ‰ãƒ­ãƒ¼ã‚«ãƒ«ã¨ãªã£ãŸ (0.6.5)" #: ../docs/WhatsNew.md:791 msgid "" "Creating a new thread will now implicitly load a new Registry that can be " "used\n" "to parse and process new code objects independently of the other threads. " "Note\n" "that this means you can no longer use the Registry across threads; you must\n" "either access the threadlocal object directly, or synchronize threads to do\n" "the processing in the initial registry's thread." msgstr "" "æ–°ã—ã„スレッドã®ä½œæˆã¯æš—é»™ã®å†…ã«ã€\n" "è§£æžã™ã‚‹ç‚ºã«åˆ©ç”¨ã§ãã‚‹æ–°ã—ã„レジストリーをロードã™ã‚‹ã ã‚ã†ã€‚\n" "ãã—ã¦ã€ä»–ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã¨ã¯ç‹¬è‡ªã«æ–°ã—ã„コードオブジェクトを処ç†ã™ã‚‹ã€‚\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "ã“れã¯ã‚ãªãŸãŒã‚‚ã†ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’渡ã£ã¦ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã‚’利用ã™ã‚‹å¿…è¦ã¯ãªã„ã“ã¨ã‚’æ„味ã™ã‚‹ã€‚\n" "ã‚ãªãŸã¯ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚ªãƒ–ジェクトã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã‹ã€åˆã¯ã€\n" "スレッドã®ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã®åˆæœŸåŒ–ã®å‡¦ç†ã‚’ã™ã‚‹ç‚ºã«ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’åŒæœŸã—ãªã‘れã°ãªã‚‰ãªã„。" #: ../docs/WhatsNew.md:797 msgid "## Support for ripper gem in Ruby 1.8.7 (0.6.5)" msgstr "## Ruby 1.8.7 ã§ã®ripper gemã®ã‚µãƒãƒ¼ãƒˆ (0.6.5)" #: ../docs/WhatsNew.md:799 msgid "" "YARD now supports the Ruby 1.8.7 port of the `ripper` gem to improve " "parsing\n" "of source, both in terms of performance and functionality. When the " "`ripper`\n" "gem is available, YARD will use the \"new-style\" handlers. You can take " "advantage\n" "of this functionality by performing a `gem install ripper`." msgstr "" "ãƒ‘ãƒ•ã‚©ãƒ¼ãƒžãƒ³ã‚¹ã¨æ©Ÿèƒ½æ€§ã®ä¸¡é¢ã§ã€\n" "YARDã¯ã‚½ãƒ¼ã‚¹ã®è§£æžã‚’å‘上ã™ã‚‹ç‚ºã«`ripper`gemã®Ruby1.8.7ã®ä¸€éƒ¨ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆ" "ã†ã«ãªã£ãŸã€‚\n" "`ripper`gemãŒå®Ÿè¡Œå¯èƒ½ãªæ™‚ã€YARDã¯\"new-style\"ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’利用ã™ã‚‹ã€‚\n" "`gem install ripper`を実行ã™ã‚‹äº‹ã§ã€ã“ã®æ©Ÿèƒ½ã®æ©æµã‚’å—ã‘る事ãŒã§ãる。" #: ../docs/WhatsNew.md:805 msgid "" "What's New in 0.5.x?\n" "====================" msgstr "" "What's New in 0.5.x?\n" "====================" #: ../docs/WhatsNew.md:808 msgid "" "1. **Support for documenting native Ruby C code** (0.5.0)\n" "2. **Incremental parsing and output generation with `yardoc -c`** (0.5.0, " "0.5.3)\n" "2. **Improved `yri` support to perform lookups on installed Gems** (0.5.0)\n" "3. **Added `yardoc --default-return` and `yardoc --hide-void-return`** " "(0.5.0)\n" "4. **Multiple syntax highlighting language support** (0.5.0)\n" "5. **New .yardoc format** (0.5.0)\n" "6. **Support for yard-doc-* gem packages as hosted .yardoc dbs** (0.5.1)\n" "7. **Support for extra search paths in `yri`** (0.5.1)\n" "8. **Generating HTML docs now adds frames view** (0.5.3)\n" "9. **Tree view for class list** (0.5.3)\n" "10. **Ability to specify markup format of extra files** (0.5.3)\n" "11. **Keyboard shortcuts for default HTML template** (0.5.4)" msgstr "" "1. **Rubyã¨Cã®ã‚³ãƒ¼ãƒ‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆåŒ–をサãƒãƒ¼ãƒˆã™ã‚‹** (0.5.0)\n" "2. **`yaradoc -c`を用ã„ãŸã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªè§£æžã¨å‡ºåŠ›ç”ŸæˆãŒã§ãるよã†ã«ãªã£ãŸ" "** (0.5.0, 0.5.3)\n" "3. **`yardoc --default-return`ã¨`yardoc --hide-void-return`ãŒè¿½åŠ ã•れãŸ** " "(0.5.0)\n" "4. **è¤‡æ•°ã®æ§‹æ–‡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹è¨€èªžã‚’サãƒãƒ¼ãƒˆ** (0.5.0)\n" "5. **æ–°ã—ã„.yardocフォーマット** (0.5.0)\n" "6. **ホストã•れãŸ.yardoc dbsã¨ã—ã¦yard-doc-* gem パッケージをサãƒãƒ¼ãƒˆã™ã‚‹** " "(0.5.1)\n" "7. **`yri`ã§è¿½åŠ ã®æ¤œç´¢ãƒ‘スをサãƒãƒ¼ãƒˆã™ã‚‹** (0.5.1)\n" "8. **HTMLドキュメントã®ç”Ÿæˆã¯ãƒ•レーム一覧ãŒè¿½åŠ ã•れるよã†ã«ãªã£ãŸ** (0.5.3)\n" "9. **クラスリスト用ã®ãƒ„リービュー** (0.5.3)\n" "10. **追加ã®ãƒ•ァイルã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—フォーマットを指定ã™ã‚‹æ©Ÿèƒ½** (0.5.3)\n" "11. **デフォルトã®HTMLテンプレート用ã®ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆ** (0.5.4)" #: ../docs/WhatsNew.md:821 msgid "" "Support for documenting native Ruby C code (0.5.0)\n" "--------------------------------------------------" msgstr "" "Rubyã¨Cã®ã‚³ãƒ¼ãƒ‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆç”Ÿæˆã®ã‚µãƒãƒ¼ãƒˆ (0.5.0)\n" "--------------------------------------------------" #: ../docs/WhatsNew.md:824 msgid "" "It is now possible to document native Ruby extensions with YARD with a new\n" "C parser mostly borrowed from RDoc. This enables the ability to document\n" "Ruby's core and stdlibs which will be hosted on http://yardoc.org/docs. In\n" "addition, the .yardoc dump for the Ruby-core classes will become available\n" "as an installable gem for yri support (see #3)." msgstr "" "大部分をRDocã‹ã‚‰å–ã‚Šå…¥ã‚ŒãŸæ–°ã—ã„Cパーサーã¨å…±ã«YARDを用ã„\n" "Rubyã®æ‹¡å¼µãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’実行å¯èƒ½ã«ãªã£ãŸã€‚\n" "ã“れã¯ã€Rubyã®ã‚³ã‚¢ã¨æ¨™æº–ライブラリを記述ã™ã‚‹äº‹ã‚’å¯èƒ½ã«ã™ã‚‹ã€‚\n" "ãã—ã¦ã€http://yardoc.org/docs ã§ãƒ›ã‚¹ãƒˆ(アクセスã§ãã‚‹)ã•れるã ã‚ã†ã€‚\n" "ã•らã«ã€Rubyコアクラス用ã®.yardocã®ãƒ€ãƒ³ãƒ—ã¯ã€\n" "yriã®ã‚µãƒãƒ¼ãƒˆã«ç”¨ã„るインストールå¯èƒ½ãªgemã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã«ãªã‚‹ã ã‚ã†ã€‚(#3 å‚" "ç…§)" #: ../docs/WhatsNew.md:830 msgid "" "Incremental parsing and output generation with `yardoc -c` (0.5.0, 0.5.3)\n" "-------------------------------------------------------------------------" msgstr "" "`yaradoc -c`を用ã„ãŸã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªè§£æžã¨å‡ºåŠ›ç”Ÿæˆ (0.5.0, 0.5.3)\n" "-------------------------------------------------------------------------" #: ../docs/WhatsNew.md:833 msgid "" "

    Note: in 0.5.3 and above you must use --incremental\n" " to incrementally generate HTML, otherwise only parsing will be done\n" " incrementally but HTML will be generated with all objects. --" "incremental\n" " implies -c, so no need to specify them both.

    " msgstr "" "

    Note: in 0.5.3 and above you must use --incremental\n" " to incrementally generate HTML, otherwise only parsing will be done\n" " incrementally but HTML will be generated with all objects. --incremental\n" " implies -c, so no need to specify them both.

    " #: ../docs/WhatsNew.md:838 msgid "" "YARD now compares file checksums before parsing when using `yardoc -c`\n" "(aka `yardoc --use-cache`) to do incremental parsing of only the files that\n" "have changed. HTML (or other output format) generation will also only be\n" "done on the objects that were parsed from changed files (\\*). This makes " "doing\n" "a documentation development cycle much faster for quick HTML previews. Just\n" "remember that when using incremental output generation, the index will not\n" "be rebuilt and inter-file links might not hook up right, so it is best to\n" "perform a full rebuild at the end of such previews." msgstr "" "YARDã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã«å¤‰æ›´ã•れãŸãƒ•ァイルã ã‘è§£æžã‚’ã™ã‚‹ç‚ºã«ã€\n" "`yardoc -c`(別å `yardoc --use-cache`)ã‚’ä½¿ã†æ™‚ã€è§£æžå‰ã®ãƒ•ァイルを比較ã™" "る。\n" "HTML(åˆã¯ã€ä»–ã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ)生æˆã¯ã€\n" "変更ã•れãŸãƒ•ァイル(\\*)ã‹ã‚‰è§£æžã•れるオブジェクト上ã§å®Ÿè¡Œã•れるã ã‘ã§ã‚る。\n" "ã“れã«ã‚ˆã‚Šè¿…速ãªHTMLプレビューã®ç‚ºã«ã€ã‚ˆã‚Šé€Ÿã„開発サイクルを作りã‚ã’る事ãŒã§" "ãる。\n" "ãŸã ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ãªå‡ºåŠ›ç”Ÿæˆã«ã‚ˆã£ã¦è¦šãˆã¦ãŠã„ã¦ã»ã—ã„ã“ã¨ã¯ã€\n" "インデックスãŒå†æ§‹ç¯‰ã•れãªã„事ã¨ãƒ•ァイル間ã®ãƒªãƒ³ã‚¯ãŒæ­£ã—ãæŽ¥ç¶šã•れãªã„ã‹ã‚‚ã—" "れãªã„ã€\n" "ãªã®ã§ã€ã“ã®ã‚ˆã†ãªãƒ—レビューã®çµ‚了時ã«å®Œå…¨ãªå†æ§‹ç¯‰ã‚’実行ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾" "ã™ã€‚" #: ../docs/WhatsNew.md:847 msgid "" "(\\*) Only for versions prior to 0.5.3. For 0.5.3+, use `--incremental` for\n" "incremental HTML output." msgstr "" "(\\*) 0.5.3よりå‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ã€0.5.3以上ã®å ´åˆã¯ã€\n" "インクリメンタルHTML出力用ã®`--incremental`を使ã†ã€‚" #: ../docs/WhatsNew.md:850 msgid "" "Improved `yri` support to perform lookups on installed Gems (0.5.0)\n" "-------------------------------------------------------------------" msgstr "" "インストールã•れãŸgemを検索ã™ã‚‹ç‚ºã®`yri`ã®ã‚µãƒãƒ¼ãƒˆãŒæ”¹è‰¯ã•れãŸã€‚(0.5.0)\n" "-------------------------------------------------------------------" #: ../docs/WhatsNew.md:853 msgid "" "The `yri` executable can now perform lookups on gems that have been parsed\n" "by yard. Therefore, to use this command you must first parse all gems with\n" "YARD. To parse all gems, use the following command:" msgstr "" "実行å¯èƒ½ãª`yri`コマンドã¯ã€YARDã§è§£æžã•れã¦ã„ãŸgemã®æ¤œç´¢ã‚’実行ã§ãるよã†ã«" "ãªã£ãŸã€‚\n" "ã—ãŸãŒã£ã¦ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使ã†ç‚ºã«ã¯ã€\n" "ã‚ãªãŸã¯ã€æœ€åˆã«å…¨ã¦ã®gemã‚’YARDã§è§£æžã—ãªã‘れã°ãªã‚‰ãªã„。\n" "å…¨ã¦ã®gemã‚’è§£æžã™ã‚‹ç‚ºã«ã¯ã€æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’利用ã™ã‚‹:" #: ../docs/WhatsNew.md:857 msgid " $ sudo yardoc --build-gems" msgstr " $ sudo yardoc --build-gems" #: ../docs/WhatsNew.md:859 msgid "" "The above command builds a .yardoc file for all installed gems in the\n" "respective gem directory. If you do not have write access to the gem path,\n" "YARD will write the yardoc file to `~/.yard/gem_index/NAME-VERSION.yardoc`." msgstr "" "上ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€gemディレクトリã«é–¢ä¿‚ã™ã‚‹å…¨ã¦ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ¸ˆã¿ã®gem用ã«." "yardocファイルをビルドã™ã‚‹ã€‚\n" "ã‚ãªãŸãŒã€gemã®ãƒ‘スã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’書ã込んã§ã„ãªã„å ´åˆã€\n" "YARDã¯`~/.yard/gem_index/NAME-VERSION.yardoc`ã«yardocファイルを書ã込むã ã‚" "ã†ã€‚" #: ../docs/WhatsNew.md:863 msgid "" "Note: you can also use `--re-build-gems` to force re-parsing of all gems." msgstr "" "注æ„:ã‚ãªãŸã¯ã€å…¨ã¦ã®gemã‚強制的ã«å†è§£æžã™ã‚‹ã®ã«ã€`--re-build-gems`を使ã†ã“ã¨" "ã‚‚ã§ãる。" #: ../docs/WhatsNew.md:865 msgid "You can now do lookups with yri:" msgstr "ã‚ãªãŸã¯ã€ä¸‹ã®ã‚ˆã†ã«yriã§æ¤œç´¢ã§ãるよã†ã«ãªã£ãŸ" #: ../docs/WhatsNew.md:867 msgid " $ yri JSON" msgstr " $ yri JSON" #: ../docs/WhatsNew.md:869 msgid "" "All lookups are cached to `~/.yard/yri_cache` for quicker lookups the " "second\n" "time onward." msgstr "" "å…¨ã¦ã®æ¤œç´¢ã¯ã€ï¼’åº¦ç›®ã®æ¤œç´¢ã‚’より早ãã™ã‚‹ç‚ºã«ã€\n" "`~/.yard/yri_cache`ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•れる。" #: ../docs/WhatsNew.md:872 msgid "" "Added `yardoc --default-return` and `yardoc --hide-void-return` (0.5.0)\n" "-----------------------------------------------------------------------" msgstr "" "`yardoc --default-return`ã¨`yardoc --hide-void-return`ãŒè¿½åŠ ã•れ㟠(0.5.0)\n" "-----------------------------------------------------------------------" #: ../docs/WhatsNew.md:875 msgid "" "YARD defaults to displaying (Object) as the default return type of any\n" "method that has not declared a @return tag. To customize the default\n" "return type, you can specify:" msgstr "" "YARDã¯@returnã‚¿ã‚°ã§å®£è¨€ã•れãªã‹ã£ãŸã€\n" "ä»»æ„ã®ãƒ‡ãƒ•ォルトã®ãƒ¡ã‚½ãƒƒãƒ‰ã®åž‹ã‚’è¿”ã—表示ã™ã‚‹äº‹ã‚’デフォルトã«ã™ã‚‹ã€‚\n" "デフォルトã®è¿”ã™åž‹ã‚’カスタマイズã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«æŒ‡å®šã™ã‚‹:" #: ../docs/WhatsNew.md:879 msgid " $ yardoc --default-return 'MyDefaultType'" msgstr " $ yardoc --default-return 'MyDefaultType'" #: ../docs/WhatsNew.md:881 msgid "You can also use the empty string to list no return type." msgstr "ã‚ãªãŸã¯ã€è¿”ã™åž‹ãŒç„¡ã„ã®ã‚’記述ã™ã‚‹ã®ã«ã€ç©ºã®æ–‡å­—列を利用ã§ãる。" #: ../docs/WhatsNew.md:883 msgid "" "In addition, you can use --hide-void-return to ignore any method that\n" "defines itself as a void type by: `@return [void]`" msgstr "" "ã•らã«ã€ã‚ãªãŸã¯ã€`@return [void]`ã§ãれ自身をvoidã®åž‹ã¨ã—ã¦å®šç¾©ã™ã‚‹\n" "ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«--hide-void-returnを利用ã§ãる。" #: ../docs/WhatsNew.md:886 msgid "" "Multiple syntax highlighting language support (0.5.0)\n" "-----------------------------------------------------" msgstr "" "è¤‡æ•°ã®æ§‹æ–‡ãƒã‚¤ãƒ©ã‚¤ãƒˆç”¨ã®è¨€èªžã‚µãƒãƒ¼ãƒˆ (0.5.0)\n" "-----------------------------------------------------" #: ../docs/WhatsNew.md:889 msgid "" "YARD now supports the ability to specify a language type for code blocks in\n" "docstrings. Although no actual highlighting support is added for any " "language\n" "but Ruby, you can add your own support by writing your own helper method:" msgstr "" "YARDã¯docstringã®ä¸­ã®ã‚³ãƒ¼ãƒ‰ãƒ–ロック用ã«ã€\n" "言語ã®åž‹ã‚’指定ã™ã‚‹æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚\n" "実際ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚µãƒãƒ¼ãƒˆã¯ã€å…¨ã¦ã®è¨€èªžã«è¿½åŠ ã•れã¦ã„ã‚‹ã‚ã‘ã§ã¯ãªã„ãŒ\n" "Rubyã¯ã€ã‚ãªãŸè‡ªèº«ãŒhelperメソッドを書ãã“ã¨ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã‚’追加ã™ã‚‹äº‹ãŒã§ãる。" #: ../docs/WhatsNew.md:893 msgid "" " # Where LANGNAME is the language:\n" " def html_syntax_highlight_LANGNAME(source)\n" " # return highlighted HTML\n" " end" msgstr "" " # LANGNAMEãŒlanguageã®å ´æ‰€:\n" " def html_syntax_highlight_LANGNAME(source)\n" " # ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れãŸHTMLã‚’è¿”ã™\n" " end" #: ../docs/WhatsNew.md:898 msgid "" "To use this language in code blocks, prefix the block with `!!!LANGNAME`:" msgstr "" "コードブロックã§ã“ã®è¨€èªžã‚’利用ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«`!!!LANGNAME`を用ã„å‰ã«ç½®" "ã。" #: ../docs/WhatsNew.md:900 msgid "" " !!!plain\n" " !!!python\n" " def python_code(self):\n" " return self" msgstr "" " !!!plain\n" " !!!python\n" " def python_code(self):\n" " return self" #: ../docs/WhatsNew.md:905 msgid "" "By the same token. you can now use `!!!plain` to ignore highlighting for\n" "a specific code block." msgstr "" "åŒã˜ãƒˆãƒ¼ã‚¯ãƒ³ã§ã€\n" "ã‚ãªãŸã¯ç‰¹å®šã®ã‚³ãƒ¼ãƒ‰ãƒ–ロック用ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’無視ã™ã‚‹ç‚ºã«`!!!plain`ãŒåˆ©ç”¨ã§ã" "るよã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:908 msgid "" "New .yardoc format (0.5.0)\n" "--------------------------" msgstr "" "æ–°ã—ã„.yardocフォーマット (0.5.0)\n" "--------------------------" #: ../docs/WhatsNew.md:911 msgid "" "To make the above yri support possible, the .yardoc format was redesigned\n" "to be a directory instead of a file. YARD can still load old .yardoc files,\n" "but they will be automatically upgraded if re-saved. The new .yardoc format\n" "does have a larger memory footprint, but this will hopefully be optimized\n" "downward." msgstr "" "上ã®yriサãƒãƒ¼ãƒˆã‚’å¯èƒ½ã«ã™ã‚‹ç‚ºã«ã€\n" ".yardocフォーマットã¯ãƒ•ァイルã®ä»£ã‚りã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«è¨˜éŒ²ã•れる事ã«ãªã£ãŸã€‚\n" "YARDã¯å°šã€å¤ã„.yardocファイルをロードã§ãã‚‹ãŒã€\n" "ã—ã‹ã—ã€ãれã¯ã€å†ã‚»ãƒ¼ãƒ–ã—ãŸå ´åˆã€è‡ªå‹•çš„ã«ä¸Šæ›¸ãã•れるã ã‚ã†ã€‚\n" "æ–°ã—ã„.yaradocフォーマットã¯ã€ã‚ˆã‚Šå¤§ãã„メモリ足跡をもã£ã¦ã„ã‚‹ãŒ\n" "ã—ã‹ã—ã“れã¯ã€æã‚‰ã下方修正ã•れるã ã‚ã†ã€‚" #: ../docs/WhatsNew.md:917 msgid "" "Support for yard-doc-* gem packages as hosted .yardoc dbs (0.5.1)\n" "-----------------------------------------------------------------" msgstr "" ".yardoc dbs ã§ãƒ›ã‚¹ãƒˆã•れãŸyard-doc-* gem パッケージ用ã®ã‚µãƒãƒ¼ãƒˆ\n" "-----------------------------------------------------------------" #: ../docs/WhatsNew.md:920 msgid "" "You can now install special YARD plugin gems titled yard-doc-NAME to get\n" "packaged a .yardoc database. This will enable yri lookups or building docs\n" "for the gem without the code." msgstr "" "ã‚ãªãŸã¯ã€ãƒ‘ッケージã•れãŸ.yardocデータベースをå–å¾—ã™ã‚‹ç‚ºã«\n" "yard-doc-NAMEã¨å付ã‘られãŸç‰¹æ®ŠãªYARDプラグインã®gemをインストールã§ãるよã†" "ã«ãªã£ãŸã€‚\n" "ã“れã¯ã€ã‚³ãƒ¼ãƒ‰ç„¡ã—ã§gem用ã®docstringã‚’yriã§æ¤œç´¢ã€åˆã¯ã€ãƒ“ルドをå¯èƒ½ã«ã™ã‚‹ã ã‚" "ã†ã€‚" #: ../docs/WhatsNew.md:924 msgid "" "One main use for this is the `yard-doc-core` package, which enabled yri\n" "support for Ruby core classes (stdlib coming soon as `yard-doc-stdlib`).\n" "To install it, simply:" msgstr "" "ã“れã®ä¸»ãªã‚‚ã®ã¨ã—ã¦ã¯ã€`yard-doc-core`パッケージã§ã‚る。\n" "ã“れã¯Rubyã®ã‚³ã‚¢ã‚¯ãƒ©ã‚¹ç”¨ã®yriサãƒãƒ¼ãƒˆã‚’有効化ã™ã‚‹\n" "(標準ライブラリã¯`yard-doc-stdlib`ã¨ã—ã¦è¿‘日登場予定)\n" "ç°¡å˜ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã«ã¯:" #: ../docs/WhatsNew.md:928 msgid "" " $ sudo gem install yard-doc-core\n" " # now you can use:\n" " $ yri String" msgstr "" " $ sudo gem install yard-doc-core\n" " # ã‚ãªãŸã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使ãˆã‚‹ã‚ˆã†ã«ãªã£ãŸ:\n" " $ yri String" #: ../docs/WhatsNew.md:932 msgid "" "This will by default install the 1.9.1 core library. To install a library\n" "for a specific version of Ruby, use the `--version` switch on gem:" msgstr "" "ã“れã¯ã€1.9.1ã®ã‚³ã‚¢ãƒ©ã‚¤ãƒ–ラリをデフォルトã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã€‚\n" "Rubyã®å›ºæœ‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ©ã‚¤ãƒ–ラリをインストールã™ã‚‹ã«ã¯ã€\n" "次ã®ã‚ˆã†ã«ã€gemã§`--version`引数を利用ã™ã‚‹:" #: ../docs/WhatsNew.md:935 msgid " $ sudo gem install --version '= 1.8.6' yard-doc-core" msgstr " $ sudo gem install --version '= 1.8.6' yard-doc-core" #: ../docs/WhatsNew.md:937 msgid "" "Support for extra search paths in `yri` (0.5.1)\n" "-----------------------------------------------" msgstr "" "`yri`ã§è¿½åŠ ã®æ¤œç´¢ãƒ‘スをサãƒãƒ¼ãƒˆã•れ㟠(0.5.1)\n" "-----------------------------------------------" #: ../docs/WhatsNew.md:940 msgid "" "You can now add custom paths to non-gem .yardoc files\n" "by adding them as newline separated paths in `~/.yard/yri_search_paths`." msgstr "" "ã‚ãªãŸã¯`~/.yard/yri_search_paths`ã®ä¸­ã«\n" "改行ã«åŒºåˆ‡ã‚‰ã‚ŒãŸãƒ‘スã¨ã—ã¦è¿½åŠ ã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n" "gemç„¡ã—ã®.yardocファイルã«\n" "カスタムパスを追加ã§ãるよã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:943 msgid "" "Generating HTML docs now adds frames view (0.5.3)\n" "-------------------------------------------------" msgstr "" "HTMLã®docstringを生æˆã™ã‚‹ã¨ãƒ•レームã®ä¸€è¦§ãŒè¿½åŠ ã•れるよã†ã«ãªã£ãŸ (0.5.3)\n" "-------------------------------------------------" #: ../docs/WhatsNew.md:946 msgid "" "`yardoc` will now create a `frames.html` file when generating HTML " "documents\n" "which allows the user to view documentation inside frames, for those users " "who\n" "still find frames beneficial." msgstr "" "`yardoc`ã¯HTMLドキュメントを生æˆã™ã‚‹æ™‚ã€\n" "`frames.html`ファイルを作æˆã§ãるよã†ã«ãªã£ãŸã€‚\n" "ã“れã¯ã€ãƒ•ãƒ¬ãƒ¼ãƒ ã§æŽ¢ã™ã®ãŒä¾¿åˆ©ã ã¨ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç‚ºã«ã€\n" "フレーム内ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’一覧ã™ã‚‹ç‚ºã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’å—ã‘入れる。" #: ../docs/WhatsNew.md:950 msgid "" "Tree view for class list (0.5.3)\n" "--------------------------------" msgstr "" "クラスリスト用ã®ãƒ„リー 一覧 (0.5.3)\n" "--------------------------------" #: ../docs/WhatsNew.md:953 msgid "" "The class list now displays as an expandable tree view to better organized " "an\n" "otherwise cluttered namespace. If you properly namespace your less " "important\n" "classes (like Rails timezone classes), they will not take up space in the\n" "class list unless the user looks for them." msgstr "" "クラスリストã¯åˆ¥ã®ä¹±é›‘ãªnamespaceをより体型化ã™ã‚‹ç‚ºã«\n" "æ‹¡å¼µå¯èƒ½ãªãƒ„リー 一覧を表示ã§ãるよã†ã«ãªã£ãŸã€‚\n" "ã‚ãªãŸãŒé‡è¦ã§ãªã„クラスをnamespaceã«ã—ãŸå ´åˆã€\n" "(Railsã®timezome classã®ã‚ˆã†ãª)\n" "ãれら(é‡è¦ã§ãªã„クラス)ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ¤œç´¢ã—ãªã‘れã°ã€\n" "クラスリストã®ã‚¹ãƒšãƒ¼ã‚¹ã‚’専有ã—ãªã„。" #: ../docs/WhatsNew.md:958 msgid "" "Ability to specify markup format of extra files (0.5.3)\n" "-------------------------------------------------------" msgstr "" "追加ã®ãƒ•ァイルã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—フォーマットを指定ã™ã‚‹ç‚ºã®æ©Ÿèƒ½ (0.5.3)\n" "-------------------------------------------------------" #: ../docs/WhatsNew.md:961 msgid "" "You can now specify the markup format of an extra file (like README) at the\n" "top of the file with a shebang-like line:" msgstr "" "ã‚ãªãŸã¯ã€æ¬¡ã®shebangã®ã‚ˆã†ãªè¡Œã‚’用ã„ファイルã®ãƒˆãƒƒãƒ—ã§\n" "追加ã®ãƒ•ァイルã®(READMEã®ã‚ˆã†ãª)固有ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—フォーマットを指定ã§ãるよ" "ã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:964 msgid "" " #!textile\n" " contents here" msgstr "" " #!textile\n" " contents here" #: ../docs/WhatsNew.md:967 msgid "" "The above file contents will be rendered with a textile markup engine\n" "(eg. RedCloth)." msgstr "上ã®ãƒ•ァイルã®å†…容ã¯ã€textileマークアップエンジンã§è¡¨ç¤ºã•れる(ã¤ã¾ã‚ŠRedCloth)。" #: ../docs/WhatsNew.md:970 msgid "" "Keyboard shortcuts for default HTML template (0.5.4)\n" "----------------------------------------------------" msgstr "" "Keyboard shortcuts for default HTML template (0.5.4)\n" "----------------------------------------------------" #: ../docs/WhatsNew.md:973 msgid "" "You can now access the \"Class List\", \"Method List\" and \"File List\" " "with the\n" "'c', 'm' and 'f' keyboard shortcuts in the default HTML template, allowing\n" "for keyboard-only navigation around YARD documentation." msgstr "" "ã‚ãªãŸã¯ã€\n" "デフォルトã®HTMLテンプレートã§'c', 'm', 'f'ã®ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’用" "ã„ã€\n" "\"Class List\",\"Method List\",\"File List\"ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ãªã£ãŸã€‚\n" "ã“れã¯ã€YARDドキュメントã®å‘¨ã‚Šã®ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã ã‘ã®ãƒŠãƒ“ゲーションをå—入れる。" #: ../docs/WhatsNew.md:977 msgid "" "API for registering custom parsers (0.5.6)\n" "------------------------------------------" msgstr "" "カスタムパーサーã®è¨˜éŒ²ç”¨API (0.5.6)\n" "------------------------------------------" #: ../docs/WhatsNew.md:980 msgid "" "You can now register parsers for custom source languages by calling the\n" "following method:" msgstr "" "ã‚ãªãŸã¯ã€æ¬¡ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®æ§˜ã«å‘¼ã³å‡ºã•れる事ã§ã€\n" "カスタムソース言語用ã®ãƒ‘ーサーを記録ã§ãるよã†ã«ãªã£ãŸã€‚" #: ../docs/WhatsNew.md:983 msgid " SourceParser.register_parser_type(:java, MyJavaParser, 'java')" msgstr " SourceParser.register_parser_type(:java, MyJavaParser, 'java')" #: ../docs/WhatsNew.md:985 msgid "" "The parser class MyJavaParser should be a subclass of {YARD::Parser::Base},\n" "and the last argument is a set of extensions (string, array or regexp). You\n" "can read more about registering parsers at the {YARD::Parser::SourceParser}\n" "class documentation." msgstr "" "パーサークラスMyJavaParserã¯ã€{YARD::Parser::Base}ã®ã‚µãƒ–クラスã«ãªã‚Šã€\n" "最後ã®å¼•æ•°ã¯ã€æ‹¡å¼µã®ã‚°ãƒ«ãƒ¼ãƒ—(string, array or regexp)ã«ãªã‚‹ã€‚\n" "{YARD::Parser::SourceParser} クラスã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ãƒ‘ーサーを記録ã™ã‚‹æ–¹æ³•ã«ã¤" "ã„ã¦ã€\n" "詳細を見る事ãŒå‡ºæ¥ã‚‹ã€‚" #: ../docs/WhatsNew.md:991 msgid "" "What's New in 0.4.x?\n" "====================" msgstr "" "What's New in 0.4.x?\n" "====================" #: ../docs/WhatsNew.md:994 msgid "" "1. **New templating engine and templates**\n" "2. **yardoc `--query` argument**\n" "3. **Greatly expanded API documentation**\n" "4. **New plugin support**\n" "5. **New tags (@abstract, @private)**\n" "6. **Default rake task is now `rake yard`**" msgstr "" "1. **æ–°ã—ã„テンプレートエンジンã¨ãƒ†ãƒ³ãƒ—レート**\n" "2. **yardoc `--query` 引数**\n" "3. **Greatly ecpanded API ドキュメント**\n" "4. **æ–°ã—ã„プラグインã®ã‚µãƒãƒ¼ãƒˆ**\n" "5. **æ–°ã—ã„ã‚¿ã‚°(@abstract, @private)**\n" "6. **デフォルトã®rake taskã¯`rake yard`コマンドã«ãªã£ãŸ**" #: ../docs/WhatsNew.md:1001 msgid "" "New templating engine and templates\n" "-----------------------------------" msgstr "" "æ–°ã—ã„テンプレートエンジンã¨ãƒ†ãƒ³ãƒ—レート\n" "-----------------------------------" #: ../docs/WhatsNew.md:1004 msgid "" "The templates were redesigned, most notably removing the ugly frameset, " "adding\n" "search to the class/method lists, simplifying the layout and making things\n" "generally prettier. You should also notice that more tags are now visible " "in\n" "the templates such as @todo, the new @abstract and @note tags and some " "others\n" "that existed but were previously omitted from the generated documentation." msgstr "" "テンプレートã¯å†è¨­è¨ˆã•れãŸç‰¹ã«æ±šã„フレームセットを削除ã—ãªã‘れã°ãªã‚‰ãªã„ã€\n" "クラス/メソッドã®ãƒªã‚¹ãƒˆã«æ¤œç´¢ã‚’追加ã™ã‚‹ã€‚\n" "レイアウトを簡å˜ã«ã—ã¦ã»ã¨ã‚“ã©ã®å ´åˆãれã„ã«ä½œæˆã™ã‚‹ã‚ˆã†ã«ãªã£ãŸã€‚\n" "ã‚ãªãŸãŒã•らã«ã‚¿ã‚°ã§æ³¨æ„ã™ã‚‹ã“ã¨ã¯ã€\n" "@todo,æ–°ã—ã„@abstract,@noteã‚¿ã‚°ãã—ã¦ã„ãã¤ã‹å­˜åœ¨ã™ã‚‹ä»–ã®ã‚¿ã‚°ãªã©ã®ã‚ˆã†ã«\n" "テンプレートã®ä¸­ã®å¯è¦–性ã«ãªã£ãŸäº‹ã§ã‚る。\n" "ã—ã‹ã—æ—¢ã«ç”Ÿæˆã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‹ã‚‰ã¯é™¤å¤–ã•れる。" #: ../docs/WhatsNew.md:1010 msgid "" "There is also a new templating engine (based on the tadpole templating " "library)\n" "to allow for much more user customization. You can read about it in\n" "{file:docs/Templates.md}." msgstr "" "ã“ã‚Œã¯æ›´ãªã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã‚’å—ã‘入れる為ã®\n" "æ–°ã—ã„テンプレートエンジンã§ã‚‚ã‚ã‚‹(tadpoleテンプレートライブラリベースã®)\n" "ã“れらã®ã«ã¤ã„ã¦ã¯{file:docs/Templates.md}ã®ä¸­ã§èª­ã‚€äº‹ãŒã§ãる。" #: ../docs/WhatsNew.md:1014 msgid "" "yardoc `--query` argument\n" "-------------------------" msgstr "" "yardoc `--query` 引数\n" "-------------------------" #: ../docs/WhatsNew.md:1017 msgid "" "The yardoc command-line tool now supports queries to select which classes,\n" "modules or methods to include in documentation based on their data or meta-" "data.\n" "For instance, you can now generate documentation for your \"public\" API " "only by\n" "adding \"@api public\" to each of your public API methods/classes and using\n" "the following argument:" msgstr "" "yardocã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ„ールã¯ã€\n" "データやメタデータã®åŸºã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’組ã¿è¾¼ã‚€ç‚ºã«ã€\n" "ãã®ã‚¯ãƒ©ã‚¹,モジュールやメソッドã§é¸æŠžã™ã‚‹ã‚¯ã‚¨ãƒªãƒ¼ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†ã«ãªã£" "ãŸã€‚\n" "例ãˆã°ã€ã‚ãªãŸã¯ã€å€‹ã€…ã®public API メソッド/クラスã«\n" "\"@api public\"を追加ã™ã‚‹ã ã‘ã§ã€è‡ªåˆ†ã®\"public\"API用ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã§" "ãるよã†ã«ãªã£ãŸã€‚\n" "æ¬¡ã®æ§˜ã«ã€å¼•数を用ã„ã‚‹:" #: ../docs/WhatsNew.md:1023 msgid " --query '@api.text == \"public\"'" msgstr " --query '@api.text == \"public\"'" #: ../docs/WhatsNew.md:1025 msgid "More information on queries is in the {file:README.md}." msgstr "クエリーã®è©³ç´°ãªæƒ…å ±ã¯{file:README.md}ã§" #: ../docs/WhatsNew.md:1027 msgid "" "Greatly expanded API documentation\n" "----------------------------------" msgstr "" "éžå¸¸ã«æ‹¡å¼µã•れãŸAPIドキュメント\n" "----------------------------------" #: ../docs/WhatsNew.md:1030 msgid "" "Last release focused on many how-to and architecture documents to explain\n" "the design of YARD, but many of the actual API classes/methods were still\n" "left undocumented. This release marks a focus on getting YARD's own " "documentation\n" "up to par so that it can serve as an official reference on the recommended\n" "conventions to use when documenting code." msgstr "" "最後ã®ãƒªãƒªãƒ¼ã‚¹ã¯æ²¢å±±ã®æ“作手順ã¨YARDã®ãƒ‡ã‚¶ã‚¤ãƒ³ã‚’詳細ã«èª¬æ˜Žã™ã‚‹ç‚ºã®\n" "アーキテクãƒãƒ£ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ç„¦ç‚¹ã‚’åˆã‚ã›ãŸã€‚\n" "ã—ã‹ã—ã€å®Ÿéš›ã®APIクラス/メソッドã®å¤§éƒ¨åˆ†ã¯ã€ã„ã¾ã è¨˜è¿°ã•れã¦ã„ãªã„。\n" "ã“ã®ãƒªãƒªãƒ¼ã‚¹ã¯ã€æ¨™æº–çš„ãªYARD独自ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å–å¾—ã«ç„¦ç‚¹ã‚’当ã¦ã¦ã„る。\n" "ãªã®ã§ã“れã¯ã€ã‚³ãƒ¼ãƒ‰ã‚’æ›¸ãæ™‚ã«åˆ©ç”¨ã™ã‚‹æŽ¨å¥¨ã•れãŸå…¬å¼ã®ãƒªãƒ•ァレンスã¨ã—ã¦æä¾›" "ã§ãる。" #: ../docs/WhatsNew.md:1036 msgid "" "New plugin support\n" "------------------" msgstr "" "æ–°ã—ã„プラグインサãƒãƒ¼ãƒˆ\n" "------------------" #: ../docs/WhatsNew.md:1039 msgid "" "YARD now supports loading of plugins via RubyGems. Any gem named `yard-*` " "or\n" "`yard_*` will now be loaded when YARD starts up. Note that the '-' " "separator\n" "is the recommended naming scheme." msgstr "" "YARDã¯ã€RubyGems経由ã§ãƒ—ラグインã®ãƒ­ãƒ¼ãƒ‰ã‚’サãƒãƒ¼ãƒˆã§ãるよã†ã«ãªã£ãŸã€‚\n" "`yard-*`ã‚„`yard_*`ã§å付ã‘られãŸä»»æ„ã®gemã¯ã€YARDãŒèµ·å‹•ã™ã‚‹æ™‚ã«ãƒ­ãƒ¼ãƒ‰ã•れるã " "ã‚ã†ã€‚\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚'-'区切りã¯ã€æŽ¨å¥¨ã•れãŸå‘½åスキームã§ã‚る。" #: ../docs/WhatsNew.md:1043 msgid "" "To ignore plugins, add the gem names to `~/.yard/ignored_plugins` on " "separate\n" "lines (or separated by whitespace)." msgstr "" "プラグインを無視ã™ã‚‹ã«ã¯ã€\n" "`~/.yard/ignored_plugins`ファイルã§è¡ŒåŒºåˆ‡ã‚Š(åˆã¯ã€ã‚¹ãƒšãƒ¼ã‚¹åŒºåˆ‡ã‚Šã§)\n" "ã§gemåを追加ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:1046 msgid "" "New tags (@abstract, @private)\n" "------------------------------" msgstr "" "æ–°ã—ã„ã‚¿ã‚°(@abstract, @private)\n" "------------------------------" #: ../docs/WhatsNew.md:1049 msgid "" "Two new tags were added to the list of builtin meta-tags in YARD. " "`@abstract`\n" "marks a class/module/method as abstract while `@private` marks an object\n" "as \"private\". The latter tag is unsed in situations where an object is " "public\n" "due to Ruby's own visibility limitations (constants, classes and modules\n" "can never be private) but not actually part of your public API. You should\n" "use this tag sparingly, as it is not meant to be an equivalent to RDoc's\n" "`:nodoc:` tag. Remember, YARD recommends documenting private objects too.\n" "This tag exists so that you can create a query (`--query !@private`) to\n" "ignore all of these private objects in your documentation. You can also\n" "use the new `--no-private` switch, which is a shortcut to the " "afformentioned\n" "query. You can read more about the new tags in the {file:docs/GettingStarted." "md}\n" "guide." msgstr "" "二ã¤ã®æ–°ã—ã„ã‚¿ã‚°ãŒã€YARDã®ä¸­ã®çµ„ã¿è¾¼ã¿ã®ãƒ¡ã‚¿ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã«è¿½åŠ ã•れãŸã€‚\n" "`@abstract`ã¯ã€æ¦‚è¦(abstract)ã¨ã—ã¦ã€class/module/methodをマークã™ã‚‹ã€‚\n" "ã•らã«ã€`@private`ã¯ã€\"private\"ã¨ã—ã¦ã€ã‚ªãƒ–ジェクトをマークã™ã‚‹ã€‚\n" "後者ã®ã‚¿ã‚°ã¯ã€\n" "後ã®ã‚¿ã‚°ã¯ã‚ªãƒ–ジェクトãŒRuby自身ã®å¯è¦–性ã®åˆ¶ç´„ã®ç‚ºã«\n" "実際ã®ã‚ãªãŸã®public APIã®ä¸€éƒ¨ã§ã¯ãªã„ã«ã—ã¦ã‚‚public相当ã®å ´æ‰€ã§åˆ©ç”¨ã•れる\n" "(定数ã¯ã€ã‚¯ãƒ©ã‚¹ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ãƒ—ライベートã«ã¯ã§ããªã„)\n" "ã‚ãªãŸã¯ã€æ…Žé‡ã«ã“ã®ã‚¿ã‚°ã‚’利用ã™ã¹ãã§ã‚る。\n" "RDocãŒ`:nodoc:`ã‚¿ã‚°ã¨åŒæ§˜ã§ã‚ã‚‹ã¨ã„ã†æ„味ã§ã¯ãªã„。\n" "YARDã¯private オブジェクトã®è¨˜è¿°ã‚‚推奨ã™ã‚‹äº‹ã‚’覚ãˆã¦ãŠã„ã¦ã»ã—ã„。\n" "ã“ã®ã‚¿ã‚°ã¯ã€ã‚ãªãŸãŒã€è‡ªåˆ†ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã“れらã®privateオブジェクトã®å…¨ã¦ã‚’無視ã™ã‚‹ç‚ºã«\n" "クエリー(`--query !@private`)を作æˆã§ãるよã†ã«å­˜åœ¨ã™ã‚‹ã€‚\n" "ã‚ãªãŸã¯æ–°ã—ã„`--no-private`引数を利用ã™ã‚‹äº‹ã‚‚ã§ãる。\n" "ã“れã¯å‰è¿°ã®ã‚¯ã‚¨ãƒªãƒ¼ã¸ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã§ã‚る。\n" "ã•ã‚‰ã«æ–°ã—ã„ã‚¿ã‚°ã«ã¤ã„ã¦çŸ¥ã‚ŠãŸã„å ´åˆã¯ã€ {file:docs/GettingStarted.md} ã®ã‚¬ã‚¤ãƒ‰ã§èª­ã‚€ã“ã¨ãŒã§ãる。" #: ../docs/WhatsNew.md:1062 msgid "" "Default rake task is now `rake yard`\n" "------------------------------------" msgstr "" "デフォルトã®rake taskã¯ã€`rake yard`ã¨ãªã£ãŸ\n" "------------------------------------" #: ../docs/WhatsNew.md:1065 msgid "" "Not a big change, but anyone using the default \"rake yardoc\" task should\n" "update their scripts:" msgstr "" "大ããªå¤‰æ›´ã§ã¯ãªã„ãŒã€èª°ã‚‚ãŒä½¿ã†ãƒ‡ãƒ•ォルトã®\"rake yardoc\" taskã¯ã€\n" "次ã®ã‚¹ã‚¯ãƒªãƒ—トã«å¤‰æ›´ã•れãŸã€‚" #: ../docs/WhatsNew.md:1068 msgid "" "[http://github.com/lsegal/yard/commit/" "ad38a68dd73898b06bd5d0a1912b7d815878fae0](http://github.com/lsegal/yard/" "commit/ad38a68dd73898b06bd5d0a1912b7d815878fae0)" msgstr "[http://github.com/lsegal/yard/commit/ad38a68dd73898b06bd5d0a1912b7d815878fae0](http://github.com/lsegal/yard/commit/ad38a68dd73898b06bd5d0a1912b7d815878fae0)" #: ../docs/WhatsNew.md:1071 msgid "" "What's New in 0.2.3.x?\n" "======================" msgstr "" "What's New in 0.2.3.x?\n" "======================" #: ../docs/WhatsNew.md:1074 msgid "" "1. **Full Ruby 1.9 support**\n" "2. **New parser code and handler API for 1.9**\n" "3. **A new `@overload` tag**\n" "4. **Better documentation**\n" "5. **Template changes and bug fixes**" msgstr "" "1. **完全ãªRuby 1.9ã§ã®ã‚µãƒãƒ¼ãƒˆ**\n" "2. **1.9ç”¨ã®æ–°ã—ã„パーサーã®ã‚³ãƒ¼ãƒ‰ã¨ãƒãƒ³ãƒ‰ãƒ©ãƒ¼API**\n" "3. **æ–°ã—ã„ `@overload` ã‚¿ã‚°**\n" "4. **より良ã„ドキュメント**\n" "5. **テンプレートã®å¤‰æ›´ã¨ãƒã‚°ã®ä¿®æ­£**" #: ../docs/WhatsNew.md:1080 msgid "" "Full Ruby 1.9 support\n" "---------------------" msgstr "" "完全ãªRuby1.9ã®ã‚µãƒãƒ¼ãƒˆ\n" "---------------------" #: ../docs/WhatsNew.md:1083 msgid "" "YARD's development actually focuses primarily on 1.9 from the get-go, so it " "is\n" "not an afterthought. All features are first implemented for compatibility " "with\n" "1.9, but of course all functionality is also tested in 1.8.x. YARD 0.2.2 " "was\n" "mostly compatible with 1.9, but the new release improves and extends in " "certain\n" "areas where compatibility was lacking. The new release should be fully " "functional\n" "in Ruby 1.9." msgstr "" "YARDã®é–‹ç™ºã®å®Ÿéš›ã®ç„¦ç‚¹ã¯æœ€åˆã‹ã‚‰1.9上ãŒä¸»ã§ã€çµæžœã¨ã—ã¦1.9ã«ãªã£ãŸè¨³ã§ã¯ãª" "ã„。\n" "å…¨ã¦ã®æ©Ÿèƒ½ã¯ã€å§‹ã‚ã«1.9互æ›ã§å®Ÿè£…ã•れるãŒã€ã‚‚ã¡ã‚ã‚“1.8.xã§ã‚‚テストã•れã¦ã„" "る。\n" "YARD 0.2.2ã¯ã€å¤§éƒ¨åˆ†ãŒ1.9を用ã„äº’æ›æ€§ãŒã‚ã‚‹ãŒã€\n" "新リリースã¯ã€äº’æ›æ€§ãŒæ¬ ã‘ã¦ã„ãŸæ‰€ã‚’範囲を拡張ã™ã‚‹ã€‚\n" "æ–°ã—ã„リリースã¯ã€Ruby 1.9ã§å®Œå…¨ã«æ©Ÿèƒ½ã™ã‚‹ã¯ãšã§ã‚る。" #: ../docs/WhatsNew.md:1090 msgid "" "New parser code and handler API for 1.9\n" "---------------------------------------" msgstr "" "1.9ç”¨ã®æ–°ã—ã„パーサーコードã¨ãƒãƒ³ãƒ‰ãƒ©ãƒ¼API\n" "---------------------------------------" #: ../docs/WhatsNew.md:1093 msgid "" "Using Ruby 1.9 also gives YARD the advantage of using the new `ripper` " "library\n" "which was added to stdlib. The ripper parser is Ruby's official answer to\n" "projects like ParseTree and ruby2ruby. Ripper allows access to the AST as " "it\n" "is parsed by the Ruby compiler. This has some large benefits over " "alternative\n" "projects:" msgstr "" "Ruby1.9ã®ä½¿ç”¨ã§ã€YARDã®æ¨™æº–ライブラリã«è¿½åŠ ã•れãŸ\n" "æ–°ã—ã„`ripper`ライブラリã®åˆ©ç‚¹ãŒä¸Žãˆã‚‰ã‚Œã‚‹ã€‚\n" "ripperパーサーã¯ã€\n" "ParseTreeã¨ruby2rubyã®ã‚ˆã†ã«å‹•ã‹ã™ç‚ºã®\n" "Rubyã®å…¬å¼ãªå›žç­”ã§ã‚る。\n" "Ripperã¯ã€Rubyコンパイラã«ã‚ˆã£ã¦è§£æžã•れるASTã¨ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã‚’å—入れる。\n" "ã“れã¯ã€åˆ¥ã®ãƒ—ロジェクトã«ãらã¹ã¦ã„ãã¤ã‹ã®å¤§ããªæ©æµãŒã‚る。" #: ../docs/WhatsNew.md:1099 msgid "" " 1. It is officially supported and maintained by the Ruby core team.\n" " 2. The AST is generated directly from the exact same code that drives the\n" " compiler, meaning anything that compiles is guaranteed to generate the\n" " equivalent AST.\n" " 3. It needs no hacks, gems or extra libs and works out of the box in 1.9.\n" " 4. It's *fast*." msgstr "" " 1. å…¬å¼ã«Rubyã®ã‚³ã‚¢ãƒãƒ¼ãƒ ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã¨ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ã•れã¦ã„る。\n" " 2. ASTã¯ã‚³ãƒ³ãƒ‘イラを起動ã™ã‚‹åŒã˜ã‚³ãƒ¼ãƒ‰ã‹ã‚‰ç›´æŽ¥ç”Ÿæˆã•れ〠\n" " コンパイルãŒASTã¨åŒæ§˜ã«ç”Ÿæˆã™ã‚‹ç‚ºã«ä¿è¨¼ã•れるã©ã‚“ãªã‚‚ã®ã§ã‚‚æ„味ãŒã‚" "る。\n" " 3. é“å…·ã‚’å¿…è¦ã¨ã—ãªã„。gemã‚„ã€è¿½åŠ ã®ãƒ©ã‚¤ãƒ–ラリã€1.9ã®ç®±ã®å¤–ã®ä»•事を\n" " 4. 速ã„" #: ../docs/WhatsNew.md:1106 msgid "" "Having the AST means that developers looking to extend YARD have much " "better\n" "access to the parsed code than in previous versions. The only caveat is " "that\n" "this library is not back-compatible to 1.8.x. Because of this, there are\n" "subtle changes to the handler extension API that developers use to extend " "YARD.\n" "Namely, there is now a standard API for 1.9 and a \"legacy\" API that can " "run in\n" "both 1.8.x and 1.9 if needed. A developer can still use the legacy API to " "write\n" "handlers that are compatible for both 1.8.x and 1.9 in one shot, or decide " "to\n" "implement the handler using both APIs. Realize that the benefit of using the " "new\n" "API means 1.9 users will get a 2.5x parsing speed increase over running the " "legacy\n" "handlers (this is *in addition to* the ~1.8x speed increase of using YARV " "over MRI)." msgstr "" "ASTã‚’æŒã¤äº‹ã¯ã€é–‹ç™ºè€…ãŒæ‹¡å¼µã•れãŸYARDãŒã‚ˆã‚Šå¤šãã®\n" "(å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚ˆã‚Šè§£æžã•れãŸã‚³ãƒ¼ãƒ‰ã‹ã‚‰)アクセスをæŒã¤ã®ã§æŽ¢ã™äº‹ã‚’æ„味ã™" "る。\n" "\n" "誤解を生ã¾ãªã„ã‚ˆã†æ³¨æ„ã™ã‚‹ãŒã€\n" "ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯ã€1.8.xã®å¾Œæ–¹äº’æ›ã§ã¯ãªã„。\n" "ã“れã¯ä½•æ•…ã‹ã¨ã„ã†ã¨ã€\n" "開発者ãŒYARDã‚’æ‹¡å¼µã™ã‚‹ç‚ºã«åˆ©ç”¨ã™ã‚‹\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®æ‹¡å¼µAPIã«é›£è§£ãªå¤‰æ›´ãŒã‚ã‚‹ã‹ã‚‰ã§ã‚る。\n" "å³ã¡ã€å¿…è¦ãªã‚‰ã€1.8.xã¨1.9両方ã§èµ·å‹•ã§ãã‚‹1.9ç”¨ã®æ¨™æº–APIã¨\"legacy\"APIã«ãªã£" "ãŸã€‚\n" "開発者ã¯ã€1.8.xã¨1.9ã®ä¸¡æ–¹ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’ä¸€å›žã§æ›¸ãã®ã«ã€legacyAPIを利用ã§ã" "る。\n" "åˆã€ä¸¡æ–¹ã®APIã«ã‚ˆã£ã¦ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’実装ã™ã‚‹äº‹ã‚’決ã‚ãŸã€‚\n" "1.9ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æ–°ã—ã„APIã®æ‰‹æ³•を使ã†äº‹ã«ã‚ˆã£ã¦ã®æ©æµã¯ã€\n" "レガシーãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®èµ·å‹•より解æžã™ã‚‹ã‚¹ãƒ”ードãŒ2.5xå€å¢—大ã™ã‚‹ã¨ç†è§£ã™ã‚‹ã€‚\n" "(ã“れã§ã€ *ã•らã«* ~1.8xã®ã‚¹ãƒ”ードãŒMRIã§YARVを使ã†äº‹ã«ã‚ˆã£ã¦å¢—大ã™ã‚‹)" #: ../docs/WhatsNew.md:1117 msgid "" "A new `@overload` tag\n" "---------------------" msgstr "" "æ–°ã—ã„`@overload`ã‚¿ã‚°\n" "---------------------" #: ../docs/WhatsNew.md:1120 msgid "" "The new `@overload` tag enables users to document methods that take " "multiple\n" "parameters depending on context. This is basically equivalent to RDoc's call-" "seq,\n" "but with a name that is more akin to the OOP concept of method overloading\n" "that is actually being employed. Here's an example:" msgstr "" "æ–°ã—ã„`@overload`ã‚¿ã‚°ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ\n" "文脈ã®ä¸­ã§ä¾å­˜ã™ã‚‹è¤‡æ•°ã®ãƒ‘ラメータをå–å¾—ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’記述ã™ã‚‹äº‹ã‚’å¯èƒ½ã«ã™" "る。\n" "ã“れã¯ã€åŸºæœ¬çš„ã«ã€RDocã®call-seqã¨åŒæ§˜ã§ã‚ã‚‹ãŒã€\n" "オブジェクト指å‘ã®å®Ÿéš›ã«ç”¨ã„られるオーãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®æ¦‚念ã«ã‚ˆã‚Šé¡žä¼¼ã—" "ã¦ã„る。\n" "次ã®ã‚ˆã†ãªä¾‹ã«ãªã‚‹:" #: ../docs/WhatsNew.md:1125 msgid "" " # @overload def to_html(html, autolink = true)\n" " # This docstring describes the specific overload only.\n" " # @param [String] html the HTML\n" " # @param [Boolean] autolink whether or not to atuomatically link\n" " # URL references\n" " # @overload def to_html(html, opts = {})\n" " # @param [String] html the HTML\n" " # @param [Hash] opts any attributes to add to the root HTML node\n" " def to_html(*args)\n" " # split args depending on context\n" " end" msgstr "" " # @overload def to_html(html, autolink = true)\n" " # This docstring describes the specific overload only.\n" " # @param [String] html the HTML\n" " # @param [Boolean] autolink whether or not to atuomatically link\n" " # URL references\n" " # @overload def to_html(html, opts = {})\n" " # @param [String] html the HTML\n" " # @param [Hash] opts any attributes to add to the root HTML node\n" " def to_html(*args)\n" " # split args depending on context\n" " end" #: ../docs/WhatsNew.md:1137 msgid "" "As you can see each overload takes its own nested tags (including a " "docstring)\n" "as if it were its own method. This allows \"virtual\" overloading behaviour " "at\n" "the API level to make Ruby look like overload-aware languages without " "caring\n" "about the implementation details required to add the behaviour." msgstr "" "上ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã¯ã€ãれãŒç‹¬è‡ªã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚ˆã†ã«\n" "入れå­ã«ãªã£ãŸè‡ªèº«ã®ã‚¿ã‚°ã‚’å–å¾—ã™ã‚‹(docstringã‚’å«ã‚“ã§ã„ã‚‹)。\n" "ã“れã¯ã€æŒ¯èˆžã„を追加ã™ã‚‹ã®ã«å¿…è¦ã¨ã•れる詳細ã®å®Ÿè£…ã«ã¤ã„ã¦æ°—ã«ã™ã‚‹ã“ã¨ãª" "ãã€\n" "Rubyをオーãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã«è€ƒæ…®ã—ãŸè¨€èªžã®ã‚ˆã†ã«æ§‹æˆã™ã‚‹ç‚ºã«ã€\n" "APIレベルã§\"ä»®ã®\"オーãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã®æŒ™å‹•ã‚‚å—入れる。" #: ../docs/WhatsNew.md:1142 msgid "" "It is still recommended practice, however, to stay away from overloading " "when\n" "possible and document the types of each method's real parameters. This " "allows\n" "toolkits making use of YARD to get accurate type information for your " "methods,\n" "for instance, allowing IDE autocompletion. There are, of course, situations\n" "where overload just makes more sense." msgstr "" "ã“れã¯ã¾ã æŽ¨å¥¨æ¡ˆã ãŒã€\n" "å¯èƒ½ãªæ™‚ã¯ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã‚’使ã‚ãªã„ã§ã€å®Ÿéš›ã®å¼•æ•°ã®å€‹ã€…ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®åž‹ã‚’記述ã™" "る。\n" "ã“れã§ã€è²´æ–¹ã®ãƒ¡ã‚½ãƒƒãƒ‰ç”¨ã«æ­£ç¢ºãªåž‹æƒ…報をå–å¾—ã™ã‚‹ç‚ºã«YARDã®ãƒ„ールキットã®ä½¿ç”¨" "ãŒå—入れられる。\n" "例ãˆã°ã€IDEã®è‡ªå‹•補完をãŒã‚る。\n" "ã“れã¯å‹¿è«–ã€ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã§ã‚ˆã‚Šå¤šãã®æ„味をæˆã™å ´åˆã‚‚ã‚る。" #: ../docs/WhatsNew.md:1148 msgid "" "Better documentation\n" "--------------------" msgstr "" "より良ã„ドキュメント\n" "--------------------" #: ../docs/WhatsNew.md:1151 msgid "" "The first few iterations of YARD were very much a proof of concept. Few " "people\n" "were paying attention and it was really just pieced together to see what " "was\n" "feasible. Now that YARD is gaining interest, there are many developers that\n" "want to take advantage of its extensibility support to do some really cool " "stuff.\n" "Considerable time was spent for this release documenting, at a high level, " "what\n" "YARD can do and how it can be done. Expect this documentation to be extended " "and\n" "improved in future releases." msgstr "" "最åˆã®ã„ãã¤ã‹ã®YARDã®ã‚¤ãƒ†ãƒ¬ãƒ¼ã‚¿ã¯ã‚ˆãã§ããŸæ¦‚念ã®è¨¼æ˜Žã§ã‚る。\n" "ã„ãらã‹ã®äººã¯ã€æ³¨æ„を払ã£ãŸã‚Šã€ãã‚ŒãŒæœ¬å½“ã«å¯èƒ½ãªã®ã‹è¦‹ã‚‹ç‚ºã«ä¸€ç·’ã«è©¦ã—ãŸã‚Š" "ã—ãŸã ã‚ã†ã€‚\n" "ç¾åœ¨ã®YARDã¯é–¢å¿ƒã‚’集ã‚ã¦ã„ã‚‹ã®ã§ã€\n" "ã„ãã¤ã‹ã®æœ¬å½“ã«ã‚¤ã‚«ã—ãŸæ‹¡å¼µã‚µãƒãƒ¼ãƒˆãŒã»ã—ã„æ²¢å±±ã®é–‹ç™ºè€…ãŒã„る。\n" "ã‹ãªã‚Šã®æ™‚é–“ã€ã“ã®ãƒªãƒªãƒ¼ã‚¹ã§ã€\n" "YARDã§ä½•ãŒã§ãã‚‹ã®ã‹ã¨ã©ã®ã‚ˆã†ãªæ–¹æ³•ãŒå‡ºæ¥ã‚‹ã®ã‹ãƒã‚¤ãƒ¬ãƒ™ãƒ«ã§è¨˜è¿°ã™ã‚‹ã®ã«è²»ã‚„" "ã•れãŸã€‚\n" "ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒæ‹¡å¼µã•ã‚Œã€æ©Ÿèƒ½ã®ãƒªãƒªãƒ¼ã‚¹ã§æ”¹è‰¯ã•れるよã†äº‹ã‚’期待ã™ã‚‹ã€‚" #: ../docs/WhatsNew.md:1159 msgid "" "Template changes and bug fixes\n" "------------------------------" msgstr "" "テンプレートã®å¤‰æ›´ã¨ãƒã‚°ä¿®æ­£\n" "------------------------------" #: ../docs/WhatsNew.md:1162 msgid "" "Of course no new release would be complete without fixing the old broken " "code.\n" "Some tags existed but were not present in generated documentation. The " "templates\n" "were mostly fixed to add the major omitted tags. In addition to template " "adjustments,\n" "many parsing bugs were ironed out to make YARD much more stable with " "existing projects\n" "(Rails, HAML, Sinatra, Ramaze, etc.)." msgstr "" "å‹¿è«–ã€æ–°ã—ã„リリースã§ã€å¤ã„壊れãŸã‚³ãƒ¼ãƒ‰ã‚’修正無ã—ã§ä»•上ã’られるã ã‚ã†ã€‚\n" "ã„ãã¤ã‹å­˜åœ¨ã—ãŸã‚¿ã‚°ãŒã€ç”Ÿæˆã•れるドキュメントã§å­˜åœ¨ã—ãªããªã£ãŸã€‚\n" "テンプレートã¯ã€ãƒ¡ã‚¸ãƒ£ãƒ¼ã ãŒæŠœã‹ã•れãŸã‚¿ã‚°ã‚’追加ã™ã‚‹ç‚ºã«å¤§éƒ¨åˆ†ãŒä¿®æ­£ã•れ" "ãŸã€‚\n" "テンプレートã®èª¿æ•´ã«åŠ ãˆã¦ã€\n" "既存ã®ãƒ—ロジェクトを用ã„(Rails, HAML, Sinatra, Ramaze, etc.)より安定ã—ãŸYARD" "を作る為ã«ã€\n" "多ãã®è§£æžã®ãƒã‚°ã¯ç„¡è¦–ã•れãŸã€‚" # YARD::ROOT #: ../lib/yard.rb:5 msgid "The root path for YARD source libraries" msgstr "YARDソースライブラリ用ã®ãƒ«ãƒ¼ãƒˆãƒ‘ス" # YARD::TEMPLATE_ROOT #: ../lib/yard.rb:8 msgid "The root path for YARD builtin templates" msgstr "YARDビルトインテンプレート用ã®ãƒ«ãƒ¼ãƒˆãƒ‘ス" # @deprecated #: ../lib/yard.rb:11 msgid "Use {Config::CONFIG_DIR}" msgstr "Use {Config::CONFIG_DIR}" # YARD.parse # YARD.parse_string #: ../lib/yard.rb:14 ../lib/yard.rb:21 msgid "An alias to {Parser::SourceParser}'s parsing method" msgstr "è§£æžç”¨ã®{Parser::SourceParser}メソッドã¸ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹" # @example Parse a glob of files #: ../lib/yard.rb:18 msgid "YARD.parse('lib/**/*.rb')" msgstr "YARD.parse('lib/**/*.rb')" # @example #: ../lib/yard.rb:18 msgid "tag|example|Parse a glob of files" msgstr "ファイルã®globã‚’è§£æžã™ã‚‹ã€‚" # @see #: ../lib/yard.rb:18 msgid "tag|see|Parser::SourceParser.parse" msgstr "tag|see|Parser::SourceParser.parse" # @example Parse a string of input #: ../lib/yard.rb:25 msgid "YARD.parse_string('class Foo; end')" msgstr "YARD.parse_string('class Foo; end')" # @example #: ../lib/yard.rb:25 msgid "tag|example|Parse a string of input" msgstr "tag|example|å…¥åŠ›ã®æ–‡å­—列を解æžã™ã‚‹" # @see #: ../lib/yard.rb:25 msgid "tag|see|Parser::SourceParser.parse_string" msgstr "tag|see|Parser::SourceParser.parse_string" # YARD.load_plugins # YARD::Config.load_plugins #: ../lib/yard.rb:30 ../lib/yard/config.rb:139 msgid "" "Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except\n" "those listed in +~/.yard/ignored_plugins+. This is called immediately\n" "after YARD is loaded to allow plugin support." msgstr "" "'yard-*'(推奨ã•れる)ã‚„'yard_*'ã®åå‰ã«ãƒžãƒƒãƒã™ã‚‹gemをロードã™ã‚‹ã€‚\n" "ã“れを除外ã™ã‚‹ã«ã¯ã€ +~/.yard/ignored_plugins+ ã®ä¸­ã«å¯¾è±¡ã®åå‰ã‚’記述ã™ã‚‹ã€‚\n" "ã“れã¯ã€YARDãŒãƒ—ラグインサãƒãƒ¼ãƒˆã‚’ロードã—ãŸå¾Œã™ãã«å‘¼ã³å‡ºã•れる。" # YARD::CLI #: ../lib/yard/autoload.rb:6 ../lib/yard/cli/command.rb:6 #: ../lib/yard/cli/command_parser.rb:6 ../lib/yard/cli/config.rb:6 #: ../lib/yard/cli/diff.rb:6 ../lib/yard/cli/gems.rb:6 #: ../lib/yard/cli/graph.rb:6 ../lib/yard/cli/help.rb:6 #: ../lib/yard/cli/i18n.rb:6 ../lib/yard/cli/list.rb:6 #: ../lib/yard/cli/server.rb:6 ../lib/yard/cli/stats.rb:6 #: ../lib/yard/cli/yardoc.rb:6 ../lib/yard/cli/yri.rb:6 msgid "Namespace for command-line interface components" msgstr "コマンドラインインタフェースコンãƒãƒ¼ãƒãƒ³ãƒˆç”¨ã®Namespace" # YARD::CodeObjects #: ../lib/yard/autoload.rb:22 ../lib/yard/code_objects/base.rb:22 #: ../lib/yard/code_objects/class_object.rb:22 #: ../lib/yard/code_objects/class_variable_object.rb:22 #: ../lib/yard/code_objects/constant_object.rb:22 #: ../lib/yard/code_objects/extended_method_object.rb:22 #: ../lib/yard/code_objects/extra_file_object.rb:22 #: ../lib/yard/code_objects/macro_object.rb:22 #: ../lib/yard/code_objects/method_object.rb:22 #: ../lib/yard/code_objects/module_object.rb:22 #: ../lib/yard/code_objects/namespace_object.rb:22 #: ../lib/yard/code_objects/proxy.rb:22 #: ../lib/yard/code_objects/root_object.rb:22 msgid "" "A \"code object\" is defined as any entity in the Ruby language.\n" "Classes, modules, methods, class variables and constants are the\n" "major objects, but DSL languages can create their own by inheriting\n" "from {CodeObjects::Base}." msgstr "" "\"code object\"ã¯ã€Ruby言語ã®ä¸­ã®ä»»æ„ã®æ§‹æˆè¦ç´ ãŒå®šç¾©ã•れる。\n" "クラスやã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã€ãƒ¡ã‚½ãƒƒãƒ‰ã€ã‚¯ãƒ©ã‚¹å¤‰æ•°ã€å®šæ•°ã¯é‡è¦ãªã‚ªãƒ–ジェクトã¨ãª" "る。\\n\n" "ãã—ã¦ã€DSL言語ã¯ã€{CodeObjects::Base}ã‹ã‚‰ã®ç¶™æ‰¿ã«ã‚ˆã£ã¦\n" "DSL言語自身を作æˆã§ãる。" # YARD::Handlers #: ../lib/yard/autoload.rb:58 ../lib/yard/handlers/base.rb:58 #: ../lib/yard/handlers/c/base.rb:58 #: ../lib/yard/handlers/c/handler_methods.rb:58 #: ../lib/yard/handlers/processor.rb:58 ../lib/yard/handlers/ruby/base.rb:58 #: ../lib/yard/handlers/ruby/dsl_handler.rb:58 #: ../lib/yard/handlers/ruby/dsl_handler_methods.rb:58 #: ../lib/yard/handlers/ruby/legacy/base.rb:58 #: ../lib/yard/handlers/ruby/legacy/dsl_handler.rb:58 msgid "" "Handlers are called during the data processing part of YARD's\n" "parsing phase. This allows YARD as well as any custom extension to\n" "analyze source and generate {CodeObjects} to be stored for later use." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã€YARDã®è§£æžæ®µéšŽã§ãƒ‡ãƒ¼ã‚¿ã®å‡¦ç†ã®é–“ã«å‘¼ã³å‡ºã•れる。\n" "ã“れã¯ã€ã‚½ãƒ¼ã‚¹ã®è§£æžã‚„後ã§ä½¿ã†ç‚ºã«è¨˜éŒ²ã•れる{CodeObjects}を生æˆã™ã‚‹ç‚ºã«\n" "YARD本体も任æ„ã®ã‚«ã‚¹ã‚¿ãƒ æ‹¡å¼µã‚‚å—ã‘入れる。" # YARD::Handlers::Ruby #: ../lib/yard/autoload.rb:62 ../lib/yard/handlers/c/base.rb:62 #: ../lib/yard/handlers/c/handler_methods.rb:62 msgid "CRuby Handlers" msgstr "CRuby ãƒãƒ³ãƒ‰ãƒ©ãƒ¼" # YARD::Handlers::Ruby #: ../lib/yard/autoload.rb:82 ../lib/yard/handlers/ruby/base.rb:82 #: ../lib/yard/handlers/ruby/dsl_handler.rb:82 #: ../lib/yard/handlers/ruby/dsl_handler_methods.rb:82 #: ../lib/yard/handlers/ruby/legacy/dsl_handler.rb:82 msgid "All Ruby handlers" msgstr "å…¨ã¦ã®Rubyãƒãƒ³ãƒ‰ãƒ©ãƒ¼" # YARD::Handlers::Ruby::Legacy #: ../lib/yard/autoload.rb:83 ../lib/yard/handlers/ruby/legacy/base.rb:83 #: ../lib/yard/handlers/ruby/legacy/dsl_handler.rb:83 msgid "Handlers for old Ruby 1.8 parser" msgstr "å¤ã„Ruby1.8パーサー用ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼" # YARD::Templates #: ../lib/yard/autoload.rb:134 ../lib/yard/i18n/locale.rb:134 #: ../lib/yard/i18n/message.rb:134 ../lib/yard/i18n/messages.rb:134 #: ../lib/yard/i18n/pot_generator.rb:134 ../lib/yard/i18n/text.rb:134 msgid "Namespace for internationalization (i18n)" msgstr "国際化用ã®Namespace (i18n)" # YARD::Parser #: ../lib/yard/autoload.rb:144 ../lib/yard/parser/base.rb:144 #: ../lib/yard/parser/c/c_parser.rb:144 #: ../lib/yard/parser/c/comment_parser.rb:144 #: ../lib/yard/parser/c/statement.rb:144 #: ../lib/yard/parser/ruby/ast_node.rb:144 #: ../lib/yard/parser/ruby/legacy/ruby_parser.rb:144 #: ../lib/yard/parser/ruby/ruby_parser.rb:144 #: ../lib/yard/parser/source_parser.rb:144 msgid "" "The parser namespace holds all parsing engines used by YARD.\n" "Currently only Ruby and C (Ruby) parsers are implemented." msgstr "" "Parserã®namespaceã¯YARDã«ã‚ˆã£ã¦åˆ©ç”¨ã•れる全ã¦ã®ãƒ‘ーサーエンジンをサãƒãƒ¼ãƒˆã™" "る。\n" "ä»Šã®æ‰€ã€Rubyã¨C(Ruby)パーサーã ã‘実装ã•れã¦ã„る。" # YARD::Parser::Ruby #: ../lib/yard/autoload.rb:147 ../lib/yard/parser/c/c_parser.rb:147 #: ../lib/yard/parser/c/comment_parser.rb:147 #: ../lib/yard/parser/c/statement.rb:147 msgid "CRuby Parsing components" msgstr "CRubyã®ãƒ‘ãƒ¼ã‚µãƒ¼ã®æ§‹æˆ" # YARD::Parser::Ruby #: ../lib/yard/autoload.rb:156 ../lib/yard/parser/ruby/ast_node.rb:156 #: ../lib/yard/parser/ruby/legacy/ruby_parser.rb:156 #: ../lib/yard/parser/ruby/ruby_parser.rb:156 msgid "Ruby parsing components." msgstr "Rubyã®ãƒ‘ãƒ¼ã‚µãƒ¼ã®æ§‹æˆ" # YARD::Parser::Ruby::Legacy #: ../lib/yard/autoload.rb:157 ../lib/yard/parser/ruby/legacy/ruby_lex.rb:157 #: ../lib/yard/parser/ruby/legacy/ruby_parser.rb:157 #: ../lib/yard/parser/ruby/legacy/statement.rb:157 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:157 #: ../lib/yard/parser/ruby/legacy/token_list.rb:157 msgid "Handles Ruby parsing in Ruby 1.8." msgstr "Ruby1.8ã§åˆ©ç”¨ã•れるパーサー処ç†" # YARD::Rake #: ../lib/yard/autoload.rb:176 ../lib/yard/rake/yardoc_task.rb:176 msgid "Holds Rake tasks used by YARD" msgstr "YARDã«ã‚ˆã£ã¦åˆ©ç”¨ã•れるRake taskã‚’æŒã¤" # YARD::Serializers #: ../lib/yard/autoload.rb:180 ../lib/yard/serializers/base.rb:180 #: ../lib/yard/serializers/file_system_serializer.rb:180 #: ../lib/yard/serializers/process_serializer.rb:180 #: ../lib/yard/serializers/stdout_serializer.rb:180 #: ../lib/yard/serializers/yardoc_serializer.rb:180 msgid "Namespace for components that serialize to various endpoints" msgstr "様々ãªå‡ºåŠ›ã§ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã™ã‚‹æ§‹æˆç”¨ã®Namespace" # YARD::Server #: ../lib/yard/autoload.rb:188 ../lib/yard/server.rb:188 #: ../lib/yard/server/adapter.rb:188 ../lib/yard/server/commands/base.rb:188 #: ../lib/yard/server/commands/display_file_command.rb:188 #: ../lib/yard/server/commands/display_object_command.rb:188 #: ../lib/yard/server/commands/frames_command.rb:188 #: ../lib/yard/server/commands/library_command.rb:188 #: ../lib/yard/server/commands/library_index_command.rb:188 #: ../lib/yard/server/commands/list_command.rb:188 #: ../lib/yard/server/commands/search_command.rb:188 #: ../lib/yard/server/commands/static_file_command.rb:188 #: ../lib/yard/server/doc_server_helper.rb:188 #: ../lib/yard/server/doc_server_serializer.rb:188 #: ../lib/yard/server/library_version.rb:188 #: ../lib/yard/server/rack_adapter.rb:188 ../lib/yard/server/router.rb:188 #: ../lib/yard/server/static_caching.rb:188 #: ../lib/yard/server/webrick_adapter.rb:188 msgid "" "Namespace for classes and modules that handle serving documentation over HTTP" msgstr "HTTP経由ã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆä½œæˆã®æä¾›ã™ã‚‹ã‚¯ãƒ©ã‚¹ã‚„モジュールã®ç‚ºã®Namespace" # YARD::Server #: ../lib/yard/autoload.rb:190 ../lib/yard/server.rb:190 #: ../lib/yard/server/adapter.rb:190 ../lib/yard/server/commands/base.rb:190 #: ../lib/yard/server/commands/display_file_command.rb:190 #: ../lib/yard/server/commands/display_object_command.rb:190 #: ../lib/yard/server/commands/frames_command.rb:190 #: ../lib/yard/server/commands/library_command.rb:190 #: ../lib/yard/server/commands/library_index_command.rb:190 #: ../lib/yard/server/commands/list_command.rb:190 #: ../lib/yard/server/commands/search_command.rb:190 #: ../lib/yard/server/commands/static_file_command.rb:190 #: ../lib/yard/server/doc_server_helper.rb:190 #: ../lib/yard/server/doc_server_serializer.rb:190 #: ../lib/yard/server/library_version.rb:190 #: ../lib/yard/server/rack_adapter.rb:190 ../lib/yard/server/router.rb:190 #: ../lib/yard/server/static_caching.rb:190 #: ../lib/yard/server/webrick_adapter.rb:190 msgid "" "== Implementing a Custom Server\n" "To customize the YARD server, see the {Adapter} and {Router} classes." msgstr "" "== カスタムサーãƒãƒ¼ã®å®Ÿè£…\n" "YARDサーãƒãƒ¼ã‚’カスタマイズã™ã‚‹ã«ã¯ã€{Adapter}ã‚„{Router}クラスå‚照。" # YARD::Server #: ../lib/yard/autoload.rb:193 ../lib/yard/server.rb:193 #: ../lib/yard/server/adapter.rb:193 ../lib/yard/server/commands/base.rb:193 #: ../lib/yard/server/commands/display_file_command.rb:193 #: ../lib/yard/server/commands/display_object_command.rb:193 #: ../lib/yard/server/commands/frames_command.rb:193 #: ../lib/yard/server/commands/library_command.rb:193 #: ../lib/yard/server/commands/library_index_command.rb:193 #: ../lib/yard/server/commands/list_command.rb:193 #: ../lib/yard/server/commands/search_command.rb:193 #: ../lib/yard/server/commands/static_file_command.rb:193 #: ../lib/yard/server/doc_server_helper.rb:193 #: ../lib/yard/server/doc_server_serializer.rb:193 #: ../lib/yard/server/library_version.rb:193 #: ../lib/yard/server/rack_adapter.rb:193 ../lib/yard/server/router.rb:193 #: ../lib/yard/server/static_caching.rb:193 #: ../lib/yard/server/webrick_adapter.rb:193 msgid "" "== Rack Middleware\n" "If you want to use the YARD server as a Rack middleware, see the " "documentation\n" "in {RackMiddleware}." msgstr "" "== Rack Middleware\n" "ã‚ãªãŸãŒRack Middlewareã®ã‚ˆã†ã«YARDサーãƒãƒ¼ã‚’使ã„ãŸã„å ´åˆã€\n" "{RackMiddleware}ドキュメントをå‚照。" # YARD::Server::Commands #: ../lib/yard/autoload.rb:201 ../lib/yard/server/commands/base.rb:201 #: ../lib/yard/server/commands/display_file_command.rb:201 #: ../lib/yard/server/commands/display_object_command.rb:201 #: ../lib/yard/server/commands/frames_command.rb:201 #: ../lib/yard/server/commands/library_command.rb:201 #: ../lib/yard/server/commands/library_index_command.rb:201 #: ../lib/yard/server/commands/list_command.rb:201 #: ../lib/yard/server/commands/search_command.rb:201 #: ../lib/yard/server/commands/static_file_command.rb:201 msgid "" "Commands implement specific kinds of server responses which are routed\n" "to by the {Router} class. To implement a custom command, subclass {Commands::" "Base}." msgstr "" "コマンドã¯ç‰¹å®šã®ã‚µãƒ¼ãƒãƒ¼ã®å¿œç­”ã®ã‚ˆã†ãªå®Ÿè£…。\n" "ãã—ã¦ã€{Router}クラスã«ã‚ˆã£ã¦é€ã‚‰ã‚Œã‚‹ã€‚\n" "カスタムコマンドを実装ã™ã‚‹ç‚ºã«ã¯ã€{Commands::Base}サブクラスå‚照。" # YARD::Tags #: ../lib/yard/autoload.rb:229 ../lib/yard/tags/default_factory.rb:229 #: ../lib/yard/tags/default_tag.rb:229 ../lib/yard/tags/directives.rb:229 #: ../lib/yard/tags/library.rb:229 ../lib/yard/tags/option_tag.rb:229 #: ../lib/yard/tags/overload_tag.rb:229 ../lib/yard/tags/ref_tag.rb:229 #: ../lib/yard/tags/ref_tag_list.rb:229 ../lib/yard/tags/tag.rb:229 #: ../lib/yard/tags/tag_format_error.rb:229 msgid "Namespace for Tag components" msgstr "ã‚¿ã‚°ã®æ§‹æˆã®ç‚ºã®Namespace" # YARD::Templates #: ../lib/yard/autoload.rb:249 ../lib/yard/templates/engine.rb:249 #: ../lib/yard/templates/erb_cache.rb:249 #: ../lib/yard/templates/helpers/html_syntax_highlight_helper.rb:249 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:249 #: ../lib/yard/templates/helpers/module_helper.rb:249 #: ../lib/yard/templates/helpers/text_helper.rb:249 #: ../lib/yard/templates/section.rb:249 ../lib/yard/templates/template.rb:249 #: ../lib/yard/templates/template_options.rb:249 msgid "Namespace for templating system" msgstr "テンプレートシステム用ã®Namespace" # YARD::Templates::Helpers #: ../lib/yard/autoload.rb:251 #: ../lib/yard/templates/helpers/base_helper.rb:251 #: ../lib/yard/templates/helpers/filter_helper.rb:251 #: ../lib/yard/templates/helpers/html_helper.rb:251 #: ../lib/yard/templates/helpers/html_syntax_highlight_helper.rb:251 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:251 #: ../lib/yard/templates/helpers/markup_helper.rb:251 #: ../lib/yard/templates/helpers/method_helper.rb:251 #: ../lib/yard/templates/helpers/module_helper.rb:251 #: ../lib/yard/templates/helpers/text_helper.rb:251 #: ../lib/yard/templates/helpers/uml_helper.rb:251 msgid "Namespace for template helpers" msgstr "テンプレートã¸ãƒ«ãƒ‘ー用ã®Namespace" # YARD::Templates::Helpers::Markup #: ../lib/yard/autoload.rb:252 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:252 msgid "Namespace for markup providers" msgstr "マークアップをæä¾›ã™ã‚‹ç‚ºã®Namespace" # YARD::CLI::Command #: ../lib/yard/cli/command.rb:6 msgid "" "Abstract base class for CLI utilities. Provides some helper methods for\n" "the option parser" msgstr "" "CLIãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ç”¨ã®æŠ½è±¡çš„ãªãƒ™ãƒ¼ã‚¹ã‚¯ãƒ©ã‚¹ã€‚\n" "オプションパーサー用ã®ã„ãã¤ã‹ã®ãƒ˜ãƒ«ãƒ‘ーメソッドをæä¾›ã™ã‚‹ã€‚" # YARD::CLI::YRI.run # YARD::CLI::Command.run #: ../lib/yard/cli/command.rb:12 ../lib/yard/cli/yri.rb:27 msgid "Helper method to run the utility on an instance." msgstr "インスタンス上ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚’èµ·å‹•ã™ã‚‹ç‚ºã®ãƒ˜ãƒ«ãƒ‘ーメソッド。" # @see #: ../lib/yard/cli/command.rb:13 ../lib/yard/cli/yri.rb:28 #: ../lib/yard/server/commands/base.rb:33 msgid "tag|see|#run" msgstr "tag|see|#run" # YARD::CLI::Command#common_options #: ../lib/yard/cli/command.rb:20 msgid "Adds a set of common options to the tail of the OptionParser" msgstr "OptionParserã®æœ«å°¾ã«ä¸€èˆ¬çš„ãªã‚ªãƒ—ションã®ã‚°ãƒ«ãƒ¼ãƒ—を追加ã™ã‚‹ã€‚" # @param [Hash] # @param [OptionParser] # @param [Hash{String => String}] # @param [Hash, nil] #: ../lib/yard/cli/command.rb:23 ../lib/yard/cli/command.rb:54 #: ../lib/yard/code_objects/class_object.rb:63 #: ../lib/yard/code_objects/class_object.rb:98 #: ../lib/yard/code_objects/namespace_object.rb:113 #: ../lib/yard/code_objects/namespace_object.rb:144 #: ../lib/yard/code_objects/namespace_object.rb:164 #: ../lib/yard/handlers/base.rb:355 #: ../lib/yard/handlers/ruby/legacy/base.rb:34 ../lib/yard/options.rb:108 #: ../lib/yard/options.rb:122 ../lib/yard/parser/ruby/ast_node.rb:152 #: ../lib/yard/serializers/base.rb:27 #: ../lib/yard/serializers/file_system_serializer.rb:27 #: ../lib/yard/server/adapter.rb:71 ../lib/yard/server/commands/base.rb:74 #: ../lib/yard/server/rack_adapter.rb:26 #: ../lib/yard/templates/helpers/html_helper.rb:536 #: ../lib/yard/templates/template.rb:230 ../lib/yard/templates/template.rb:256 msgid "tag|param|opts" msgstr "tag|param|opts" # @param [OptionParser] opts #: ../lib/yard/cli/command.rb:23 ../lib/yard/cli/command.rb:54 msgid "the option parser object" msgstr "パーサーオブジェクトã®ã‚ªãƒ—ション" # YARD::CLI::Command#parse_options #: ../lib/yard/cli/command.rb:49 msgid "Parses the option and gracefully handles invalid switches" msgstr "オプションを解æžã—ã€ç„¡åйãªå¼•数を処ç†ã™ã‚‹ã€‚" # @since #: ../lib/yard/cli/command.rb:54 ../lib/yard/cli/diff.rb:201 #: ../lib/yard/cli/gems.rb:59 ../lib/yard/cli/graph.rb:66 #: ../lib/yard/cli/help.rb:8 ../lib/yard/cli/server.rb:109 #: ../lib/yard/cli/stats.rb:179 ../lib/yard/cli/yardoc.rb:193 #: ../lib/yard/cli/yardoc.rb:197 ../lib/yard/cli/yardoc.rb:201 #: ../lib/yard/cli/yardoc.rb:388 ../lib/yard/cli/yardoc.rb:498 #: ../lib/yard/cli/yardoc.rb:742 ../lib/yard/cli/yri.rb:24 #: ../lib/yard/code_objects/base.rb:149 #: ../lib/yard/code_objects/method_object.rb:132 #: ../lib/yard/code_objects/namespace_object.rb:12 #: ../lib/yard/core_ext/insertion.rb:30 ../lib/yard/core_ext/insertion.rb:34 #: ../lib/yard/handlers/processor.rb:24 ../lib/yard/handlers/processor.rb:31 #: ../lib/yard/handlers/processor.rb:33 ../lib/yard/serializers/base.rb:61 #: ../lib/yard/server/commands/display_object_command.rb:47 #: ../lib/yard/tags/directives.rb:98 ../lib/yard/tags/directives.rb:121 #: ../lib/yard/tags/library.rb:100 ../lib/yard/tags/library.rb:128 #: ../lib/yard/tags/library.rb:137 #: ../lib/yard/templates/helpers/base_helper.rb:19 #: ../lib/yard/templates/helpers/base_helper.rb:102 #: ../lib/yard/templates/helpers/html_helper.rb:57 #: ../lib/yard/templates/helpers/html_helper.rb:73 #: ../lib/yard/templates/helpers/html_helper.rb:83 #: ../lib/yard/templates/helpers/html_helper.rb:91 #: ../lib/yard/templates/helpers/html_helper.rb:101 #: ../lib/yard/templates/helpers/html_helper.rb:109 #: ../lib/yard/templates/helpers/html_helper.rb:123 #: ../lib/yard/templates/helpers/markup_helper.rb:52 #: ../lib/yard/templates/helpers/markup_helper.rb:122 #: ../lib/yard/templates/helpers/markup_helper.rb:140 #: ../lib/yard/templates/section.rb:85 ../lib/yard/templates/template.rb:133 msgid "0.6.0" msgstr "0.6.0" # @param [Array] # @param [Array] #: ../lib/yard/cli/command.rb:54 ../lib/yard/cli/gems.rb:17 #: ../lib/yard/cli/graph.rb:50 ../lib/yard/cli/graph.rb:66 #: ../lib/yard/cli/list.rb:12 ../lib/yard/cli/stats.rb:33 #: ../lib/yard/cli/stats.rb:165 ../lib/yard/cli/yardoc.rb:243 #: ../lib/yard/cli/yardoc.rb:281 ../lib/yard/cli/yardoc.rb:507 #: ../lib/yard/cli/yri.rb:49 ../lib/yard/cli/yri.rb:189 #: ../lib/yard/docstring.rb:37 ../lib/yard/templates/template.rb:204 msgid "tag|param|args" msgstr "tag|param|args" # @param [Array] args #: ../lib/yard/cli/command.rb:54 msgid "" "the arguments passed from input. This\n" "array will be modified." msgstr "" "引数ã¯å…¥åŠ›ã‹ã‚‰è§£æžã•れる。\n" "ã“ã®é…列ã¯ã€å¤‰æ›´ã•れるã ã‚ã†ã€‚" # YARD::CLI::Command#load_script #: ../lib/yard/cli/command.rb:63 msgid "" "Loads a Ruby script. If Config.options[:safe_mode] is enabled,\n" "this method will do nothing." msgstr "" "Rubyスクリプトをロードã™ã‚‹ã€‚ Config.options[:safe_mode] ãŒæœ‰åйã®å ´åˆã€\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ä½•ã‚‚ã—ãªã„ã ã‚ã†ã€‚" # @since #: ../lib/yard/cli/command.rb:67 ../lib/yard/cli/config.rb:90 #: ../lib/yard/cli/server.rb:20 ../lib/yard/cli/server.rb:24 #: ../lib/yard/config.rb:263 ../lib/yard/handlers/base.rb:228 #: ../lib/yard/handlers/base.rb:235 ../lib/yard/server.rb:7 msgid "0.6.2" msgstr "0.6.2" # @param [String] # @param [String, nil] #: ../lib/yard/cli/command.rb:67 ../lib/yard/code_objects/base.rb:260 #: ../lib/yard/core_ext/file.rb:53 ../lib/yard/registry.rb:118 #: ../lib/yard/registry.rb:132 ../lib/yard/registry.rb:158 #: ../lib/yard/registry_store.rb:113 ../lib/yard/registry_store.rb:130 #: ../lib/yard/registry_store.rb:164 #: ../lib/yard/templates/helpers/base_helper.rb:110 msgid "tag|param|file" msgstr "tag|param|file" # @param [String] file #: ../lib/yard/cli/command.rb:67 msgid "the path to the script to load" msgstr "ロードã™ã‚‹ã‚¹ã‚¯ãƒªãƒ—トã®ç‚ºã®ãƒ‘ス" # YARD::CLI::CommandParser #: ../lib/yard/cli/command_parser.rb:4 msgid "" "This class parses a command name out of the +yard+ CLI command and calls\n" "that command in the form:" msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯ã€ +yard+ CLIコマンド出力ã®ã‚³ãƒžãƒ³ãƒ‰åã‚’è§£æžã™ã‚‹ã€‚\n" "以下ã®å½¢å¼ã®ã‚³ãƒžãƒ³ãƒ‰å‘¼ã³å‡ºã—ã¨ãªã‚‹ã€‚" # YARD::CLI::CommandParser #: ../lib/yard/cli/command_parser.rb:7 msgid " $ yard command_name [options]" msgstr " $ yard command_name [options]" # YARD::CLI::CommandParser #: ../lib/yard/cli/command_parser.rb:9 msgid "" "If no command or arguments are specified, or if the arguments immediately\n" "begin with a +--opt+ (not +--help+), the {default_command} will be used\n" "(which itself defaults to +:doc+)." msgstr "" "コマンドãŒç„¡ã„å ´åˆã‚„ã€å¼•æ•°ãŒæŒ‡å®šã•れる場åˆã€\n" "åˆã¯ã€å¼•æ•°ãŒç›´å¾Œã« +--opt+ ( +--help+ ã§ã¯ãªã„)ã§å§‹ã¾ã‚‹å ´åˆã€\n" "{default_command}ãŒåˆ©ç”¨ã•れる。(ãã—ã¦è‡ªèº«ã® +:doc+ をデフォルトã«ã™ã‚‹)" # YARD::CLI::CommandParser #: ../lib/yard/cli/command_parser.rb:13 msgid "== Adding a Command" msgstr "== コマンドを追加ã™ã‚‹" # YARD::CLI::CommandParser #: ../lib/yard/cli/command_parser.rb:15 msgid "" "To add a custom command via plugin, create a mapping in {commands} from\n" "the Symbolic command name to the {Command} class that implements the\n" "command. To implement a command, see the documentation for the {Command}\n" "class." msgstr "" "プラグイン経由ã§ã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒžãƒ³ãƒ‰ã‚’追加ã™ã‚‹ã«ã¯ã€\n" "ãã®ã‚³ãƒžãƒ³ãƒ‰åã®è±¡å¾´ã‹ã‚‰\n" "コマンドを実装ã™ã‚‹{Command}クラスã«\n" "{commands}ã®ãƒžãƒƒãƒ”ングを作æˆã™ã‚‹ã€‚\n" "コマンドを実装ã™ã‚‹ã«ã¯ã€{Command}クラス用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚照。" # @see #: ../lib/yard/cli/command_parser.rb:22 msgid "tag|see|Command" msgstr "tag|see|Command" # @see #: ../lib/yard/cli/command_parser.rb:22 msgid "tag|see|commands" msgstr "tag|see|commands" # @see #: ../lib/yard/cli/command_parser.rb:22 msgid "tag|see|default_command" msgstr "tag|see|default_command" # @return [Hash{Symbol => Command}] #: ../lib/yard/cli/command_parser.rb:26 msgid "" "the mapping of command names to\n" "command classes to parse the user command." msgstr "ユーザーコマンドを解æžã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚¯ãƒ©ã‚¹ã®ç‚ºã®ã‚³ãƒžãƒ³ãƒ‰åã®ãƒžãƒƒãƒ”ング" # @return [Symbol] #: ../lib/yard/cli/command_parser.rb:30 msgid "" "the default command name to use when no options\n" "are specified or" msgstr "ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæŒ‡å®šã•れãªã„時ã«åˆ©ç”¨ã™ã‚‹ãƒ‡ãƒ•ォルトã®ã‚³ãƒžãƒ³ãƒ‰å" # YARD::CLI::CommandParser.run #: ../lib/yard/cli/command_parser.rb:50 msgid "Convenience method to create a new CommandParser and call {#run}" msgstr "" "æ–°ã—ã„CommandParserを作æˆã—ã€{#run}メソッドを呼ã³å‡ºã™ç‚ºã®ä¾¿åˆ©ãƒ¡ã‚½ãƒƒãƒ‰ã€‚" # @return [CommandParser] #: ../lib/yard/cli/command_parser.rb:53 msgid "a new instance of CommandParser" msgstr "CommandParserã®æ–°ã—ã„インスタンス" # YARD::CLI::CommandParser#run #: ../lib/yard/cli/command_parser.rb:58 msgid "" "Runs the {Command} object matching the command name of the first\n" "argument." msgstr "最åˆã®å¼•æ•°ã®ã‚³ãƒžãƒ³ãƒ‰åã«ãƒžãƒƒãƒã™ã‚‹{Command}オブジェクトを起動ã™ã‚‹ã€‚" # YARD::CLI::Config #: ../lib/yard/cli/config.rb:4 msgid "CLI command to view or edit configuration options" msgstr "" "CLIコマンドを調ã¹ã‚‹ã€‚\n" "åˆã¯ã€è¨­å®šã‚ªãƒ—ションを編集ã™ã‚‹ã€‚" # @return [Symbol, nil] #: ../lib/yard/cli/config.rb:7 msgid "the key to view/edit, if any" msgstr "調ã¹ãŸã‚Šã€ç·¨é›†ã™ã‚‹ç‚ºã®key" # @return [Array, nil] #: ../lib/yard/cli/config.rb:10 msgid "the list of values to set (or single value), if modifying" msgstr "変更ã™ã‚‹å ´åˆã€ã‚»ãƒƒãƒˆã™ã‚‹å€¤ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™(åˆã¯ã€å˜ä¸€ã®å€¤)" # @return [Boolean] #: ../lib/yard/cli/config.rb:13 msgid "whether to reset the {#key}" msgstr "{#key}をリセットã™ã‚‹ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/cli/config.rb:16 msgid "whether the value being set should be inside a list" msgstr "設定ã•れる値ãŒãƒªã‚¹ãƒˆã®å†…部ã«ãªã‚‹ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/cli/config.rb:19 msgid "whether to append values to existing key" msgstr "既存ã®keyã«å€¤ã‚’追加ã™ã‚‹ã‹ã©ã†ã‹" # @return [Config] #: ../lib/yard/cli/config.rb:21 msgid "a new instance of Config" msgstr "Configã®æ–°ã—ã„インスタンス" # YARD::CLI::Diff #: ../lib/yard/cli/diff.rb:8 msgid "" "CLI command to return the objects that were added/removed from 2 versions\n" "of a project (library, gem, working copy)." msgstr "" "プロジェクトã®2ã¤ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰è¿½åŠ ã‚„å‰Šé™¤ã•ã‚ŒãŸæ‰€ã®ã‚ªãƒ–ジェクトを返ã™ç‚ºã®" "CLIコマンド。\n" "(library, gem, working copy)" # @return [Diff] #: ../lib/yard/cli/diff.rb:11 msgid "a new instance of Diff" msgstr "Diffã®æ–°ã—ã„インスタンス" # @return [Gems] #: ../lib/yard/cli/gems.rb:5 msgid "a new instance of Gems" msgstr "Gemsã®æ–°ã—ã„インスタンス" # YARD::CLI::Gems#run #: ../lib/yard/cli/gems.rb:13 msgid "" "Runs the commandline utility, parsing arguments and generating\n" "YARD indexes for gems." msgstr "" "コマンドラインユーティリティを起動ã—ã€å¼•æ•°ã‚’è§£æžã—ã€gem用ã®YARDインデックスを" "生æˆã™ã‚‹ã€‚" # @param [Array] args #: ../lib/yard/cli/gems.rb:17 ../lib/yard/cli/stats.rb:33 #: ../lib/yard/cli/yardoc.rb:281 msgid "the list of arguments" msgstr "引数ã®ãƒªã‚¹ãƒˆ" # YARD::CLI::Gems#build_gems #: ../lib/yard/cli/gems.rb:26 msgid "Builds .yardoc files for all non-existing gems" msgstr "存在ã—ãªã„gem用ã«.yardocファイルをビルドã™ã‚‹ã€‚" # @param [Array] #: ../lib/yard/cli/gems.rb:27 msgid "tag|param|gems" msgstr "tag|param|gems" # YARD::CLI::Gems#optparse #: ../lib/yard/cli/gems.rb:59 msgid "Parses options" msgstr "オプションを解æžã™ã‚‹ã€‚" # YARD::Rake::YardocTask#options # YARD::Rake::YardocTask#options= #: ../lib/yard/cli/graph.rb:4 msgid "Options to pass to the {Graph} CLI." msgstr "{Graph} CLIã«æ¸¡ã™ç‚ºã®ã‚ªãƒ—ション" # @param [String] text #: ../lib/yard/cli/graph.rb:6 msgid "the default output format" msgstr "デフォルトã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ" # @param [Boolean] link #: ../lib/yard/cli/graph.rb:9 msgid "whether to list the full class diagram" msgstr "å…¨ã¦ã®ã‚¯ãƒ©ã‚¹å›³ã‚’リストã™ã‚‹ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/cli/graph.rb:12 msgid "whether to show the object dependencies" msgstr "オブジェクトã®ä¾å­˜é–¢ä¿‚を調ã¹ã‚‹ã‹ã©ã†ã‹" # @param [Hash] opts #: ../lib/yard/cli/graph.rb:15 msgid "any contents to pass to the digraph" msgstr "å›³ã«æ¸¡ã™å†…容" # YARD::CLI::Graph #: ../lib/yard/cli/graph.rb:19 msgid "" "A command-line utility to generate Graphviz graphs from\n" "a set of objects" msgstr "" "オブジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—ã‹ã‚‰Graphvizã®ã‚°ãƒ©ãƒ•を生æˆã™ã‚‹ç‚ºã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼" "ティリティ" # @see #: ../lib/yard/cli/graph.rb:23 msgid "tag|see|Graph#run" msgstr "tag|see|Graph#run" # YARD::CLI::Graph#options #: ../lib/yard/cli/graph.rb:25 msgid "" "The options parsed out of the commandline.\n" "Default options are:\n" " :format => :dot" msgstr "" "optionsã¯ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã®å‡ºåŠ›ã‚’è§£æžã™ã‚‹ã€‚\n" "optionsã®ãƒ‡ãƒ•ォルトã¯:\n" " :format => dot" # YARD::CLI::Graph#objects #: ../lib/yard/cli/graph.rb:30 msgid "The set of objects to include in the graph." msgstr "graphã§ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã™ã‚‹ç‚ºã®ã‚ªãƒ–ジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—" # YARD::CLI::Graph#initialize #: ../lib/yard/cli/graph.rb:33 msgid "Creates a new instance of the command-line utility" msgstr "ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã®æ–°ã—ã„インスタンスを作æˆã™ã‚‹ã€‚" # @return [Graph] #: ../lib/yard/cli/graph.rb:33 msgid "a new instance of Graph" msgstr "Graphã®æ–°ã—ã„インスタンス" # YARD::CLI::YRI#run # YARD::CLI::Graph#run #: ../lib/yard/cli/graph.rb:45 ../lib/yard/cli/yri.rb:45 msgid "Runs the command-line utility." msgstr "コマンドラインユーティリティを起動ã™ã‚‹ã€‚" # @param [Array] args #: ../lib/yard/cli/graph.rb:50 ../lib/yard/cli/graph.rb:66 #: ../lib/yard/cli/stats.rb:165 ../lib/yard/cli/yardoc.rb:507 #: ../lib/yard/cli/yri.rb:49 ../lib/yard/cli/yri.rb:189 msgid "each tokenized argument" msgstr "個々ã«ãƒˆãƒ¼ã‚¯ãƒŠã‚¤ã‚ºã•れãŸå¼•æ•°" # @example #: ../lib/yard/cli/graph.rb:50 msgid "" "grapher = Graph.new\n" "grapher.run('--private')" msgstr "" "grapher = Graph.new\n" "grapher.run('--private')" # YARD::CLI::YRI#optparse # YARD::CLI::Graph#optparse # YARD::CLI::Stats#optparse # YARD::CLI::Yardoc#optparse #: ../lib/yard/cli/graph.rb:65 ../lib/yard/cli/stats.rb:164 #: ../lib/yard/cli/yardoc.rb:506 ../lib/yard/cli/yri.rb:188 msgid "Parses commandline options." msgstr "コマンドラインオプションを解æžã™ã‚‹ã€‚" # YARD::CLI::Help #: ../lib/yard/cli/help.rb:4 msgid "Handles help for commands" msgstr "コマンド用ã®ãƒ˜ãƒ«ãƒ—ã‚’æ“作ã™ã‚‹ã€‚" # YARD::CLI::I18n #: ../lib/yard/cli/i18n.rb:6 msgid "" "CLI command to support internationalization (a.k.a. i18n).\n" "I18n feature is based on gettext technology.\n" "This command generates .pot file from docstring and extra\n" "documentation." msgstr "" # @todo #: ../lib/yard/cli/i18n.rb:12 msgid "Support msgminit and msgmerge features?" msgstr "" # @return [YRI] #: ../lib/yard/cli/i18n.rb:13 msgid "a new instance of I18n" msgstr "I18nã®æ–°ã—ã„インスタンス" # @since #: ../lib/yard/cli/i18n.rb:60 ../lib/yard/code_objects/base.rb:233 #: ../lib/yard/code_objects/base.rb:531 #: ../lib/yard/code_objects/method_object.rb:83 #: ../lib/yard/docstring_parser.rb:268 ../lib/yard/handlers/base.rb:411 #: ../lib/yard/handlers/base.rb:424 ../lib/yard/handlers/base.rb:433 #: ../lib/yard/handlers/base.rb:456 ../lib/yard/handlers/base.rb:470 #: ../lib/yard/handlers/base.rb:483 ../lib/yard/handlers/base.rb:495 #: ../lib/yard/handlers/base.rb:506 ../lib/yard/handlers/base.rb:520 #: ../lib/yard/handlers/c/override_comment_handler.rb:27 #: ../lib/yard/i18n/pot_generator.rb:258 ../lib/yard/registry_store.rb:94 #: ../lib/yard/registry_store.rb:103 ../lib/yard/tags/directives.rb:73 #: ../lib/yard/tags/directives.rb:519 ../lib/yard/tags/library.rb:113 #: ../lib/yard/templates/helpers/html_helper.rb:364 #: ../lib/yard/templates/helpers/html_helper.rb:372 msgid "0.8.0" msgstr "" # YARD::CLI::List #: ../lib/yard/cli/list.rb:4 msgid "" "Lists all constant and method names in the codebase. Uses {Yardoc} --list." msgstr "" "å…¨ã¦ã®å®šæ•°ã¨ã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã®ä¸­ã®ãƒ¡ã‚½ãƒƒãƒ‰åを記述ã™ã‚‹ã€‚{yardoc} --list ã§åˆ©ç”¨ã™" "る。" # YARD::CLI::List#run #: ../lib/yard/cli/list.rb:8 msgid "" "Runs the commandline utility, parsing arguments and displaying a\n" "list of objects" msgstr "" "コマンドラインユーティリティを起動ã—ã€å¼•æ•°ã‚’è§£æžã™ã‚‹ã€‚\n" "ãã—ã¦ã€ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã‚’表示ã™ã‚‹ã€‚" # @param [Array] args #: ../lib/yard/cli/list.rb:12 msgid "the list of arguments." msgstr "引数ã®ãƒªã‚¹ãƒˆ" # YARD::CLI::Server #: ../lib/yard/cli/server.rb:4 msgid "A local documentation server" msgstr "ローカルドキュメントサーãƒãƒ¼" # @return [Hash] #: ../lib/yard/cli/server.rb:7 msgid "a list of options to pass to the doc server" msgstr "ドキュメントサーãƒãƒ¼ã«æ¸¡ã™ç‚ºã®ã‚ªãƒ—ションã®ãƒªã‚¹ãƒˆ" # @return [Hash] #: ../lib/yard/cli/server.rb:10 msgid "a list of options to pass to the web server" msgstr "webサーãƒãƒ¼ã«æ¸¡ã™ç‚ºã®ã‚ªãƒ—ションã®ãƒªã‚¹ãƒˆ" # @return [Hash] #: ../lib/yard/cli/server.rb:13 msgid "a list of library names and yardoc files to serve" msgstr "ライブラリåã®ãƒªã‚¹ãƒˆã¨æä¾›ã™ã‚‹ç‚ºã®yardocファイル" # @return [Adapter] #: ../lib/yard/cli/server.rb:16 msgid "the adapter to use for loading the web server" msgstr "ロードã™ã‚‹webサーãƒãƒ¼ç”¨ã«åˆ©ç”¨ã•れるアダプタ" # @return [Array] #: ../lib/yard/cli/server.rb:20 msgid "a list of scripts to load" msgstr "ロードã™ã‚‹ç‚ºã®ã‚¹ã‚¯ãƒªãƒ—トã®ãƒªã‚¹ãƒˆ" # @return [Array] #: ../lib/yard/cli/server.rb:24 msgid "a list of template paths to register" msgstr "登録ã™ã‚‹ãƒ†ãƒ³ãƒ—レートã®ãƒ‘スã®ãƒªã‚¹ãƒˆ" # YARD::CLI::Yardoc#initialize #: ../lib/yard/cli/server.rb:27 msgid "Creates a new instance of the Server command line utility" msgstr "サーãƒãƒ¼ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã®æ–°ã—ã„インスタンスを作æˆã™ã‚‹ã€‚" # @return [Verifier] #: ../lib/yard/cli/server.rb:27 msgid "a new instance of Server" msgstr "サーãƒãƒ¼ã®æ–°ã—ã„インスタンス" # YARD::CLI::Stats::STATS_ORDER #: ../lib/yard/cli/stats.rb:8 msgid "" "Maintains the order in which +stats_for_+ statistics methods should be\n" "printed." msgstr "" "オーダーを継続ã™ã‚‹ã€‚ãã—ã¦çµ±è¨ˆç”¨ã® +stats_for_+ メソッドã¯ã€ãƒ—リントã•れるã¹" "ãã§ã‚る。" # @see #: ../lib/yard/cli/stats.rb:11 msgid "tag|see|#print_statistics" msgstr "" # @return [Boolean] #: ../lib/yard/cli/stats.rb:14 msgid "whether to parse and load registry" msgstr "è§£æžã™ã‚‹ã‹ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã‚’ロードã™ã‚‹ã‹ã©ã†ã‹" # @return [Stats] #: ../lib/yard/cli/stats.rb:17 msgid "a new instance of Stats" msgstr "Statsã®æ–°ã—ã„インスタンス" # @param [Boolean] #: ../lib/yard/cli/stats.rb:17 msgid "tag|param|parse" msgstr "" # @param [Boolean] parse #: ../lib/yard/cli/stats.rb:17 msgid "whether to parse and load registry (see {#parse})" msgstr "è§£æžã™ã‚‹ã‹ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ãŒãƒ­ãƒ¼ãƒ‰ã•れるã‹ã©ã†ã‹(see {#parse})" # YARD::CLI::Stats#run # YARD::CLI::Yardoc#run #: ../lib/yard/cli/stats.rb:29 ../lib/yard/cli/yardoc.rb:238 msgid "" "Runs the commandline utility, parsing arguments and generating\n" "output if set." msgstr "" "コマンドラインユーティリティを起動ã—ã€å¼•æ•°ã‚’è§£æžã™ã‚‹ã€‚\n" "ãã—ã¦ã‚°ãƒ«ãƒ¼ãƒ—ã®å ´åˆã€å‡ºåŠ›ã‚’ç”Ÿæˆã™ã‚‹ã€‚" # YARD::CLI::Stats#print_statistics #: ../lib/yard/cli/stats.rb:48 msgid "Prints statistics for different object types" msgstr "色々ãªã‚ªãƒ–ジェクト型用ã«çµ±è¨ˆå€¤ã‚’プリントã™ã‚‹ã€‚" # YARD::CLI::Stats#print_statistics #: ../lib/yard/cli/stats.rb:50 msgid "" "To add statistics for a specific type, add a method +#stats_for_TYPE+\n" "to this class that calls {#output}." msgstr "" "特定ã®åž‹ç”¨ã«çµ±è¨ˆå€¤ã‚’追加ã™ã‚‹ã«ã¯ã€\n" "{#output}メソッドã«å‘¼ã³å‡ºã•れるã“ã®ã‚¯ãƒ©ã‚¹ã« +#stats_for_TYPE+ メソッドを追加" "ã™ã‚‹ã€‚" # YARD::CLI::Stats#print_undocumented_objects #: ../lib/yard/cli/stats.rb:71 msgid "Prints list of undocumented objects" msgstr "記述ã•れãªã‹ã£ãŸã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã‚’プリントã™ã‚‹ã€‚" # @return [Array] #: ../lib/yard/cli/stats.rb:99 msgid "" "all the parsed objects in the registry,\n" "removing any objects that are not visible (private, protected) depending\n" "on the arguments passed to the command." msgstr "" "レジストリーã®ä¸­ã®å…¨ã¦ã®è§£æžã•れãŸã‚ªãƒ–ジェクト,\n" "ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã•れãŸå¼•æ•°ã«å¿œã˜ã¦ä¸å¯è¦–(private,protected)ã®ã‚ªãƒ–ジェクトを削除ã—ã¦ã„る。" # YARD::CLI::Stats#stats_for_files #: ../lib/yard/cli/stats.rb:104 msgid "Statistics for files" msgstr "ファイル用ã®çµ±è¨ˆå€¤" # YARD::CLI::Stats#stats_for_modules #: ../lib/yard/cli/stats.rb:111 msgid "Statistics for modules" msgstr "モジュール用ã®çµ±è¨ˆå€¤" # YARD::CLI::Stats#stats_for_classes #: ../lib/yard/cli/stats.rb:116 msgid "Statistics for classes" msgstr "クラス用ã®çµ±è¨ˆå€¤" # YARD::CLI::Stats#stats_for_constants #: ../lib/yard/cli/stats.rb:121 msgid "Statistics for constants" msgstr "定数用ã®çµ±è¨ˆå€¤" # YARD::CLI::Stats#stats_for_methods #: ../lib/yard/cli/stats.rb:126 msgid "Statistics for methods" msgstr "メソッド用ã®çµ±è¨ˆå€¤" # YARD::CLI::Stats#output #: ../lib/yard/cli/stats.rb:135 msgid "" "Prints a statistic to standard out. This method is optimized for\n" "getting Integer values, though it allows any data to be printed." msgstr "" "標準出力ã«çµ±è¨ˆå€¤ã‚’プリントã™ã‚‹ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€\n" "Integerã®å€¤ã®å–å¾—ç”¨ã«æœ€é©åŒ–ã•れã€ãƒ—リントã•れる為ã«ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ã‚’å—入れる。" # @param [Integer, nil] undoc #: ../lib/yard/cli/stats.rb:143 msgid "number of undocumented objects for the type" msgstr "åž‹ã«ã‚ˆã£ã¦è¨˜è¿°ã•れãªã‹ã£ãŸã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•°" # @param [String] # @param [Integer, String] #: ../lib/yard/cli/stats.rb:143 #: ../lib/yard/code_objects/extra_file_object.rb:47 #: ../lib/yard/code_objects/macro_object.rb:39 ../lib/yard/registry.rb:323 #: ../lib/yard/serializers/base.rb:41 ../lib/yard/serializers/base.rb:77 #: ../lib/yard/server/commands/base.rb:159 #: ../lib/yard/templates/helpers/uml_helper.rb:33 msgid "tag|param|data" msgstr "" # @param [String] # @param [Symbol, String] # @param [String, Symbol] # @param [Object] # @param [#to_s] #: ../lib/yard/cli/stats.rb:143 ../lib/yard/cli/yri.rb:109 #: ../lib/yard/cli/yri.rb:141 ../lib/yard/code_objects/base.rb:207 #: ../lib/yard/code_objects/method_object.rb:33 ../lib/yard/config.rb:154 #: ../lib/yard/config.rb:247 ../lib/yard/docstring.rb:237 #: ../lib/yard/docstring.rb:245 ../lib/yard/docstring.rb:255 #: ../lib/yard/docstring.rb:263 ../lib/yard/handlers/ruby/base.rb:21 #: ../lib/yard/handlers/ruby/base.rb:83 ../lib/yard/i18n/locale.rb:20 #: ../lib/yard/rake/yardoc_task.rb:46 ../lib/yard/registry.rb:270 #: ../lib/yard/registry.rb:368 ../lib/yard/server/library_version.rb:120 #: ../lib/yard/tags/tag.rb:43 msgid "tag|param|name" msgstr "" # @param [Integer, nil] #: ../lib/yard/cli/stats.rb:143 msgid "tag|param|undoc" msgstr "" # @param [Integer, String] data #: ../lib/yard/cli/stats.rb:143 msgid "" "the numeric (or any) data representing\n" "the statistic. If +data+ is an Integer, it should represent the\n" "total objects of a type." msgstr "" "æ•°(åˆã¯ä½•ã‹)ã®ãƒ‡ãƒ¼ã‚¿ã‚’表ã™çµ±è¨ˆå€¤ã€‚\n" "+data+ ãŒIntegerã®å ´åˆã€åž‹ã®å…¨ä½“ã®ã‚ªãƒ–ジェクトを表ã™ã¯ãšã§ã‚る。" # @param [String] name #: ../lib/yard/cli/stats.rb:143 msgid "the statistic name" msgstr "統計値ã®åå‰" # YARD::CLI::YardocOptions #: ../lib/yard/cli/yardoc.rb:7 msgid "Default options used in +yard doc+ command." msgstr "" # @return [Array] #: ../lib/yard/cli/yardoc.rb:10 msgid "the list of extra files rendered along with objects" msgstr "オブジェクトã¨ä¸€ç·’ã«è¡¨ç¤ºã•れる追加ã®ãƒ•ァイルã®ãƒªã‚¹ãƒˆ" # @return [String] #: ../lib/yard/cli/yardoc.rb:13 msgid "the default title appended to each generated page" msgstr "" # @return [Verifier] #: ../lib/yard/cli/yardoc.rb:16 msgid "the default verifier object to filter queries" msgstr "" # @return [Serializers::Base] #: ../lib/yard/cli/yardoc.rb:20 msgid "" "the default serializer for generating output\n" "to disk." msgstr "" # @return [String] #: ../lib/yard/cli/yardoc.rb:23 msgid "the default output format (:html)." msgstr "デフォルト出力フォーマット (:html)" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:27 msgid "" "whether the data should be rendered in a single page,\n" "if the template supports it." msgstr "" # @return [CodeObjects::ExtraFileObject] #: ../lib/yard/cli/yardoc.rb:31 msgid "" "the README file object rendered\n" "along with objects" msgstr "" # @return [Array] #: ../lib/yard/cli/yardoc.rb:35 msgid "" "the list of code objects to render\n" "the templates with." msgstr "リストã¨å…±ã«ãƒ†ãƒ³ãƒ—レートを表示ã™ã‚‹ç‚ºã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ" # @return [Numeric] #: ../lib/yard/cli/yardoc.rb:38 msgid "An index value for rendering sequentially related templates" msgstr "" # @return [CodeObjects::Base] #: ../lib/yard/cli/yardoc.rb:42 msgid "" "an extra item to send to a template that is not\n" "the main rendered object" msgstr "" # @return [CodeObjects::ExtraFileObject] #: ../lib/yard/cli/yardoc.rb:47 msgid "" "the file object being rendered.\n" "The +object+ key is not used so that a file may be rendered in the context\n" "of an object's namespace (for generating links)." msgstr "" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:51 msgid "" "Yardoc is the default YARD CLI command (+yard doc+ and historic +yardoc+\n" "executable) used to generate and output (mainly) HTML documentation given\n" "a set of source files." msgstr "" "Yardocã¯ã€ãƒ‡ãƒ•ォルトã®YARD CLIコマンドã¨ãªã‚Š( +yard doc+ ã¨çœç•¥è¡¨è¨˜ã® +yardoc" "+ ãŒå®Ÿè¡Œå¯èƒ½)ã€\n" "生æˆã—ã€ä¸Žãˆã‚‰ã‚ŒãŸã‚½ãƒ¼ã‚¹ãƒ•ァイルã®ã‚°ãƒ«ãƒ¼ãƒ—ã®HTMLドキュメントã®å‡ºåŠ›(ä¸»ãªæ©Ÿèƒ½)" "ã®ç‚ºã«åˆ©ç”¨ã•れる。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:55 ../lib/yard/i18n/pot_generator.rb:38 msgid "== Usage" msgstr "== 使用法" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:57 msgid "Main usage for this command is:" msgstr "ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã®ä¸»ãªä½¿ç”¨æ³•ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚‹:" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:59 msgid " $ yardoc [options] [source_files [- extra_files]]" msgstr "" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:61 msgid "See +yardoc --help+ for details on valid options." msgstr "有効ãªã‚ªãƒ—ションã®è©³ç´°ã¯ +yardoc --help+ ã§å‚ç…§ã§ãる。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:63 msgid "== Options File (+.yardopts+)" msgstr "== オプションファイル (+.yardopts+)" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:65 msgid "" "If a +.yardopts+ file is found in the source directory being processed,\n" "YARD will use the contents of the file as arguments to the command,\n" "treating newlines as spaces. You can use shell-style quotations to\n" "group space delimited arguments, just like on the command line." msgstr "" "+.yardopts+ ファイルãŒã€å‡¦ç†ã•れるソースディレクトリã§è¦‹ã¤ã‹ã£ãŸå ´åˆã€\n" "YARDã¯ã€ã‚³ãƒžãƒ³ãƒ‰ã«å¼•æ•°ã¨ã—ã¦ãƒ•ァイルã®å†…容を利用ã—ã€æ”¹è¡Œã‚’スペースã¨ã—ã¦å‡¦ç†" "ã™ã‚‹ã€‚\n" "ã‚ãªãŸã¯ã‚¹ãƒšãƒ¼ã‚¹ã§åŒºåˆ‡ã‚‰ã‚ŒãŸå¼•æ•°ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«ã€\n" "コマンドラインã®ã‚ˆã†ãªã‚·ã‚§ãƒ«ã‚¹ã‚¿ã‚¤ãƒ«ã®å¼•用を利用ã§ãる。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:70 msgid "A valid +.yardopts+ file might look like:" msgstr "有効㪠+.yardopts+ ファイルã¯ã€æ¬¡ã®ã‚ˆã†ã«ãªã‚‹ã€‚" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:72 msgid "" " --no-private\n" " --title \"My Title\"\n" " --exclude foo --exclude bar\n" " lib/**/*.erb\n" " lib/**/*.rb -\n" " HACKING.rdoc LEGAL COPYRIGHT" msgstr "" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:79 msgid "" "Note that Yardoc also supports the legacy RDoc style +.document+ file,\n" "though this file can only specify source globs to parse, not options." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚Yardocã¯ã€ãƒ¬ã‚¬ã‚·ãƒ¼ãªRDocスタイル㮠+.document+ ファイルもサ" "ãƒãƒ¼ãƒˆã™ã‚‹ã‘れã©ã‚‚ã€\n" "ã“ã®ãƒ•ァイルã¯ã€ã‚ªãƒ—ションã¯ãªã—ã§ã€è§£æžã®ç‚ºã«ã‚½ãƒ¼ã‚¹ã®globã ã‘指定ã§ãる。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:82 msgid "== Queries (+--query+)" msgstr "== クエリー (+--query+)" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:84 msgid "" "Yardoc supports queries to select specific code objects for which to\n" "generate documentation. For example, you might want to generate\n" "documentation only for your public API. If you've documented your public\n" "methods with +@api public+, you can use the following query to select\n" "all of these objects:" msgstr "" "Yardocã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹æ™‚ã«ã€\n" "特定ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ç‚ºã«ã‚¯ã‚¨ãƒªãƒ¼ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã€‚\n" "例ãˆã°ã€ã‚ãªãŸãŒã€\n" "自分ã®public APIã®ç‚ºã ã‘ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆç”Ÿæˆã—ãŸã„ã‹ã‚‚ã—れãªã„。\n" "ã‚ãªãŸãŒã€ +@api public+ を用ã„ã¦è¨˜è¿°ã•れãŸpublicメソッドをæŒã£ã¦ã„ãŸå ´åˆã€\n" "ã“れらã®ã‚ªãƒ–ジェクトã®å…¨ã¦ã‚’é¸æŠžã™ã‚‹ç‚ºã«ã€æ¬¡ã®æ§˜ãªã‚¯ã‚¨ãƒªãƒ¼ã‚’利用ã§ãã‚‹:" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:90 msgid " --query '@api.text == \"public\"'" msgstr "" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:92 msgid "" "Note that the syntax for queries is mostly Ruby with a few syntactic\n" "simplifications for meta-data tags. See the {Verifier} class for an\n" "overview of this syntax." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚ã‚¯ã‚¨ãƒªãƒ¼ç”¨ã®æ§‹æ–‡ã¯ã€\n" "主ã«Rubyæ§‹æ–‡ã§ã€ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ç”¨ã®ã„ãã¤ã‹ã®æ§‹æ–‡ã®ç°¡å˜ã«ã—ãŸã‚‚ã®ã‚‚用ã„ã¦ã„" "る。\n" "ã“ã®æ§‹æ–‡ã®æ¦‚è¦ã¯ã€{Verifier}クラスå‚照。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:96 msgid "== Adding Custom Ad-Hoc Meta-data Tags (+--tag+)" msgstr "== カスタムã—ãŸç‰¹åˆ¥ãªãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°(+--tag+)を追加ã™ã‚‹" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:98 msgid "" "YARD allows specification of {file:docs/Tags.md meta-data tags}\n" "programmatically via the {YARD::Tags::Library} class, but often this is not\n" "practical for users writing documentation. To make adding custom tags\n" "easier, Yardoc has a few command-line switches for creating basic tags\n" "and displaying them in generated HTML output." msgstr "" "YARDã¯ã€{YARD::Tags::Library}クラス経由ã§ãƒ—ラグラムã•れãŸ{file:docs/Tags.md " "meta-data tags}ã®ä»•様をå—入れるãŒã€æ™‚々ã“れã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ›¸ã„ã¦ã„るドキュメン" "トã¨ã¯ããã‚ãªã„å ´åˆãŒã‚る。\n" "ç°¡å˜ãªã‚«ã‚¹ã‚¿ãƒ ã‚¿ã‚°ã‚’作æˆã™ã‚‹ã«ã¯ã€\n" "YardocãŒåŸºæœ¬çš„ãªã‚¿ã‚°ä½œæˆç”¨ã«ã„ãã¤ã‹ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³å¼•æ•°ã‚’æŒã£ã¦ãŠã‚Šã€\n" "ãれをHTML出力ã—表示ã§ãる。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:104 msgid "" "To specify a custom tag to be displayed in output, use any of the\n" "following:" msgstr "出力ã«è¡¨ç¤ºã•れるカスタムタグを指定ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«åˆ©ç”¨ã§ãる。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:107 msgid "" "* +--tag+ TAG:TITLE\n" "* +--name-tag+ TAG:TITLE\n" "* +--type-tag+ TAG:TITLE\n" "* +--type-name-tag+ TAG:TITLE\n" "* +--title-tag+ TAG:TITLE" msgstr "" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:113 msgid "\"TAG:TITLE\" is of the form: name:\"Display Title\", for example:" msgstr "" "以下ã®ã‚ˆã†ã«\"TAG:TITLE\" ã¯ã€ å½¢å¼: åå‰:\"表示ã•れるタイトル\" ã¨ã™ã‚‹ã€‚" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:115 msgid " --tag overload:\"Overloaded Method\"" msgstr "" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:117 msgid "See +yardoc --help+ for a description of the various options." msgstr "様々ãªã‚ªãƒ—ションã®èª¬æ˜Žã¯ +yardoc --help+ å‚照。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:119 msgid "" "Tags added in this way are automatically displayed in output. To add\n" "a meta-data tag that does not show up in output, use +--hide-tag TAG+.\n" "Note that you can also use this option on existing tags to hide\n" "builtin tags, for instance." msgstr "" "ã“ã®æ–¹æ³•ã§è¿½åŠ ã—ãŸã‚¿ã‚°ã¯ã€è‡ªå‹•çš„ã«å‡ºåŠ›ã§è¡¨ç¤ºã•れる。\n" "出力ã«è¡¨ç¤ºã—ãªã„ã§ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã‚’追加ã™ã‚‹ã«ã¯ã€ +--hide-tag TAG+ を使ã†ã€‚\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚ã‚ãªãŸã¯ã€\n" "組ã¿è¾¼ã¿ã‚¿ã‚°ã‚’éš ã™ç‚ºã«æ—¢å­˜ã®ã‚¿ã‚°ä¸Šã§ã“ã®ã‚ªãƒ—ションも利用ã§ãる。" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:124 msgid "== Processed Data Storage (+.yardoc+ directory)" msgstr "== 処ç†ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ (+.yardoc+ ディレクトリ)" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:126 msgid "" "When Yardoc parses a source directory, it creates a +.yardoc+ directory\n" "(by default, override with +-b+) at the root of the project. This directory\n" "contains marshal dumps for all raw object data in the source, so that\n" "you can access it later for various commands (+stats+, +graph+, etc.).\n" "This directory is also used as a cache for any future calls to +yardoc+\n" "so as to process only the files which have changed since the last call." msgstr "" "YardocãŒã‚½ãƒ¼ã‚¹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’è§£æžã™ã‚‹æ™‚ã€ãƒ—ロジェクトã®ãƒ«ãƒ¼ãƒˆã§ +.yardoc+ ディ" "レクトリを作æˆã™ã‚‹ã€‚\n" "(デフォルトã§ã€ +-b+ ã¨å…±ã«ä¸Šæ›¸ãã™ã‚‹)\n" "ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ã€\n" "å…¨ã¦ã®ã‚½ãƒ¼ã‚¹ã®ç”Ÿã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ‡ãƒ¼ã‚¿ç”¨ã«æ•´ç†ã•れãŸãƒ€ãƒ³ãƒ—ã‚’å«ã‚“ã§ã„ã‚‹ã®ã§ã€\n" "å¾Œã§æ§˜ã€…ãªã‚³ãƒžãƒ³ãƒ‰ç”¨(+stats+, +graph+ ç­‰)ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãる。\n" "ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ã€ã„ã¤ã‹ +yardoc+ を呼ã³å‡ºã™ç‚ºã«ã‚‚キャッシュã¨ã—ã¦åˆ©ç”¨ã™" "る。\n" "最後ã®å‘¼ã³å‡ºã—ã‹ã‚‰å¤‰æ›´ã—ãŸæ‰€ã®ãƒ•ァイルã ã‘処ç†ã™ã‚‹ç‚ºã«ã€‚" # YARD::CLI::Yardoc #: ../lib/yard/cli/yardoc.rb:133 msgid "" "When Yardoc uses the cache in subsequent calls to +yardoc+, methods\n" "or classes that have been deleted from source since the last parsing\n" "will not be erased from the cache (YARD never deletes objects). In such\n" "a case, you should wipe the cache and do a clean parsing of the source " "tree.\n" "You can do this by deleting the +.yardoc+ directory manually, or running\n" "Yardoc without +--use-cache+ (+-c+)." msgstr "" "Yardoc㌠+yardoc+ 呼ã³å‡ºã—ã«ç¶šãã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’ä½¿ã†æ™‚ã€\n" "最後ã«è§£æžã—ã¦ã„ã‚‹ã®ã§ã‚½ãƒ¼ã‚¹ã‹ã‚‰å‰Šé™¤ã•れã¦ã„るメソッドやクラスã¯ã€\n" "キャッシュã‹ã‚‰å‰Šé™¤ã•れãªã„。(YARDã¯ã‚ªãƒ–ジェクトを決ã—ã¦å‰Šé™¤ã—ãªã„)\n" "ã“ã®ã‚ˆã†ãªå ´åˆã€ã‚ãªãŸã¯ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’一掃ã—ã€ã‚¯ãƒªãƒ¼ãƒ³ãªã‚½ãƒ¼ã‚¹ãƒ„リーã®è§£æžã«" "ã™ã‚‹ã¹ãã§ã‚る。\n" "+.yardoc+ ディレクトリを手動ã§å‰Šé™¤ã™ã‚‹äº‹ã«ä¸Šè¨˜ã®äº‹ãŒã§ãる。\n" "åˆã¯ã€yardoc ã® +--use-cache+ (+-c+)ç„¡ã—ã§èµ·å‹•ã™ã‚‹ã€‚" # @see #: ../lib/yard/cli/yardoc.rb:141 ../lib/yard/rake/yardoc_task.rb:38 msgid "tag|see|Verifier" msgstr "" # YARD::CLI::Yardoc::DEFAULT_YARDOPTS_FILE #: ../lib/yard/cli/yardoc.rb:143 msgid "The configuration filename to load extra options from" msgstr "追加ã®ã‚ªãƒ—ションをロードã™ã‚‹è¨­å®šãƒ•ァイルå" # @see #: ../lib/yard/cli/yardoc.rb:147 ../lib/yard/code_objects/base.rb:463 msgid "tag|see|Templates::Engine#render" msgstr "" # @return [Hash] #: ../lib/yard/cli/yardoc.rb:147 msgid "the hash of options passed to the template." msgstr "テンプレートã«è§£æžã•れãŸã€optionsã®ãƒãƒƒã‚·ãƒ¥" # @return [Array] #: ../lib/yard/cli/yardoc.rb:150 msgid "list of Ruby source files to process" msgstr "処ç†ã™ã‚‹ç‚ºã®Rubyソースファイルã®ãƒªã‚¹ãƒˆ" # @since #: ../lib/yard/cli/yardoc.rb:154 ../lib/yard/code_objects/base.rb:430 #: ../lib/yard/code_objects/method_object.rb:91 #: ../lib/yard/code_objects/method_object.rb:98 #: ../lib/yard/code_objects/method_object.rb:104 #: ../lib/yard/core_ext/file.rb:62 ../lib/yard/parser/source_parser.rb:469 #: ../lib/yard/templates/helpers/html_helper.rb:430 #: ../lib/yard/templates/helpers/html_helper.rb:542 msgid "0.5.3" msgstr "" # @return [Array] #: ../lib/yard/cli/yardoc.rb:154 msgid "list of excluded paths (regexp matches)" msgstr "除外ã•れãŸãƒ‘ス(æ­£è¦è¡¨ç¾ã«ãƒžãƒƒãƒã™ã‚‹)ã®ãƒªã‚¹ãƒˆ" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:159 msgid "" "whether to use the existing yardoc db if the\n" ".yardoc already exists. Also makes use of file checksums to\n" "parse only changed files." msgstr "" ".yardocãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€æ—¢å­˜ã®yardoc dbを利用ã™ã‚‹ã‹ã©ã†ã‹ã€‚\n" "従ã£ã¦ã€å¤‰æ›´ã•れãŸãƒ•ァイルã ã‘è§£æžã™ã‚‹ç‚ºã«ãƒ•ァイルãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’活用ã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:162 msgid "whether to parse options from .yardopts" msgstr ".yardoptsã‹ã‚‰ã€ã‚ªãƒ—ションを解æžã™ã‚‹ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:165 msgid "whether to parse options from .document" msgstr ".documentã‹ã‚‰ã‚ªãƒ—ションを解æžã™ã‚‹ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:168 msgid "whether objects should be serialized to .yardoc db" msgstr "オブジェクトãŒ.yardoc dbã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れるã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:171 msgid "whether to generate output" msgstr "出力を生æˆã™ã‚‹ã‹ã©ã†ã‹" # @since #: ../lib/yard/cli/yardoc.rb:175 ../lib/yard/cli/yardoc.rb:402 #: ../lib/yard/handlers/ruby/legacy/class_condition_handler.rb:28 #: ../lib/yard/handlers/ruby/legacy/class_condition_handler.rb:67 #: ../lib/yard/handlers/ruby/legacy/class_condition_handler.rb:72 #: ../lib/yard/templates/helpers/base_helper.rb:149 msgid "0.5.5" msgstr "" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:175 msgid "whether to print a list of objects" msgstr "オブジェクトã®ãƒªã‚¹ãƒˆã‚’プリントã™ã‚‹ã‹ã©ã†ã‹" # YARD::CLI::Yardoc#options_file # YARD::CLI::Yardoc#options_file= #: ../lib/yard/cli/yardoc.rb:178 msgid "The options file name (defaults to {DEFAULT_YARDOPTS_FILE})" msgstr "ファイルåã®ã‚ªãƒ—ション(デフォルトã§ã¯{DEFAULT_YARDOPTS_FILE}ã«ãªã‚‹)" # @return [String] #: ../lib/yard/cli/yardoc.rb:179 msgid "the filename to load extra options from" msgstr "追加ã®ã‚ªãƒ—ションをロードã™ã‚‹ç‚ºã®ãƒ•ァイルå" # YARD::CLI::Yardoc#visibilities # YARD::CLI::Yardoc#visibilities= #: ../lib/yard/cli/yardoc.rb:182 msgid "Keep track of which visibilities are to be shown" msgstr "visibilitiesã§ç¤ºã•れるãã®ä¸­ã§æ‰‹é †ã‚’ç¶­æŒã™ã‚‹ã€‚" # @since #: ../lib/yard/cli/yardoc.rb:184 ../lib/yard/cli/yardoc.rb:281 #: ../lib/yard/cli/yardoc.rb:476 ../lib/yard/cli/yri.rb:74 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:133 #: ../lib/yard/parser/base.rb:51 #: ../lib/yard/parser/ruby/legacy/ruby_parser.rb:26 #: ../lib/yard/parser/source_parser.rb:150 #: ../lib/yard/parser/source_parser.rb:152 #: ../lib/yard/parser/source_parser.rb:158 #: ../lib/yard/parser/source_parser.rb:160 #: ../lib/yard/parser/source_parser.rb:168 #: ../lib/yard/parser/source_parser.rb:512 ../lib/yard/verifier.rb:36 #: ../lib/yard/verifier.rb:57 msgid "0.5.6" msgstr "" # @return [Array] #: ../lib/yard/cli/yardoc.rb:184 msgid "a list of visibilities" msgstr "visibilitiesã®ãƒªã‚¹ãƒˆ" # YARD::CLI::Yardoc#visibilities # YARD::CLI::Yardoc#visibilities= #: ../lib/yard/cli/yardoc.rb:187 msgid "Keep track of which APIs are to be shown" msgstr "ãã®APIãŒè¡¨ç¤ºã•れる経éŽã‚’追ã†" # @since #: ../lib/yard/cli/yardoc.rb:189 ../lib/yard/cli/yardoc.rb:484 #: ../lib/yard/i18n/message.rb:48 ../lib/yard/i18n/messages.rb:52 #: ../lib/yard/i18n/pot_generator.rb:69 msgid "0.8.1" msgstr "" # @return [Array] #: ../lib/yard/cli/yardoc.rb:189 msgid "a list of APIs" msgstr "APIã®ãƒªã‚¹ãƒˆ" # @return [Array] #: ../lib/yard/cli/yardoc.rb:193 msgid "a list of tags to hide from templates" msgstr "テンプレートã‹ã‚‰éš ã™ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆ" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:197 msgid "whether to print statistics after parsing" msgstr "è§£æžã®å¾Œã§çµ±è¨ˆå€¤ã‚’プリントã™ã‚‹ã‹ã©ã†ã‹" # @return [Array] #: ../lib/yard/cli/yardoc.rb:201 msgid "a list of assets to copy after generation" msgstr "生æˆã®å¾Œã§ã‚³ãƒ”ーã™ã‚‹è³‡ç”£ã®ãƒªã‚¹ãƒˆ" # @since #: ../lib/yard/cli/yardoc.rb:205 ../lib/yard/docstring.rb:138 #: ../lib/yard/docstring.rb:186 ../lib/yard/docstring.rb:263 #: ../lib/yard/docstring.rb:272 ../lib/yard/parser/source_parser.rb:68 #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 #: ../lib/yard/parser/source_parser.rb:292 #: ../lib/yard/parser/source_parser.rb:321 #: ../lib/yard/parser/source_parser.rb:328 #: ../lib/yard/parser/source_parser.rb:335 #: ../lib/yard/parser/source_parser.rb:342 #: ../lib/yard/parser/source_parser.rb:349 #: ../lib/yard/parser/source_parser.rb:393 #: ../lib/yard/parser/source_parser.rb:397 ../lib/yard/tags/directives.rb:318 #: ../lib/yard/tags/directives.rb:393 ../lib/yard/tags/directives.rb:489 #: ../lib/yard/tags/directives.rb:553 ../lib/yard/tags/directives.rb:583 #: ../lib/yard/templates/helpers/base_helper.rb:110 #: ../lib/yard/templates/helpers/html_helper.rb:134 msgid "0.7.0" msgstr "" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:205 msgid "whether markup option was specified" msgstr "ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæŒ‡å®šã•れãŸã‹ã©ã†ã‹" # YARD::CLI::Yardoc#initialize #: ../lib/yard/cli/yardoc.rb:208 msgid "Creates a new instance of the commandline utility" msgstr "ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã®æ–°ã—ã„インスタンスを作æˆã™ã‚‹ã€‚" # @return [Yardoc] #: ../lib/yard/cli/yardoc.rb:208 msgid "a new instance of Yardoc" msgstr "Yardocã®æ–°ã—ã„インスタンス" # @param [Array] args #: ../lib/yard/cli/yardoc.rb:243 msgid "" "the list of arguments. If the list only\n" "contains a single nil value, skip calling of {#parse_arguments}" msgstr "" "引数ã®ãƒªã‚¹ãƒˆã€‚リストãŒnilã ã‘ã®å ´åˆã€\n" "{#parse_arguments}メソッドを呼ã³å‡ºã—スキップã™ã‚‹ã€‚" # YARD::CLI::Yardoc#parse_arguments #: ../lib/yard/cli/yardoc.rb:278 msgid "Parses commandline arguments" msgstr "コマンドライン引数を解æžã™ã‚‹" # @return [Boolean] #: ../lib/yard/cli/yardoc.rb:281 msgid "whether or not arguments are valid" msgstr "å¼•æ•°ãŒæœ‰åйã‹ã©ã†ã‹" # YARD::CLI::Yardoc#all_objects #: ../lib/yard/cli/yardoc.rb:317 msgid "" "The list of all objects to process. Override this method to change\n" "which objects YARD should generate documentation for." msgstr "" "処ç†ã™ã‚‹ä¸Šã§ã®å…¨ã¦ã®ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã€‚\n" "変更ã™ã‚‹ãŸã³ã«ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ä¸Šæ›¸ãã™ã‚‹ã®ã§ã€\n" "YARDã®ã‚ªãƒ–ジェクトã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã¹ãã§ã‚る。" # @deprecated #: ../lib/yard/cli/yardoc.rb:321 msgid "To hide methods use the +@private+ tag instead." msgstr "メソッドを隠ã™ã«ã¯ã€ä»£ã‚りã«ã€ +@private+ タグを使ã†" # @return [Array] #: ../lib/yard/cli/yardoc.rb:321 msgid "a list of code objects to process" msgstr "処ç†ã™ã‚‹ç‚ºã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ" # YARD::CLI::Yardoc#yardopts #: ../lib/yard/cli/yardoc.rb:326 msgid "Parses the .yardopts file for default yard options" msgstr "デフォルトã®yardオプション用ã«.yardoptsファイルを解æžã™ã‚‹ã€‚" # @return [Array] #: ../lib/yard/cli/yardoc.rb:327 msgid "an array of options parsed from .yardopts" msgstr ".yardoptsã‹ã‚‰è§£æžã•れãŸã‚ªãƒ—ションã®é…列" # YARD::CLI::Yardoc#run_generate #: ../lib/yard/cli/yardoc.rb:337 msgid "Generates output for objects" msgstr "オブジェクト用ã®å‡ºåŠ›ã‚’ç”Ÿæˆã™ã‚‹" # @since #: ../lib/yard/cli/yardoc.rb:340 ../lib/yard/cli/yri.rb:14 #: ../lib/yard/cli/yri.rb:180 ../lib/yard/registry.rb:132 #: ../lib/yard/registry.rb:147 ../lib/yard/registry_store.rb:130 msgid "0.5.1" msgstr "" # @param [Hash, nil] checksums #: ../lib/yard/cli/yardoc.rb:340 msgid "if supplied, a list of checkums for files." msgstr "æä¾›ã™ã‚‹å ´åˆã¯ã€ãƒ•ァイルã®ç‚ºã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã®ãƒªã‚¹ãƒˆ" # @param [Hash, nil] #: ../lib/yard/cli/yardoc.rb:340 msgid "tag|param|checksums" msgstr "" # YARD::CLI::Yardoc#verify_markup_options #: ../lib/yard/cli/yardoc.rb:361 msgid "" "Verifies that the markup options are valid before parsing any code.\n" "Failing early is better than failing late." msgstr "" "ä»»æ„ã®ã‚³ãƒ¼ãƒ‰ã‚’è§£æžã™ã‚‹å‰ã«ã€æœ‰åйãªãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—オプションをèªè¨¼ã™ã‚‹ã€‚\n" "(早期ã«å¤±æ•—ãŒåˆ†ã‹ã‚‹ã»ã†ãŒã€å¾Œã§å¤±æ•—ã™ã‚‹ã‚ˆã‚Šã„ã„ã®ã§)" # YARD::CLI::Yardoc#copy_assets #: ../lib/yard/cli/yardoc.rb:386 msgid "Copies any assets to the output directory" msgstr "出力ディレクトリã«ä»»æ„ã®è³‡ç”£ã‚’コピーã™ã‚‹ã€‚" # YARD::CLI::Yardoc#print_list #: ../lib/yard/cli/yardoc.rb:400 msgid "Prints a list of all objects" msgstr "å…¨ã¦ã®ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã‚’プリントã™ã‚‹" # YARD::CLI::Yardoc#parse_yardopts_options #: ../lib/yard/cli/yardoc.rb:411 msgid "Parses out the yardopts/document options" msgstr "yardopts/documentオプションã®å‡ºåŠ›ã‚’è§£æžã™ã‚‹" # YARD::CLI::Yardoc#support_rdoc_document_file! #: ../lib/yard/cli/yardoc.rb:426 msgid "Reads a .document file in the directory to get source file globs" msgstr "" "ソースファイルã®globã‚’å–å¾—ã™ã‚‹ç‚ºã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ä¸­ã®.documentファイルをロード" "ã™ã‚‹" # @return [Array] #: ../lib/yard/cli/yardoc.rb:427 msgid "an array of files parsed from .document" msgstr ".documentã‹ã‚‰è§£æžã•れãŸãƒ•ァイルã®é…列" # YARD::CLI::Yardoc#add_extra_files #: ../lib/yard/cli/yardoc.rb:435 msgid "Adds a set of extra documentation files to be processed" msgstr "処ç†ã•れる追加ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ァイルã®ã‚°ãƒ«ãƒ¼ãƒ—を追加ã™ã‚‹" # @param [Array] # @param [String, Array] #: ../lib/yard/cli/yardoc.rb:436 ../lib/yard/cli/yardoc.rb:456 #: ../lib/yard/i18n/pot_generator.rb:102 #: ../lib/yard/parser/source_parser.rb:32 #: ../lib/yard/parser/source_parser.rb:361 ../lib/yard/registry.rb:97 msgid "tag|param|files" msgstr "" # @param [Array] files #: ../lib/yard/cli/yardoc.rb:436 msgid "the set of documentation files" msgstr "ドキュメントファイルã®ã‚°ãƒ«ãƒ¼ãƒ—" # YARD::CLI::Yardoc#parse_files #: ../lib/yard/cli/yardoc.rb:448 msgid "" "Parses the file arguments into Ruby files and extra files, which are\n" "separated by a '-' element." msgstr "" "Rubyã®ãƒ•ァイルã¨è¿½åŠ ã®ãƒ•ァイルをfilesã®å¼•æ•°ã¨ã—ã¦è§£æžã™ã‚‹ã€‚\n" "ãれã¯ã€'-'è¦ç´ ã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚Œã‚‹ã€‚" # @example Parses a set of Ruby files with a separator and extra files #: ../lib/yard/cli/yardoc.rb:456 msgid "parse_files %w(file1 file2 - extrafile1 extrafile2)" msgstr "" # @example Parses a set of Ruby source files #: ../lib/yard/cli/yardoc.rb:456 msgid "parse_files %w(file1 file2 file3)" msgstr "" # @example #: ../lib/yard/cli/yardoc.rb:456 msgid "tag|example|Parses a set of Ruby files with a separator and extra files" msgstr "Rubyã®ãƒ•ァイルã¨åŒºåˆ‡ã‚Šã‚’用ã„ãŸè¿½åŠ ã®ãƒ•ァイルã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’è§£æžã™ã‚‹" # @example #: ../lib/yard/cli/yardoc.rb:456 msgid "tag|example|Parses a set of Ruby source files" msgstr "Rubyソースファイルã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’è§£æžã™ã‚‹" # @param [Array] files #: ../lib/yard/cli/yardoc.rb:456 ../lib/yard/parser/source_parser.rb:32 msgid "the list of files to parse" msgstr "è§£æžã™ã‚‹ãƒ•ァイルã®ãƒªã‚¹ãƒˆ" # YARD::CLI::Yardoc#add_visibility_verifier #: ../lib/yard/cli/yardoc.rb:474 msgid "Adds verifier rule for visibilities" msgstr "visibilities用ã«èªè¨¼ãƒ«ãƒ¼ãƒ«ã‚’追加ã™ã‚‹" # YARD::CLI::Yardoc#add_visibility_verifier #: ../lib/yard/cli/yardoc.rb:482 msgid "Adds verifier rule for APIs" msgstr "API用ã«èªè¨¼ãƒ«ãƒ¼ãƒ«ã‚’追加ã™ã‚‹" # YARD::CLI::Yardoc#run_verifier # YARD::Templates::Helpers::BaseHelper#run_verifier #: ../lib/yard/cli/yardoc.rb:494 #: ../lib/yard/templates/helpers/base_helper.rb:24 msgid "" "Runs a list of objects against the {Verifier} object passed into the\n" "template and returns the subset of verified objects." msgstr "" "ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã¸æ¸¡ã•れãŸ{Verifier}オブジェクトã«å¯¾ã—ã¦ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã‚’èµ·" "å‹•ã™ã‚‹ã€‚\n" "ãã—ã¦ã€èªè¨¼ã•れãŸã‚ªãƒ–ジェクトã®ã‚µãƒ–セットを返ã™ã€‚" # YARD::CLI::Yardoc#general_options #: ../lib/yard/cli/yardoc.rb:532 msgid "Adds general options" msgstr "全体的ãªã‚ªãƒ—ションを追加ã™ã‚‹ã€‚" # YARD::CLI::Yardoc#yardopts_options #: ../lib/yard/cli/yardoc.rb:573 msgid "Adds --[no-]yardopts / --[no-]document" msgstr "" # @since #: ../lib/yard/cli/yardoc.rb:592 msgid "0.2.1" msgstr "" # YARD::CLI::Yardoc#output_options #: ../lib/yard/cli/yardoc.rb:592 msgid "Adds output options" msgstr "オプションã®å‡ºåŠ›ã‚’è¿½åŠ ã™ã‚‹ã€‚" # YARD::CLI::Yardoc#tag_options #: ../lib/yard/cli/yardoc.rb:741 msgid "Adds tag options" msgstr "ã‚¿ã‚°ã®ã‚ªãƒ—ションを追加ã™ã‚‹ã€‚" # YARD::CLI::YRI #: ../lib/yard/cli/yri.rb:6 msgid "A tool to view documentation in the console like `ri`" msgstr "`ri`ã®ã‚ˆã†ãªã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’調ã¹ã‚‹ç‚ºã®ãƒ„ール" # YARD::CLI::YRI::CACHE_FILE #: ../lib/yard/cli/yri.rb:8 msgid "" "The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded\n" "from." msgstr "YRIキャッシュファイルãŒãƒ­ãƒ¼ãƒ‰ã•れるã€{YARD::CONFIG_DIR}ã®ä¸­ã®å ´æ‰€" # YARD::CLI::YRI::SEARCH_PATHS_FILE #: ../lib/yard/cli/yri.rb:12 msgid "" "A file containing all paths, delimited by newlines, to search for\n" "yardoc databases." msgstr "" "ファイルã¯ã€æ”¹è¡Œã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚ŒãŸyardocãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ç”¨ã®æ¤œç´¢ã™ã‚‹ç‚ºã®\n" "å…¨ã¦ã®ãƒ‘スをå«ã‚“ã§ã„る。" # YARD::CLI::YRI::DEFAULT_SEARCH_PATHS #: ../lib/yard/cli/yri.rb:17 msgid "" "Default search paths that should be loaded dynamically into YRI. These " "paths\n" "take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems\n" "paths). To add a path, call:" msgstr "" "デフォルトã§ã¯ã€YRIã¸å‹•çš„ã«ãƒ­ãƒ¼ãƒ‰ã•れるã¹ãパスを検索ã™ã‚‹ã€‚\n" "ã“れらã®ãƒ‘スã¯ã€ä»–ã®ãƒ‘ス全ã¦ã‚ˆã‚Šå„ªå…ˆã—ã¦å–å¾—ã™ã‚‹({SEARCH_PATHS_FILE}ã¨" "RubyGemsパス)。\n" "パスを追加ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«å‘¼ã³å‡ºã™ã€‚" # YARD::CLI::YRI::DEFAULT_SEARCH_PATHS #: ../lib/yard/cli/yri.rb:21 msgid " DEFAULT_SEARCH_PATHS.push(\"/path/to/.yardoc\")" msgstr "" # @return [Array] #: ../lib/yard/cli/yri.rb:24 msgid "a list of extra search paths" msgstr "è¿½åŠ ã®æ¤œç´¢ãƒ‘スã®ãƒªã‚¹ãƒˆ" # @return [YRI] #: ../lib/yard/cli/yri.rb:30 msgid "a new instance of YRI" msgstr "YRIã®æ–°ã—ã„インスタンス" # @example #: ../lib/yard/cli/yri.rb:49 msgid "YRI.new.run('String#reverse')" msgstr "" # YARD::CLI::YRI#print_usage #: ../lib/yard/cli/yri.rb:72 msgid "Prints the command usage" msgstr "コマンドã®ä½¿ç”¨æ³•をプリントã™ã‚‹ã€‚" # YARD::CLI::YRI#cache_object #: ../lib/yard/cli/yri.rb:80 msgid "" "Caches the .yardoc file where an object can be found in the {CACHE_FILE}" msgstr "" "オブジェクトãŒ{CACHE_FILE}ã®ä¸­ã‚’見ã¤ã‘られる場åˆã€\n" ".yardocファイルをキャッシュã™ã‚‹ã€‚" # @param [CodeObjects::Base, nil] # @param [CodeObjects::Base] # @param [Base, Proxy, String, Symbol, nil] # @param [Proxy, CodeObjects::Base] # @param [CodeObjects::Base, String] # @param [CodeObjects::Base, CodeObjects::ExtraFileObject, String] #: ../lib/yard/cli/yri.rb:94 ../lib/yard/code_objects/class_object.rb:122 #: ../lib/yard/docstring.rb:74 ../lib/yard/docstring.rb:99 #: ../lib/yard/docstring_parser.rb:106 ../lib/yard/handlers/base.rb:411 #: ../lib/yard/handlers/base.rb:424 ../lib/yard/handlers/base.rb:433 #: ../lib/yard/handlers/base.rb:456 ../lib/yard/handlers/base.rb:470 #: ../lib/yard/handlers/base.rb:483 ../lib/yard/handlers/base.rb:495 #: ../lib/yard/handlers/base.rb:506 ../lib/yard/handlers/base.rb:520 #: ../lib/yard/handlers/base.rb:544 ../lib/yard/registry.rb:174 #: ../lib/yard/registry.rb:182 ../lib/yard/serializers/base.rb:41 #: ../lib/yard/serializers/base.rb:50 ../lib/yard/serializers/base.rb:61 #: ../lib/yard/serializers/file_system_serializer.rb:48 #: ../lib/yard/serializers/file_system_serializer.rb:69 #: ../lib/yard/server/commands/base.rb:138 ../lib/yard/templates/engine.rb:114 #: ../lib/yard/templates/helpers/base_helper.rb:102 #: ../lib/yard/templates/helpers/base_helper.rb:119 #: ../lib/yard/templates/helpers/base_helper.rb:179 #: ../lib/yard/templates/helpers/base_helper.rb:193 #: ../lib/yard/templates/helpers/html_helper.rb:288 #: ../lib/yard/templates/helpers/uml_helper.rb:8 #: ../lib/yard/templates/helpers/uml_helper.rb:19 ../lib/yard/verifier.rb:75 msgid "tag|param|object" msgstr "" # @return [String] #: ../lib/yard/cli/yri.rb:94 msgid "the formatted output for an object." msgstr "オブジェクト用ã«ãƒ•ォーマットã•れãŸå‡ºåŠ›" # @param [CodeObjects::Base] object #: ../lib/yard/cli/yri.rb:94 msgid "the object to print." msgstr "プリントã™ã‚‹ç‚ºã®ã‚ªãƒ–ジェクト" # YARD::CLI::YRI#find_object #: ../lib/yard/cli/yri.rb:104 msgid "" "Locates an object by name starting in the cached paths and then\n" "searching through any search paths." msgstr "" "キャッシュã•れãŸãƒ‘スã§å§‹ã¾ã‚‹åå‰ã®ã‚ªãƒ–ジェクトを示ã—ã€\n" "ãã®æ™‚ã€ä»»æ„ã®æ¤œç´¢ãƒ‘スを通ã—ã¦æ¤œç´¢ã™ã‚‹ã€‚" # @return [CodeObjects::Base] #: ../lib/yard/cli/yri.rb:109 msgid "an object if found" msgstr "見ã¤ã‹ã£ãŸå ´åˆã¯ã€ã‚ªãƒ–ジェクト" # @return [nil] #: ../lib/yard/cli/yri.rb:109 ../lib/yard/registry.rb:235 msgid "if no object is found" msgstr "オブジェクトãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆ" # @param [String] name #: ../lib/yard/cli/yri.rb:109 msgid "the full name of the object" msgstr "オブジェクトã®ãƒ•ルãƒãƒ¼ãƒ " # YARD::CLI::YRI#try_load_object #: ../lib/yard/cli/yri.rb:134 msgid "" "Tries to load the object with name. If successful, caches the object\n" "with the cache_path" msgstr "" # @param [String] # @param [Array] # @param [String, :root] #: ../lib/yard/cli/yri.rb:141 msgid "tag|param|cache_path" msgstr "" # @param [String] cache_path #: ../lib/yard/cli/yri.rb:141 msgid "" "the location of the yardoc\n" "db containing the object to cache for future lookups.\n" "No caching is done if this is nil." msgstr "" # @return [CodeObjects::Base] #: ../lib/yard/cli/yri.rb:141 msgid "the object path" msgstr "オブジェクトパス" # YARD::CLI::YRI#load_cache #: ../lib/yard/cli/yri.rb:151 msgid "Loads {CACHE_FILE}" msgstr "{CACHE_FILE}をロードã™ã‚‹" # YARD::CLI::YRI#add_gem_paths #: ../lib/yard/cli/yri.rb:161 msgid "Adds all RubyGems yardoc files to search paths" msgstr "パスを検索ã™ã‚‹ç‚ºã«å…¨ã¦ã®RubyGemsyardocファイルを追加ã™ã‚‹\n" # YARD::CLI::YRI#add_default_paths #: ../lib/yard/cli/yri.rb:179 msgid "Adds paths in {SEARCH_PATHS_FILE}" msgstr "{SEARCH_PATHS_FILE}ã®ä¸­ã®ãƒ‘スを追加ã™ã‚‹ã€‚" # YARD::CodeObjects::CodeObjectList #: ../lib/yard/code_objects/base.rb:4 msgid "" "A list of code objects. This array acts like a set (no unique items)\n" "but also disallows any {Proxy} objects from being added." msgstr "" "コードオブジェクトã®ãƒªã‚¹ãƒˆã€ã“ã®é…列ã¯ã‚°ãƒ«ãƒ¼ãƒ—(固有ã®ç‰©ã§ã¯ãªã„)ã®ã‚ˆã†ã«æŒ¯ã‚‹" "舞ã†ã€‚\n" "ã—ã‹ã—ãªãŒã‚‰ã€è¿½åŠ ã•れる任æ„ã®{Proxy}オブジェクトを拒å¦ã™ã‚‹ã€‚" # YARD::CodeObjects::CodeObjectList#initialize #: ../lib/yard/code_objects/base.rb:7 msgid "Creates a new object list associated with a namespace" msgstr "namespaceã«é–¢é€£ä»˜ã‘ã‚‰ã‚ŒãŸæ–°ã—ã„オブジェクトã®ãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹ã€‚" # @param [NamespaceObject] #: ../lib/yard/code_objects/base.rb:10 msgid "tag|param|owner" msgstr "" # @param [NamespaceObject] owner #: ../lib/yard/code_objects/base.rb:10 msgid "the namespace the list should be associated with" msgstr "リストã§é–¢é€£ä»˜ã‘られるã¹ãã€namespace" # YARD::CodeObjects::CodeObjectList#push # YARD::CodeObjects::CodeObjectList#<< #: ../lib/yard/code_objects/base.rb:15 ../lib/yard/code_objects/base.rb:28 msgid "Adds a new value to the list" msgstr "ãƒªã‚¹ãƒˆã«æ–°ã—ã値を追加ã™ã‚‹" # @param [Base] value #: ../lib/yard/code_objects/base.rb:18 msgid "a code object to add" msgstr "追加ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクト" # @return [CodeObjectList] # @return [Proxy] # @return [SymbolHash] #: ../lib/yard/code_objects/base.rb:18 ../lib/yard/code_objects/proxy.rb:28 #: ../lib/yard/core_ext/symbol_hash.rb:65 msgid "self" msgstr "" # @param # @param [Base] # @param [Object] # @param [String] # @param [CodeObjects::Base] #: ../lib/yard/code_objects/base.rb:18 ../lib/yard/code_objects/base.rb:325 #: ../lib/yard/code_objects/extra_file_object.rb:7 #: ../lib/yard/code_objects/extra_file_object.rb:8 #: ../lib/yard/code_objects/extra_file_object.rb:9 #: ../lib/yard/code_objects/extra_file_object.rb:10 #: ../lib/yard/code_objects/namespace_object.rb:6 #: ../lib/yard/code_objects/namespace_object.rb:7 #: ../lib/yard/code_objects/namespace_object.rb:8 #: ../lib/yard/core_ext/insertion.rb:13 ../lib/yard/core_ext/symbol_hash.rb:41 #: ../lib/yard/handlers/base.rb:311 ../lib/yard/handlers/base.rb:314 #: ../lib/yard/handlers/base.rb:317 ../lib/yard/handlers/base.rb:320 #: ../lib/yard/handlers/base.rb:333 ../lib/yard/handlers/base.rb:335 #: ../lib/yard/handlers/base.rb:337 ../lib/yard/handlers/base.rb:339 #: ../lib/yard/logging.rb:20 ../lib/yard/logging.rb:30 #: ../lib/yard/options.rb:99 ../lib/yard/parser/c/statement.rb:5 #: ../lib/yard/parser/c/statement.rb:6 ../lib/yard/parser/c/statement.rb:7 #: ../lib/yard/parser/c/statement.rb:13 ../lib/yard/parser/c/statement.rb:39 #: ../lib/yard/parser/c/statement.rb:43 ../lib/yard/parser/c/statement.rb:44 #: ../lib/yard/parser/c/statement.rb:45 ../lib/yard/parser/c/statement.rb:51 #: ../lib/yard/parser/c/statement.rb:52 ../lib/yard/parser/c/statement.rb:53 #: ../lib/yard/parser/ruby/ast_node.rb:41 #: ../lib/yard/parser/ruby/ast_node.rb:42 #: ../lib/yard/parser/ruby/ast_node.rb:48 #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:485 #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:486 #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:487 #: ../lib/yard/parser/ruby/legacy/statement.rb:5 #: ../lib/yard/parser/ruby/legacy/statement.rb:11 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:6 #: ../lib/yard/registry_store.rb:52 ../lib/yard/tags/option_tag.rb:4 #: ../lib/yard/tags/ref_tag.rb:4 ../lib/yard/tags/ref_tag_list.rb:4 #: ../lib/yard/templates/helpers/base_helper.rb:4 #: ../lib/yard/templates/helpers/base_helper.rb:206 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:23 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:68 #: ../lib/yard/templates/template.rb:6 ../lib/yard/templates/template.rb:59 msgid "tag|param|value" msgstr "" # YARD::CodeObjects::NSEP #: ../lib/yard/code_objects/base.rb:32 msgid "Namespace separator" msgstr "Namespace separator(ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹åŒºåˆ‡ã‚Š)" # YARD::CodeObjects::NSEPQ #: ../lib/yard/code_objects/base.rb:35 msgid "Regex-quoted namespace separator" msgstr "" "Regex-quoted namespace separator(クオートã•ã‚ŒãŸæ­£è¦è¡¨ç¾ãƒãƒ¼ãƒ ã‚¹ãƒšãƒ¼ã‚¹åŒºåˆ‡ã‚Š)" # YARD::CodeObjects::ISEP #: ../lib/yard/code_objects/base.rb:38 msgid "Instance method separator" msgstr "Instance method separator(インスタンスメソッドã®åŒºåˆ‡ã‚Š)" # YARD::CodeObjects::ISEPQ #: ../lib/yard/code_objects/base.rb:41 msgid "Regex-quoted instance method separator" msgstr "" "Regex-quoted instance method separator(æ­£è¦è¡¨ç¾ã§ã‚¯ã‚ªãƒ¼ãƒˆã•れãŸã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡" "ソッド区切り)" # YARD::CodeObjects::CSEP #: ../lib/yard/code_objects/base.rb:44 msgid "Class method separator" msgstr "Class method separator(クラスメソッド区切り)" # YARD::CodeObjects::CSEPQ #: ../lib/yard/code_objects/base.rb:47 msgid "Regex-quoted class method separator" msgstr "" "Regex-quoted class method separator(æ­£è¦è¡¨ç¾ã§ã‚¯ã‚ªãƒ¼ãƒˆã•れãŸã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰åŒº" "切り)" # YARD::CodeObjects::CONSTANTMATCH #: ../lib/yard/code_objects/base.rb:50 msgid "Regular expression to match constant name" msgstr "Regular expression to match constant name(定数åã«ãƒžãƒƒãƒã™ã‚‹æ­£è¦è¡¨ç¾)" # YARD::CodeObjects::NAMESPACEMATCH #: ../lib/yard/code_objects/base.rb:53 msgid "Regular expression to match namespaces (const A or complex path A::B)" msgstr "namespaceã«ãƒžãƒƒãƒã™ã‚‹æ­£è¦è¡¨ç¾(const A or complex path A::B)" # YARD::CodeObjects::METHODNAMEMATCH #: ../lib/yard/code_objects/base.rb:56 msgid "Regular expression to match a method name" msgstr "メソッドåã«ãƒžãƒƒãƒã™ã‚‹æ­£è¦è¡¨ç¾" # YARD::CodeObjects::METHODMATCH #: ../lib/yard/code_objects/base.rb:59 msgid "" "Regular expression to match a fully qualified method def (self.foo, Class." "foo)." msgstr "å…¨ã¦ã«æœ‰åйãªãƒ¡ã‚½ãƒƒãƒ‰å®šç¾©(self.foo Class.fooãªã©)ã«ãƒžãƒƒãƒã™ã‚‹æ­£è¦è¡¨ç¾" # YARD::CodeObjects::BUILTIN_EXCEPTIONS #: ../lib/yard/code_objects/base.rb:62 msgid "All builtin Ruby exception classes for inheritance tree." msgstr "継承ツリー用ã®å…¨ã¦ã®çµ„ã¿è¾¼ã¿Ruby例外クラス" # YARD::CodeObjects::BUILTIN_CLASSES #: ../lib/yard/code_objects/base.rb:68 msgid "All builtin Ruby classes for inheritance tree." msgstr "継承ツリー用ã®å…¨ã¦ã®Rubyクラス" # @note #: ../lib/yard/code_objects/base.rb:69 msgid "MatchingData is a 1.8.x legacy class" msgstr "マッãƒãƒ‡ãƒ¼ã‚¿ãŒ1.8以é™ã®ãƒ¬ã‚¬ã‚·ãƒ¼ã‚±ãƒ¼ã‚¹ã®å ´åˆ\n" # YARD::CodeObjects::BUILTIN_MODULES #: ../lib/yard/code_objects/base.rb:74 msgid "All builtin Ruby modules for mixin handling." msgstr "mixinæ“作用ã®å…¨ã¦ã®Ruby組ã¿è¾¼ã¿ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«" # YARD::CodeObjects::BUILTIN_ALL #: ../lib/yard/code_objects/base.rb:77 msgid "All builtin Ruby classes and modules." msgstr "å…¨ã¦ã®çµ„ã¿è¾¼ã¿Rubyクラスやモジュール" # YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH #: ../lib/yard/code_objects/base.rb:80 msgid "" "Hash of {BUILTIN_EXCEPTIONS} as keys and true as value (for O(1) lookups)" msgstr "{BUILTIN_EXCEPTIONS}ã®ã‚­ãƒ¼ã¨,値ãŒtrueã®ãƒãƒƒã‚·ãƒ¥,(for O(1) lookups)" # YARD::CodeObjects::Base #: ../lib/yard/code_objects/base.rb:83 msgid "" "+Base+ is the superclass of all code objects recognized by YARD. A code\n" "object is any entity in the Ruby language (class, method, module). A\n" "DSL might subclass +Base+ to create a new custom object representing\n" "a new entity type." msgstr "" "+Base+ ã¯ã€YARDã«ã‚ˆã£ã¦è¡¨ã•れる全ã¦ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ã‚¹ãƒ¼ãƒ‘ークラスã¨ãª" "る。\n" "コードオブジェクトã¯ã€Ruby言語ã®ä¸­ã®ä½•らã‹ã®(class,method,module)æ§‹æˆè¦ç´ ã¨ãª" "る。\n" "DSLã¯æ–°ã—ã„æ§‹æˆè¦ç´ ã®åž‹ã§è¡¨ã•れるカスタムオブジェクトを作æˆã™ã‚‹ç‚ºã«ã€\n" "+Base+ をサブクラスã¨ã™ã‚‹ã‹ã‚‚ã—れãªã„。\n" # YARD::CodeObjects::Base #: ../lib/yard/code_objects/base.rb:88 msgid "" "== Registry Integration\n" "Any created object associated with a namespace is immediately registered\n" "with the registry. This allows the Registry to act as an identity map\n" "to ensure that no object is represented by more than one Ruby object\n" "in memory. A unique {#path} is essential for this identity map to work\n" "correctly." msgstr "" "== レジストリーã®çµ±åˆ\n" "namespaceã¨å…±ã«é–¢é€£ä»˜ã‘られ作æˆã•れる任æ„ã®ã‚ªãƒ–ジェクトã¯ã€ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã¨å…±ã«ç›´ãã«è¨˜éŒ²ã•れる。\n" "ã“れã¯ã€ãƒ¡ãƒ¢ãƒªã®ä¸­ã§ä¸€ã¤ä»¥ä¸Šã®Rubyオブジェクトã«ã‚ˆã£ã¦è¡¨ã•れる事をä¿è¨¼ã—ã€\n" "レジストリーãŒç‹¬è‡ªã®ãƒžãƒƒãƒ—ã®æ§˜ã«æŒ¯ã‚‹èˆžã†äº‹ã‚’å—ã‘入れる。\n" "固有ã®{#path}メソッドã¯ã€ã“ã®ç‹¬è‡ªã®ãƒžãƒƒãƒ—ã‚’æ­£å¸¸ã«æ©Ÿèƒ½ã•ã›ã‚‹ç‚ºã«å¿…é ˆã®ã‚‚ã®ã§ã‚る。" # YARD::CodeObjects::Base #: ../lib/yard/code_objects/base.rb:95 msgid "" "== Custom Attributes\n" "Code objects allow arbitrary custom attributes to be set using the\n" "{#[]=} assignment method." msgstr "" # YARD::CodeObjects::Base #: ../lib/yard/code_objects/base.rb:99 msgid "" "== Namespaces\n" "There is a special type of object called a \"namespace\". These are " "subclasses\n" "of the {NamespaceObject} and represent Ruby entities that can have\n" "objects defined within them. Classically these are modules and classes,\n" "though a DSL might create a custom {NamespaceObject} to describe a\n" "specific set of objects." msgstr "" "== Namespaces\n" "\"namespace\"ã«å‘¼ã³å‡ºã•れるオブジェクトã®ç‰¹åˆ¥ãªåž‹ãŒã‚る。\n" "ã“れらã¯{NamespaceObject}をサブクラス化ã—ã€\n" "ãれらã®ä¸­ã§å®šç¾©ã•ã‚Œã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæŒã¤äº‹ãŒå‡ºæ¥ã‚‹Rubyã®æ§‹æˆè¦ç´ ã‚’表ã™ã€‚\n" "オーソドックスãªã“れらã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚„クラスã¯ã€\n" "DSLãŒç‰¹å®šã®ã‚ªãƒ–ジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—を説明ã™ã‚‹ç‚ºã«ã€\n" "カスタム{NamespaceObject}を作æˆã™ã‚‹ã‹ã‚‚ã—れãªã„。\n" # @abstract #: ../lib/yard/code_objects/base.rb:111 msgid "" "This class should not be used directly. Instead, create a\n" "subclass that implements {#path}, {#sep} or {#type}." msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯ã€ç›´æŽ¥åˆ©ç”¨ã™ã‚‹ã¹ãã§ã¯ãªã„。\n" "代ã‚りã«ã€{#path}, {#sep} , {#type}メソッドを実装ã™ã‚‹ã‚µãƒ–クラスを作æˆã™ã‚‹ã€‚" # @see #: ../lib/yard/code_objects/base.rb:111 ../lib/yard/code_objects/base.rb:312 msgid "tag|see|#[]=" msgstr "" # @see #: ../lib/yard/code_objects/base.rb:111 msgid "tag|see|#path" msgstr "" # @see #: ../lib/yard/code_objects/base.rb:111 msgid "tag|see|NamespaceObject" msgstr "" # @see #: ../lib/yard/code_objects/base.rb:111 ../lib/yard/registry_store.rb:8 msgid "tag|see|Registry" msgstr "" # YARD::CodeObjects::Base#files #: ../lib/yard/code_objects/base.rb:113 msgid "The files the object was defined in. To add a file, use {#add_file}." msgstr "" "中ã§å®šç¾©ã•れãŸã‚ªãƒ–ジェクトã‹ã‚‰æˆã‚‹ãƒ•ァイルã€\n" "ファイルを追加ã™ã‚‹ã«ã¯ã€{#add_file}メソッドを使ã†ã€‚" # @return [Array] #: ../lib/yard/code_objects/base.rb:115 ../lib/yard/rake/yardoc_task.rb:24 msgid "a list of files" msgstr "ファイルã®ãƒªã‚¹ãƒˆ" # @see #: ../lib/yard/code_objects/base.rb:115 msgid "tag|see|#add_file" msgstr "" # YARD::CodeObjects::Base#namespace # YARD::CodeObjects::Base#parent #: ../lib/yard/code_objects/base.rb:118 ../lib/yard/code_objects/base.rb:496 msgid "" "The namespace the object is defined in. If the object is in the\n" "top level namespace, this is {Registry.root}" msgstr "" "中ã§å®šç¾©ã•れるオブジェクトã‹ã‚‰æˆã‚‹namespace,オブジェクトãŒtop level namespace" "ã®å ´åˆã€\n" "ã“れã¯ã€{Registry.root}ã«ãªã‚‹ã€‚" # @return [NamespaceObject] #: ../lib/yard/code_objects/base.rb:120 msgid "the namespace object" msgstr "namespaceオブジェクト" # YARD::CodeObjects::Base#source #: ../lib/yard/code_objects/base.rb:123 msgid "The source code associated with the object" msgstr "オブジェクトã«é–¢é€£ä»˜ã‘られãŸã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰" # @return [String, nil] #: ../lib/yard/code_objects/base.rb:124 msgid "source, if present, or nil" msgstr "存在ã™ã‚‹å ´åˆã¯ã‚½ãƒ¼ã‚¹,ãã†ã§ãªã‘ã°ã€nil" # YARD::CodeObjects::Base#source_type # YARD::CodeObjects::Base#source_type= #: ../lib/yard/code_objects/base.rb:127 msgid "" "Language of the source code associated with the object. Defaults to\n" "+:ruby+." msgstr "" "オブジェクトã¨å…±ã«é–¢é€£ä»˜ã‘られãŸã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®è¨€èªžã€‚\n" "デフォルト㯠+:ruby+ 。" # @return [Symbol] #: ../lib/yard/code_objects/base.rb:130 msgid "the language type" msgstr "言語ã®åž‹" # YARD::CodeObjects::Base#signature # YARD::CodeObjects::Base#signature= #: ../lib/yard/code_objects/base.rb:133 msgid "" "The one line signature representing an object. For a method, this will\n" "be of the form \"def meth(arguments...)\". This is usually the first\n" "source line." msgstr "" "オブジェクトを一行ã®ç”¨æ³•ã§è¡¨ã—ã¦ã„る。メソッド用ã€\n" "ã“れã¯ã€\"def meth(arguments...)\"ã®ã‚ˆã†ãªå½¢å¼ã«ãªã‚‹ã ã‚ã†ã€‚\n" "普通ã¯ã€æœ€åˆã®ã‚½ãƒ¼ã‚¹ã®æœ€åˆã®è¡Œã¨ãªã‚‹ã€‚" # @return [String] #: ../lib/yard/code_objects/base.rb:137 msgid "a line of source" msgstr "ソースã®è¡Œ" # YARD::CodeObjects::Base#docstring #: ../lib/yard/code_objects/base.rb:140 msgid "The documentation string associated with the object" msgstr "オブジェクトã«é–¢é€£ä»˜ã‘られãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆæ–‡å­—列" # @return [Docstring] #: ../lib/yard/code_objects/base.rb:141 ../lib/yard/code_objects/base.rb:367 msgid "the documentation string" msgstr "ドキュメント文字列(docstring)" # YARD::CodeObjects::Base#dynamic # YARD::CodeObjects::Base#dynamic= #: ../lib/yard/code_objects/base.rb:144 msgid "Marks whether or not the method is conditionally defined at runtime" msgstr "メソッドãŒå®Ÿè¡Œæ™‚ã«å®šç¾©ã•ã‚ŒãŸæ¡ä»¶ã¨ãªã‚‹ã‹ã€ãƒžãƒ¼ã‚¯ã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/code_objects/base.rb:145 msgid "true if the method is conditionally defined at runtime" msgstr "メソッドãŒå®Ÿè¡Œæ™‚ã«å®šç¾©ã•ã‚ŒãŸæ¡ä»¶ã¨ãªã‚‹å ´åˆã€true" # @return [String] #: ../lib/yard/code_objects/base.rb:149 msgid "the group this object is associated with" msgstr "ã“ã®ã‚ªãƒ–ジェクトã«é–¢é€£ä»˜ã‘られãŸã‚°ãƒ«ãƒ¼ãƒ—" # YARD::CodeObjects::Base#dynamic? #: ../lib/yard/code_objects/base.rb:152 msgid "Is the object defined conditionally at runtime?" msgstr "オブジェクトãŒå®Ÿè¡Œæ™‚ã«æ¡ä»¶ãŒå®šç¾©ã•れãŸã‹?" # @see #: ../lib/yard/code_objects/base.rb:153 msgid "tag|see|#dynamic" msgstr "" # @return [Symbol] #: ../lib/yard/code_objects/base.rb:156 ../lib/yard/code_objects/base.rb:158 msgid "the visibility of an object (:public, :private, :protected)" msgstr "オブジェクトã®å¯è¦–性(:public, :private, :protected)" # YARD::CodeObjects::Base.new #: ../lib/yard/code_objects/base.rb:162 msgid "Allocates a new code object" msgstr "æ–°ã—ã„コードオブジェクトを割り当ã¦ã‚‹ã€‚" # @see #: ../lib/yard/code_objects/base.rb:164 #: ../lib/yard/code_objects/extended_method_object.rb:21 msgid "tag|see|#initialize" msgstr "" # YARD::CodeObjects::Base.=== #: ../lib/yard/code_objects/base.rb:185 msgid "Compares the class with subclasses" msgstr "サブクラスã¨ã‚¯ãƒ©ã‚¹ã‚’比較ã™ã‚‹" # @param [Object] # @param [Base, Proxy] # @param [Base, String] # @param [Docstring, String] #: ../lib/yard/code_objects/base.rb:188 ../lib/yard/code_objects/base.rb:233 #: ../lib/yard/code_objects/base.rb:292 ../lib/yard/code_objects/base.rb:430 #: ../lib/yard/docstring.rb:112 ../lib/yard/i18n/message.rb:48 #: ../lib/yard/i18n/messages.rb:44 msgid "tag|param|other" msgstr "" # @param [Object] other #: ../lib/yard/code_objects/base.rb:188 msgid "the other object to compare classes with" msgstr "ã‚¯ãƒ©ã‚¹ã¨æ¯”較ã™ã‚‹ä»–ã®ã‚ªãƒ–ジェクト" # @return [Boolean] #: ../lib/yard/code_objects/base.rb:188 msgid "true if other is a subclass of self" msgstr "otherãŒè‡ªèº«ã®ã‚µãƒ–クラスã®å ´åˆã€true" # YARD::CodeObjects::Base#initialize #: ../lib/yard/code_objects/base.rb:194 msgid "Creates a new code object" msgstr "æ–°ã—ã„コードオブジェクトを作æˆã™ã‚‹ã€‚" # @example Create a method in the root namespace #: ../lib/yard/code_objects/base.rb:207 msgid "CodeObjects::Base.new(:root, '#method') # => #" msgstr "" # @example Create class Z inside namespace X::Y #: ../lib/yard/code_objects/base.rb:207 msgid "" "CodeObjects::Base.new(P(\"X::Y\"), :Z) # or\n" "CodeObjects::Base.new(Registry.root, \"X::Y\")" msgstr "" # @yield [self] #: ../lib/yard/code_objects/base.rb:207 msgid "a block to perform any extra initialization on the object" msgstr "オブジェクト上ã§ä»»æ„ã®è¿½åŠ ã®ã‚¤ãƒ‹ã‚·ãƒ£ãƒ©ã‚¤ã‚ºã‚’実行ã™ã‚‹block" # @example #: ../lib/yard/code_objects/base.rb:207 msgid "tag|example|Create a method in the root namespace" msgstr "root namespaceã®ä¸­ã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’作æˆã™ã‚‹" # @example #: ../lib/yard/code_objects/base.rb:207 msgid "tag|example|Create class Z inside namespace X::Y" msgstr "namespace X::Yã®ä¸­ã«Zクラスを作æˆã™ã‚‹ã€‚" # @param [NamespaceObject] # @param [CodeObjects::NamespaceObject, nil] # @param [CodeObjects::NamespaceObject] #: ../lib/yard/code_objects/base.rb:207 #: ../lib/yard/code_objects/method_object.rb:33 ../lib/yard/registry.rb:270 #: ../lib/yard/registry.rb:368 msgid "tag|param|namespace" msgstr "namespace" # @yieldparam [Base] #: ../lib/yard/code_objects/base.rb:207 msgid "tag|yieldparam|self" msgstr "self" # @param [Symbol, String] name #: ../lib/yard/code_objects/base.rb:207 msgid "the name (or complex path) of the object." msgstr "オブジェクトã®åå‰(åˆã¯ã€complex path)" # @param [NamespaceObject] namespace #: ../lib/yard/code_objects/base.rb:207 msgid "" "the namespace the object belongs in,\n" "{Registry.root} or :root should be provided if it is associated with\n" "the top level namespace." msgstr "" "ãã®ä¸­ã§ã‚ªãƒ–ジェクトã®å±žã™ã‚‹namespace,\n" "top level namespaceã¨å…±ã«ã€\n" "{Registry.root} 㨠:rootã¯ã€æä¾›ã•れるã¹ãã§ã‚る。" # @return [Base] # @return [MacroObject] #: ../lib/yard/code_objects/base.rb:207 #: ../lib/yard/code_objects/macro_object.rb:39 msgid "the newly created object" msgstr "æ–°ãŸã«ä½œæˆã•れãŸã‚ªãƒ–ジェクト" # @yieldparam [Base] self #: ../lib/yard/code_objects/base.rb:207 msgid "the newly initialized code object" msgstr "æ–°ãŸã«initializeã•れるコードオジェクト" # YARD::CodeObjects::Base#copy_to #: ../lib/yard/code_objects/base.rb:228 msgid "" "Copies all data in this object to another code object, except for\n" "uniquely identifying information (path, namespace, name, scope)." msgstr "" # @return [CodeObjects::Base] #: ../lib/yard/code_objects/base.rb:233 msgid "the object to copy data to" msgstr "オブジェクトã«ãƒ‡ãƒ¼ã‚¿ã‚’コピーã™ã‚‹ç‚ºã®ã‚ªãƒ–ジェクト" # @return [CodeObjects::RootObject] #: ../lib/yard/code_objects/base.rb:233 msgid "the other object" msgstr "ä»–ã®ã‚ªãƒ–ジェクト" # YARD::CodeObjects::Base#name # YARD::CodeObjects::Proxy#name #: ../lib/yard/code_objects/base.rb:243 ../lib/yard/code_objects/proxy.rb:71 msgid "The name of the object" msgstr "オブジェクトã®åå‰" # @return [Symbol] #: ../lib/yard/code_objects/base.rb:248 msgid "if prefix is false, the symbolized name" msgstr "prefixãŒfalseã®å ´åˆã€ã‚·ãƒ³ãƒœãƒ«åŒ–ã•れるåå‰" # @return [String] #: ../lib/yard/code_objects/base.rb:248 msgid "" "if prefix is true, prefix + the name as a String.\n" "This must be implemented by the subclass." msgstr "" "prefixãŒtrueã®å ´åˆã€prefix + åå‰ã®æ–‡å­—列ã¨ãªã‚‹ã€‚\n" "ã“れã¯ã€ã‚µãƒ–クラスã«ã‚ˆã£ã¦å®Ÿè£…ã•れãªã‘れã°ãªã‚‰ãªã„。" # @param [Boolean] #: ../lib/yard/code_objects/base.rb:248 #: ../lib/yard/code_objects/method_object.rb:170 msgid "tag|param|prefix" msgstr "prefix" # @param [Boolean] prefix #: ../lib/yard/code_objects/base.rb:248 msgid "" "whether to show a prefix. Implement\n" "this in a subclass to define how the prefix is showed." msgstr "" "prefixを見ã›ã‚‹ã‹ã©ã†ã‹ã€‚\n" "prefixãŒã©ã®ã‚ˆã†ã«ã¿ã›ã‚‰ã‚Œã‚‹ã‹å®šç¾©ã™ã‚‹ç‚ºã«ã€\n" "ã“ã®ã‚µãƒ–クラスã®ä¸­ã§å®Ÿè£…ã™ã‚‹ã€‚" # YARD::CodeObjects::Base#add_file #: ../lib/yard/code_objects/base.rb:253 msgid "" "Associates a file with a code object, optionally adding the line where it " "was defined.\n" "By convention, '' should be used to associate code that comes form " "standard input." msgstr "" "コードオブジェクトã¨å…±ã«ã€ãƒ•ァイルを関連付ã‘ã€\n" "定義ã•れãŸå ´æ‰€ã§ä»»æ„ã§è¡Œã‚’追加ã™ã‚‹ã€‚\n" "慣習ã§ã€''ã¯ã€æ¨™æº–入力形å¼ã§å…¥ã£ã¦æ¥ã‚‹ã‚³ãƒ¼ãƒ‰ã«é–¢é€£ä»˜ã‘ã¦åˆ©ç”¨ã•れるã¹ã" "ã§ã‚る。" # @param [Boolean] #: ../lib/yard/code_objects/base.rb:260 msgid "tag|param|has_comments" msgstr "has_comments" # @param [Fixnum, nil] #: ../lib/yard/code_objects/base.rb:260 ../lib/yard/i18n/message.rb:34 msgid "tag|param|line" msgstr "param|line" # @param [String] file #: ../lib/yard/code_objects/base.rb:260 msgid "the filename ('' for standard input)" msgstr "ファイルå('' ã¯æ¨™æº–入力用)" # @param [Fixnum, nil] line #: ../lib/yard/code_objects/base.rb:260 msgid "the line number where the object lies in the file" msgstr "ファイルã®ä¸­ã§ã‚ªãƒ–ジェクトãŒä½ç½®ã™ã‚‹,行数" # @param [Boolean] has_comments #: ../lib/yard/code_objects/base.rb:260 msgid "" "whether or not the definition has comments associated. This\n" "will allow {#file} to return the definition where the comments were made " "instead\n" "of any empty definitions that might have been parsed before (module " "namespaces for instance)." msgstr "" "定義ãŒé–¢é€£ä»˜ã‘られãŸã‚³ãƒ¡ãƒ³ãƒˆã‚’æŒã£ã¦ã„ã‚‹ã‹ã©ã†ã‹ã€‚\n" "ã“れã¯ã€è§£æžã•れるå‰ã«(例ãˆã°ã€module namespace)ã€ç©ºã®å®šç¾©ã®ä»£ã‚りã«ä»»æ„ã®ä½œ" "られãŸã‚³ãƒ¡ãƒ³ãƒˆã§ã€\n" "定義を返ã™ç‚ºã«ã€{#file}メソッドをå—ã‘入れる。" # YARD::CodeObjects::Base#file #: ../lib/yard/code_objects/base.rb:273 msgid "" "Returns the filename the object was first parsed at, taking\n" "definitions with docstrings first." msgstr "" "オブジェクトãŒã€æœ€åˆã«è§£æžã•ã‚ŒãŸæ‰€ã§ã€\n" "最åˆã®docstringã¨å…±ã«ã€å®šç¾©ã‚’å–ã£ã¦ãるファイルåã‚’è¿”ã™" # @return [String] #: ../lib/yard/code_objects/base.rb:276 msgid "a filename" msgstr "ファイルå" # YARD::CodeObjects::Base#line #: ../lib/yard/code_objects/base.rb:281 msgid "Returns the line the object was first parsed at (or nil)" msgstr "オブジェクトãŒã€æœ€åˆã«è§£æžã•ã‚ŒãŸæ‰€(åˆã¯ã€nil)ã®è¡Œã‚’è¿”ã™" # @return [nil] #: ../lib/yard/code_objects/base.rb:284 msgid "if there is no line associated with the object" msgstr "オブジェクトã¨å…±ã«é–¢é€£ä»˜ã‘られãŸè¡ŒãŒãªã„å ´åˆ" # @return [Fixnum] #: ../lib/yard/code_objects/base.rb:284 msgid "the line where the object was first defined." msgstr "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæœ€åˆã«å®šç¾©ã•ã‚ŒãŸæ‰€ã®è¡Œ" # YARD::CodeObjects::Base#equal? # YARD::CodeObjects::Base#== # YARD::CodeObjects::Base#eql? #: ../lib/yard/code_objects/base.rb:289 ../lib/yard/code_objects/base.rb:300 #: ../lib/yard/code_objects/base.rb:301 msgid "Tests if another object is equal to this, including a proxy" msgstr "ä»–ã®ã‚ªãƒ–ジェクトãŒBaseã¨ã‚¤ã‚³ãƒ¼ãƒ«ã‹Proxyã‚’å«ã‚“ã§ã„ã‚‹ã‹ãƒ†ã‚¹ãƒˆã™ã‚‹ã€‚" # @param [Base, Proxy] other #: ../lib/yard/code_objects/base.rb:292 msgid "" "if other is a {Proxy}, tests if\n" "the paths are equal" msgstr "" "pathãŒã‚¤ã‚³ãƒ¼ãƒ«ã®å ´åˆã€\n" "otherãŒ{Proxy}ã‹ã€ãƒ†ã‚¹ãƒˆã™ã‚‹ã€‚\n" # @return [Boolean] #: ../lib/yard/code_objects/base.rb:292 msgid "whether or not the objects are considered the same" msgstr "オブジェクトãŒåŒã˜ã‚‚ã®ã‹ã©ã†ã‹åˆ¤æ–­ã™ã‚‹" # @return [Integer] #: ../lib/yard/code_objects/base.rb:303 ../lib/yard/code_objects/proxy.rb:138 msgid "the object's hash value (for equality checking)" msgstr "オブジェクトã®ãƒãƒƒã‚·ãƒ¥å€¤(イコールã‹ãƒã‚§ãƒƒã‚¯ç”¨)" # @return [nil] #: ../lib/yard/code_objects/base.rb:306 msgid "this object does not turn into an array" msgstr "ã“ã®ã‚ªãƒ–ジェクトã¯é…列ã«ã¯ã§ããªã„" # YARD::CodeObjects::Base#[] #: ../lib/yard/code_objects/base.rb:309 msgid "Accesses a custom attribute on the object" msgstr "オブジェクト上ã®ã‚«ã‚¹ã‚¿ãƒ å±žæ€§ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹" # @param [#to_s] # @param [String, Symbol] # @param [#to_sym] #: ../lib/yard/code_objects/base.rb:312 ../lib/yard/code_objects/base.rb:325 #: ../lib/yard/core_ext/symbol_hash.rb:41 #: ../lib/yard/core_ext/symbol_hash.rb:48 #: ../lib/yard/core_ext/symbol_hash.rb:53 #: ../lib/yard/core_ext/symbol_hash.rb:58 ../lib/yard/options.rb:79 #: ../lib/yard/options.rb:90 ../lib/yard/options.rb:99 #: ../lib/yard/options.rb:204 ../lib/yard/registry_store.rb:31 #: ../lib/yard/registry_store.rb:52 ../lib/yard/registry_store.rb:72 msgid "tag|param|key" msgstr "key" # @return [Object, nil] #: ../lib/yard/code_objects/base.rb:312 msgid "the custom attribute or nil if not found." msgstr "カスタム属性や見ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯nilã‚’è¿”ã™" # @param [#to_s] key #: ../lib/yard/code_objects/base.rb:312 ../lib/yard/code_objects/base.rb:325 msgid "the name of the custom attribute" msgstr "カスタム属性ã®åå‰" # YARD::CodeObjects::Base#[]= #: ../lib/yard/code_objects/base.rb:321 msgid "Sets a custom attribute on the object" msgstr "オブジェクトã«ã‚«ã‚¹ã‚¿ãƒ å±žæ€§ã‚’設定ã™ã‚‹" # @see #: ../lib/yard/code_objects/base.rb:325 msgid "tag|see|#[]" msgstr "" # @param [Object] value #: ../lib/yard/code_objects/base.rb:325 msgid "the value to associate" msgstr "関連ã™ã‚‹å€¤" # @overload #: ../lib/yard/code_objects/base.rb:342 msgid "tag|overload|dynamic_attr_name" msgstr "dynamic_attr_name" # @overload #: ../lib/yard/code_objects/base.rb:342 msgid "tag|overload|dynamic_attr_name=" msgstr "dynamic_attr_name=" # YARD::CodeObjects::Base#source= #: ../lib/yard/code_objects/base.rb:353 msgid "Attaches source code to a code object with an optional file location" msgstr "" "ä»»æ„ã®ãƒ•ァイルã®å ´æ‰€ã¨å…±ã«ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ç‚ºã«ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’追加ã™ã‚‹ã€‚" # @param [#source, String] # @param #: ../lib/yard/code_objects/base.rb:357 ../lib/yard/handlers/base.rb:198 #: ../lib/yard/handlers/processor.rb:149 msgid "tag|param|statement" msgstr "statement" # @param [#source, String] statement #: ../lib/yard/code_objects/base.rb:357 msgid "" "the +Parser::Statement+ holding the source code or the raw source\n" "as a +String+ for the definition of the code object only (not the block)" msgstr "" "+Parser::Statement+ ã¯ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚„\n" "コードオブジェクトã ã‘ã®å®šç¾©ç”¨ã«(blockã§ã¯ãªã„)\n" " +String+ ã®ã‚ˆã†ãªæœªåŠ å·¥ã®ã‚½ãƒ¼ã‚¹ã‚’ä¿æŒã™ã‚‹ã€‚" # YARD::CodeObjects::Base#docstring= #: ../lib/yard/code_objects/base.rb:382 msgid "" "Attaches a docstring to a code object by parsing the comments attached to " "the statement\n" "and filling the {#tags} and {#docstring} methods with the parsed information." msgstr "" "ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«æ·»ä»˜ã•れãŸã‚³ãƒ¡ãƒ³ãƒˆã‚’è§£æžã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã€\n" "コードオブジェクトã«docstringを追加ã™ã‚‹ã€‚\n" "ãã—ã¦ã€è§£æžã•ã‚ŒãŸæƒ…å ±ã¨å…±ã«ã€{#tags}ã‚„{#docstring}メソッドを埋ã‚込む。" # @param [String, Array, Docstring] # @param [String] #: ../lib/yard/code_objects/base.rb:387 ../lib/yard/docstring.rb:310 msgid "tag|param|comments" msgstr "comments" # @param [String, Array, Docstring] comments #: ../lib/yard/code_objects/base.rb:387 msgid "" "the comments attached to the code object to be parsed\n" "into a docstring and meta tags." msgstr "" "docstringã¨ãƒ¡ã‚¿ã‚¿ã‚°ã®ä¸­ã‚’è§£æžã™ã‚‹ç‚ºã«ã€ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã«è¿½åŠ ã•れる,コメン" "ト" # YARD::CodeObjects::Base#type #: ../lib/yard/code_objects/base.rb:402 msgid "" "Default type is the lowercase class name without the \"Object\" suffix.\n" "Override this method to provide a custom object type" msgstr "" "デフォルトã®åž‹ã¯\"Object\"サフィックスãªã—ã®å°æ–‡å­—ã®ã‚¯ãƒ©ã‚¹åã¨ãªã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’上書ãã™ã‚‹ç‚ºã«ã‚«ã‚¹ã‚¿ãƒ ã‚ªãƒ–ジェクト型をæä¾›ã™ã‚‹ã€‚" # @return [Symbol] #: ../lib/yard/code_objects/base.rb:405 msgid "the type of code object this represents" msgstr "ã“れを表ã™ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®åž‹" # YARD::CodeObjects::Base#path # YARD::CodeObjects::Base#to_s #: ../lib/yard/code_objects/base.rb:410 ../lib/yard/code_objects/base.rb:426 msgid "" "Represents the unique path of the object. The default implementation\n" "joins the path of {#namespace} with {#name} via the value of {#sep}.\n" "Custom code objects should ensure that the path is unique to the code\n" "object by either overriding {#sep} or this method." msgstr "" "オブジェクトã®å›ºæœ‰ã®ãƒ‘スを表ã™ã€‚\n" "デフォルトã®å®Ÿè£…ã¯ã€{#sep}ã®å€¤ã‚’挟んã§{#namespace} 㨠{#name}ã®ãƒ‘スを加ãˆ" "ãŸã€\n" "実装ã¨ãªã‚‹ã€‚\n" "カスタムコードオブジェクトã¯ã€{#sep}メソッドやã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã£ã¦\n" "固有ã®ãƒ‘スãŒç¢ºä¿ã•れるã¹ãã§ã‚る。" # @example The path of an instance method #: ../lib/yard/code_objects/base.rb:418 msgid "MethodObject.new(P(\"A::B\"), :c).path # => \"A::B#c\"" msgstr "" # @example #: ../lib/yard/code_objects/base.rb:418 msgid "tag|example|The path of an instance method" msgstr "インスタンスメソッドã®ãƒ‘ス" # @see #: ../lib/yard/code_objects/base.rb:418 msgid "tag|see|#sep" msgstr "" # @return [String] #: ../lib/yard/code_objects/base.rb:418 msgid "the unique path of the object" msgstr "オブジェクトã®å›ºæœ‰ã®ãƒ‘ス" # @param [Base, String] other #: ../lib/yard/code_objects/base.rb:430 msgid "another code object (or object path)" msgstr "ä»–ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクト(åˆã¯ã€ã‚ªãƒ–ジェクトã®ãƒ‘ス)" # @return [String] #: ../lib/yard/code_objects/base.rb:430 msgid "the shortest relative path from this object to +other+" msgstr "ã“ã®ã‚ªãƒ–ジェクトã‹ã‚‰ +other+ ã¸ã®æœ€çŸ­ã®ç›¸å¯¾ãƒ‘ス" # YARD::CodeObjects::Base#format #: ../lib/yard/code_objects/base.rb:451 msgid "Renders the object using the {Templates::Engine templating system}." msgstr "{Templates::Engine templating system}ã«ã‚ˆã£ã¦ã‚ªãƒ–ジェクトを表示ã™ã‚‹ã€‚" # @param [Hash] options #: ../lib/yard/code_objects/base.rb:463 msgid "a set of options to pass to the template" msgstr "ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã«æ¸¡ã™optionã®ã‚°ãƒ«ãƒ¼ãƒ—" # @example Formats a method in html with rdoc markup #: ../lib/yard/code_objects/base.rb:463 msgid "puts P('MyClass#meth').format(:format => :html, :markup => :rdoc)" msgstr "" # @example Formats a class in plaintext #: ../lib/yard/code_objects/base.rb:463 msgid "puts P('MyClass').format" msgstr "" # @example #: ../lib/yard/code_objects/base.rb:463 msgid "tag|example|Formats a class in plaintext" msgstr "プレーンテキストã§ã‚¯ãƒ©ã‚¹ã‚’書å¼åŒ–ã™ã‚‹" # @example #: ../lib/yard/code_objects/base.rb:463 msgid "tag|example|Formats a method in html with rdoc markup" msgstr "rdocマークアップã¨å…±ã«ã€htmlã§ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’書å¼åŒ–ã™ã‚‹" # @option #: ../lib/yard/code_objects/base.rb:463 ../lib/yard/i18n/text.rb:11 #: ../lib/yard/templates/engine.rb:81 ../lib/yard/templates/engine.rb:140 msgid "tag|option|options" msgstr "" # @param [Hash] #: ../lib/yard/code_objects/base.rb:463 ../lib/yard/i18n/text.rb:11 #: ../lib/yard/templates/engine.rb:81 ../lib/yard/templates/engine.rb:100 #: ../lib/yard/templates/engine.rb:140 ../lib/yard/templates/template.rb:37 msgid "tag|param|options" msgstr "" # @return [String] #: ../lib/yard/code_objects/base.rb:463 ../lib/yard/templates/engine.rb:81 msgid "the rendered template" msgstr "テンプレートを表示ã™ã‚‹ã€‚" # YARD::CodeObjects::Base#inspect #: ../lib/yard/code_objects/base.rb:469 msgid "Inspects the object, returning the type and path" msgstr "オブジェクトを検査ã—ã€åž‹ã¨ãƒ‘スを返ã™ã€‚" # @return [String] #: ../lib/yard/code_objects/base.rb:470 msgid "a string describing the object" msgstr "オブジェクトを説明ã™ã‚‹æ–‡å­—列" # YARD::CodeObjects::Base#namespace= # YARD::CodeObjects::Base#parent= #: ../lib/yard/code_objects/base.rb:475 ../lib/yard/code_objects/base.rb:497 msgid "Sets the namespace the object is defined in." msgstr "中ã§å®šç¾©ã•れるオブジェクトã®namespaceを設定ã™ã‚‹ã€‚" # @param [String, CodeObjects::Base] # @param [NamespaceObject, :root, nil] # @param [MethodObject] #: ../lib/yard/code_objects/base.rb:479 #: ../lib/yard/code_objects/extended_method_object.rb:16 #: ../lib/yard/templates/helpers/html_helper.rb:309 msgid "tag|param|obj" msgstr "obj" # @param [NamespaceObject, :root, nil] obj #: ../lib/yard/code_objects/base.rb:479 msgid "" "the new namespace (:root\n" "for {Registry.root}). If obj is nil, the object is unregistered\n" "from the Registry." msgstr "" "æ–°ã—ã„namespace({Registry.root}用ã®:root)\n" "objãŒnilã®å ´åˆã€è¨˜éŒ²ã•れãŸã‚ªãƒ–ジェクトã¯ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã‹ã‚‰æˆ»ã•れる。" # YARD::CodeObjects::Base#tag #: ../lib/yard/code_objects/base.rb:499 msgid "Gets a tag from the {#docstring}" msgstr "{#docstring}メソッドã‹ã‚‰ã€å–å¾—ã™ã‚‹ã€‚" # @see #: ../lib/yard/code_objects/base.rb:500 msgid "tag|see|Docstring#tag" msgstr "" # YARD::CodeObjects::Base#tags #: ../lib/yard/code_objects/base.rb:503 msgid "Gets a list of tags from the {#docstring}" msgstr "{#docstring}メソッドã‹ã‚‰ã€ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã™ã‚‹ã€‚" # @see #: ../lib/yard/code_objects/base.rb:504 msgid "tag|see|Docstring#tags" msgstr "" # YARD::CodeObjects::Base#has_tag? #: ../lib/yard/code_objects/base.rb:507 msgid "Tests if the {#docstring} has a tag" msgstr "{#docstring}メソッドãŒã‚¿ã‚°ã‚’æŒã¤å ´åˆã€ãƒ†ã‚¹ãƒˆã™ã‚‹ã€‚" # @see #: ../lib/yard/code_objects/base.rb:508 msgid "tag|see|Docstring#has_tag?" msgstr "" # @return [Boolean] #: ../lib/yard/code_objects/base.rb:511 msgid "whether or not this object is a RootObject" msgstr "ã“ã®ã‚ªãƒ–ジェクトãŒRootObjectã‹ã©ã†ã‹" # YARD::CodeObjects::Base#sep #: ../lib/yard/code_objects/base.rb:514 msgid "" "Override this method with a custom component separator. For instance,\n" "{MethodObject} implements sep as '#' or '.' (depending on if the\n" "method is instance or class respectively). {#path} depends on this\n" "value to generate the full path in the form: namespace.path + sep + name" msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€åŒºåˆ‡ã‚Šã®ã‚«ã‚¹ã‚¿ãƒ æ§‹æˆã‚’上書ãã™ã‚‹ã€‚\n" "例ãˆã°ã€{MethodObject}ã¯'#'ã‚„'.'ã®ã‚ˆã†ãªåŒºåˆ‡ã‚Šã‚’実装ã™ã‚‹ã€‚\n" "(メソッドã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚„クラスã®é–¢ä¿‚ã«ä¾å­˜ã—ã¦ã„ã‚‹)\n" "{#path}メソッド㯠namespace.path + sep + name ã®å½¢å¼ã§ã€\n" "フルパスを生æˆã™ã‚‹ç‚ºã€ã“ã®å€¤ã«ä¾å­˜ã—ã¦ã„る。" # @return [String] #: ../lib/yard/code_objects/base.rb:520 msgid "" "the component that separates the namespace path\n" "and the name (default is {NSEP})" msgstr "namespace path 㨠name ã§åŒºåˆ‡ã‚‹æ§‹æˆã¨ãªã‚‹ã€‚(デフォルトã¯{NSEP})" # YARD::CodeObjects::Base#copyable_attributes #: ../lib/yard/code_objects/base.rb:525 msgid "" "Override this method if your code object subclass does not allow\n" "copying of certain attributes." msgstr "" # @see #: ../lib/yard/code_objects/base.rb:531 msgid "tag|see|#copy_to" msgstr "" # @return [Array] #: ../lib/yard/code_objects/base.rb:531 msgid "" "the list of instance variable names (without\n" "\"@\" prefix) that should be copied when {#copy_to} is called" msgstr "" # YARD::CodeObjects::Base#format_source #: ../lib/yard/code_objects/base.rb:540 msgid "Formats source code by removing leading indentation" msgstr "インデントを読ã¿è¾¼ã¿å‰Šé™¤ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’書å¼åŒ–ã™ã‚‹" # @return [String] #: ../lib/yard/code_objects/base.rb:543 msgid "formatted source" msgstr "書å¼åŒ–ã•れãŸã‚½ãƒ¼ã‚¹" # @param [Symbol] # @param [String] #: ../lib/yard/code_objects/base.rb:543 ../lib/yard/parser/base.rb:25 #: ../lib/yard/server/library_version.rb:120 #: ../lib/yard/templates/helpers/html_helper.rb:134 #: ../lib/yard/templates/helpers/html_helper.rb:154 #: ../lib/yard/templates/helpers/html_helper.rb:557 #: ../lib/yard/templates/helpers/html_syntax_highlight_helper.rb:9 msgid "tag|param|source" msgstr "source" # @param [String] source #: ../lib/yard/code_objects/base.rb:543 msgid "the source code to format" msgstr "書å¼åŒ–ã™ã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰" # YARD::CodeObjects::ClassObject #: ../lib/yard/code_objects/class_object.rb:3 msgid "" "A ClassObject represents a Ruby class in source code. It is a " "{ModuleObject}\n" "with extra inheritance semantics through the superclass." msgstr "" "クラスオブジェクトã¯ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®ä¸­ã®Rubyクラスをæ„味ã™ã‚‹ã€‚\n" "ãれã¯ã€ã‚¹ãƒ¼ãƒ‘ークラスを介ã—ãŸç‰¹åˆ¥ãªç¶™æ‰¿ã®æ„味をæŒã¤ {ModuleObject} ã¨ãªã‚‹ã€‚" # YARD::CodeObjects::ClassObject#superclass #: ../lib/yard/code_objects/class_object.rb:6 msgid "The {ClassObject} that this class object inherits from in Ruby source." msgstr "ã“ã®ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクトãŒRubyã®ã‚½ãƒ¼ã‚¹ã‹ã‚‰ç¶™æ‰¿ã™ã‚‹{ClassObject}" # @return [ClassObject] #: ../lib/yard/code_objects/class_object.rb:7 msgid "a class object that is the superclass of this one" msgstr "ã“ã®ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクトã®ã‚¹ãƒ¼ãƒ‘ークラスã¨ãªã‚‹ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクトを返ã™" # YARD::CodeObjects::ClassObject#initialize #: ../lib/yard/code_objects/class_object.rb:10 msgid "Creates a new class object in +namespace+ with +name+" msgstr "+name+ ã¨å…±ã« +namespace+ ã®ä¸­ã§æ–°ã—ã„クラスオブジェクトを作æˆã™ã‚‹ã€‚" # @return [ClassObject] #: ../lib/yard/code_objects/class_object.rb:12 msgid "a new instance of ClassObject" msgstr "ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–°ã—ã„インスタンス" # @see #: ../lib/yard/code_objects/class_object.rb:12 msgid "tag|see|Base.new" msgstr "" # YARD::CodeObjects::ClassObject#is_exception? #: ../lib/yard/code_objects/class_object.rb:30 msgid "Whether or not the class is a Ruby Exception" msgstr "Ruby Exceptionクラスã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/code_objects/class_object.rb:32 msgid "whether the object represents a Ruby exception" msgstr "Ruby exceptionクラスを表ã™ã‚ªãƒ–ジェクトã‹ã©ã†ã‹" # YARD::CodeObjects::ClassObject#inheritance_tree #: ../lib/yard/code_objects/class_object.rb:37 msgid "Returns the inheritance tree of the object including self." msgstr "自身をå«ã‚“ã§ã„るオブジェクトã®ç¶™æ‰¿ãƒ„リーを返ã™" # @param [Boolean] #: ../lib/yard/code_objects/class_object.rb:42 #: ../lib/yard/code_objects/module_object.rb:9 msgid "tag|param|include_mods" msgstr "include_mods" # @return [Array] #: ../lib/yard/code_objects/class_object.rb:42 msgid "" "the list of code objects that make up\n" "the inheritance tree." msgstr "継承ツリーを作り上ã’るコードオブジェクトã®ãƒªã‚¹ãƒˆ" # @param [Boolean] include_mods #: ../lib/yard/code_objects/class_object.rb:42 msgid "" "whether or not to include mixins in the\n" "inheritance tree." msgstr "継承ツリーã®ä¸­ã§mixinã‚’å«ã‚“ã§ã„ã‚‹ã‹ã©ã†ã‹" # YARD::CodeObjects::ClassObject#meths #: ../lib/yard/code_objects/class_object.rb:55 msgid "" "Returns the list of methods matching the options hash. Returns\n" "all methods if hash is empty." msgstr "" "ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã«ãƒžãƒƒãƒã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ã€‚\n" "(ãƒãƒƒã‚·ãƒ¥ãŒç©ºã®å ´åˆã¯ã€å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰)" # @option #: ../lib/yard/code_objects/class_object.rb:63 #: ../lib/yard/code_objects/class_object.rb:98 #: ../lib/yard/code_objects/namespace_object.rb:113 #: ../lib/yard/code_objects/namespace_object.rb:144 #: ../lib/yard/code_objects/namespace_object.rb:164 #: ../lib/yard/handlers/base.rb:355 ../lib/yard/parser/ruby/ast_node.rb:152 #: ../lib/yard/serializers/file_system_serializer.rb:27 #: ../lib/yard/server/adapter.rb:71 ../lib/yard/server/rack_adapter.rb:26 msgid "tag|option|opts" msgstr "opts" # @return [Array] #: ../lib/yard/code_objects/class_object.rb:63 msgid "the list of methods that matched" msgstr "マッãƒã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒªã‚¹ãƒˆ" # @param [Hash] opts #: ../lib/yard/code_objects/class_object.rb:63 #: ../lib/yard/code_objects/class_object.rb:98 msgid "the options hash to match" msgstr "マッãƒã™ã‚‹ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ション" # YARD::CodeObjects::ClassObject#inherited_meths #: ../lib/yard/code_objects/class_object.rb:74 msgid "Returns only the methods that were inherited." msgstr "継承ã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã ã‘ã‚’è¿”ã™" # @return [Array] #: ../lib/yard/code_objects/class_object.rb:76 msgid "the list of inherited method objects" msgstr "メソッドオブジェクトを継承ã—ãŸãƒªã‚¹ãƒˆ" # YARD::CodeObjects::ClassObject#constants #: ../lib/yard/code_objects/class_object.rb:91 msgid "Returns the list of constants matching the options hash." msgstr "ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã«ãƒžãƒƒãƒã™ã‚‹å®šæ•°ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # @return [Array] #: ../lib/yard/code_objects/class_object.rb:98 msgid "the list of constant that matched" msgstr "マッãƒã—ãŸå®šæ•°ã®ãƒªã‚¹ãƒˆ" # YARD::CodeObjects::ClassObject#inherited_constants #: ../lib/yard/code_objects/class_object.rb:104 msgid "Returns only the constants that were inherited." msgstr "継承ã•れãŸå®šæ•°ã ã‘è¿”ã™" # @return [Array] #: ../lib/yard/code_objects/class_object.rb:106 msgid "the list of inherited constant objects" msgstr "定数オブジェクトを継承ã—ãŸãƒªã‚¹ãƒˆ" # YARD::CodeObjects::ClassObject#superclass= #: ../lib/yard/code_objects/class_object.rb:119 msgid "Sets the superclass of the object" msgstr "オブジェクトã®ã‚¹ãƒ¼ãƒ‘ークラスをグループ化ã™ã‚‹ã€‚" # @param [Base, Proxy, String, Symbol, nil] object #: ../lib/yard/code_objects/class_object.rb:122 msgid "the superclass value" msgstr "スーパークラスã®å€¤" # YARD::CodeObjects::ClassVariableObject #: ../lib/yard/code_objects/class_variable_object.rb:3 msgid "" "Represents a class variable inside a namespace. The path is expressed\n" "in the form \"A::B::@@classvariable\"" msgstr "" "namespaceã®å†…部ã§ã‚¯ãƒ©ã‚¹å¤‰æ•°ã‚’表ã™ã€‚\n" "パスã¯ã€\"A::B::@@クラス変数\"å½¢å¼ã§è¡¨ã•れる。" # @return [String] #: ../lib/yard/code_objects/class_variable_object.rb:6 msgid "the class variable's value" msgstr "クラス変数ã®å€¤" # YARD::CodeObjects::ConstantObject #: ../lib/yard/code_objects/constant_object.rb:3 msgid "" "A +ConstantObject+ represents a Ruby constant (not a module or class).\n" "To access the constant's (source code) value, use {#value}." msgstr "" "+ConstantObject+ ã¯ã€Ruby定数を表ã™ã€‚(モジュールやクラスã§ã¯ãªã„)\n" "定数(ソースコード)ã®å€¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ç‚ºã«ã¯ã€{#value}メソッドを利用ã™ã‚‹ã€‚" # YARD::CodeObjects::ConstantObject#value #: ../lib/yard/code_objects/constant_object.rb:6 msgid "The source code representing the constant's value" msgstr "定数ã®å€¤ã‚’表ã—ã¦ã„るソースコード" # @return [String] #: ../lib/yard/code_objects/constant_object.rb:7 msgid "the value the constant is set to" msgstr "定数を設定ã•れる値" # YARD::CodeObjects::ExtendedMethodObject #: ../lib/yard/code_objects/extended_method_object.rb:3 msgid "" "Represents an instance method of a module that was mixed into the class\n" "scope of another namespace." msgstr "" "ä»–ã®namespaceã®ã‚¯ãƒ©ã‚¹ã‚¹ã‚³ãƒ¼ãƒ—ã®ä¸­ã¸æ··ãœã‚‰ã‚ŒãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰" "を表ã™ã€‚" # @see #: ../lib/yard/code_objects/extended_method_object.rb:6 #: ../lib/yard/code_objects/extended_method_object.rb:21 msgid "tag|see|MethodObject" msgstr "" # @return [Symbol] #: ../lib/yard/code_objects/extended_method_object.rb:10 msgid "always +:class+" msgstr "常㫠+:class+" # YARD::CodeObjects::ExtendedMethodObject#initialize #: ../lib/yard/code_objects/extended_method_object.rb:13 msgid "Sets up a delegate for {MethodObject} obj." msgstr "{MethodObject}オブジェクト用ã«å§”譲をセットアップã™ã‚‹" # @return [ExtendedMethodObject] #: ../lib/yard/code_objects/extended_method_object.rb:16 msgid "a new instance of ExtendedMethodObject" msgstr "ExtendedMethodObjectã®æ–°ã—ã„インスタンス" # @param [MethodObject] obj #: ../lib/yard/code_objects/extended_method_object.rb:16 msgid "" "the instance method to treat as a mixed in\n" "class method on another namespace." msgstr "" "別ã®namespace上ã§ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æ··ãœãŸã‚ˆã†ãªå‡¦ç†ã‚’ã™ã‚‹,インスタンスメソッド" # YARD::CodeObjects::ExtendedMethodObject#method_missing #: ../lib/yard/code_objects/extended_method_object.rb:19 msgid "Sends all methods to the {MethodObject} assigned in {#initialize}" msgstr "" "{MethodObject}ãŒ{#initialize}メソッドを割り当ã¦ã‚‹äº‹ã«ã‚ˆã£ã¦ã€\n" "å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’__send__ã™ã‚‹ã€‚" # YARD::CodeObjects::ExtraFileObject #: ../lib/yard/code_objects/extra_file_object.rb:3 msgid "" "An ExtraFileObject represents an extra documentation file (README or other\n" "file). It is not strictly a CodeObject (does not inherit from `Base`) " "although\n" "it implements `path`, `name` and `type`, and therefore should be " "structurally\n" "compatible with most CodeObject interfaces." msgstr "" "ExtraFileObjectã¯ã€è¿½åŠ ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ァイル(README ã‚„ ä»–ã®ãƒ•ァイル)を表ã™ã‘" "れã©ã€\n" "コードオブジェクトã«é™ã‚‰ãš(`Base`ã‹ã‚‰ç¶™æ‰¿ã¯ã§ããªã„)`path`, `name` , `type`ã‚’" "実装ã§ãる。\n" "従ã£ã¦ã€æ®†ã©ã®CodeObjectインターフェースã¨äº’æ›æ€§ãŒã‚ã‚Šã€æ§‹é€ ä¸Šä¸¡ç«‹ã•れるã¹ã" "ã§ã‚る。" # @param value #: ../lib/yard/code_objects/extra_file_object.rb:7 msgid "the value to set the attribute filename to." msgstr "filename属性を設定ã™ã‚‹å€¤" # YARD::CodeObjects::ExtraFileObject#filename #: ../lib/yard/code_objects/extra_file_object.rb:8 msgid "Returns the value of attribute filename" msgstr "filename属性ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::ExtraFileObject#filename= #: ../lib/yard/code_objects/extra_file_object.rb:8 msgid "Sets the attribute filename" msgstr "filename属性を設定ã™ã‚‹" # @param value #: ../lib/yard/code_objects/extra_file_object.rb:8 msgid "the value to set the attribute attributes to." msgstr "attributesã®å±žæ€§ã‚’設定ã™ã‚‹å€¤" # YARD::CodeObjects::ExtraFileObject#attributes #: ../lib/yard/code_objects/extra_file_object.rb:9 msgid "Returns the value of attribute attributes" msgstr "attributes属性ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::ExtraFileObject#attributes= #: ../lib/yard/code_objects/extra_file_object.rb:9 msgid "Sets the attribute attributes" msgstr "attributes属性を設定ã™ã‚‹" # @param value #: ../lib/yard/code_objects/extra_file_object.rb:9 #: ../lib/yard/tags/ref_tag_list.rb:4 msgid "the value to set the attribute name to." msgstr "name属性を設定ã™ã‚‹å€¤" # YARD::CodeObjects::ExtraFileObject#name # YARD::CodeObjects::ExtraFileObject#path # YARD::Parser::Ruby::Legacy::RubyToken::TkId#name # YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar#name # YARD::Tags::RefTagList#name # YARD::Templates::Section#name #: ../lib/yard/code_objects/extra_file_object.rb:10 #: ../lib/yard/code_objects/extra_file_object.rb:24 #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:79 #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:114 #: ../lib/yard/tags/ref_tag_list.rb:5 msgid "Returns the value of attribute name" msgstr "name属性ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::ExtraFileObject#name= # YARD::Tags::RefTagList#name= # YARD::Templates::Section#name= #: ../lib/yard/code_objects/extra_file_object.rb:10 #: ../lib/yard/tags/ref_tag_list.rb:5 msgid "Sets the attribute name" msgstr "name属性を設定ã™ã‚‹" # @param value #: ../lib/yard/code_objects/extra_file_object.rb:10 msgid "the value to set the attribute contents to." msgstr "値ã«å±žæ€§ã®å†…容を設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::Legacy::Statement#comments # YARD::Parser::Ruby::RipperParser#comments #: ../lib/yard/code_objects/extra_file_object.rb:11 msgid "Returns the value of attribute contents" msgstr "属性ã®å†…容ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::NamespaceObject#constants= #: ../lib/yard/code_objects/extra_file_object.rb:11 msgid "Sets the attribute contents" msgstr "属性ã®å†…容を設定ã™ã‚‹" # YARD::CodeObjects::ExtraFileObject#initialize #: ../lib/yard/code_objects/extra_file_object.rb:13 msgid "Creates a new extra file object." msgstr "æ–°ã—ã追加ã®ãƒ•ァイルオブジェクトを作æˆã™ã‚‹" # @return [ExtraFileObject] #: ../lib/yard/code_objects/extra_file_object.rb:16 msgid "a new instance of ExtraFileObject" msgstr "ExtraFileObjectã®æ–°ã—ã„インスタンス" # @param [String] #: ../lib/yard/code_objects/extra_file_object.rb:16 #: ../lib/yard/templates/helpers/markup_helper.rb:122 msgid "tag|param|contents" msgstr "contents" # @param [String, CodeObjects::ExtraFileObject] # @param [String] # @param [String, Regexp] #: ../lib/yard/code_objects/extra_file_object.rb:16 #: ../lib/yard/handlers/base.rb:228 ../lib/yard/parser/base.rb:25 #: ../lib/yard/parser/source_parser.rb:505 #: ../lib/yard/templates/helpers/base_helper.rb:149 #: ../lib/yard/templates/helpers/html_helper.rb:342 msgid "tag|param|filename" msgstr "filename" # @param [String] contents #: ../lib/yard/code_objects/extra_file_object.rb:16 msgid "" "the file contents. If not set, the contents\n" "will be read from disk using the +filename+." msgstr "" "ファイルã®å†…容ã¨ãªã‚‹ã€‚設定ã—ãªã„å ´åˆã€\n" "contentsã¯ã€ +filename+ ã«ã‚ˆã£ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã‚‹ã ã‚ã†ã€‚" # @param [String] filename #: ../lib/yard/code_objects/extra_file_object.rb:16 msgid "the location on disk of the file" msgstr "ファイルã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®å ´æ‰€" # @param [String] data #: ../lib/yard/code_objects/extra_file_object.rb:47 msgid "the file contents" msgstr "ファイルã®å†…容" # YARD::CodeObjects::MacroObject #: ../lib/yard/code_objects/macro_object.rb:6 msgid "" "A MacroObject represents a docstring defined through +@!macro NAME+ and can " "be\n" "reused by specifying the tag +@!macro NAME+. You can also provide the\n" "+attached+ type flag to the macro definition to have it attached to the\n" "specific DSL method so it will be implicitly reused." msgstr "" "マクロオブジェクトã¯ã€+@!macro NAME+ を通ã˜ã¦å®šç¾©ã—㟠docstring を表ã—ã€\n" "+@!macro NAME+ タグを指定ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã€å†åˆ©ç”¨ã§ãる。\n" "ã‚ãªãŸã¯ã€å›ºæœ‰ã®DSLメソッドã«åŠ ãˆã‚‹ãƒžã‚¯ãƒ­å®šç¾©ã®ç‚ºã«\n" "+attached+ 型フラグをæä¾›ã‚‚ã§ãる。\n" "ãªã®ã§ã€æš—é»™ã®å†…ã«å†åˆ©ç”¨ã•れる。" # YARD::CodeObjects::MacroObject #: ../lib/yard/code_objects/macro_object.rb:11 msgid "" "Macros are fully described in the {file:docs/Tags.md#macro Tags Overview}\n" "document." msgstr "" "マクロã¯ã€{file:docs/Tags.md#macros Tags Overview}ドキュメントã§è©³ç´°ã«èª¬æ˜Žã•" "れã¦ã„る。" # @example Creating a macro that is attached to the method call #: ../lib/yard/code_objects/macro_object.rb:29 msgid "" "# @!macro [attach] prop2\n" "# @!method $1(value)\n" "property :foo\n" "\n" "# Extra data added to docstring\n" "property :bar" msgstr "" # @example Creating a basic named macro #: ../lib/yard/code_objects/macro_object.rb:29 msgid "" "# @!macro prop\n" "# @!method $1(${3-})\n" "# @return [$2] the value of the $0\n" "property :foo, String, :a, :b\n" "\n" "# @!macro prop\n" "property :bar, Numeric, :value" msgstr "" # @example #: ../lib/yard/code_objects/macro_object.rb:29 msgid "tag|example|Creating a basic named macro" msgstr "一般的ãªãƒžã‚¯ãƒ­ã‚’作æˆ" # @example #: ../lib/yard/code_objects/macro_object.rb:29 msgid "tag|example|Creating a macro that is attached to the method call" msgstr "メソッド呼ã³å‡ºã—ã®ç‚ºã«åŠ ãˆã‚‰ã‚Œã‚‹ãƒžã‚¯ãƒ­ã‚’作æˆã™ã‚‹ã€‚" # YARD::CodeObjects::MacroObject.create #: ../lib/yard/code_objects/macro_object.rb:34 msgid "Creates a new macro and fills in the relevant properties." msgstr "関連ã—ãŸãƒ—ロパティã®ãƒ•ã‚¡ã‚¤ãƒ«ã¨æ–°ã—ã„マクロを作æˆã™ã‚‹ã€‚" # @param [CodeObjects::Base] method_object #: ../lib/yard/code_objects/macro_object.rb:39 msgid "" "an object to attach this\n" "macro to. If supplied, {#attached?} will be true" msgstr "" "ã“ã®ãƒžã‚¯ãƒ­ã«åŠ ãˆã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã€‚ã‚‚ã—æä¾›ã•れãŸå ´åˆã€\n" "{#attached?}ã¯trueã«ãªã‚‹ã€‚" # @param [String] #: ../lib/yard/code_objects/macro_object.rb:39 #: ../lib/yard/code_objects/macro_object.rb:50 #: ../lib/yard/code_objects/macro_object.rb:70 msgid "tag|param|macro_name" msgstr "macro_name" # @param [CodeObjects::Base] #: ../lib/yard/code_objects/macro_object.rb:39 #: ../lib/yard/code_objects/macro_object.rb:70 msgid "tag|param|method_object" msgstr "method_object" # @param [String] data #: ../lib/yard/code_objects/macro_object.rb:39 msgid "the data the macro should expand when re-used" msgstr "å†åˆ©ç”¨ã•ã‚ŒãŸæ™‚ã€ãƒžã‚¯ãƒ­ãŒå±•é–‹ã™ã‚‹ã§ã‚ã‚ã†ãƒ‡ãƒ¼ã‚¿" # @param [String] macro_name #: ../lib/yard/code_objects/macro_object.rb:39 msgid "the name of the macro, must be unique." msgstr "マクロã®åå‰ã€å›ºæœ‰ã®ã‚‚ã®ã«ã—ãªã‘れã°ãªã‚‰ãªã„" # YARD::CodeObjects::MacroObject.find #: ../lib/yard/code_objects/macro_object.rb:47 msgid "Finds a macro using +macro_name+" msgstr "+macro_name+ ã®ãƒžã‚¯ãƒ­ã‚’見ã¤ã‘ã‚‹" # @return [MacroObject] #: ../lib/yard/code_objects/macro_object.rb:50 msgid "if a macro is found" msgstr "マクロãŒè¦‹ã¤ã‹ã£ãŸå ´åˆ" # @return [nil] #: ../lib/yard/code_objects/macro_object.rb:50 msgid "if there is no registered macro by that name" msgstr "マクロã®åå‰ãŒè¨˜éŒ²ã•れãªã„å ´åˆ" # @return [String] #: ../lib/yard/code_objects/macro_object.rb:50 #: ../lib/yard/code_objects/macro_object.rb:70 msgid "the name of the macro" msgstr "マクロã®åå‰" # YARD::CodeObjects::MacroObject.find_or_create # YARD::CodeObjects::MacroObject.create_docstring #: ../lib/yard/code_objects/macro_object.rb:55 #: ../lib/yard/code_objects/macro_object.rb:78 msgid "" "Parses a given docstring and determines if the macro is \"new\" or\n" "not. If the macro has $variable names or if it has a @!macro tag\n" "with the [new] or [attached] flag, it is considered new." msgstr "" "与ãˆã‚‰ãŸdocstringã‚’è§£æžã—ãƒžã‚¯ãƒ­ãŒæ–°ã—ã作æˆã•れるもã®ã‹ã©ã†ã‹æ±ºã‚る。\n" "ã‚‚ã—マクロãŒ$variableåã‚’æŒã£ã¦ã„ãŸå ´åˆã‚„\n" "[new]ã‚„[attached]フラグã¨ä¸€ç·’ã«@!macroã‚¿ã‚°ã‚’æŒã£ã¦ã„ãŸå ´åˆã€\n" "æ–°è¦ã«ä½œæˆã•れるもã®ã¨ã¿ãªã•れる。" # YARD::CodeObjects::MacroObject.find_or_create # YARD::CodeObjects::MacroObject.create_docstring #: ../lib/yard/code_objects/macro_object.rb:59 #: ../lib/yard/code_objects/macro_object.rb:82 msgid "" "If a new macro is found, the macro is created and registered. Otherwise\n" "the macro name is searched and returned. If a macro is not found,\n" "nil is returned." msgstr "" "æ–°ã—ã„マクロãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã€ä½œæˆã•れ記録ã•れる。\n" "ãã®ä»–ã®å ´åˆã€ãƒžã‚¯ãƒ­åãŒæ¤œç´¢ã•れ返ã•れる。\n" "マクロãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯ã€nilãŒè¿”ã•れる。" # @param [CodeObjects::Base] method_object #: ../lib/yard/code_objects/macro_object.rb:70 msgid "" "an optional method to attach\n" "the macro to. Only used if the macro is being created, otherwise\n" "this argument is ignored." msgstr "" "マクロを加ãˆã‚‹ç‚ºã®ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰\n" "マクロãŒä½œæˆã•れる場åˆã€åˆ©ç”¨ã•れるã ã‘ã§ã‚る。\n" "ã•ã‚‚ãªã‘れã°ã€ã“ã®å¼•æ•°ã¯ç„¡è¦–ã•れる。" # @return [nil] #: ../lib/yard/code_objects/macro_object.rb:70 msgid "" "if the +data+ has no macro tag or if the macro is\n" "not new and no macro by the macro name is found." msgstr "" "+data+ ãŒãƒžã‚¯ãƒ­ã‚¿ã‚°ã‚’æŒã£ã¦ã„ãªã„ã‹ã€\n" "マクロãŒã€\"new\"ã§ãªã‹ã£ãŸã‚Šã€\n" "macro name is foundã«ã‚ˆã£ã¦ã€ãƒžã‚¯ãƒ­è‡ªä½“ãŒç„¡ã„å ´åˆã€nilã‚’è¿”ã™ã€‚" # @return [MacroObject] #: ../lib/yard/code_objects/macro_object.rb:70 msgid "" "the newly created or existing macro, depending\n" "on whether the @!macro tag was a new tag or not." msgstr "" "æ–°ãŸã«ä½œæˆã•れãŸã€åˆã¯ã€æ—¢å­˜ã®ãƒžã‚¯ãƒ­ã‚’è¿”ã™ã€‚\n" "@!macroã‚¿ã‚°ã¯newã‚¿ã‚°ã‹ãã†ã§ãªã„ã‹ã«ä¾å­˜ã™ã‚‹ã€‚" # YARD::CodeObjects::MacroObject.expand #: ../lib/yard/code_objects/macro_object.rb:80 msgid "Expands +macro_data+ using the interpolation parameters." msgstr "補完ã®å¼•æ•°ã«ã‚ˆã£ã¦ã€ +macro_data+ を展開ã™ã‚‹ã€‚" # YARD::CodeObjects::MacroObject.expand #: ../lib/yard/code_objects/macro_object.rb:82 msgid "" "Interpolation rules:\n" "* $0, $1, $2, ... = the Nth parameter in +call_params+\n" "* $* = the full statement source (excluding block)\n" "* Also supports $!{N-M} ranges, as well as negative indexes on N or M\n" "* Use \\$ to escape the variable name in a macro." msgstr "" "補完ã®ãƒ«ãƒ¼ãƒ«:\n" "* $0, $1, $2, ... = +call_params+ ã®ä¸­ã®N番目ã®å¼•æ•°\n" "* $* = 完全ãªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ã‚½ãƒ¼ã‚¹(blockを除外ã™ã‚‹)\n" "* $!{N-M}ã®ç¯„囲もサãƒãƒ¼ãƒˆã—,マイナスã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚‚利用ã§ãã‚‹\n" "* マクロã®ä¸­ã®å¤‰æ•°åã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã«ã¯\\$を使ã†" # @param [String] #: ../lib/yard/code_objects/macro_object.rb:96 msgid "tag|param|macro_data" msgstr "マクロデータ" # @param [String] macro_data #: ../lib/yard/code_objects/macro_object.rb:96 msgid "the macro data to expand (taken from {#macro_data})" msgstr "æ‹¡å¼µã™ã‚‹ç‚ºã®ãƒžã‚¯ãƒ­ãƒ‡ãƒ¼ã‚¿({#macro_data}メソッドã‹ã‚‰å–å¾—ã™ã‚‹)" # YARD::CodeObjects::MacroObject.apply #: ../lib/yard/code_objects/macro_object.rb:114 msgid "" "Applies a macro on a docstring by creating any macro data inside of\n" "the docstring first. Equivalent to calling {find_or_create} and " "{apply_macro}\n" "on the new macro object." msgstr "" "最åˆã«docstringã®å†…部ã®ä½•らã‹ã®ãƒžã‚¯ãƒ­ãƒ‡ãƒ¼ã‚¿ã‚’作æˆã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n" "docstring上ã®ãƒžã‚¯ãƒ­ã‚’é©ç”¨ã™ã‚‹ã€‚\n" "{find_or_create}ã¨ã€\n" "æ–°ã—ã„マクロオブジェクト上ã§{apply_macro}を呼ã³å‡ºã™ã®ã¯åŒæ§˜ã§ã‚る。" # @param [Docstring] #: ../lib/yard/code_objects/macro_object.rb:120 msgid "tag|param|docstring" msgstr "docstring" # @see #: ../lib/yard/code_objects/macro_object.rb:120 msgid "tag|see|find_or_create" msgstr "" # @param [Docstring] docstring #: ../lib/yard/code_objects/macro_object.rb:120 msgid "the docstring to create a macro out of" msgstr "マクロã®å‡ºåŠ›ã‚’ä½œæˆã™ã‚‹ç‚ºã®docstrng" # YARD::CodeObjects::MacroObject.apply_macro #: ../lib/yard/code_objects/macro_object.rb:131 msgid "" "Applies a macro to a docstring, interpolating the macro's data on the\n" "docstring and appending any extra local docstring data that was in\n" "the original +docstring+ object." msgstr "" "docstringã«macroãŒé©ç”¨ã•れã€\n" "docstring上ã®ãƒžã‚¯ãƒ­ãƒ‡ãƒ¼ã‚¿ã‚’補完ã™ã‚‹ã€‚\n" "ãã—ã¦ã€å…ƒã® +docstring+ オブジェクトã®ä¸­ã®\n" "ä»»æ„ã§åŠ ãˆã‚‰ã‚Œã‚‹ãƒ­ãƒ¼ã‚«ãƒ«ãªdocstringã®ãƒ‡ãƒ¼ã‚¿ã‚’é©ç”¨ã™ã‚‹ã€‚\n" # @param [MacroObject] # @param [CodeObjects::MacroObject] #: ../lib/yard/code_objects/macro_object.rb:136 msgid "tag|param|macro" msgstr "macro" # @param [MacroObject] macro #: ../lib/yard/code_objects/macro_object.rb:136 msgid "the macro object" msgstr "マクロオブジェクト" # @return [String] #: ../lib/yard/code_objects/macro_object.rb:142 msgid "the macro data stored on the object" msgstr "マクロ上ã§è¨˜éŒ²ã•れるデータ" # @return [CodeObjects::Base] #: ../lib/yard/code_objects/macro_object.rb:146 msgid "" "the method object that this macro is\n" "attached to." msgstr "ã“ã®ãƒžã‚¯ãƒ­ãŒè¿½åŠ ã•れるメソッドオブジェクト\n" # @return [Boolean] #: ../lib/yard/code_objects/macro_object.rb:149 msgid "whether this macro is attached to a method" msgstr "ã“ã®ãƒžã‚¯ãƒ­ãŒãƒ¡ã‚½ãƒƒãƒ‰ã«åŠ ãˆã‚‰ã‚Œã‚‹ã‹ã©ã†ã‹" # YARD::CodeObjects::MacroObject#path #: ../lib/yard/code_objects/macro_object.rb:152 msgid "Overrides {Base#path} so the macro path is \".macro.MACRONAME\"" msgstr "" # YARD::CodeObjects::MacroObject#sep #: ../lib/yard/code_objects/macro_object.rb:155 msgid "Overrides the separator to be '.'" msgstr "" # YARD::CodeObjects::MacroObject#expand #: ../lib/yard/code_objects/macro_object.rb:158 msgid "Expands the macro using" msgstr "マクロã«ã‚ˆã£ã¦å±•é–‹ã•れる" # @param [Array] call_params #: ../lib/yard/code_objects/macro_object.rb:167 msgid "" "a list of tokens that are passed\n" "to the method call" msgstr "メソッド呼ã³å‡ºã—ã«æ¸¡ã•れるトークンã®ãƒªã‚¹ãƒˆ" # @example Expanding a Macro #: ../lib/yard/code_objects/macro_object.rb:167 msgid "" "macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=>\n" " \"...macro data interpolating this line of code...\"" msgstr "" # @example #: ../lib/yard/code_objects/macro_object.rb:167 msgid "tag|example|Expanding a Macro" msgstr "マクロを展開ã™ã‚‹" # @param [String] #: ../lib/yard/code_objects/macro_object.rb:167 msgid "tag|param|block_source" msgstr "block_source" # @param [Array] #: ../lib/yard/code_objects/macro_object.rb:167 msgid "tag|param|call_params" msgstr "call_params" # @param [String] #: ../lib/yard/code_objects/macro_object.rb:167 msgid "tag|param|full_source" msgstr "full_source" # @see #: ../lib/yard/code_objects/macro_object.rb:167 msgid "tag|see|expand" msgstr "" # @param [String] full_source #: ../lib/yard/code_objects/macro_object.rb:167 msgid "the full method call (not including the block)" msgstr "å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—(blockã‚’å«ã‚“ã§ã„ãªã„)" # @param [String] block_source #: ../lib/yard/code_objects/macro_object.rb:167 msgid "" "the source passed in the block of the method\n" "call, if there is a block." msgstr "ブロックãŒã‚ã‚‹å ´åˆã€ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã®ãƒ–ロックã®ä¸­ã§è§£æžã•れãŸã‚½ãƒ¼ã‚¹ã€‚" # YARD::CodeObjects::MethodObject #: ../lib/yard/code_objects/method_object.rb:3 msgid "Represents a Ruby method in source" msgstr "ソースã®ä¸­ã®Rubyメソッドを表ã™ã€‚" # YARD::CodeObjects::MethodObject#scope #: ../lib/yard/code_objects/method_object.rb:5 msgid "The scope of the method (+:class+ or +:instance+)" msgstr "メソッドã®ã‚¹ã‚³ãƒ¼ãƒ—( +:class+ ã‚„ +:instance+ )" # @return [Symbol] #: ../lib/yard/code_objects/method_object.rb:7 msgid "the scope" msgstr "スコープ" # YARD::CodeObjects::MethodObject#explicit # YARD::CodeObjects::MethodObject#explicit= #: ../lib/yard/code_objects/method_object.rb:10 msgid "" "Whether the object is explicitly defined in source or whether it was\n" "inferred by a handler. For instance, attribute methods are generally\n" "inferred and therefore not explicitly defined in source." msgstr "" "オブジェクトãŒã‚½ãƒ¼ã‚¹ã®ä¸­ã§æ˜Žç¢ºã«å®šç¾©ã•れるã‹ã©ã†ã‹ã‚„ã€\n" "ãれãŒãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ã‚ˆã£ã¦æŽ¨å¯Ÿã•れãŸã‹ã©ã†ã‹ã€‚\n" "例ãˆã°ã€å¤§æŠµãƒ¡ã‚½ãƒƒãƒ‰ã®å±žæ€§ã¯æŽ¨å¯Ÿã•れるãŒã€\n" "ソースã®ä¸­ã§æ˜Žç¢ºã«å®šç¾©ã•れãªã„å ´åˆã€ãƒžãƒ¼ã‚«ãƒ¼ã¯ã©ã“も示ã›ãªã„。" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:14 msgid "whether the object is explicitly defined in source." msgstr "オブジェクトãŒã‚½ãƒ¼ã‚¹ã®ä¸­ã§æ˜Žç¢ºã«å®šç¾©ã•れãŸã‹ã©ã†ã‹" # YARD::CodeObjects::MethodObject#parameters # YARD::CodeObjects::MethodObject#parameters= #: ../lib/yard/code_objects/method_object.rb:17 msgid "" "Returns the list of parameters parsed out of the method signature\n" "with their default values." msgstr "" "メソッドã®ç”¨æ³•ã®ãƒ‡ãƒ•ォルトã®å€¤ã¨å…±ã«ã€ãã®å‡ºåŠ›ã®è§£æžã•れãŸå¼•æ•°ã®ãƒªã‚¹ãƒˆã‚’è¿”" "ã™ã€‚" # @return [Array] #: ../lib/yard/code_objects/method_object.rb:21 msgid "" "a list of parameter names followed\n" "by their default values (or nil)" msgstr "引数åã®ãƒ‡ãƒ•ォルトã®å€¤ã‚’フォローã™ã‚‹(åˆã¯ã€nil)" # YARD::CodeObjects::MethodObject#initialize #: ../lib/yard/code_objects/method_object.rb:24 msgid "" "Creates a new method object in +namespace+ with +name+ and an instance\n" "or class +scope+" msgstr "" "+name+ ã¨ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚„ +scope+ クラスã¨å…±ã«ã€\n" "+namespace+ã®ä¸­ã§æ–°ã—ã„メソッドオブジェクトを作æˆã™ã‚‹ã€‚" # YARD::CodeObjects::MethodObject#initialize #: ../lib/yard/code_objects/method_object.rb:27 msgid "" "If scope is +:module+, this object is instantiated as a public\n" "method in +:class+ scope, but also creates a new (empty) method\n" "as a private +:instance+ method on the same class or module." msgstr "" # @param [Symbol] scope #: ../lib/yard/code_objects/method_object.rb:33 msgid "+:instance+, +:class+, or +:module+" msgstr "+:instance+ ã‚„ +:class+ ã‚„ +:module+" # @return [MethodObject] #: ../lib/yard/code_objects/method_object.rb:33 msgid "a new instance of MethodObject" msgstr "ãƒ¡ã‚½ãƒƒãƒ‰ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–°ã—ã„インスタンス" # @param [Symbol] #: ../lib/yard/code_objects/method_object.rb:33 msgid "tag|param|scope" msgstr "" # @param [String, Symbol] name #: ../lib/yard/code_objects/method_object.rb:33 msgid "the method name" msgstr "メソッドå" # @param [NamespaceObject] namespace #: ../lib/yard/code_objects/method_object.rb:33 msgid "the namespace" msgstr "namespace" # YARD::CodeObjects::MethodObject#scope= #: ../lib/yard/code_objects/method_object.rb:53 msgid "Changes the scope of an object from :instance or :class" msgstr ":instanceã‚„:classã‹ã‚‰ã‚ªãƒ–ジェクトã®ã‚¹ã‚³ãƒ¼ãƒ—を変更ã™ã‚‹ã€‚" # @param [Symbol] #: ../lib/yard/code_objects/method_object.rb:54 msgid "tag|param|v" msgstr "v" # @param [Symbol] v #: ../lib/yard/code_objects/method_object.rb:54 msgid "the new scope" msgstr "æ–°ã—ã„スコープ" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:76 msgid "whether or not the method is the #initialize constructor method" msgstr "メソッドãŒ#initialize,コンストラクタメソッドã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:83 msgid "" "whether or not this method was created as a module\n" "function" msgstr "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«é–¢æ•°ã¨ã—ã¦ä½œæˆã•れãŸã‹ã©ã†ã‹" # YARD::CodeObjects::MethodObject#attr_info #: ../lib/yard/code_objects/method_object.rb:88 msgid "Returns the read/writer info for the attribute if it is one" msgstr "属性ãŒã²ã¨ã¤ã ã‘ã®å ´åˆã€èª­ã¿/書ãã™ã‚‹ç‚ºã®æƒ…報を返ã™ã€‚" # @return [nil] #: ../lib/yard/code_objects/method_object.rb:91 msgid "if the method is not an attribute" msgstr "メソッドãŒå±žæ€§ã§ç„¡ã„å ´åˆ" # @return [SymbolHash] #: ../lib/yard/code_objects/method_object.rb:91 msgid "if there is information about the attribute" msgstr "属性ã«ã¤ã„ã¦ã®æƒ…å ±ãŒã‚ã‚‹å ´åˆ" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:98 msgid "whether the method is a writer attribute" msgstr "メソッドãŒwriter属性ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:104 msgid "whether the method is a reader attribute" msgstr "メソッドãŒreader属性ã‹ã©ã†ã‹" # YARD::CodeObjects::MethodObject#is_attribute? #: ../lib/yard/code_objects/method_object.rb:109 msgid "Tests if the object is defined as an attribute in the namespace" msgstr "オブジェクトãŒnamespaceã®ä¸­ã§ãã®å±žæ€§ã‚’定義ã•れる場åˆã€ãƒ†ã‚¹ãƒˆã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:110 msgid "whether the object is an attribute" msgstr "オブジェクトãŒå±žæ€§ã‹ã©ã†ã‹" # YARD::CodeObjects::MethodObject#is_alias? #: ../lib/yard/code_objects/method_object.rb:116 msgid "Tests if the object is defined as an alias of another method" msgstr "" "オブジェクトãŒåˆ¥ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒãã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã«å®šç¾©ã•れる場åˆã€ãƒ†ã‚¹ãƒˆã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:117 msgid "whether the object is an alias" msgstr "オブジェクトãŒã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‹ã©ã†ã‹" # YARD::CodeObjects::MethodObject#is_explicit? #: ../lib/yard/code_objects/method_object.rb:123 msgid "Tests boolean {#explicit} value." msgstr "ブールã®{#explicit}メソッドã®å€¤ã‚’テストã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/code_objects/method_object.rb:125 msgid "whether the method is explicitly defined in source" msgstr "メソッドãŒã‚½ãƒ¼ã‚¹ã®ä¸­ã§æ˜Žç¢ºã«å®šç¾©ã•れるã‹ã©ã†ã‹" # @return [nil] #: ../lib/yard/code_objects/method_object.rb:132 msgid "if it does not override a method" msgstr "メソッドãŒä¸Šæ›¸ãã•れãªã„å ´åˆ" # @return [MethodObject] #: ../lib/yard/code_objects/method_object.rb:132 msgid "the object that this method overrides" msgstr "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒä¸Šæ›¸ãã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::CodeObjects::MethodObject#aliases #: ../lib/yard/code_objects/method_object.rb:139 msgid "Returns all alias names of the object" msgstr "オブジェクトã®å…¨ã¦ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã®åå‰ã‚’è¿”ã™" # @return [Array] #: ../lib/yard/code_objects/method_object.rb:140 msgid "the alias names" msgstr "エイリアスã®åå‰" # YARD::CodeObjects::MethodObject#path #: ../lib/yard/code_objects/method_object.rb:150 msgid "" "Override path handling for instance methods in the root namespace\n" "(they should still have a separator as a prefix)." msgstr "" "root namespaseã®ä¸­ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ç”¨ã«æ“作ã™ã‚‹ãƒ‘スを上書ãã™ã‚‹ã€‚\n" "(root namespaseã¯ãƒ—レフィックスã¨ã—ã¦åŒºåˆ‡ã‚ŠãŒå¿…è¦ã§ã‚ã‚‹)" # @return [String] #: ../lib/yard/code_objects/method_object.rb:152 msgid "the path of a method" msgstr "メソッドã®ãƒ‘ス" # YARD::CodeObjects::MethodObject#name #: ../lib/yard/code_objects/method_object.rb:161 msgid "Returns the name of the object." msgstr "オブジェクトã®åå‰ã‚’è¿”ã™" # @example The name of a class method (with prefix) #: ../lib/yard/code_objects/method_object.rb:170 msgid "a_class_method.name(true) # => \"mymethod\"" msgstr "" # @example The name of an instance method (with prefix) #: ../lib/yard/code_objects/method_object.rb:170 msgid "an_instance_method.name(true) # => \"#mymethod\"" msgstr "" # @return [String] #: ../lib/yard/code_objects/method_object.rb:170 msgid "" "returns {#sep} + +name+ for an instance method if\n" "prefix is true" msgstr "" "プレフィックスãŒtrueã®å ´åˆã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ç”¨ã«{#sep} + +name+ ã‚’è¿”ã™" # @example #: ../lib/yard/code_objects/method_object.rb:170 msgid "tag|example|The name of a class method (with prefix)" msgstr "クラスメソッドã®åå‰(プレフィックスを用ã„ã‚‹)" # @example #: ../lib/yard/code_objects/method_object.rb:170 msgid "tag|example|The name of an instance method (with prefix)" msgstr "インスタンスメソッドã®åå‰(プレフィックスを用ã„ã‚‹)" # @return [Symbol] #: ../lib/yard/code_objects/method_object.rb:170 msgid "the name without {#sep} if prefix is set to false" msgstr "プレフィックスã«falseを設定ã™ã‚‹å ´åˆã€{#sep}メソッド無ã—ã®åå‰ã¨ãªã‚‹ã€‚" # @param [Boolean] prefix #: ../lib/yard/code_objects/method_object.rb:170 msgid "whether or not to show the prefix" msgstr "プレフィックスを見ã›ã‚‹ã‹ã©ã†ã‹" # YARD::CodeObjects::MethodObject#sep #: ../lib/yard/code_objects/method_object.rb:175 msgid "" "Override separator to differentiate between class and instance\n" "methods." msgstr "インスタンスメソッドã¨ã‚¯ãƒ©ã‚¹ã®é–“ã§åŒºåˆ¥ã™ã‚‹ç‚ºã«åŒºåˆ‡ã‚Šã‚’上書ãã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/code_objects/method_object.rb:177 msgid "\"#\" for an instance method, \".\" for class" msgstr "インスタンスメソッド用ã®\"#\"ã€ã‚¯ãƒ©ã‚¹ç”¨ã®\".\"。" # YARD::CodeObjects::ModuleObject #: ../lib/yard/code_objects/module_object.rb:3 msgid "Represents a Ruby module." msgstr "Rubyモジュールを表ã™ã€‚" # YARD::CodeObjects::ModuleObject#inheritance_tree #: ../lib/yard/code_objects/module_object.rb:5 msgid "Returns the inheritance tree of mixins." msgstr "mixinã®ç¶™æ‰¿ãƒ„リーを返ã™" # @return [Array] #: ../lib/yard/code_objects/module_object.rb:9 msgid "a list of namespace objects" msgstr "オブジェクトã®namespaceã®ãƒªã‚¹ãƒˆ" # @param [Boolean] include_mods #: ../lib/yard/code_objects/module_object.rb:9 msgid "" "if true, will include mixed in\n" "modules (which is likely what is wanted)." msgstr "" "trueã®å ´åˆã€mixinã•れるモジュールをå«ã‚“ã§ã„ã‚‹(ãれãŒä½•ãŒã§ããã†ã§ã‚ã‚‹ã‹)" # YARD::CodeObjects::NamespaceObject #: ../lib/yard/code_objects/namespace_object.rb:3 msgid "" "A \"namespace\" is any object that can store other objects within itself.\n" "The two main Ruby objects that can act as namespaces are modules\n" "({ModuleObject}) and classes ({ClassObject})." msgstr "" "namespaceã¯ãれ自身ã®ä¸­ã§ä»–ã®ã‚ªãƒ–ジェクトを記録ã§ãã‚‹ä»»æ„ã®ã‚ªãƒ–ジェクトã¨ãª" "る。\n" "namespaceãŒãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«({ModuleObject})ã¨ã‚¯ãƒ©ã‚¹({ClassObject})ã®ã‚ˆã†ã«æŒ¯ã‚‹èˆžãˆ" "るオブジェクトã¨ãªã‚‹ã€‚" # @param value #: ../lib/yard/code_objects/namespace_object.rb:6 msgid "the value to set the attribute child to." msgstr "child属性を設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/code_objects/namespace_object.rb:6 msgid "the value to set the attribute constants to." msgstr "属性ã®å®šæ•°ã‚’設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/code_objects/namespace_object.rb:6 msgid "the value to set the attribute cvars to." msgstr "cvars(クラス変数)ã®å±žæ€§ã‚’設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/code_objects/namespace_object.rb:6 msgid "the value to set the attribute meths to." msgstr "meths(メソッド)属性を設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/code_objects/namespace_object.rb:6 msgid "the value to set the attribute mixins to." msgstr "mixinã®å±žæ€§ã‚’設定ã™ã‚‹å€¤" # YARD::CodeObjects::NamespaceObject#child= #: ../lib/yard/code_objects/namespace_object.rb:7 msgid "Sets the attribute child" msgstr "child属性を設定ã™ã‚‹" # YARD::CodeObjects::NamespaceObject#constants= #: ../lib/yard/code_objects/namespace_object.rb:7 msgid "Sets the attribute constants" msgstr "定数ã®å±žæ€§ã‚’設定ã™ã‚‹" # YARD::CodeObjects::NamespaceObject#cvars= #: ../lib/yard/code_objects/namespace_object.rb:7 msgid "Sets the attribute cvars" msgstr "cvarsã®å±žæ€§ã‚’設定ã™ã‚‹" # YARD::CodeObjects::NamespaceObject#meths= #: ../lib/yard/code_objects/namespace_object.rb:7 msgid "Sets the attribute meths" msgstr "meths属性を設定ã™ã‚‹" # YARD::CodeObjects::NamespaceObject#mixins= #: ../lib/yard/code_objects/namespace_object.rb:7 msgid "Sets the attribute mixins" msgstr "mixinã®å±žæ€§ã‚’設定ã™ã‚‹" # @param value #: ../lib/yard/code_objects/namespace_object.rb:7 msgid "the value to set the attribute class_attributes to." msgstr "class_attributes属性を設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/code_objects/namespace_object.rb:7 msgid "the value to set the attribute instance_attributes to." msgstr "instance_attributes属性を設定ã™ã‚‹å€¤" # YARD::CodeObjects::NamespaceObject#class_attributes= #: ../lib/yard/code_objects/namespace_object.rb:8 msgid "Sets the attribute class_attributes" msgstr "class_attributes属性を設定ã™ã‚‹" # YARD::CodeObjects::NamespaceObject#instance_attributes= #: ../lib/yard/code_objects/namespace_object.rb:8 msgid "Sets the attribute instance_attributes" msgstr "instance_attributes属性を設定ã™ã‚‹" # @param value #: ../lib/yard/code_objects/namespace_object.rb:8 msgid "the value to set the attribute included_constants to." msgstr "included_constants属性を設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/code_objects/namespace_object.rb:8 msgid "the value to set the attribute included_meths to." msgstr "included_meths属性を設定ã™ã‚‹å€¤" # YARD::CodeObjects::NamespaceObject#included_constants= #: ../lib/yard/code_objects/namespace_object.rb:9 msgid "Sets the attribute included_constants" msgstr "included_constants属性を設定ã™ã‚‹" # YARD::CodeObjects::NamespaceObject#included_meths= #: ../lib/yard/code_objects/namespace_object.rb:9 msgid "Sets the attribute included_meths" msgstr "included_meths属性を設定ã™ã‚‹" # @return [Array] #: ../lib/yard/code_objects/namespace_object.rb:12 msgid "a list of ordered group names inside the namespace" msgstr "namespace内部ã®åå‰ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¸ã®å‘½ä»¤ã®å…¥ã£ãŸãƒªã‚¹ãƒˆ" # YARD::CodeObjects::NamespaceObject#children #: ../lib/yard/code_objects/namespace_object.rb:15 msgid "The list of objects defined in this namespace" msgstr "ã“ã®namespaceã®ä¸­ã§å®šç¾©ã•れãŸã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ" # @return [Array] #: ../lib/yard/code_objects/namespace_object.rb:16 msgid "a list of objects" msgstr "オブジェクトã®ãƒªã‚¹ãƒˆ" # YARD::CodeObjects::NamespaceObject#attributes #: ../lib/yard/code_objects/namespace_object.rb:19 msgid "" "A hash containing two keys, class and instance, each containing\n" "the attribute name with a { :read, :write } hash for the read and\n" "write objects respectively." msgstr "" "ãƒãƒƒã‚·ãƒ¥ã¯ã‚¯ãƒ©ã‚¹ã¨ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®äºŒã¤ã®ã‚­ãƒ¼ã‚’å«ã‚“ã§ã„ã‚‹,\n" "èª­ã¿æ›¸ãオブジェクトãれãžã‚Œ{:read, :write}ãƒãƒƒã‚·ãƒ¥ã¨å…±ã«\n" "属性ã®åå‰ã‚’ãれãžã‚Œå«ã‚“ã§ã„る。" # @example The attributes of an object #: ../lib/yard/code_objects/namespace_object.rb:39 msgid "" ">> Registry.at('YARD::Docstring').attributes\n" "=> {\n" " :class => { },\n" " :instance => {\n" " :ref_tags => {\n" " :read => #,\n" " :write => nil\n" " },\n" " :object => {\n" " :read => #,\n" " :write => #\n" " },\n" " ...\n" " }\n" " }" msgstr "" # @return [Hash] # @param [Array] list #: ../lib/yard/code_objects/namespace_object.rb:39 #: ../lib/yard/code_objects/namespace_object.rb:44 #: ../lib/yard/templates/helpers/module_helper.rb:10 msgid "a list of methods" msgstr "メソッドã®ãƒªã‚¹ãƒˆ" # @example #: ../lib/yard/code_objects/namespace_object.rb:39 msgid "tag|example|The attributes of an object" msgstr "オブジェクトã®å±žæ€§" # YARD::CodeObjects::NamespaceObject#aliases #: ../lib/yard/code_objects/namespace_object.rb:42 msgid "" "A hash containing two keys, :class and :instance, each containing\n" "a hash of objects and their alias names." msgstr "" "二ã¤ã®ã‚­ãƒ¼ã‚’å«ã‚“ã§ã„ã‚‹ãƒãƒƒã‚·ãƒ¥ã§,クラスã¨ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ãれãžã‚Œã€\n" "オブジェクトã®ãƒãƒƒã‚·ãƒ¥ã¨ã€ãã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã®åå‰ã‚’å«ã‚“ã§ã„る。" # YARD::CodeObjects::NamespaceObject#class_mixins #: ../lib/yard/code_objects/namespace_object.rb:47 msgid "Class mixins" msgstr "mixinã®ã‚¯ãƒ©ã‚¹" # @return [Array] #: ../lib/yard/code_objects/namespace_object.rb:48 #: ../lib/yard/code_objects/namespace_object.rb:52 #: ../lib/yard/code_objects/namespace_object.rb:194 msgid "a list of mixins" msgstr "mixinã®ãƒªã‚¹ãƒˆ" # YARD::CodeObjects::NamespaceObject#instance_mixins #: ../lib/yard/code_objects/namespace_object.rb:51 msgid "Instance mixins" msgstr "mixinã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹" # YARD::CodeObjects::NamespaceObject#initialize #: ../lib/yard/code_objects/namespace_object.rb:55 msgid "Creates a new namespace object inside +namespace+ with +name+." msgstr "" "+name+ ã¨å…±ã«ã€ +namespace+ ã®å†…éƒ¨ã§æ–°ã—ã„namespaceオブジェクトを作æˆã™ã‚‹ã€‚" # @return [NamespaceObject] #: ../lib/yard/code_objects/namespace_object.rb:56 msgid "a new instance of NamespaceObject" msgstr "NamespaceObjectã®æ–°ã—ã„インスタンス" # @see #: ../lib/yard/code_objects/namespace_object.rb:56 msgid "tag|see|Base#initialize" msgstr "" # YARD::CodeObjects::NamespaceObject#class_attributes #: ../lib/yard/code_objects/namespace_object.rb:67 msgid "Only the class attributes" msgstr "クラス属性ã ã‘" # @return [Hash] #: ../lib/yard/code_objects/namespace_object.rb:69 #: ../lib/yard/code_objects/namespace_object.rb:76 msgid "a list of method names and their read/write objects" msgstr "メソッドåã®ãƒªã‚¹ãƒˆã¨ãれを読ã¿/書ãã™ã‚‹ã‚ªãƒ–ジェクト" # @see #: ../lib/yard/code_objects/namespace_object.rb:69 #: ../lib/yard/code_objects/namespace_object.rb:76 msgid "tag|see|#attributes" msgstr "" # YARD::CodeObjects::NamespaceObject#instance_attributes #: ../lib/yard/code_objects/namespace_object.rb:74 msgid "Only the instance attributes" msgstr "インスタンス属性ã ã‘" # YARD::CodeObjects::NamespaceObject#child #: ../lib/yard/code_objects/namespace_object.rb:81 msgid "Looks for a child that matches the attributes specified by +opts+." msgstr "+opts+ã«æŒ‡å®šã•れãŸå±žæ€§ã«ãƒžãƒƒãƒã™ã‚‹å­ã‚’検索ã™ã‚‹" # @example Finds a child by name and scope #: ../lib/yard/code_objects/namespace_object.rb:86 msgid "" "namespace.child(:name => :to_s, :scope => :instance)\n" "# => #" msgstr "" # @example #: ../lib/yard/code_objects/namespace_object.rb:86 msgid "tag|example|Finds a child by name and scope" msgstr "åå‰ã¨ã‚¹ã‚³ãƒ¼ãƒ—ã®å­ã‚’検索ã™ã‚‹" # @return [Base, nil] #: ../lib/yard/code_objects/namespace_object.rb:86 msgid "the first matched child object, or nil" msgstr "最åˆã«ãƒžãƒƒãƒã—ãŸå­ã®ã‚ªãƒ–ジェクトã€åˆã¯nil" # YARD::CodeObjects::NamespaceObject#meths #: ../lib/yard/code_objects/namespace_object.rb:100 msgid "" "Returns all methods that match the attributes specified by +opts+. If\n" "no options are provided, returns all methods." msgstr "" "+opts+ã«æŒ‡å®šã•れãŸå±žæ€§ã«ãƒžãƒƒãƒã™ã‚‹å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’è¿”ã™ã€‚\n" "optionãŒæä¾›ã•れãªã„å ´åˆã¯ã€å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’è¿”ã™ã€‚" # @param [Hash] opts #: ../lib/yard/code_objects/namespace_object.rb:113 #: ../lib/yard/code_objects/namespace_object.rb:144 #: ../lib/yard/code_objects/namespace_object.rb:164 #: ../lib/yard/handlers/base.rb:355 ../lib/yard/i18n/text.rb:11 #: ../lib/yard/serializers/file_system_serializer.rb:27 #: ../lib/yard/server/rack_adapter.rb:26 msgid "a customizable set of options" msgstr "カスタマイズå¯èƒ½ãªã‚ªãƒ—ションã®ã‚°ãƒ«ãƒ¼ãƒ—" # @return [Array] #: ../lib/yard/code_objects/namespace_object.rb:113 msgid "a list of method objects" msgstr "オブジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒªã‚¹ãƒˆ" # @example Finds all private and protected class methods #: ../lib/yard/code_objects/namespace_object.rb:113 msgid "" "namespace.meths(:visibility => [:private, :protected], :scope => :class)\n" "# => [#, #]" msgstr "" # @example #: ../lib/yard/code_objects/namespace_object.rb:113 msgid "tag|example|Finds all private and protected class methods" msgstr "å…¨ã¦ã®privateã¨ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã®protectedを検索ã™ã‚‹" # YARD::CodeObjects::NamespaceObject#included_meths #: ../lib/yard/code_objects/namespace_object.rb:133 msgid "" "Returns methods included from any mixins that match the attributes\n" "specified by +opts+. If no options are specified, returns all included\n" "methods." msgstr "" "+opts+ã§æŒ‡å®šã•れãŸå±žæ€§ã«ãƒžãƒƒãƒã™ã‚‹ä»»æ„ã®mixinã‹ã‚‰å«ã‚“ã§ã„るメソッドを返ã™\n" "ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæŒ‡å®šã•れãªã„å ´åˆã€å…¨ã¦ã®å«ã‚“ã§ã„るメソッドを返ã™methods." # @see #: ../lib/yard/code_objects/namespace_object.rb:144 msgid "tag|see|#meths" msgstr "" # YARD::CodeObjects::NamespaceObject#constants #: ../lib/yard/code_objects/namespace_object.rb:160 msgid "Returns all constants in the namespace" msgstr "namespaceã®ä¸­ã®å…¨ã¦ã®å®šæ•°ã‚’è¿”ã™" # @return [Array] #: ../lib/yard/code_objects/namespace_object.rb:164 #: ../lib/yard/code_objects/namespace_object.rb:172 msgid "a list of constant objects" msgstr "定数オブジェクトã®ãƒªã‚¹ãƒˆ" # YARD::CodeObjects::NamespaceObject#included_constants #: ../lib/yard/code_objects/namespace_object.rb:171 msgid "Returns constants included from any mixins" msgstr "ä»»æ„ã®mixinã‹ã‚‰ã€å«ã‚“ã§ã„る定数を返ã™" # YARD::CodeObjects::NamespaceObject#cvars #: ../lib/yard/code_objects/namespace_object.rb:185 msgid "Returns class variables defined in this namespace." msgstr "ã“ã®namespaseã®ä¸­ã§å®šç¾©ã•れãŸã‚¯ãƒ©ã‚¹å¤‰æ•°ã‚’è¿”ã™" # @return [Array] #: ../lib/yard/code_objects/namespace_object.rb:186 msgid "a list of class variable objects" msgstr "オブジェクトã®ã‚¯ãƒ©ã‚¹å¤‰æ•°ã®ãƒªã‚¹ãƒˆ" # YARD::CodeObjects::NamespaceObject#mixins #: ../lib/yard/code_objects/namespace_object.rb:191 msgid "" "Returns for specific scopes. If no scopes are provided, returns all mixins." msgstr "固有ã®ã‚¹ã‚³ãƒ¼ãƒ—ã‚’è¿”ã™ã€‚ã‚¹ã‚³ãƒ¼ãƒ—ãŒæä¾›ã•れãªã„å ´åˆã€å…¨ã¦ã®mixinã‚’è¿”ã™" # @param [Array] scopes #: ../lib/yard/code_objects/namespace_object.rb:194 msgid "" "a list of scopes (:class, :instance) to\n" "return mixins for. If this is empty, all scopes will be returned." msgstr "" "mixinã‚’è¿”ã™ç‚ºã®ã‚¹ã‚³ãƒ¼ãƒ—ã®ãƒªã‚¹ãƒˆ(:class, :instance).\n" "ã“れãŒç©ºã®å ´åˆã€å…¨ã¦ã®ã‚¹ã‚³ãƒ¼ãƒ—ãŒã€è¿”ã•れるã ã‚ã†ã€‚" # @param [Array] #: ../lib/yard/code_objects/namespace_object.rb:194 msgid "tag|param|scopes" msgstr "scopes" # YARD::CodeObjects::ProxyMethodError #: ../lib/yard/code_objects/proxy.rb:4 msgid "A special type of +NoMethodError+ when raised from a {Proxy}" msgstr "{Proxy}ã‹ã‚‰ã€ä¾‹å¤–ãŒä¸Šã’られる時ã®ã€+NoMethodError+ã®ç‰¹åˆ¥ãªåž‹" # YARD::CodeObjects::Proxy #: ../lib/yard/code_objects/proxy.rb:7 msgid "" "The Proxy class is a way to lazily resolve code objects in\n" "cases where the object may not yet exist. A proxy simply stores\n" "an unresolved path until a method is called on the object, at which\n" "point it does a lookup using {Registry.resolve}. If the object is\n" "not found, a warning is raised and {ProxyMethodError} might be raised." msgstr "" "Proxyクラスã¯ã€ã‚ªãƒ–ジェクトãŒã¾ã å­˜åœ¨ã—ãªã„ã‹ã‚‚ã—れãªã„ケースã§ã€\n" "コードオブジェクトを簡å˜ã«è§£æ±ºã™ã‚‹ç‚ºã®æ–¹æ³•ã§ã‚る。\n" "å˜ç´”ã«proxyã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒè§£æ±ºã•れãªã‹ã£ãŸãƒ‘スを記録ã—ã€\n" "オブジェクト上ã§å‘¼ã³å‡ºã•れ{Registry.resolve}ã«ã‚ˆã£ã¦æ¤œç´¢ã™ã‚‹ã€‚\n" "オブジェクトãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€è­¦å‘ŠãŒã§ãŸã‚Šã€{ProxyMethodError}ãŒå‡ºã‚‹ã‹ã‚‚ã—" "れãªã„。" # @example Creates a Proxy to the String class from a module #: ../lib/yard/code_objects/proxy.rb:18 msgid "" "# When the String class is parsed this method will\n" "# begin to act like the String ClassObject.\n" "Proxy.new(mymoduleobj, \"String\")" msgstr "" # @example #: ../lib/yard/code_objects/proxy.rb:18 msgid "tag|example|Creates a Proxy to the String class from a module" msgstr "モジュールã‹ã‚‰Stringクラスã®ç‚ºã®Proxyを作æˆã™ã‚‹" # @see #: ../lib/yard/code_objects/proxy.rb:18 msgid "tag|see|ProxyMethodError" msgstr "" # @see #: ../lib/yard/code_objects/proxy.rb:18 msgid "tag|see|Registry.resolve" msgstr "" # YARD::CodeObjects::Proxy#namespace # YARD::CodeObjects::Proxy#parent #: ../lib/yard/code_objects/proxy.rb:22 ../lib/yard/code_objects/proxy.rb:23 #: ../lib/yard/handlers/base.rb:315 ../lib/yard/handlers/base.rb:335 msgid "Returns the value of attribute namespace" msgstr "namespaxe属性ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::Proxy#initialize #: ../lib/yard/code_objects/proxy.rb:25 msgid "Creates a new Proxy" msgstr "æ–°ã—ã„Proxyã‚’è¿”ã™" # @raise [ArgumentError] #: ../lib/yard/code_objects/proxy.rb:28 msgid "if namespace is not a NamespaceObject" msgstr "namespaceãŒNamespaceObjectã§ãªã„å ´åˆ" # YARD::CodeObjects::Proxy#inspect #: ../lib/yard/code_objects/proxy.rb:76 msgid "Returns a text representation of the Proxy" msgstr "Proxyã®ãƒ†ã‚­ã‚¹ãƒˆè¡¨ç¾ã‚’è¿”ã™" # @return [String] #: ../lib/yard/code_objects/proxy.rb:77 msgid "the object's #inspect method or P(OBJECTPATH)" msgstr "#inspectメソッドやP(OBJECTPATH)ã®ã‚ªãƒ–ジェクト" # YARD::CodeObjects::Proxy#path # YARD::CodeObjects::Proxy#to_s # YARD::CodeObjects::Proxy#to_str #: ../lib/yard/code_objects/proxy.rb:86 ../lib/yard/code_objects/proxy.rb:98 #: ../lib/yard/code_objects/proxy.rb:99 msgid "" "If the proxy resolves to an object, returns its path, otherwise\n" "guesses at the correct path using the original namespace and name." msgstr "" "proxyãŒã‚ªãƒ–ジェクトを解決ã™ã‚‹å ´åˆã€ãƒ‘スを返ã™ã€‚\n" "ä»–ã®å ´åˆã€\n" "å…ƒã®namespaceã¨nameã«ã‚ˆã£ã¦æ­£ã—ã„パスを推測ã™ã‚‹" # @return [String] #: ../lib/yard/code_objects/proxy.rb:90 msgid "" "the assumed path of the proxy (or the real path\n" "of the resolved object)" msgstr "proxyã®ãƒ‘スを装ã†(åˆã¯ã€è§£æ±ºã—ãŸã‚ªãƒ–ジェクトã®å®Ÿéš›ã®ãƒ‘ス)" # YARD::CodeObjects::Proxy#class #: ../lib/yard/code_objects/proxy.rb:141 msgid "" "Returns the class name of the object the proxy is mimicking, if\n" "resolved. Otherwise returns +Proxy+." msgstr "" "解決ã—ãŸå ´åˆã€proxyãŒæ¨¡å€£ã™ã‚‹ã‚ªãƒ–ジェクトã®ã‚¯ãƒ©ã‚¹åã‚’è¿”ã™ã€‚\n" "ä»–ã®å ´åˆã€+Proxy+ã‚’è¿”ã™ã€‚" # @return [Class] #: ../lib/yard/code_objects/proxy.rb:143 msgid "the resolved object's class or +Proxy+" msgstr "解決ã—ãŸã‚ªãƒ–ジェクトã®ã‚¯ãƒ©ã‚¹ã‚„ +Proxy+" # YARD::CodeObjects::Proxy#type #: ../lib/yard/code_objects/proxy.rb:152 msgid "" "Returns the type of the proxy. If it cannot be resolved at the\n" "time of the call, it will either return the inferred proxy type\n" "(see {#type=}) or +:proxy+" msgstr "" "proxyã®åž‹ã‚’è¿”ã™ã€‚呼ã³å‡ºã•れる時間ã§è§£æ±ºã§ããªã„å ´åˆã€\n" "予想ã•れるproxyã®åž‹(see {#type=})ã‚„ +:proxy+ ã‚’è¿”ã™ã€‚" # @see #: ../lib/yard/code_objects/proxy.rb:156 msgid "tag|see|#type=" msgstr "" # @return [Symbol] #: ../lib/yard/code_objects/proxy.rb:156 msgid "the Proxy's type" msgstr "Proxyã®åž‹" # YARD::CodeObjects::Proxy#type= #: ../lib/yard/code_objects/proxy.rb:165 msgid "Allows a parser to infer the type of the proxy by its path." msgstr "パスã«ã‚ˆã£ã¦proxyã®åž‹ã‚’推測ã™ã‚‹ç‚ºã«ã€ãƒ‘ーサーをå—ã‘入れる。" # @param [#to_sym] # @param [Symbol] #: ../lib/yard/code_objects/proxy.rb:167 ../lib/yard/handlers/ruby/base.rb:102 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:16 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:37 #: ../lib/yard/parser/ruby/ast_node.rb:110 #: ../lib/yard/parser/ruby/ast_node.rb:152 #: ../lib/yard/parser/source_parser.rb:139 #: ../lib/yard/parser/source_parser.rb:181 ../lib/yard/registry.rb:270 #: ../lib/yard/registry.rb:368 ../lib/yard/registry_store.rb:94 #: ../lib/yard/registry_store.rb:103 #: ../lib/yard/templates/helpers/html_helper.rb:154 #: ../lib/yard/templates/helpers/html_helper.rb:364 #: ../lib/yard/templates/helpers/markup_helper.rb:149 #: ../lib/yard/templates/helpers/markup_helper.rb:159 msgid "tag|param|type" msgstr "type" # @param [#to_sym] type #: ../lib/yard/code_objects/proxy.rb:167 msgid "the proxy's inferred type" msgstr "推察ã•れãŸproxyã®åž‹" # YARD::CodeObjects::Proxy#method_missing #: ../lib/yard/code_objects/proxy.rb:189 msgid "Dispatches the method to the resolved object." msgstr "解決ã—ãŸã‚ªãƒ–ジェクトã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’é€ã‚‹" # @raise [ProxyMethodError] #: ../lib/yard/code_objects/proxy.rb:191 msgid "if the proxy cannot find the real object" msgstr "proxyãŒå®Ÿéš›ã®ã‚ªãƒ–ジェクトを見ã¤ã‘られãªã„å ´åˆ" # YARD::CodeObjects::Proxy#root? #: ../lib/yard/code_objects/proxy.rb:213 msgid "This class is never a root object" msgstr "ã“ã®ã‚¯ãƒ©ã‚¹rootオブジェクトã«ã¯ãªã‚‰ãªã„" # @note #: ../lib/yard/code_objects/proxy.rb:218 msgid "this method fixes a bug in 1.9.2: http://gist.github.com/437136" msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒã‚°ã‚’修正ã™ã‚‹ã€‚\n" "(in 1.9.2: http://gist.github.com/4371369)" # YARD::CodeObjects::Proxy#to_obj #: ../lib/yard/code_objects/proxy.rb:221 msgid "" "Attempts to find the object that this unresolved object\n" "references by checking if any objects by this name are\n" "registered all the way up the namespace tree." msgstr "" "ã“ã®åå‰ã«ã‚ˆã£ã¦ä»»æ„ã®ã‚ªãƒ–ジェクトãŒ\n" "namespaceツリーã®å¤‰æ›´ã‚’記録ã™ã‚‹å ´åˆã€\n" "ã“れãŒãƒã‚§ãƒƒã‚¯ã™ã‚‹ã‚ªãƒ–ジェクトã®å‚ç…§ãŒ\n" "未解決ã ã£ãŸã‚ªãƒ–ジェクトを見ã¤ã‘る為ã«è©¦ã¿ã‚‹ã€‚" # @return [Base, nil] #: ../lib/yard/code_objects/proxy.rb:225 msgid "the registered code object or nil" msgstr "記録ã•れるコードオブジェクトã€åˆã¯ã€nil" # YARD::CodeObjects::RootObject #: ../lib/yard/code_objects/root_object.rb:4 msgid "" "Represents the root namespace object (the invisible Ruby module that\n" "holds all top level modules, class and other objects)." msgstr "" "root namespaceオブジェクトを表ã™(å…¨ã¦ã®top levelã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«,クラス,ä»–ã®ã‚ªãƒ–" "ジェクトを把æ¡ã™ã‚‹éš ã‚ŒãŸRubyモジュール)" # YARD::Config #: ../lib/yard/config.rb:3 msgid "" "This class maintains all system-wide configuration for YARD and handles\n" "the loading of plugins. To access options call {options}, and to load\n" "a plugin use {load_plugin}. All other public methods are used by YARD\n" "during load time." msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯\n" "YARDã¨ãƒ—ラグインã®ãƒ­ãƒ¼ãƒ‰ã‚’æ“作ã™ã‚‹ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®è¨­å®šã‚’ç¶­æŒã™ã‚‹ã€‚\n" "設定を呼ã³å‡ºã™{options}ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ç‚ºã‚„ã€\n" "プラグインを使ã†{load_plugin}をロードã™ã‚‹äº‹ã‚’目的ã«ã€\n" "å…¨ã¦ã®ä»–ã®publicãªãƒ¡ã‚½ãƒƒãƒ‰ãŒã€\n" "ロード中ã«YARDã«ã‚ˆã£ã¦åˆ©ç”¨ã•れる。" # YARD::Config #: ../lib/yard/config.rb:8 msgid "== User Configuration Files" msgstr "== ユーザー設定ファイル" # YARD::Config #: ../lib/yard/config.rb:10 msgid "" "Persistent user configuration files can be stored in the file\n" "+~/.yard/config+, which is read when YARD first loads. The file should\n" "be formatted as YAML, and should contain a map of keys and values." msgstr "" "persistent(é•·ã使ã£ãŸ)ユーザーã®è¨­å®šãƒ•ァイルã¯ã€+~/.yard/config+ ファイルã®ä¸­" "ã«è¨˜éŒ²ã•れる。\n" "ãã—ã¦ã€YARDãŒæœ€åˆã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹æ™‚ã«ã€èª­ã¿å‡ºã•れる。\n" "ã“ã®ãƒ•ァイルã¯YAMLã®ã‚ˆã†ã«æ›¸å¼åŒ–ã•れるã€\n" "ãã—ã¦ã€ã‚­ãƒ¼ã‚„値ã®ãƒžãƒƒãƒ—ã‚’å«ã‚“ã§ã„ã‚‹ã¯ãšã§ã‚る。" # YARD::Config #: ../lib/yard/config.rb:14 msgid "" "Although you can specify any key-value mapping in the configuration file,\n" "YARD defines special keys specified in {DEFAULT_CONFIG_OPTIONS}." msgstr "" "ã‚ãªãŸã¯ã€è¨­å®šãƒ•ァイルã®ä¸­ã«ä»»æ„ã®ã‚­ãƒ¼ã‚„値ã®ãƒžãƒƒãƒ”ングを指定ã§ãã‚‹ã‘れã©" "ã‚‚ã€\n" "YARDã¯{DEFAULT_CONFIG_OPTIONS}ã®ä¸­ã®è¦å®šã®ç‰¹åˆ¥ãªã‚­ãƒ¼ã‚’定義ã™ã‚‹ã€‚" # YARD::Config #: ../lib/yard/config.rb:17 msgid "An example of a configuration file is listed below:" msgstr "設定ファイルã®ä¾‹ã¯æ¬¡ã®ã‚ˆã†è¨˜è¿°ã•れる。" # YARD::Config #: ../lib/yard/config.rb:19 msgid "" " !!!yaml\n" " load_plugins: true # Auto-load plugins when YARD starts\n" " ignored_plugins:\n" " - yard-broken\n" " - broken2 # yard- prefix not necessary\n" " autoload_plugins:\n" " - yard-rspec" msgstr "" # YARD::Config #: ../lib/yard/config.rb:27 msgid "== Automatic Loading of Plugins" msgstr "== プラグインã®è‡ªå‹•ロード" # YARD::Config #: ../lib/yard/config.rb:29 msgid "" "YARD 0.6.2 will no longer automatically load all plugins by default. This\n" "option can be reset by setting 'load_plugins' to true in the configuration\n" "file. In addition, you can specify a set of specific plugins to load on\n" "load through the 'autoload_plugins' list setting. This setting is\n" "independent of the 'load_plugins' value and will always be processed." msgstr "" "YARD 0.6.2ã‹ã‚‰ã¯ã€ãƒ‡ãƒ•ォルトã§å…¨ã¦ã®ãƒ—ラグインを自動ロードã—ãªã„。\n" "ã“ã®è¨­å®šã¯ã€è¨­å®šãƒ•ァイルã®ä¸­ã®'load_plugins'ã‚’trueã«è¨­å®šã™ã‚‹äº‹ã«ã‚ˆã£ã¦ãƒªã‚»ãƒƒ" "トã§ãる。\n" "ã•らã«ã€ã‚ãªãŸã¯ã€\n" "'autoload_plugins'リストã®ã‚»ãƒƒãƒ†ã‚£ãƒ³ã‚°ã‚’通ã—ã¦ã€\n" "ロード毎ã«ç‰¹å®šã®ãƒ—ラグインã®è¨­å®šã‚’指定ã§ãる。\n" "特定ã®ãƒ—ラグインã®ã‚°ãƒ«ãƒ¼ãƒ—を指定ã§ãる。\n" "ã“ã®è¨­å®šã¯ã€'load_plugins'ã®ç‹¬è‡ªã®å€¤ã¨ãªã‚Šã€ãã—ã¦å¸¸ã«å‡¦ç†ã•れるã ã‚ã†ã€‚" # YARD::Config #: ../lib/yard/config.rb:35 msgid "== Ignored Plugins File" msgstr "== プラグインファイルを無視ã™ã‚‹" # YARD::Config #: ../lib/yard/config.rb:37 msgid "" "YARD 0.5 and below used a +~/.yard/ignored_plugins+ file to specify\n" "plugins to be ignored at load time. Ignored plugins in 0.6.2 and above\n" "should now be specified in the main configuration file, though YARD\n" "will support the +ignored_plugins+ file until 0.7.x." msgstr "" "YARD 0.5ã‚„ãれ以下ã§ã¯ã€\n" "ロード時間ã§ç„¡è¦–ã•れるプラグインを指定ã™ã‚‹ç‚ºã«\n" "+~/.yard/ignored_plugins+ ファイルを利用ã—ãŸã€‚\n" "0.6.2以上ã§ç„¡è¦–ã•れるプラグインã¯ã€\n" "ç¾åœ¨ã€ä¸»ã«è¨­å®šãƒ•ァイルã®ä¸­ã§è¦å®šã•れるã¯ãšã§ã‚る。\n" "ã¨ã¯ã„ãˆ,YARD㯠+ignored_pluginis+ ファイルを0.7.xã¾ã§ã€ã‚µãƒãƒ¼ãƒˆã™ã‚‹ã€‚" # YARD::Config #: ../lib/yard/config.rb:42 msgid "== Safe Mode" msgstr "== セーフモード" # YARD::Config #: ../lib/yard/config.rb:44 msgid "" "YARD supports running in safe-mode. By doing this, it will avoid executing\n" "any user code such as require files or queries. Plugins will still be\n" "loaded with safe mode on, because plugins are properly namespaced with\n" "a 'yard-' prefix, must be installed as a gem, and therefore cannot be\n" "touched by the user. To specify safe mode, use the +safe_mode+ key." msgstr "" "YARDã¯ã‚»ãƒ¼ãƒ•モードã§ã®èµ·å‹•をサãƒãƒ¼ãƒˆã™ã‚‹ã€‚\n" "ã“れを行ã†ã“ã¨ã«ã‚ˆã‚Šã€requireファイルやクエリーã®ã‚ˆã†ãª\n" "ä»»æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚³ãƒ¼ãƒ‰ã®å®Ÿè¡Œã‚’無効ã«ã™ã‚‹ã€‚\n" "ã—ã‹ã—ã€ãƒ—ラグインã¯ã‚»ãƒ¼ãƒ•モードã®å®Ÿè¡Œã¨å…±ã«ãƒ­ãƒ¼ãƒ‰ã•れる。\n" "何故ãªã‚‰ã€ãƒ—ラグインã¯ã€'yard-'プレフィックスã¨å…±ã«ã€\n" "é©åˆ‡ã«namespaceãŒè¨­å®šã•れ,\n" "gemã®ã‚ˆã†ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れるã¯ãšã§ã‚ã‚‹,\n" "ãã—ã¦ã€ã“れ自身ã®è¨­å®šã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å¤‰æ›´ã§ããªã„。\n" "セーフモードを指定ã™ã‚‹ã«ã¯ã€ +safe_mode+ キーを利用ã™ã‚‹ã€‚" # YARD::Config #: ../lib/yard/config.rb:50 msgid "== Plugin Specific Configuration" msgstr "== プラグインã®è©³ç´°ãªè¨­å®š" # YARD::Config #: ../lib/yard/config.rb:52 msgid "" "Additional settings can be defined within the configuration file\n" "specifically to provide configuration for a plugin. A plugin that utilizes\n" "the YARD configuration is strongly encouraged to utilize namespacing of\n" "their configuration content." msgstr "" "追加ã®è¨­å®šã¯\n" "プラグイン用ã®è¨­å®šã‚’æä¾›ã™ã‚‹ç‚ºã«ã€\n" "明確ã«è¨­å®šãƒ•ァイルã®ä¸­ã§\n" "定義ã•れる。\n" "YARDã®è¨­å®šã‚’利用ã™ã‚‹ãƒ—ラグインã¯ã€\n" "ãã®è¨­å®šå†…容ã®namespaceを利用ã™ã‚‹ç‚ºã«\n" "強力ã«å¾ŒæŠ¼ã—ã•れる。" # YARD::Config #: ../lib/yard/config.rb:57 msgid "" " !!!yaml\n" " load_plugins: true # Auto-load plugins when YARD starts\n" " ignored_plugins:\n" " - yard-broken\n" " - broken2 # yard- prefix not necessary\n" " autoload_plugins:\n" " - yard-rspec\n" " # Plugin Specific Configuration\n" " yard-sample-plugin:\n" " show-results-inline: true" msgstr "" # YARD::Config #: ../lib/yard/config.rb:68 msgid "" "As the configuration is available system wide, it can be\n" "accessed within the plugin code." msgstr "" "ã“ã®è¨­å®šã¯ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã«åŠã³ã€\n" "プラグインã®ã‚³ãƒ¼ãƒ‰ã®ä¸­ã§ã€ã‚¢ã‚¯ã‚»ã‚¹ã§ãる。" # YARD::Config #: ../lib/yard/config.rb:72 msgid "" " if YARD::Config.options['yard-sample-plugin'] and\n" " YARD::Config.options['yard-sample-plugin']['show-results-inline']\n" " # ... perform the action that places the results inline ...\n" " else\n" " # ... do the default behavior of not showing the results inline ...\n" " end" msgstr "" # YARD::Config #: ../lib/yard/config.rb:79 msgid "" "When accessing the configuration, be aware that this file is user managed\n" "so configuration keys and values may not be present. Make no assumptions " "and\n" "instead ensure that you check for the existence of keys before proceeding " "to\n" "retrieve values." msgstr "" "設定ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ™‚ã€\n" "ã“ã®ãƒ•ァイルã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰±ã†äº‹ã«æ³¨æ„ã™ã‚‹ã€‚\n" "ãªã®ã§ã€ã‚­ãƒ¼ã‚„値ã®è¨­å®šã¯è¦‹ã¤ã‹ã‚‰ãªã„ã‹ã‚‚ã—れãªã„。\n" "勿‰‹ã«ä½œæˆã—ãªã„代ã‚りã«ã€\n" "ã‚ãªãŸãŒå€¤ã‚’å–ã‚Šå‡ºã™æ‰‹ç¶šãã‚’ã™ã‚‹å‰ã«ã‚­ãƒ¼ã®å­˜åœ¨ã®ç®¡ç†ã™ã‚‹äº‹ã‚’ä¿è¨¼ã™ã‚‹ã€‚" # @see #: ../lib/yard/config.rb:85 msgid "tag|see|options" msgstr "" # YARD::Config.options # YARD::Config.options= #: ../lib/yard/config.rb:88 msgid "The system-wide configuration options for YARD" msgstr "YARD用ã®ã‚·ã‚¹ãƒ†ãƒ å…¨ä½“ã®è¨­å®šã‚ªãƒ—ション" # @return [SymbolHash] #: ../lib/yard/config.rb:90 msgid "a map a key-value pair settings." msgstr "キー,値ã®ãƒšã‚¢è¨­å®šã®ãƒžãƒƒãƒ—" # @see #: ../lib/yard/config.rb:90 msgid "tag|see|DEFAULT_CONFIG_OPTIONS" msgstr "" # YARD::Config::CONFIG_DIR #: ../lib/yard/config.rb:94 msgid "The location where YARD stores user-specific settings" msgstr "YARDãŒãƒ¦ãƒ¼ã‚¶ãƒ¼å›ºæœ‰ã®è¨­å®šã‚’記録ã™ã‚‹å ´æ‰€" # YARD::Config::CONFIG_FILE #: ../lib/yard/config.rb:97 msgid "The main configuration YAML file." msgstr "YAMLファイルã®ä¸»ãªè¨­å®š" # YARD::Config::IGNORED_PLUGINS #: ../lib/yard/config.rb:100 msgid "File listing all ignored plugins" msgstr "ファイルã«è¨˜è¿°ã™ã‚‹ã€ç„¡è¦–ã•れるプラグイン" # @deprecated #: ../lib/yard/config.rb:101 msgid "Set `ignored_plugins` in the {CONFIG_FILE} instead." msgstr "{CONFIG_FILE}ã®ä»£ã‚りã«ã€`ignored_plugins`を設定ã™ã‚‹ã€‚" # YARD::Config::DEFAULT_CONFIG_OPTIONS #: ../lib/yard/config.rb:104 msgid "Default configuration options" msgstr "デフォルトã®è¨­å®šã‚ªãƒ—ション" # YARD::Config::YARD_PLUGIN_PREFIX #: ../lib/yard/config.rb:112 msgid "" "The prefix used for YARD plugins. Name your gem with this prefix\n" "to allow it to be used as a plugin." msgstr "" "プレフィックスã¯ã€YARDプラグイン用ã«åˆ©ç”¨ã•れる。\n" "ã‚ãªãŸã®gemãŒãƒ—ãƒ©ã‚°ã‚¤ãƒ³ã®æ§˜ã«åˆ©ç”¨ã•れる為ã«ã€\n" "ã“ã®ãƒ—レフィックスã¨å…±ã«å付ã‘る。" # YARD::Config.load #: ../lib/yard/config.rb:116 msgid "" "Loads settings from {CONFIG_FILE}. This method is called by YARD at\n" "load time and should not be called by the user." msgstr "" "{CONFIG_FILE}ã‹ã‚‰ã®è¨­å®šã‚’ロードã™ã‚‹ã€‚\n" "ã“れメソッドã¯ã€ãƒ­ãƒ¼ãƒ‰æ™‚é–“ã§YARDã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れる。\n" "ãã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れãªã„ã¯ãšã§ã‚る。" # YARD::Config.save #: ../lib/yard/config.rb:132 msgid "Saves settings to {CONFIG_FILE}." msgstr "{CONFIG_FILE}ã®ç‚ºã®è¨­å®šã‚’ä¿å­˜ã™ã‚‹ã€‚" # @deprecated #: ../lib/yard/config.rb:143 msgid "Use {Config.load_plugins}" msgstr "" # @return [Boolean] #: ../lib/yard/config.rb:143 msgid "true if all plugins loaded successfully, false otherwise." msgstr "å…¨ã¦ã®ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ãŒæ­£ã—ãロードã—ãŸå ´åˆã€trueã€ãã†ã§ãªã‘れã°ã€false" # YARD::Config.load_plugin #: ../lib/yard/config.rb:150 msgid "" "Loads an individual plugin by name. It is not necessary to include the\n" "+yard-+ plugin prefix here." msgstr "" "åå‰ã«ã‚ˆã£ã¦ã€å€‹ã€…ã®ãƒ—ラグインをロードã™ã‚‹ã€‚\n" "ã“ã“ã§ +yard-+ プラグインã®ãƒ—レフィックスをå«ã‚€å¿…è¦ã¯ç„¡ã„。" # @param [String] name #: ../lib/yard/config.rb:154 msgid "the name of the plugin (with or without +yard-+ prefix)" msgstr "プラグインã®åå‰( +yard-+ ãƒ—ãƒ¬ãƒ•ã‚£ãƒƒã‚¯ã‚¹ã®æœ‰ç„¡ã«ã‹ã‹ã‚らãš)" # @return [Boolean] #: ../lib/yard/config.rb:154 msgid "whether the plugin was successfully loaded" msgstr "プラグインãŒãƒ­ãƒ¼ãƒ‰ã«æˆåŠŸã—ãŸã‹ã©ã†ã‹" # YARD::Config.load_gem_plugins #: ../lib/yard/config.rb:168 msgid "Load gem plugins if :load_plugins is true" msgstr ":load_pluginsãŒtrueã®å ´åˆã€gemプラグインをロードã™ã‚‹" # YARD::Config.load_autoload_plugins #: ../lib/yard/config.rb:188 msgid "Load plugins set in :autoload_plugins" msgstr ":autoload_pluginsã®ä¸­ã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ—ラグインをロードã™ã‚‹ã€‚" # YARD::Config.load_commandline_plugins #: ../lib/yard/config.rb:193 msgid "Load plugins from {#arguments}" msgstr "(#arguments)メソッドã‹ã‚‰ãƒ—ラグインをロードã™ã‚‹ã€‚" # YARD::Config.load_commandline_safemode #: ../lib/yard/config.rb:203 msgid "Check for command-line safe_mode switch in {#arguments}" msgstr "" # YARD::Config.load_plugin_failed #: ../lib/yard/config.rb:212 msgid "Print a warning if the plugin failed to load" msgstr "ロードã«å¤±æ•—ã—ãŸãƒ—ラグインã®å ´åˆã€è­¦å‘Šã‚’プリントã™ã‚‹ã€‚" # YARD::Config.add_ignored_plugins_file #: ../lib/yard/config.rb:220 msgid "Legacy support for {IGNORED_PLUGINS}" msgstr "{IGNORED_PLUGINS}用ã®ãƒ¬ã‚¬ã‚·ãƒ¼ã‚µãƒãƒ¼ãƒˆ" # YARD::Config.translate_plugin_names #: ../lib/yard/config.rb:227 msgid "Translates plugin names to add yard- prefix." msgstr "yard-プレフィックスを追加ã™ã‚‹ç‚ºã«ãƒ—ラグインåを翻訳ã™ã‚‹ã€‚" # YARD::Config.read_config_file #: ../lib/yard/config.rb:233 msgid "Loads the YAML configuration file into memory" msgstr "メモリã®ä¸­ã«YAML設定ファイルをロードã™ã‚‹ã€‚" # @see #: ../lib/yard/config.rb:235 msgid "tag|see|CONFIG_FILE" msgstr "" # @return [Hash] #: ../lib/yard/config.rb:235 msgid "the contents of the YAML file from disk" msgstr "ディスクã‹ã‚‰ã®YAMLファイルã®å†…容" # YARD::Config.translate_plugin_name #: ../lib/yard/config.rb:245 msgid "Sanitizes and normalizes a plugin name to include the 'yard-' prefix." msgstr "'yard-'プレフィックスをå«ã‚“ã§ã„るプラグインåã‚’æ­£è¦åŒ–ã™ã‚‹ã€‚" # @param [String] name #: ../lib/yard/config.rb:247 msgid "the plugin name" msgstr "プラグインå" # @return [String] #: ../lib/yard/config.rb:247 msgid "the sanitized and normalized plugin name." msgstr "æ­£è¦åŒ–ã•れるプラグインå" # YARD::Config.with_yardopts #: ../lib/yard/config.rb:254 msgid "Temporarily loads .yardopts file into @yardopts" msgstr "@yardoptsã®ä¸­ã«ã€.yardoptsファイルを一時的ã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã€‚" # @return [Array] #: ../lib/yard/config.rb:263 msgid "arguments from commandline and yardopts file" msgstr "コマンドラインやyardoptsファイルã‹ã‚‰ã®å¼•æ•°" # Array#place #: ../lib/yard/core_ext/array.rb:3 msgid "" "Places values before or after another object (by value) in\n" "an array. This is used in tandem with the before and after\n" "methods of the {Insertion} class." msgstr "" "é…列ã®å‰å¾Œã«ä»–ã®ã‚ªãƒ–ジェクト(値ã¨ã—ã¦)ã®å€¤ã‚’ç½®ã\n" "ã“れã¯ã€å‰å¾Œã«{Insertion}クラスã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„ã¦ã„る。" # @example Places an item before another #: ../lib/yard/core_ext/array.rb:14 msgid "[1, 2, 3].place(4).before(3) # => [1, 2, 4, 3]" msgstr "" # @example Places an item after another #: ../lib/yard/core_ext/array.rb:14 msgid "[:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c]" msgstr "" # @return [Insertion] #: ../lib/yard/core_ext/array.rb:14 msgid "an insertion object to" msgstr "挿入ã•れãŸã‚ªãƒ–ジェクト" # @example #: ../lib/yard/core_ext/array.rb:14 msgid "tag|example|Places an item after another" msgstr "後ã‚ã«åˆ¥ã®è¦ç´ ã‚’ç½®ã" # @example #: ../lib/yard/core_ext/array.rb:14 msgid "tag|example|Places an item before another" msgstr "å‰ã«åˆ¥ã®è¦ç´ ã‚’ç½®ã" # @param [Array] #: ../lib/yard/core_ext/array.rb:14 msgid "tag|param|values" msgstr "values" # @see #: ../lib/yard/core_ext/array.rb:14 msgid "tag|see|Insertion#after" msgstr "" # @see #: ../lib/yard/core_ext/array.rb:14 msgid "tag|see|Insertion#before" msgstr "" # @param [Array] values #: ../lib/yard/core_ext/array.rb:14 msgid "value to insert" msgstr "挿入ã™ã‚‹å€¤" # File.relative_path #: ../lib/yard/core_ext/file.rb:10 msgid "" "Turns a path +to+ into a relative path from starting\n" "point +from+. The argument +from+ is assumed to be\n" "a filename. To treat it as a directory, make sure it\n" "ends in +File::SEPARATOR+ ('/' on UNIX filesystems)." msgstr "" "+from+ ã§å§‹ã¾ã‚‹å ´æ‰€ã‹ã‚‰ã€ç›¸å¯¾ãƒ‘ã‚¹ã®æƒ…å ±ã¸ãƒ‘スを変ãˆã‚‹ã€‚\n" "+from+ ã®å¼•æ•°ã¯ã€ãƒ•ァイルåã«ãªã‚‹ã‚ˆã†ã«å‡¦ç†ã•れる。\n" "ディレクトリã¨ã—ã¦å–å¾—ã™ã‚‹ã«ã¯ã€ +File::SEPARATOR+ ã§çµ‚ã‚ã‚‹å¿…è¦ãŒã‚る。\n" "(UNIX上ã®ãƒ•ァイルシステムãªã‚‰ã€'/')" # File.relative_path # File.cleanpath #: ../lib/yard/core_ext/file.rb:18 ../lib/yard/core_ext/file.rb:35 msgid "Manipulating Paths" msgstr "パスをæ“作ã™ã‚‹" # @param [String] #: ../lib/yard/core_ext/file.rb:18 msgid "tag|param|from" msgstr "from" # @param [String] #: ../lib/yard/core_ext/file.rb:18 msgid "tag|param|to" msgstr "to" # @param [String] to #: ../lib/yard/core_ext/file.rb:18 msgid "the final path that should be made relative." msgstr "対応ã—ã¦ä½œã‚‰ã‚Œã‚‹æœ€å¾Œã®ãƒ‘ス" # @return [String] #: ../lib/yard/core_ext/file.rb:18 msgid "the relative path from +from+ to +to+." msgstr "+from+ ã‹ã‚‰ +to+ ã¸ã®ç›¸å¯¾ãƒ‘ス" # @param [String] from #: ../lib/yard/core_ext/file.rb:18 msgid "" "the starting filename\n" "(or directory with +from_isdir+ set to +true+)." msgstr "" "ファイルå(åˆã¯ +from_isdir+ ã‚’ +true+ を設定ã—ãŸå ´åˆã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª)ã®æ–‡å­—列" # File.cleanpath #: ../lib/yard/core_ext/file.rb:30 msgid "Cleans a path by removing extraneous '..', '.' and '/' characters" msgstr "無関係㮠'..', '.', '/' 文字を削除ã—ã€ãƒ‘スをãれã„ã«ã™ã‚‹ã€‚" # @example Clean a path #: ../lib/yard/core_ext/file.rb:35 msgid "File.cleanpath('a/b//./c/../e') # => \"a/b/e\"" msgstr "" # @example #: ../lib/yard/core_ext/file.rb:35 msgid "tag|example|Clean a path" msgstr "pathã‚’ãれã„ã«ã™ã‚‹" # @param [String] # @param [Array] # @param [String, :root] #: ../lib/yard/core_ext/file.rb:35 ../lib/yard/i18n/message.rb:34 #: ../lib/yard/registry.rb:235 ../lib/yard/server.rb:7 #: ../lib/yard/server/doc_server_helper.rb:65 #: ../lib/yard/templates/engine.rb:20 ../lib/yard/templates/engine.rb:34 #: ../lib/yard/templates/engine.rb:52 ../lib/yard/templates/engine.rb:160 #: ../lib/yard/templates/engine.rb:175 ../lib/yard/templates/template.rb:182 msgid "tag|param|path" msgstr "path" # @param [String] path #: ../lib/yard/core_ext/file.rb:35 msgid "the path to clean" msgstr "ãれã„ã«ã™ã‚‹ãƒ‘ス" # @return [String] #: ../lib/yard/core_ext/file.rb:35 msgid "the sanitized path" msgstr "ãれã„ã«ã•れãŸãƒ‘ス" # File.open! #: ../lib/yard/core_ext/file.rb:51 msgid "" "Forces opening a file (for writing) by first creating the file's directory" msgstr "" "最åˆã«ãƒ•ァイルã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作æˆã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã€é–‹ãファイル(書込ã¿ç”¨)ã‚’å¼·" "制ã™ã‚‹ã€‚" # @since #: ../lib/yard/core_ext/file.rb:53 msgid "0.5.2" msgstr "" # File.open! # File.read_binary #: ../lib/yard/core_ext/file.rb:53 ../lib/yard/core_ext/file.rb:62 msgid "Reading Files" msgstr "ファイルを読ã¿è¾¼ã‚€" # @param [String] file #: ../lib/yard/core_ext/file.rb:53 msgid "the filename to open" msgstr "展開ã™ã‚‹ãƒ•ァイルå" # File.read_binary #: ../lib/yard/core_ext/file.rb:60 msgid "Reads a file with binary encoding" msgstr "ãƒã‚¤ãƒŠãƒªã‚³ãƒ¼ãƒ‰ã«ã—ã¦ãƒ•ァイルを読ã¿è¾¼ã‚€" # @return [String] #: ../lib/yard/core_ext/file.rb:62 msgid "the ascii-8bit encoded data" msgstr "ascii-8bitã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•れãŸãƒ‡ãƒ¼ã‚¿" # Insertion #: ../lib/yard/core_ext/insertion.rb:2 msgid "" "The Insertion class inserts a value before or after another\n" "value in a list." msgstr "Insertionクラスã¯ãƒªã‚¹ãƒˆã®ä¸­ã®å‰å¾Œã«ä»–ã®å€¤ã‚’挿入ã™ã‚‹ã€‚" # @example #: ../lib/yard/core_ext/insertion.rb:6 msgid "Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3]" msgstr "" # Insertion#initialize #: ../lib/yard/core_ext/insertion.rb:8 msgid "" "Creates an insertion object on a list with a value to be\n" "inserted. To finalize the insertion, call {#before} or\n" "{#after} on the object." msgstr "" "挿入ã•れる値ã¨å…±ã«ãƒªã‚¹ãƒˆä¸Šã®insertionオブジェクトを作æˆã™ã‚‹ã€‚\n" "最終的ã«insertionã¯ã€ã‚ªãƒ–ジェクト上ã®{#before}ã‚„{#after}メソッドを呼ã³å‡ºã™ã€‚" # @return [Insertion] #: ../lib/yard/core_ext/insertion.rb:13 msgid "a new instance of Insertion" msgstr "Insertionã®æ–°ã—ã„インスタンス" # @param [Array] # @param [Array] # @param [Array] #: ../lib/yard/core_ext/insertion.rb:13 ../lib/yard/core_ext/insertion.rb:45 #: ../lib/yard/templates/helpers/base_helper.rb:29 #: ../lib/yard/templates/helpers/base_helper.rb:165 #: ../lib/yard/templates/helpers/module_helper.rb:10 #: ../lib/yard/verifier.rb:90 msgid "tag|param|list" msgstr "list" # @param [Array] list #: ../lib/yard/core_ext/insertion.rb:13 msgid "the list to perform the insertion on" msgstr "insertionã§å®Ÿè¡Œã™ã‚‹ãƒªã‚¹ãƒˆ" # @param [Object] value # @param [Object] val #: ../lib/yard/core_ext/insertion.rb:13 ../lib/yard/core_ext/insertion.rb:45 msgid "the value to insert" msgstr "挿入ã™ã‚‹å€¤" # Insertion#before #: ../lib/yard/core_ext/insertion.rb:16 msgid "Inserts the value before +val+" msgstr "+val+ ã®å‰ã«å€¤ã‚’挿入ã™ã‚‹" # @param [Boolean] recursive #: ../lib/yard/core_ext/insertion.rb:18 ../lib/yard/core_ext/insertion.rb:26 #: ../lib/yard/core_ext/insertion.rb:45 msgid "look inside sublists" msgstr "ãƒã‚¹ãƒˆã—ãŸé…列ã®å†…部をã¿ã‚‹ã‹ã©ã†ã‹" # @param [Boolean] #: ../lib/yard/core_ext/insertion.rb:18 ../lib/yard/core_ext/insertion.rb:26 #: ../lib/yard/core_ext/insertion.rb:45 msgid "tag|param|recursive" msgstr "recursive" # @param [Object] #: ../lib/yard/core_ext/insertion.rb:18 ../lib/yard/core_ext/insertion.rb:26 #: ../lib/yard/core_ext/insertion.rb:45 msgid "tag|param|val" msgstr "val" # @param [Object] val #: ../lib/yard/core_ext/insertion.rb:18 msgid "the object the value will be inserted before" msgstr "値ãŒå‰ã«æŒ¿å…¥ã•れる,オブジェクト" # Insertion#after #: ../lib/yard/core_ext/insertion.rb:21 msgid "Inserts the value after +val+." msgstr "+val+ ã®å‰ã«å€¤ã‚’挿入ã™ã‚‹" # @example If subsections are ignored #: ../lib/yard/core_ext/insertion.rb:26 msgid "Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3]" msgstr "" # @example #: ../lib/yard/core_ext/insertion.rb:26 msgid "tag|example|If subsections are ignored" msgstr "ãƒã‚¹ãƒˆã—ãŸé…列ãŒç„¡è¦–ã•れる場åˆ" # @param [Object] val #: ../lib/yard/core_ext/insertion.rb:26 msgid "the object the value will be inserted after" msgstr "値ãŒå‰ã«æŒ¿å…¥ã•れる,オブジェクト" # Insertion#before_any #: ../lib/yard/core_ext/insertion.rb:29 msgid "Alias for {#before} with +recursive+ set to true" msgstr "+recursive+ ã«trueを設定ã™ã‚‹{#before}メソッド用ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹" # Insertion#after_any #: ../lib/yard/core_ext/insertion.rb:33 msgid "Alias for {#after} with +recursive+ set to true" msgstr "+recursive+ ã«trueを設定ã™ã‚‹{#after}メソッド用ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹" # Insertion#insertion #: ../lib/yard/core_ext/insertion.rb:39 msgid "This method performs the actual insertion" msgstr "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒã€å®Ÿéš›ã«insertionを実行ã™ã‚‹ã€‚" # @param [Fixnum] #: ../lib/yard/core_ext/insertion.rb:45 msgid "tag|param|rel" msgstr "rel" # @param [Array] list #: ../lib/yard/core_ext/insertion.rb:45 msgid "the list to place objects into" msgstr "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æƒ…報を置ã為ã®ãƒªã‚¹ãƒˆ" # @param [Fixnum] rel #: ../lib/yard/core_ext/insertion.rb:45 msgid "" "the relative index (0 or 1) of where the object\n" "should be placed" msgstr "オブジェクトãŒç½®ã‹ã‚Œã‚‹æ‰€ã®ç›¸å¯¾ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹(0åˆã¯1)" # Module#class_name #: ../lib/yard/core_ext/module.rb:3 msgid "Returns the class name of a full module namespace path" msgstr "モジュールã®å®Œå…¨ãªnamespaceパスã®ã‚¯ãƒ©ã‚¹åã‚’è¿”ã™" # @example #: ../lib/yard/core_ext/module.rb:7 msgid "module A::B::C; class_name end # => \"C\"" msgstr "" # @return [String] #: ../lib/yard/core_ext/module.rb:7 msgid "the last part of a module path" msgstr "ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãƒ‘ã‚¹ã®æœ€å¾Œã®éƒ¨åˆ†" # Module#namespace_name #: ../lib/yard/core_ext/module.rb:12 msgid "Returns the module namespace path minus the class/module name" msgstr "クラス/モジュールåを引ã„ãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®namespaceã®ãƒ‘スを返ã™" # @example #: ../lib/yard/core_ext/module.rb:16 msgid "module A::B::C; namespace_name end # => \"A::B\"" msgstr "" # @return [String] #: ../lib/yard/core_ext/module.rb:16 msgid "the namespace minus the class/module name" msgstr "クラス/モジュールåを引ã„ãŸnamespace" # String#shell_split #: ../lib/yard/core_ext/string.rb:3 msgid "" "Splits text into tokens the way a shell would, handling quoted\n" "text as a single token. Use '\\\"' and \"\\'\" to escape quotes and\n" "'\\\\' to escape a backslash." msgstr "" "シェルã®å ´åˆãƒ†ã‚­ã‚¹ãƒˆæƒ…å ±ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’分割ã—ã€\n" "å˜ä¸€ã®ãƒˆãƒ¼ã‚¯ãƒ³ã¨ã—ã¦ã‚¯ã‚ªãƒ¼ãƒˆã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’æ“作ã™ã‚‹ã€‚\n" "エスケープをクオートã™ã‚‹ã«ã¯ã€'\\\"'ã¨\"\\'\"ã€\n" "ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’エスケープã™ã‚‹ã«ã¯'\\\\'を使ã†ã€‚" # @return [Array] #: ../lib/yard/core_ext/string.rb:7 msgid "an array representing the tokens" msgstr "トークンを表ã™é…列" # SymbolHash #: ../lib/yard/core_ext/symbol_hash.rb:2 msgid "" "A subclass of Hash where all keys are converted into Symbols, and\n" "optionally, all String values are converted into Symbols." msgstr "" "å…¨ã¦ã®ã‚­ãƒ¼ãŒSymbolsã«å¤‰æ›ã•れる所ã®ãƒãƒƒã‚·ãƒ¥ã®ã‚µãƒ–クラスã€\n" "自由ã«å…¨ã¦ã®Stringã®å€¤ã‚’Symblosã«å¤‰æ›ã§ãる。" # SymbolHash#initialize #: ../lib/yard/core_ext/symbol_hash.rb:5 msgid "Creates a new SymbolHash object" msgstr "æ–°ã—ã„SymbolHashオブジェクトを作æˆã™ã‚‹" # @return [SymbolHash] #: ../lib/yard/core_ext/symbol_hash.rb:8 msgid "a new instance of SymbolHash" msgstr "SymbolHashã®æ–°ã—ã„インスタンス" # @param [Boolean] symbolize_value #: ../lib/yard/core_ext/symbol_hash.rb:8 msgid "" "converts any String values into Symbols\n" "if this is set to +true+." msgstr "" "ã“ã®è¨­å®šãŒtrueã®å ´åˆã€\n" "å…¨ã¦ã®Stringã®å€¤ã‚’Symbolã¸å¤‰æ›ã™ã‚‹ã€‚" # @param [Boolean] #: ../lib/yard/core_ext/symbol_hash.rb:8 msgid "tag|param|symbolize_value" msgstr "symbolize_value" # @overload #: ../lib/yard/core_ext/symbol_hash.rb:27 msgid "tag|overload|[]" msgstr "" # SymbolHash#[]= #: ../lib/yard/core_ext/symbol_hash.rb:38 msgid "Assigns a value to a symbolized key" msgstr "シンボル化ã•れãŸã‚­ãƒ¼ã«å€¤ã‚’割り当ã¦ã‚‹" # @param [#to_sym] key #: ../lib/yard/core_ext/symbol_hash.rb:41 msgid "the key" msgstr "キー" # @param [Object] value #: ../lib/yard/core_ext/symbol_hash.rb:41 msgid "" "the value to be assigned. If this is a String and\n" "values are set to be symbolized, it will be converted into a Symbol." msgstr "" "割り当ã¦ã‚‰ã‚Œã‚‹å€¤ã€‚\n" "ã“れãŒã€æ–‡å­—列ã®å ´åˆã«ã¯ã€å€¤ãŒã‚·ãƒ³ãƒœãƒ«åŒ–ã•れる為ã«è¨­å®šã•れã€\n" "シンボルã¸å¤‰æ›ã•れるã ã‚ã†ã€‚" # SymbolHash#[] #: ../lib/yard/core_ext/symbol_hash.rb:46 msgid "Accessed a symbolized key" msgstr "シンボル化ã•れるキーã«ã‚¢ã‚¯ã‚»ã‚¹ã•れる" # @param [#to_sym] key #: ../lib/yard/core_ext/symbol_hash.rb:48 msgid "the key to access" msgstr "アクセスã™ã‚‹ç‚ºã®ã‚­ãƒ¼" # @return [Object] #: ../lib/yard/core_ext/symbol_hash.rb:48 msgid "the value associated with the key" msgstr "キーã«é–¢é€£ä»˜ã‘られãŸå€¤" # SymbolHash#delete #: ../lib/yard/core_ext/symbol_hash.rb:51 msgid "Deleted a key and value associated with it" msgstr "関連付ã‘られãŸã‚­ãƒ¼ã¨å€¤ãŒå‰Šé™¤ã•れる" # @param [#to_sym] key #: ../lib/yard/core_ext/symbol_hash.rb:53 ../lib/yard/registry_store.rb:72 msgid "the key to delete" msgstr "削除ã™ã‚‹ã‚­ãƒ¼" # SymbolHash#has_key? #: ../lib/yard/core_ext/symbol_hash.rb:56 msgid "Tests if a symbolized key exists" msgstr "シンボル化ã•れãŸã‚­ãƒ¼ãŒã‚ã‚‹ã‹ãƒ†ã‚¹ãƒˆã™ã‚‹" # @param [#to_sym] key #: ../lib/yard/core_ext/symbol_hash.rb:58 msgid "the key to test" msgstr "テストã™ã‚‹ã‚­ãƒ¼" # @return [Boolean] #: ../lib/yard/core_ext/symbol_hash.rb:58 msgid "whether the key exists" msgstr "キーãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹" # SymbolHash#update # SymbolHash#merge! #: ../lib/yard/core_ext/symbol_hash.rb:61 #: ../lib/yard/core_ext/symbol_hash.rb:67 msgid "" "Updates the object with the contents of another Hash object.\n" "This method modifies the original SymbolHash object" msgstr "" "ä»–ã®ãƒãƒƒã‚·ãƒ¥ã‚ªãƒ–ジェクトã®å†…容ã¨å…±ã«ã‚ªãƒ–ジェクトを更新ã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å…ƒã®SymbolHashオブジェクトを変更ã™ã‚‹ã€‚" # @param [Hash] #: ../lib/yard/core_ext/symbol_hash.rb:65 #: ../lib/yard/core_ext/symbol_hash.rb:72 msgid "tag|param|hash" msgstr "" # @param [Hash] hash #: ../lib/yard/core_ext/symbol_hash.rb:65 msgid "the hash object to copy the values from" msgstr "ãƒãƒƒã‚·ãƒ¥ã‚ªãƒ–ジェクトã‹ã‚‰å€¤ã‚’コピーã™ã‚‹,ãƒãƒƒã‚·ãƒ¥" # SymbolHash#merge #: ../lib/yard/core_ext/symbol_hash.rb:69 msgid "Merges the contents of another hash into a new SymbolHash object" msgstr "æ–°ã—ã„SymbolHashオブジェクトã¸ä»–ã®ãƒãƒƒã‚·ãƒ¥ã®å†…容をマージã™ã‚‹ã€‚" # @return [SymbolHash] #: ../lib/yard/core_ext/symbol_hash.rb:72 msgid "a new SymbolHash containing the merged data" msgstr "マージã•れãŸãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã‚‹æ–°ã—ã„SymbolHash" # @param [Hash] hash #: ../lib/yard/core_ext/symbol_hash.rb:72 msgid "the hash of objects to copy" msgstr "コピーã™ã‚‹ã‚ªãƒ–ジェクトã®ãƒãƒƒã‚·ãƒ¥" # YARD::Docstring #: ../lib/yard/docstring.rb:3 msgid "" "A documentation string, or \"docstring\" for short, encapsulates the\n" "comments and metadata, or \"tags\", of an object. Meta-data is expressed\n" "in the form +@tag VALUE+, where VALUE can span over multiple lines as\n" "long as they are indented. The following +@example+ tag shows how tags\n" "can be indented:" msgstr "" "documentation stringã‚’ç•¥ã—ã¦\"docstring\"ã¯ã€\n" "コメントやメタデータ,オブジェクトã®ã‚¿ã‚°ã‚’カプセル化ã™ã‚‹ã€‚\n" "メタデータ㯠+@tag VALUE+ ã‹ã‚‰\n" "VALUEãŒã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れる間ã®è¤‡æ•°è¡Œã«æ¸¡ã£ã¦è¡¨ã•れる。\n" "次㮠+@example+ ã‚¿ã‚°ã¯\n" "ã‚¿ã‚°ãŒã©ã®ã‚ˆã†ã«ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れるã‹è¡¨ã™ã€‚" # YARD::Docstring #: ../lib/yard/docstring.rb:9 msgid "" " # @example My example\n" " # a = \"hello world\"\n" " # a.reverse\n" " # @version 1.0" msgstr "" # YARD::Docstring #: ../lib/yard/docstring.rb:14 msgid "" "Tags can be nested in a documentation string, though the {Tags::Tag}\n" "itself is responsible for parsing the inner tags." msgstr "" "ã‚¿ã‚°ã¯ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆæ–‡å­—列ã®ä¸­ã§ãƒã‚¹ãƒˆã•れã€{Tags::Tag}自身ã¯ã€\n" "中ã®ã‚¿ã‚°ã‚’è§£æžã™ã‚‹è²¬ä»»ãŒã‚る。" # @note #: ../lib/yard/docstring.rb:27 msgid "" "Plugin developers should make sure to reset this value\n" "after parsing finishes. This can be done via the\n" "{Parser::SourceParser.after_parse_list} callback. This will\n" "ensure that YARD can properly parse multiple projects in\n" "the same process." msgstr "" # @param [Docstring] #: ../lib/yard/docstring.rb:27 msgid "tag|see|DocstringParser" msgstr "" # @see #: ../lib/yard/docstring.rb:27 msgid "tag|see|Parser::SourceParser.after_parse_list" msgstr "" # @return [Class] #: ../lib/yard/docstring.rb:27 msgid "" "the parser class used to parse\n" "text and optional meta-data from docstrings. Defaults to\n" "{DocstringParser}." msgstr "" # YARD::Docstring.parser #: ../lib/yard/docstring.rb:30 msgid "" "Creates a parser object using the current {default_parser}.\n" "Equivalent to:\n" " Docstring.default_parser.new(*args)" msgstr "" # @param args #: ../lib/yard/docstring.rb:37 msgid "" "arguments are passed to the {DocstringParser}\n" "class. See {DocstringParser#initialize} for details on\n" "arguments." msgstr "" # @return [Object, nil] #: ../lib/yard/docstring.rb:37 msgid "" "the parser object used to parse a\n" "docstring." msgstr "docstringã‚’è§£æžã™ã‚‹ç‚ºã«åˆ©ç”¨ã—ãŸãƒ‘ーサーオブジェクト。" # @return [Array] #: ../lib/yard/docstring.rb:43 msgid "the list of reference tags" msgstr "å‚ç…§ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆ" # @return [CodeObjects::Base] #: ../lib/yard/docstring.rb:46 msgid "the object that owns the docstring." msgstr "docstring自身ã®ã‚ªãƒ–ジェクト" # @return [Range] #: ../lib/yard/docstring.rb:49 msgid "line range in the {#object}'s file where the docstring was parsed from" msgstr "è§£æžã•れるdocstringã®{#object}ファイルã®ä¸­ã®line range" # @return [String] #: ../lib/yard/docstring.rb:52 msgid "the raw documentation (including raw tag text)" msgstr "未加工ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ(未加工ã®ã‚¿ã‚°ãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚“ã§ã„ã‚‹)" # @return [Boolean] #: ../lib/yard/docstring.rb:55 msgid "whether the docstring was started with \"##\"" msgstr "docstringãŒ\"##\"ã¨å…±ã«è¨˜éŒ²ã•れる" # YARD::Docstring::META_MATCH #: ../lib/yard/docstring.rb:59 msgid "Matches a tag at the start of a comment line" msgstr "コメント行ã®å§‹ã¾ã‚Šã§ã‚¿ã‚°ã«ãƒžãƒƒãƒã™ã‚‹ã€‚" # @deprecated #: ../lib/yard/docstring.rb:60 msgid "Use {DocstringParser::META_MATCH}" msgstr "" # YARD::Docstring.new! #: ../lib/yard/docstring.rb:65 msgid "" "Creates a new docstring without performing any parsing through\n" "a {DocstringParser}. This method is called by +DocstringParser+\n" "when creating the new docstring object." msgstr "" # YARD::Docstring#initialize # YARD::Docstring#+ # YARD::Docstring#replace # YARD::Docstring#dup #: ../lib/yard/docstring.rb:74 ../lib/yard/docstring.rb:99 #: ../lib/yard/docstring.rb:112 ../lib/yard/docstring.rb:123 #: ../lib/yard/docstring.rb:129 ../lib/yard/docstring.rb:138 msgid "Creating a Docstring Object" msgstr "Docstringオブジェクトを作æˆã™ã‚‹" # @param [String] #: ../lib/yard/docstring.rb:74 msgid "tag|param|raw_data" msgstr "" # @param [Tags::Tag, Tags::RefTag] #: ../lib/yard/docstring.rb:74 ../lib/yard/docstring.rb:214 msgid "tag|param|tags" msgstr "" # @param [String] #: ../lib/yard/docstring.rb:74 ../lib/yard/parser/ruby/legacy/ruby_lex.rb:48 #: ../lib/yard/serializers/stdout_serializer.rb:25 #: ../lib/yard/tags/default_factory.rb:12 #: ../lib/yard/tags/default_factory.rb:21 #: ../lib/yard/tags/default_factory.rb:32 #: ../lib/yard/tags/default_factory.rb:44 #: ../lib/yard/tags/default_factory.rb:56 #: ../lib/yard/tags/default_factory.rb:98 ../lib/yard/tags/tag.rb:43 #: ../lib/yard/templates/helpers/html_helper.rb:16 #: ../lib/yard/templates/helpers/html_helper.rb:24 #: ../lib/yard/templates/helpers/html_helper.rb:36 #: ../lib/yard/templates/helpers/html_helper.rb:57 #: ../lib/yard/templates/helpers/html_helper.rb:73 #: ../lib/yard/templates/helpers/html_helper.rb:83 #: ../lib/yard/templates/helpers/html_helper.rb:91 #: ../lib/yard/templates/helpers/html_helper.rb:101 #: ../lib/yard/templates/helpers/html_helper.rb:109 #: ../lib/yard/templates/helpers/html_helper.rb:123 #: ../lib/yard/templates/helpers/html_helper.rb:180 #: ../lib/yard/templates/helpers/uml_helper.rb:26 msgid "tag|param|text" msgstr "" # @param [String] raw_data #: ../lib/yard/docstring.rb:74 msgid "" "the complete docstring, including all\n" "original formatting and any unparsed tags/directives." msgstr "" # YARD::CodeObjects::Base#tags #: ../lib/yard/docstring.rb:74 msgid "the list of tag objects in the docstring" msgstr "docstringã®ä¸­ã®ã‚¿ã‚°ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ" # @param [CodeObjects::Base] object #: ../lib/yard/docstring.rb:74 msgid "" "the object associated with the\n" "docstring. May be nil." msgstr "docstringã¨å…±ã«é–¢é€£ã—ãŸã‚ªãƒ–ジェクト, nilã«ãªã‚‹ã‹ã‚‚ã—れãªã„。" # @return [CodeObjects::Base] #: ../lib/yard/docstring.rb:74 msgid "the textual portion of the docstring" msgstr "docstringã®åŽŸæ–‡ã®ä¸€éƒ¨" # YARD::Docstring#initialize #: ../lib/yard/docstring.rb:84 msgid "" "Creates a new docstring with the raw contents attached to an optional\n" "object. Parsing will be done by the {DocstringParser} class." msgstr "" "ä»»æ„ã®ã‚ªãƒ–ジェクトã«è¿½åŠ ã•ã‚ŒãŸæœªåŠ å·¥ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’ç”¨ã„æ–°ã—ã„docstringを作æˆã™ã‚‹ã€‚\n" "è§£æžã¯ {DocstringParser} クラスã«ã‚ˆã£ã¦å®Œäº†ã™ã‚‹ã€‚" # @example #: ../lib/yard/docstring.rb:99 msgid "Docstring.new(\"hello world\\n@return Object return\", someobj)" msgstr "" # @note #: ../lib/yard/docstring.rb:99 msgid "" "To properly parse directives with proper parser context within\n" "handlers, you should not use this method to create a Docstring.\n" "Instead, use the {parser}, which takes a handler object that\n" "can pass parser state onto directives. If a Docstring is created\n" "with this method, directives do not have access to any parser\n" "state, and may not function as expected." msgstr "" # @return [Docstring] #: ../lib/yard/docstring.rb:99 msgid "a new instance of Docstring" msgstr "Docstringã®æ–°ã—ã„インスタンス" # @param [CodeObjects::Base] object #: ../lib/yard/docstring.rb:99 msgid "" "an object to associate the docstring\n" "with." msgstr "docstringã¨é–¢é€£ã™ã‚‹ã‚ªãƒ–ジェクト" # @param [TokenList, String] # @param [String] # @param [String, #read, Object] #: ../lib/yard/docstring.rb:99 ../lib/yard/docstring.rb:123 #: ../lib/yard/docstring_parser.rb:106 ../lib/yard/docstring_parser.rb:123 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:16 #: ../lib/yard/parser/source_parser.rb:116 #: ../lib/yard/parser/source_parser.rb:125 #: ../lib/yard/parser/source_parser.rb:416 #: ../lib/yard/parser/source_parser.rb:460 msgid "tag|param|content" msgstr "内容" # @param [String] content #: ../lib/yard/docstring.rb:99 msgid "" "the raw comments to be parsed into a docstring\n" "and associated meta-data." msgstr "docstring,関連ã™ã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®ä¸­ã§è§£æžã•れる未加工ã®å†…容," # YARD::Docstring#+ #: ../lib/yard/docstring.rb:108 msgid "Adds another {Docstring}, copying over tags." msgstr "別ã®{Docstring}を追加ã—ã€ã‚¿ã‚°ã‚’コピーã™ã‚‹ã€‚" # @return [Docstring] #: ../lib/yard/docstring.rb:112 msgid "a new docstring with both docstrings combines" msgstr "docstring化ã—,一体化(別ã®docstringã¨)ã—ãŸã€æ–°ã—ã„docstring" # @param [Docstring, String] other #: ../lib/yard/docstring.rb:112 msgid "" "the other docstring (or string) to\n" "add." msgstr "ä»–ã®è¿½åŠ ã™ã‚‹docstring(ã‚„string)" # YARD::Docstring#replace # YARD::Docstring#all= #: ../lib/yard/docstring.rb:122 ../lib/yard/docstring.rb:130 msgid "Replaces the docstring with new raw content. Called by {#all=}." msgstr "" "{#all=}メソッドãŒå‘¼ã°ã‚Œã‚‹äº‹ã«ã‚ˆã£ã¦ã€æ–°ã—ã„æ•´å½¢å‰ã®å†…容ã«docstringã‚’ç½®æ›ã™" "る。" # @param [String] content #: ../lib/yard/docstring.rb:123 msgid "the raw comments to be parsed" msgstr "è§£æžã•れる未加工ã®ã‚³ãƒ¡ãƒ³ãƒˆ" # YARD::Docstring#dup #: ../lib/yard/docstring.rb:132 msgid "Deep-copies a docstring" msgstr "docstringã‚’æ·±ã„階層ã¾ã§ã‚³ãƒ”ーã™ã‚‹ã€‚" # @note #: ../lib/yard/docstring.rb:138 msgid "" "This method creates a new docstring with new tag lists, but does\n" "not create new individual tags. Modifying the tag objects will still\n" "affect the original tags." msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ–°ã—ã„タグリストã¨å…±ã«æ–°ã—ã„docstringを作æˆã™ã‚‹ã€‚\n" "ã—ã‹ã—ã€æ–°ã—ã„個々ã®ã‚¿ã‚°ã¯ä½œæˆã§ããªã„。\n" "タグオブジェクトを変更ã™ã‚‹ã¨ã€å…ƒã®ã‚¿ã‚°ã«å½±éŸ¿ã™ã‚‹ã ã‚ã†ã€‚" # @return [Docstring] #: ../lib/yard/docstring.rb:138 msgid "a new copied docstring" msgstr "æ–°ã—ãコピーã•れãŸdocstring" # @return [nil] #: ../lib/yard/docstring.rb:151 msgid "if there is no associated {#line_range}" msgstr "{#line_range}メソッドã«é–¢ä¿‚ãªã„å ´åˆ" # @return [Fixnum] #: ../lib/yard/docstring.rb:151 msgid "the first line of the {#line_range}" msgstr "{#line_range}ãƒ¡ã‚½ãƒƒãƒ‰ã®æœ€åˆã®è¡Œ" # YARD::Docstring#summary #: ../lib/yard/docstring.rb:156 msgid "" "Gets the first line of a docstring to the period or the first paragraph." msgstr "" "ピリオドや最åˆã®æ®µè½ã®ç‚ºã«ã€\n" "docstringã®æœ€åˆã®è¡Œã‚’å–å¾—ã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/docstring.rb:157 msgid "" "The first line or paragraph of the docstring; always ends with a period." msgstr "docstringã®æœ€åˆã®è¡Œã‚„段è½ã€ãã—ã¦å¸¸ã«periodã¨å…±ã«çµ‚ã‚る。" # YARD::Docstring#to_raw #: ../lib/yard/docstring.rb:181 msgid "" "Reformats and returns a raw representation of the tag data using the\n" "current tag and docstring data, not the original text." msgstr "" "冿›¸å¼åŒ–ã—è¿”ã™ã€\n" "ç¾åœ¨ã®ã‚¿ã‚°ã‚„docstringデータã«ã‚ˆã£ã¦\n" "未加工ã®ã‚¿ã‚°ãƒ‡ãƒ¼ã‚¿ã§è¡¨ã•れる。\n" "ã—ã‹ã—å…ƒã®ãƒ†ã‚­ã‚¹ãƒˆã§ã¯ãªã„。" # @todo #: ../lib/yard/docstring.rb:186 msgid "Add Tags::Tag#to_raw and refactor" msgstr "Tags::Tag#to_rawメソッドやå†ç·¨é›†ã‚’追加ã™ã‚‹" # @return [String] #: ../lib/yard/docstring.rb:186 msgid "the updated raw formatted docstring data" msgstr "æ›´æ–°ã•れ書å¼åŒ–ã•れる未加工ã®docstringã®ãƒ‡ãƒ¼ã‚¿" # YARD::Docstring#add_tag #: ../lib/yard/docstring.rb:209 msgid "" "Adds a tag or reftag object to the tag list. If you want to parse\n" "tag data based on the {Tags::DefaultFactory} tag factory, use\n" "{DocstringParser} instead." msgstr "" "ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã«ã‚¿ã‚°ã‚„å‚照タグオブジェクトを追加ã™ã‚‹ã€‚\n" "ã‚ãªãŸãŒã€ {Tags::DefaultFactory} タグファクトリーを元ã«ã—ãŸã‚¿ã‚°ãƒ‡ãƒ¼ã‚¿ã‚’è§£æžã—ãŸã„å ´åˆ\n" "代ã‚り㫠{DocstringParser} を使ã†ã€‚" # YARD::Docstring#create_tag # YARD::Docstring#add_tag # YARD::Docstring#tag # YARD::Docstring#tags # YARD::Docstring#has_tag? # YARD::Docstring#delete_tags # YARD::Docstring#delete_tag_if # YARD::Docstring#blank? #: ../lib/yard/docstring.rb:214 ../lib/yard/docstring.rb:237 #: ../lib/yard/docstring.rb:245 ../lib/yard/docstring.rb:255 #: ../lib/yard/docstring.rb:263 ../lib/yard/docstring.rb:272 #: ../lib/yard/docstring.rb:282 ../lib/yard/docstring.rb:297 #: ../lib/yard/docstring.rb:310 msgid "Creating and Accessing Meta-data" msgstr "メタデータを作æˆã—アクセスã™ã‚‹ã€‚" # @param [Tags::Tag, Tags::RefTag] tags #: ../lib/yard/docstring.rb:214 msgid "list of tag objects to add" msgstr "追加ã®ã‚¿ã‚°ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ" # YARD::Docstring#tag #: ../lib/yard/docstring.rb:229 msgid "" "Convenience method to return the first tag\n" "object in the list of tag objects of that name" msgstr "" "タグオブジェクトã®ãƒªã‚¹ãƒˆã®ã‚ˆã†ãªåå‰ã®ä¸­ã®ã€\n" "最åˆã®ã‚¿ã‚°ã‚ªãƒ–ジェクトを返ã™ç‚ºã®ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰ã€‚" # @example #: ../lib/yard/docstring.rb:237 msgid "" "doc = Docstring.new(\"@return zero when nil\")\n" "doc.tag(:return).text # => \"zero when nil\"" msgstr "" # @return [Tags::Tag] #: ../lib/yard/docstring.rb:237 msgid "the first tag in the list of {#tags}" msgstr "{#tags}メソッドã®ãƒªã‚¹ãƒˆã®ä¸­ã®ã€æœ€åˆã®ã‚¿ã‚°" # @param [#to_s] name #: ../lib/yard/docstring.rb:237 msgid "the tag name to return data for" msgstr "データを返ã™ç‚ºã®ã‚¿ã‚°å" # YARD::Docstring#tags #: ../lib/yard/docstring.rb:242 msgid "" "Returns a list of tags specified by +name+ or all tags if +name+ is not " "specified." msgstr "" "+name+ ãŒæŒ‡å®šã•れãªã„å ´åˆã€\n" "+name+ ã‚„allã‚¿ã‚°ã«ã‚ˆã£ã¦æŒ‡å®šã•れãŸã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # @return [Array] #: ../lib/yard/docstring.rb:245 msgid "the list of tags by the specified tag name" msgstr "指定ã•れãŸã‚¿ã‚°åã«ã‚ˆã£ã¦ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã¨ãªã‚‹ã€‚" # @param [#to_s] name #: ../lib/yard/docstring.rb:245 msgid "the tag name to return data for, or nil for all tags" msgstr "データã‹ã‚‰ã‚¿ã‚°åã‚’è¿”ã™ã€åˆã¯ã€nilã®å ´åˆã€å…¨ã¦ã®ã‚¿ã‚°ã€‚" # YARD::Docstring#has_tag? #: ../lib/yard/docstring.rb:252 msgid "Returns true if at least one tag by the name +name+ was declared" msgstr "宣言ã•れるnameã®ã‚¿ã‚°åãŒ1ã¤ã§ã‚‚ã‚れã°ã€trueã‚’è¿”ã™ã€‚" # @param [String] name #: ../lib/yard/docstring.rb:255 msgid "the tag name to search for" msgstr "検索ã®ç‚ºã®ã‚¿ã‚°å" # @return [Boolean] #: ../lib/yard/docstring.rb:255 msgid "whether or not the tag +name+ was declared" msgstr "ã‚¿ã‚° +name+ãŒå®£è¨€ã•れるã‹ã©ã†ã‹\n" # YARD::Docstring#delete_tags #: ../lib/yard/docstring.rb:260 msgid "Delete all tags with +name+" msgstr "å…¨ã¦ã®ã‚¿ã‚° +name+ を用ã„ãŸå‰Šé™¤ã™ã‚‹ã€‚" # @param [Symbol] tag # @param [String] tag_name # @param [String] name #: ../lib/yard/docstring.rb:263 ../lib/yard/docstring_parser.rb:185 #: ../lib/yard/tags/library.rb:100 msgid "the tag name" msgstr "ã‚¿ã‚°å" # YARD::Docstring#delete_tag_if #: ../lib/yard/docstring.rb:268 msgid "Deletes all tags where the block returns true" msgstr "ブロックãŒtrueã‚’è¿”ã™æ‰€ã§å…¨ã¦ã®ã‚¿ã‚°ã‚’削除ã™ã‚‹ã€‚" # @yieldparam [Tags::Tag] #: ../lib/yard/docstring.rb:272 msgid "tag|yieldparam|tag" msgstr "tag" # @yieldparam [Tags::Tag] tag #: ../lib/yard/docstring.rb:272 msgid "the tag that is being tested" msgstr "試ã•れるタグ" # @yieldreturn [Boolean] #: ../lib/yard/docstring.rb:272 msgid "true if the tag should be deleted" msgstr "ã‚¿ã‚°ãŒå‰Šé™¤ã•れる場åˆã€true" # YARD::Docstring#blank? #: ../lib/yard/docstring.rb:278 msgid "" "Returns true if the docstring has no content that is visible to a template." msgstr "docstringãŒãƒ†ãƒ³ãƒ—レートã®ç‚ºã€æ˜Žç¢ºãªå†…容をæŒãŸãªã„å ´åˆã€trueã‚’è¿”ã™ã€‚" # @param [Boolean] #: ../lib/yard/docstring.rb:282 msgid "tag|param|only_visible_tags" msgstr "only_visible_tags" # @param [Boolean] only_visible_tags #: ../lib/yard/docstring.rb:282 msgid "" "whether only {Tags::Library.visible_tags}\n" "should be checked, or if all tags should be considered." msgstr "" "{Tags::Library.visible_tags}ãŒã€ãƒã‚§ãƒƒã‚¯ã•れるã‹ã©ã†ã‹ã€\n" "åˆã¯ã€å…¨ã¦ã®ã‚¿ã‚°ãŒè€ƒæ…®ã•れる場åˆ" # @return [Boolean] #: ../lib/yard/docstring.rb:282 msgid "whether or not the docstring has content" msgstr "docstringãŒå†…容をæŒã£ã¦ã„ã‚‹ã‹ã©ã†ã‹" # YARD::Docstring#convert_ref_tags #: ../lib/yard/docstring.rb:295 msgid "Maps valid reference tags" msgstr "有効ãªå‚照タグをマップã™ã‚‹" # @return [Array] #: ../lib/yard/docstring.rb:297 msgid "the list of valid reference tags" msgstr "有効ãªå‚ç…§ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # YARD::Docstring#parse_comments #: ../lib/yard/docstring.rb:303 msgid "Parses out comments split by newlines into a new code object" msgstr "æ–°ã—ã„コードオブジェクトã®ä¸­ã®æ”¹è¡Œã«ã‚ˆã£ã¦åˆ†å‰²ã•れるコメントを解æžã™ã‚‹" # @param [String] comments #: ../lib/yard/docstring.rb:310 msgid "" "the newline delimited array of comments. If the comments\n" "are passed as a String, they will be split by newlines." msgstr "" "コメントã®é…列を改行ã§åŒºåˆ‡ã‚‹ã€‚\n" "ã‚³ãƒ¡ãƒ³ãƒˆãŒæ–‡å­—åˆ—ã®æ§˜ã«è§£æžã•れる場åˆã€æ”¹è¡Œã«ã‚ˆã£ã¦åˆ†å‰²ã•れる。" # @return [String] #: ../lib/yard/docstring.rb:310 msgid "" "the non-metadata portion of the comments to\n" "be used as a docstring" msgstr "docstringã®ã‚ˆã†ã«åˆ©ç”¨ã•れる為ã®ã‚³ãƒ¡ãƒ³ãƒˆã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã§ã¯ãªã„部分" # YARD::DocstringParser #: ../lib/yard/docstring_parser.rb:5 msgid "" "Parses text and creates a {Docstring} object to represent documentation\n" "for a {CodeObjects::Base}. To create a new docstring, you should initialize\n" "the parser and call {#parse} followed by {#to_docstring}." msgstr "" # YARD::DocstringParser #: ../lib/yard/docstring_parser.rb:9 msgid "== Subclassing Notes" msgstr "" # YARD::DocstringParser #: ../lib/yard/docstring_parser.rb:11 msgid "" "The DocstringParser can be subclassed and subtituted during parsing by\n" "setting the {Docstring.default_parser} attribute with the name of the\n" "subclass. This allows developers to change the way docstrings are\n" "parsed, allowing for completely different docstring syntaxes." msgstr "" # @example Creating a Custom DocstringParser #: ../lib/yard/docstring_parser.rb:29 msgid "" "# Parses docstrings backwards!\n" "class ReverseDocstringParser\n" " def parse_content(content)\n" " super(content.reverse)\n" " end\n" "end\n" "\n" "# Set the parser as default when parsing\n" "YARD::Docstring.default_parser = ReverseDocstringParser" msgstr "" # @example Creating a Docstring with a DocstringParser #: ../lib/yard/docstring_parser.rb:29 msgid "DocstringParser.new.parse(\"text here\").to_docstring" msgstr "" # @example #: ../lib/yard/docstring_parser.rb:29 msgid "tag|example|Creating a Custom DocstringParser" msgstr "tag|example|カスタムDocstringParserを作æˆã™ã‚‹" # @example #: ../lib/yard/docstring_parser.rb:29 msgid "tag|example|Creating a Docstring with a DocstringParser" msgstr "tag|example|DocstringParserを用ã„Docstringを作æˆã™ã‚‹" # @param [TokenList, String] # @param [String] # @param [String, #read, Object] #: ../lib/yard/docstring_parser.rb:29 msgid "tag|see|#parse_content" msgstr "" # @param [String] tag_buf #: ../lib/yard/docstring_parser.rb:32 msgid "" "the parsed text portion of the docstring,\n" "with tags removed." msgstr "è§£æžã•れãŸdocstringã®ãƒ†ã‚­ã‚¹ãƒˆã®ä¸€éƒ¨, 削除ã•れãŸã‚¿ã‚°ã¨ä¸€ç·’" # @param [String] content #: ../lib/yard/docstring_parser.rb:35 msgid "the complete input string to the parser." msgstr "パーサーã®ç‚ºã®å®Œå…¨ãªå…¥åŠ›æ–‡å­—åˆ—" # @return [Array] #: ../lib/yard/docstring_parser.rb:39 msgid "" "the list of meta-data tags identified\n" "by the parser" msgstr "パーサーã«èªè¨¼ã•れãŸãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆ" # @return [Array] #: ../lib/yard/docstring_parser.rb:44 msgid "" "a list of directives identified\n" "by the parser. This list will not be passed on to the\n" "Docstring object." msgstr "" # @return [OpenStruct] #: ../lib/yard/docstring_parser.rb:50 msgid "" "any arbitrary state to be passed between\n" "tags during parsing. Mainly used by directives to coordinate\n" "behaviour (so that directives can be aware of other directives\n" "used in a docstring)." msgstr "" # @return [CodeObjects::Base, nil] #: ../lib/yard/docstring_parser.rb:55 msgid "" "the object associated with\n" "the docstring being parsed. May be nil if the docstring is\n" "not attached to any object." msgstr "" # @return [Handlers::Base, nil] #: ../lib/yard/docstring_parser.rb:60 msgid "" "the handler parsing this\n" "docstring. May be nil if this docstring parser is not\n" "initialized through" msgstr "" # @return [Tags::Library] #: ../lib/yard/docstring_parser.rb:64 msgid "" "the tag library being used to\n" "identify registered tags in the docstring." msgstr "" # YARD::CodeObjects::CONSTANTMATCH #: ../lib/yard/docstring_parser.rb:67 msgid "The regular expression to match the tag syntax" msgstr "ã‚¿ã‚°æ§‹æ–‡ã«ãƒžãƒƒãƒã™ã‚‹ç‚ºã®æ­£è¦è¡¨ç¾" # YARD::Server::Router#initialize #: ../lib/yard/docstring_parser.rb:72 msgid "Creates a new parser to parse docstring data" msgstr "docstringã®ãƒ‡ãƒ¼ã‚¿ã‚’è§£æžã™ã‚‹ç‚ºã®æ–°ã—ã„パーサーを作æˆã™ã‚‹" # YARD::Docstring#create_tag # YARD::Docstring#add_tag # YARD::Docstring#tag # YARD::Docstring#tags # YARD::Docstring#has_tag? # YARD::Docstring#delete_tags # YARD::Docstring#delete_tag_if # YARD::Docstring#blank? #: ../lib/yard/docstring_parser.rb:75 ../lib/yard/docstring_parser.rb:88 msgid "Creation and Conversion Methods" msgstr "作æˆã€å¤‰æ›ãƒ¡ã‚½ãƒƒãƒ‰" # @return [Docstring] #: ../lib/yard/docstring_parser.rb:75 msgid "a new instance of DocstringParser" msgstr "DocstringParserã®æ–°ã—ã„インスタンス" # @param [Tags::Library] library #: ../lib/yard/docstring_parser.rb:75 msgid "" "a tag library for recognizing\n" "tags." msgstr "" # @param [LibraryVersion] #: ../lib/yard/docstring_parser.rb:75 ../lib/yard/server/adapter.rb:88 #: ../lib/yard/server/router.rb:122 msgid "tag|param|library" msgstr "" # YARD::Docstring#initialize # YARD::Docstring#+ # YARD::Docstring#replace # YARD::Docstring#dup #: ../lib/yard/docstring_parser.rb:88 msgid "" "translates parsed text into\n" "a Docstring object." msgstr "Docstringオブジェクトã¸è§£æžã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’変æ›ã™ã‚‹" # YARD::DocstringParser#parse #: ../lib/yard/docstring_parser.rb:95 msgid "Parses all content and returns itself." msgstr "" # YARD::Server::Router#parse_library_from_path # YARD::Server::Router#route # YARD::Server::Router#route_docs # YARD::Server::Router#route_index # YARD::Server::Router#route_list # YARD::Server::Router#route_search #: ../lib/yard/docstring_parser.rb:106 ../lib/yard/docstring_parser.rb:123 msgid "Parsing Methods" msgstr "è§£æžãƒ¡ã‚½ãƒƒãƒ‰" # @param [Parser::Ruby::AstNode] #: ../lib/yard/docstring_parser.rb:106 msgid "tag|param|handler" msgstr "" # @param [Docstring] #: ../lib/yard/docstring_parser.rb:106 msgid "tag|see|#to_docstring" msgstr "" # @param [String, #read, Object] content #: ../lib/yard/docstring_parser.rb:106 msgid "the docstring text to parse" msgstr "è§£æžã®ç‚ºã®docstringã®ãƒ†ã‚­ã‚¹ãƒˆ" # @param [Handlers::Base, nil] handler #: ../lib/yard/docstring_parser.rb:106 msgid "" "the handler object that is\n" "parsing this object. May be nil if this parser is not being\n" "called from a {Parser::SourceParser} context." msgstr "" # @param [CodeObjects::Base] object #: ../lib/yard/docstring_parser.rb:106 msgid "" "the object that the docstring\n" "is attached to. Will be passed to directives to act on\n" "this object." msgstr "" # @return [self] #: ../lib/yard/docstring_parser.rb:106 msgid "" "the parser object. To get the docstring,\n" "call {#to_docstring}." msgstr "" # YARD::Parser::SourceParser.parse_string #: ../lib/yard/docstring_parser.rb:119 msgid "Parses a given block of text." msgstr "テキストã®ä¸Žãˆã‚‰ã‚ŒãŸãƒ–ロックを解æžã™ã‚‹" # YARD::Handlers::Base#process #: ../lib/yard/docstring_parser.rb:123 msgid "" "Subclasses can override this method to perform custom\n" "parsing of content data." msgstr "" "サブクラスã¯å†…容ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚«ã‚¹ã‚¿ãƒ è§£æžã‚’実行ã™ã‚‹ç‚ºã«\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’上書ãã§ãã‚‹" # @yieldreturn [String] #: ../lib/yard/docstring_parser.rb:123 msgid "the content to parse" msgstr "è§£æžã™ã‚‹ç‚ºã®å†…容" # YARD::Docstring#create_tag #: ../lib/yard/docstring_parser.rb:179 msgid "Creates a tag from the {Tags::DefaultFactory tag factory}." msgstr "{Tags::DefaultFactory tag factory}ã‹ã‚‰ã€ã‚¿ã‚°ã‚’作æˆã™ã‚‹ã€‚" # YARD::Docstring#create_tag #: ../lib/yard/docstring_parser.rb:181 msgid "To add an already created tag object, append it to {#tags}." msgstr "æ—¢ã«ä½œæˆã•れãŸã‚¿ã‚°ã‚ªãƒ–ジェクトを追加ã™ã‚‹ã«ã¯ã€{#tags}メソッドを追加ã™ã‚‹ã€‚" # File.relative_path # File.cleanpath #: ../lib/yard/docstring_parser.rb:185 ../lib/yard/docstring_parser.rb:202 #: ../lib/yard/docstring_parser.rb:208 ../lib/yard/docstring_parser.rb:228 msgid "Tag Manipulation Methods" msgstr "ã‚¿ã‚°æ“作メソッド" # @return [Tags::Tag, Tags::RefTag] #: ../lib/yard/docstring_parser.rb:185 msgid "a tag" msgstr "ã‚¿ã‚°" # @param [String] #: ../lib/yard/docstring_parser.rb:185 ../lib/yard/tags/library.rb:290 msgid "tag|param|tag_buf" msgstr "tag_buf" # @param [#to_s] # @param # @param [String] #: ../lib/yard/docstring_parser.rb:185 ../lib/yard/tags/default_factory.rb:12 #: ../lib/yard/tags/default_factory.rb:21 #: ../lib/yard/tags/default_factory.rb:32 #: ../lib/yard/tags/default_factory.rb:44 #: ../lib/yard/tags/default_factory.rb:56 ../lib/yard/tags/library.rb:267 #: ../lib/yard/tags/library.rb:280 ../lib/yard/tags/library.rb:290 #: ../lib/yard/tags/tag.rb:43 msgid "tag|param|tag_name" msgstr "tag_name" # @param [String] tag_buf #: ../lib/yard/docstring_parser.rb:185 msgid "the text attached to the tag with newlines removed." msgstr "空白文字ãŒå‰Šé™¤ã•れãŸã‚¿ã‚°ã‚’追加ã—ãŸãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Docstring#create_ref_tag #: ../lib/yard/docstring_parser.rb:202 msgid "Creates a {Tags::RefTag}" msgstr "{Tags::RefTag}を作æˆã™ã‚‹" # YARD::Registry.register #: ../lib/yard/docstring_parser.rb:207 msgid "Creates a new directive using the registered {#library}" msgstr "記録ã•れãŸ{#library}メソッドを使ã£ã¦æ–°ã—ã„命令を作æˆã™ã‚‹" # @return [OpenStruct] #: ../lib/yard/docstring_parser.rb:208 msgid "the directive object that is created" msgstr "作æˆã•れる命令オブジェクト" # YARD::DocstringParser#tag_is_directive? #: ../lib/yard/docstring_parser.rb:227 msgid "" "Backward compatibility to detect old tags that should be specified\n" "as directives in 0.8 and onward." msgstr "" # YARD::DocstringParser#call_directives_after_parse #: ../lib/yard/docstring_parser.rb:238 msgid "" "Calls the {Directive#after_parse} callback on all the\n" "created directives." msgstr "" # YARD::Parser::SourceParser.before_parse_list # YARD::Parser::SourceParser.after_parse_list # YARD::Parser::SourceParser.before_parse_file # YARD::Parser::SourceParser.after_parse_file # YARD::Parser::SourceParser.before_parse_list_callbacks # YARD::Parser::SourceParser.after_parse_list_callbacks # YARD::Parser::SourceParser.before_parse_file_callbacks # YARD::Parser::SourceParser.after_parse_file_callbacks #: ../lib/yard/docstring_parser.rb:239 ../lib/yard/docstring_parser.rb:246 #: ../lib/yard/docstring_parser.rb:263 ../lib/yard/docstring_parser.rb:268 msgid "Parser Callback Methods" msgstr "パーサーコールãƒãƒƒã‚¯ãƒ¡ã‚½ãƒƒãƒ‰" # YARD::DocstringParser#call_after_parse_callbacks #: ../lib/yard/docstring_parser.rb:246 msgid "Calls all {after_parse} callbacks" msgstr "" # YARD::DocstringParser.after_parse #: ../lib/yard/docstring_parser.rb:255 msgid "" "Creates a callback that is called after a docstring is successfully\n" "parsed. Use this method to perform sanity checks on a docstring's\n" "tag data, or add any extra tags automatically to a docstring." msgstr "" # @return [Proc] #: ../lib/yard/docstring_parser.rb:263 msgid "a block to be called after a docstring is parsed" msgstr "docstringãŒè§£æžã•れãŸå¾Œã§å‘¼ã³å‡ºã•れるãŸã‚ã®ãƒ–ロック" # @yieldparam [SourceParser] #: ../lib/yard/docstring_parser.rb:263 ../lib/yard/parser/source_parser.rb:292 #: ../lib/yard/parser/source_parser.rb:321 msgid "tag|yieldparam|parser" msgstr "parser" # @yieldparam [DocstringParser] parser #: ../lib/yard/docstring_parser.rb:263 msgid "" "the docstring parser object\n" "with all directives and tags created." msgstr "" # @return [Array] #: ../lib/yard/docstring_parser.rb:268 msgid "the {after_parse} callback proc objects" msgstr "" # #P #: ../lib/yard/globals.rb:4 msgid "Shortcut for creating a YARD::CodeObjects::Proxy via a path" msgstr "" # #P # #log #: ../lib/yard/globals.rb:7 ../lib/yard/globals.rb:16 msgid "Global Convenience Methods" msgstr "グローãƒãƒ«ãªä¾¿åˆ©ãƒ¡ã‚½ãƒƒãƒ‰" # @see #: ../lib/yard/globals.rb:7 msgid "tag|see|YARD::CodeObjects::Proxy" msgstr "" # @see #: ../lib/yard/globals.rb:7 msgid "tag|see|YARD::Registry.resolve" msgstr "" # #log #: ../lib/yard/globals.rb:13 msgid "The global {YARD::Logger} instance" msgstr "" # @see #: ../lib/yard/globals.rb:16 msgid "tag|see|YARD::Logger" msgstr "" # @return [YARD::Logger] #: ../lib/yard/globals.rb:16 msgid "the global {YARD::Logger} instance" msgstr "" # YARD::Handlers::NamespaceMissingError #: ../lib/yard/handlers/base.rb:4 msgid "" "Raised during processing phase when a handler needs to perform\n" "an operation on an object's namespace but the namespace could\n" "not be resolved." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒnamespaceã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ¼”算を実行ã™ã‚‹å¿…è¦ãŒã‚る時ã€\n" "処ç†ã—ã¦ã„ã‚‹é–“ã«ä¾‹å¤–を上ã’る。ã—ã‹ã—ã€namespaceã¯è§£æ±ºã•れãªã„。" # YARD::Handlers::NamespaceMissingError#object # YARD::Handlers::NamespaceMissingError#object= #: ../lib/yard/handlers/base.rb:8 msgid "The object the error occurred on" msgstr "エラーãŒç”Ÿã˜ãŸã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトを返ã™ã€‚" # @return [CodeObjects::Base] #: ../lib/yard/handlers/base.rb:9 msgid "a code object" msgstr "コードオブジェクト" # @return [NamespaceMissingError] #: ../lib/yard/handlers/base.rb:11 msgid "a new instance of NamespaceMissingError" msgstr "NamespaceMissingErrorã®æ–°ã—ã„インスタンス" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:15 msgid "" "Handlers are pluggable semantic parsers for YARD's code generation\n" "phase. They allow developers to control what information gets\n" "generated by YARD, giving them the ability to, for instance, document\n" "any Ruby DSLs that a customized framework may use. A good example\n" "of this would be the ability to document and generate meta data for\n" "the 'describe' declaration of the RSpec testing framework by simply\n" "adding a handler for such a keyword. Similarly, any Ruby API that\n" "takes advantage of class level declarations could add these to the\n" "documentation in a very explicit format by treating them as first-\n" "class objects in any outputted documentation." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã€YARDãŒã‚³ãƒ¼ãƒ‰ç”Ÿæˆæ®µéšŽã§ã€\n" "プラグインå¯èƒ½ã¨ã„ã†æ„味ã®ãƒ‘ーサーã§ã‚る。\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã€YARDã«ã‚ˆã£ã¦ç”Ÿæˆã•れる情報やã€\n" "ãã®æƒ…å ±ã«æ©Ÿèƒ½ã‚’与ãˆã‚‹ç‚ºã‚„ã€\n" "例ãˆã°ã€åˆ©ç”¨ã™ã‚‹ã‹ã‚‚ã—れãªã„\n" "カスタマイズã•れãŸãƒ•レームワークã®ä½•らã‹ã®Ruby DSLを記述ã™ã‚‹ã“ã¨ç­‰ã‚’\n" "制御ã™ã‚‹ç‚ºã«é–‹ç™ºè€…ã‚’å—ã‘入れる。\n" "ã„ã„例ã¯ã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®ã‚ˆã†ãªå˜ç´”ãªãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®è¿½åŠ ã«ã‚ˆã£ã¦ã€\n" "RSpec testing フレームワークã®'describe'宣言ã®ã‚ˆã†ã«ã€\n" "ドキュメント作æˆã‚„メタデータを生æˆã™ã‚‹æ©Ÿèƒ½ã§ã‚る。\n" "åŒæ§˜ã«ã€ã‚¯ãƒ©ã‚¹ãƒ¬ãƒ™ãƒ«å®£è¨€ã‹ã‚‰åˆ©ç”¨ã™ã‚‹ä½•らã‹ã®RubyAPIã¯ã€\n" "出力ã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã€\n" "最åˆã®ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクトã¨ã—ã¦ãれらを処ç†ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€\n" "æ˜Žç¢ºãªæ›¸å¼ã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã“れらを追加ã§ããŸã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:26 msgid "== Overview of a Typical Handler Scenario" msgstr "== 標準的ãªãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®å‡¦ç†æ¦‚è¦" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:28 msgid "" "Generally, a handler class will declare a set of statements which\n" "it will handle using the {handles} class declaration. It will then\n" "implement the {#process} method to do the work. The processing would\n" "usually involve the manipulation of the {#namespace}, {#owner}\n" "{CodeObjects::Base code objects} or the creation of new ones, in\n" "which case they should be registered by {#register}, a method that\n" "sets some basic attributes for the new objects." msgstr "" "一般的ã«ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚¯ãƒ©ã‚¹ã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ã‚°ãƒ«ãƒ¼ãƒ—を宣言ã™ã‚‹ã€‚\n" "ãã—ã¦ã€ãれ㯠{handles} クラス宣言ã«ã‚ˆã£ã¦å‡¦ç†ã™ã‚‹ã€‚\n" "ãれã¯ã€å‡¦ç†ã®ç‚ºã« {#process} メソッドを実装ã™ã‚‹ã€‚\n" "処ç†ä¸­ã¯ã€é€šå¸¸ {#namespace} , {#owner} , {CodeObjects::Base code objects} ã‚„\n" "æ–°è¦ä½œæˆã‚’å«ã‚€å ´åˆã«ã€ãれらã¯ã€ {#register} ã«ã‚ˆã£ã¦ç™»éŒ²ã•れるã¹ãã€\n" "ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ–°ã—ã„オブジェクト用ã«ã„ãã¤ã‹ã®åŸºæœ¬çš„属性を設定ã™ã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:36 msgid "" "Handlers are usually simple and take up to a page of code to process\n" "and register a new object or add new attributes to the current +namespace+." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ä¸€èˆ¬çš„ã«ã‚·ãƒ³ãƒ—ルã§ã€å‡¦ç†ã®ç‚ºã«ã‚³ãƒ¼ãƒ‰ã®ãƒšãƒ¼ã‚¸ã‚’å–り上ã’ã€\n" "æ–°ã—ã„オブジェクトを登録ã—ã€ç¾åœ¨ã® +namespace+ ã«æ–°ã—ã„属性を追加ã™ã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:39 msgid "== Setting up a Handler for Use" msgstr "== ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’使ã†ç‚ºã®è¨­å®š" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:41 msgid "" "A Handler is automatically registered when it is subclassed from the\n" "base class. The only other thing that needs to be done is to specify\n" "which statement the handler will process. This is done with the +handles+\n" "declaration, taking either a {Parser::Ruby::Legacy::RubyToken}, {String} or " "`Regexp`.\n" "Here is a simple example which processes module statements." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ãƒ™ãƒ¼ã‚¹ã‚¯ãƒ©ã‚¹ã‹ã‚‰ã‚µãƒ–クラス化ã•れる時ã«ã€\n" "自動的ã«ç™»éŒ²ã•れる。\n" "å¿…è¦ãªãã®ä»–ã®ã“ã¨ã¨ã—ã¦ã¯ã€\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒã©ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã‹ã‚’指定ã™ã‚‹ã€‚\n" "ã“れã¯ã€ +handles+ ã®å®£è¨€ã¨å…±ã«ã€\n" "{Parser::Ruby::Legacy::RubyToken} ã‹ {String} ã‚„ `Regexp`ãŒå–å¾—ã•れる。\n" "ã“れã¯ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®å‡¦ç†ã®ç°¡å˜ãªä¾‹ã§ã™ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:47 msgid "" " class MyModuleHandler < YARD::Handlers::Base\n" " handles TkMODULE" msgstr "" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:50 msgid "" " def process\n" " # do something\n" " end\n" " end" msgstr "" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:55 msgid "== Processing Handler Data" msgstr "== ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãƒ‡ãƒ¼ã‚¿å‡¦ç†" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:57 msgid "" "The goal of a specific handler is really up to the developer, and as\n" "such there is no real guideline on how to process the data. However,\n" "it is important to know where the data is coming from to be able to use\n" "it." msgstr "" "具体的ãªãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ä½¿ã„æ–¹ã¯ã€é–‹ç™ºè€…次第ã¨ãªã‚‹ã€‚\n" "データ処ç†ã®æ–¹æ³•ã®ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ã¯ä½•ã‚‚ãªã„。\n" "ã—ã‹ã—ãªãŒã‚‰ã€ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†ç‚ºã«ã¯ã€\n" "ãã®ãƒ‡ãƒ¼ã‚¿ãŒã©ã“ã‹ã‚‰æ¥ã‚‹ã‹çŸ¥ã‚‹äº‹ãŒé‡è¦ã¨ãªã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:62 msgid "=== +statement+ Attribute" msgstr "=== +statement+ 属性" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:64 msgid "" "The +statement+ attribute pertains to the {Parser::Ruby::Legacy::Statement} " "object\n" "containing a set of tokens parsed in by the parser. This is the main set\n" "of data to be analyzed and processed. The comments attached to the " "statement\n" "can be accessed by the {Parser::Ruby::Legacy::Statement#comments} method, " "but generally\n" "the data to be processed will live in the +tokens+ attribute. This list\n" "can be converted to a +String+ using +#to_s+ to parse the data with\n" "regular expressions (or other text processing mechanisms), if needed." msgstr "" "パーサーã«ã‚ˆã£ã¦è§£æžã•れãŸãƒˆãƒ¼ã‚¯ãƒ³ã®è¨­å®šã‚’\n" "{Parser::Ruby::Legacy::Statement} オブジェクトãŒå«ã‚“ã§ã„る為ã€\n" "+statement+ 属性ã¯é–¢ä¿‚ãŒã‚る。\n" "ã“れã¯è§£æžã‚„処ç†ã•れる為ã®ãƒ‡ãƒ¼ã‚¿ã®ä¸»ãªè¨­å®šã¨ãªã‚‹ã€‚\n" "コメントã¯statement㌠{Parser::Ruby::Legacy::Statement#comments} メソッドã«" "よã£ã¦ã‚¢ã‚¯ã‚»ã‚¹ã•れる為ã«ä»˜åŠ ã•れるã€\n" "ã—ã‹ã—ã€å‡¦ç†ã•れる一般的ãªãƒ‡ãƒ¼ã‚¿ã¯ +tokens+ 属性ã®ä¸­ã«å­˜åœ¨ã™ã‚‹ã€‚\n" "å¿…è¦ã§ã‚れã°ã€ã“ã®ãƒªã‚¹ãƒˆã¯ã€æ­£è¦è¡¨ç¾(åˆã¯ã€ä»–ã®ãƒ†ã‚­ã‚¹ãƒˆãŒå‡¦ç†ã—ã¦ã„るメカニズ" "ム)を用ã„ã€ãƒ‡ãƒ¼ã‚¿ã‚’è§£æžã™ã‚‹ç‚ºã«+#to_s+メソッドã«ã‚ˆã£ã¦ +String+ ã«å¤‰æ›ã•れ" "る。\n" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:72 msgid "=== +namespace+ Attribute" msgstr "=== +namespace+ 属性" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:74 msgid "" "The +namespace+ attribute is a {CodeObjects::NamespaceObject namespace " "object}\n" "which represents the current namespace that the parser is in. For instance:" msgstr "" "+namespace+ 属性㯠{CodeObjects::NamespaceObject namespace object} ã¨ãªã‚‹ã€‚\n" "ãれã¯ã€ãã®ãƒ‘ーサーã®ä¸­ã§ã¯ç¾åœ¨ã®namespaceを表ã™ã€‚\n" "例ãˆã°:" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:77 msgid "" " module SomeModule\n" " class MyClass\n" " def mymethod; end\n" " end\n" " end" msgstr "" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:83 msgid "" "If a handler was to parse the 'class MyClass' statement, it would\n" "be necessary to know that it belonged inside the SomeModule module.\n" "This is the value that +namespace+ would return when processing such\n" "a statement. If the class was then entered and another handler was\n" "called on the method, the +namespace+ would be set to the 'MyClass'\n" "code object." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼å‡¦ç†ãŒ'class MyClass'ステートメントを解æžã™ã‚‹å ´åˆã€\n" "class My ClassãŒSomeModuleモジュールã®å†…部ã«\n" "属ã—ã¦ã„ã‚‹ã“ã¨ã‚’知るã“ã¨ãŒå¿…é ˆã«ãªã‚‹ã€‚\n" "ステートメントã®ã‚ˆã†ãªå‡¦ç†(class MyClassã‚’è§£æž)ã‚’ã—ã¦ã„る時ã€\n" "SomeModule㌠+namespace+ 値ã¨ãªã‚Šè¿”ã•れるã ã‚ã†ã€‚\n" "ã‚‚ã—MyClassãŒã‚¨ãƒ³ãƒˆãƒªãƒ¼ã•れãŸã‚Šã€\n" "ä»–ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒãƒ¡ã‚½ãƒƒãƒ‰ä¸Šã§å‘¼ã³å‡ºã•れãŸå ´åˆã€\n" "'MyClass'コードオブジェクト㌠+namespace+ ã«è¨­å®šã•れる。" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:90 msgid "=== +owner+ Attribute" msgstr "=== +owner+ 属性" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:92 msgid "" "The +owner+ attribute is similar to the +namespace+ attribute in that\n" "it also follows the scope of the code during parsing. However, a namespace\n" "object is loosely defined as a module or class and YARD has the ability\n" "to parse beyond module and class blocks (inside methods, for instance),\n" "so the +owner+ attribute would not be limited to modules and classes." msgstr "" "+owner+ 属性㯠+namespace+ 属性ã¨ä¼¼ã¦ã„ã‚‹ãŒã€\n" "è§£æžä¸­ã®ã‚³ãƒ¼ãƒ‰ã®ã‚¹ã‚³ãƒ¼ãƒ—をフォローもã™ã‚‹ã€‚\n" "ã—ã‹ã—ãªãŒã‚‰ã€namespace オブジェクトã¯\n" "モジュールやクラスã®ã‚ˆã†ã«æ›–昧ã«å®šç¾©ã•れる。\n" "ãã®ç‚ºã€YARDã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚„クラスブロック(例ãˆã°ã€å†…部メソッド)ã‚’\n" "è¶Šãˆã¦è§£æžã™ã‚‹ç‚ºã®æ©Ÿèƒ½ã‚’æŒã¤ã€‚\n" "ãªã®ã§ã€ã“ã® +owner+ 属性ã¯ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚„クラスã«åˆ¶é™ã•れãªã„。" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:98 msgid "" "To put this into context, the example from above will be used. If a method\n" "handler was added to the mix and decided to parse inside the method body,\n" "the +owner+ would be set to the method object but the namespace would " "remain\n" "set to the class. This would allow the developer to process any method\n" "definitions set inside a method (def x; def y; 2 end end) by adding them\n" "to the correct namespace (the class, not the method)." msgstr "" "ã“ã®æ–‡è„ˆã®ä¸­ã§ã¯ã€ä¸Šã®ä¾‹ãŒä½¿ã‚れる。\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€çµ„ã¿åˆã‚ã›ã‚‹ç‚ºã«è¿½åŠ ã•れãŸã‚Šã€\n" "メソッド本体ã®å†…部を解æžã™ã‚‹å ´åˆã€\n" "+owner+ ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚ªãƒ–ジェクトを設定ã™ã‚‹ã€‚\n" "ã—ã‹ã—ã€namespaceã¯ã‚¯ãƒ©ã‚¹ã«è¨­å®šã•れãŸã¾ã¾ã¨ãªã‚‹ã€‚\n" "ã“れã¯é–‹ç™ºè€…ã«ä»¥ä¸‹ã®ã“ã¨ã‚’å¯èƒ½ã¨ã™ã‚‹ã€‚å…¨ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰å®šç¾©ã¯ã€\n" "æ­£ã—ã„namespaceを追加ã™ã‚‹äº‹ã«ã‚ˆã£ã¦(クラスã®,メソッドã§ã¯ç„¡ã„)ã€\n" "メソッドã®å†…部(def x; def y; 2 end end)ã®ã‚°ãƒ«ãƒ¼ãƒ—を処ç†ã™ã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:105 msgid "" "In summary, the distinction between +namespace+ and +owner+ can be thought\n" "of as the difference between first-class Ruby objects (namespaces) and\n" "second-class Ruby objects (methods)." msgstr "" "è¦ç´„ã™ã‚‹ã¨ã€+namespace+ 㨠+owner+ ã®é•ã„ã¯ã€\n" "ãƒã‚¹ãƒˆã™ã‚‹ã‚¯ãƒ©ã‚¹ã§è€ƒãˆã‚‹ã¨ã€:ownerã¯\n" "最åˆã®ã‚¯ãƒ©ã‚¹ã®Rubyオブジェクトã§ã¯(namespace)ã¨ãªã‚‹ãŒã€\n" "次ã®ãƒã‚¹ãƒˆã—ãŸã‚¯ãƒ©ã‚¹ã®Rubyオブジェクトã§ã¯å‰ã®ã‚¯ãƒ©ã‚¹ã®namespaceã¨ãªã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:109 msgid "=== +visibility+ and +scope+ Attributes" msgstr "=== +visibility+ 㨠+scope+ 属性" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:111 msgid "" "Mainly needed for parsing methods, the +visibility+ and +scope+ attributes\n" "refer to the public/protected/private and class/instance values " "(respectively)\n" "of the current parsing position." msgstr "" "大抵ã¯è§£æžã•れるメソッドã®ç‚ºã«å¿…è¦ã¨ã•れるã€\n" "+visibility+ 㨠+scope+ 属性ã¯ç¾åœ¨ã®è§£æžã—ã¦ã„る場所ã®\n" "public/protected/privateã¨class/instanceã®å€¤(ãれãžã‚Œã«ã¤ã„ã¦)ã‚’\n" "å‚ç…§ã™ã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:115 msgid "== Parsing Blocks in Statements" msgstr "== ステートメントã®ä¸­ã®ãƒ–ロックを解æžã™ã‚‹" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:117 msgid "" "In addition to parsing a statement and creating new objects, some\n" "handlers may wish to continue parsing the code inside the statement's\n" "block (if there is one). In this context, a block means the inside\n" "of any statement, be it class definition, module definition, if\n" "statement or classic 'Ruby block'." msgstr "" "ステートメントã®è§£æžã‚„æ–°ã—ãオブジェクトを作æˆã™ã‚‹äº‹ã«åŠ ãˆã¦ã€\n" "ã„ãã¤ã‹ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒ–ロック(ãŒä¸€ã¤ã§ã‚‚ã‚ã‚‹å ´åˆ)ã®\n" "内部コードã®è§£æžå‡¦ç†ã‚’継続ã™ã‚‹ã‹ã‚‚ã—れãªã„。\n" "ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ãƒ–ロックã¨ã¯ã€ä½•らã‹ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®å†…部をæ„味ã™ã‚‹ã€‚\n" "ãれã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚„Rubyã§ä½¿ã‚れるblockã®å ´åˆã€ã‚¯ãƒ©ã‚¹å®šç¾©ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«å®šç¾©ã«ãªã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:123 msgid "" "For example, a class statement would be \"class MyClass\" and the block\n" "would be a list of statements including the method definitions inside\n" "the class. For a class handler, the programmer would execute the\n" "{#parse_block} method to continue parsing code inside the block, with\n" "the +namespace+ now pointing to the class object the handler created." msgstr "" "例ãˆã°ã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ã‚¯ãƒ©ã‚¹ãŒ\"class MyClass\"ã«ãªã‚‹ã‹ã‚‚ã—れãªã„\n" "ãã—ã¦ã€ãƒ–ロックã¯ã‚¯ãƒ©ã‚¹ã®å†…部ã§ãƒ¡ã‚½ãƒƒãƒ‰ã®å®šç¾©ã‚’\n" "å«ã‚“ã§ã„るステートメントã®ãƒªã‚¹ãƒˆã«ãªã‚‹ã‹ã‚‚ã—れãªã„。\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ã‚¯ãƒ©ã‚¹ç”¨ã«ã€\n" "プログラマーã¯ã€{#parse_block} メソッドを実行ã™ã‚‹ã€‚\n" "ブロックã®å†…部ã®ã‚³ãƒ¼ãƒ‰è§£æžã‚’継続ã™ã‚‹ç‚ºã«ã€\n" "+namespace+ ã¯ã€ç¾åœ¨ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒä½œæˆã—ãŸã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクトを指定ã™ã‚‹ã€‚" # YARD::Handlers::Base #: ../lib/yard/handlers/base.rb:129 msgid "" "YARD has the ability to continue into any block: class, module, method,\n" "even if statements. For this reason, the block parsing method must be\n" "invoked explicitly out of efficiency sake." msgstr "" "YARDã¯ä½•らã‹ã®ãƒ–ロックã®ä¸­ã¸(クラス,モジュール,メソッド,ステートメントã§ã•ãˆ)\n" "継続ã™ã‚‹ç‰¹æ€§ãŒã‚る。\n" "従ã£ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’è§£æžã™ã‚‹ãƒ–ロックã¯ã€\n" "効率良ã処ç†ã™ã‚‹ç‚ºã€æ˜Žç¤ºçš„ã«å‘¼ã³å‡ºã•れるã¹ãã§ã‚る。" # @abstract #: ../lib/yard/handlers/base.rb:142 msgid "" "Subclass this class to provide a handler for YARD to use\n" "during the processing phase." msgstr "" "YARDãŒå‡¦ç†æ®µéšŽã§ä½¿ç”¨ã™ã‚‹ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’æä¾›ã™ã‚‹ç‚ºã«ã€\n" "ã“ã®ã‚¯ãƒ©ã‚¹ã‚’サブクラス化ã™ã‚‹ã€‚" # @see #: ../lib/yard/handlers/base.rb:142 msgid "tag|see|#namespace" msgstr "" # @see #: ../lib/yard/handlers/base.rb:142 msgid "tag|see|#owner" msgstr "" # @see #: ../lib/yard/handlers/base.rb:142 msgid "tag|see|#parse_block" msgstr "" # @see #: ../lib/yard/handlers/base.rb:142 ../lib/yard/handlers/base.rb:290 msgid "tag|see|#register" msgstr "" # @see #: ../lib/yard/handlers/base.rb:142 ../lib/yard/parser/source_parser.rb:62 msgid "tag|see|CodeObjects::Base" msgstr "" # @see #: ../lib/yard/handlers/base.rb:142 msgid "tag|see|CodeObjects::NamespaceObject" msgstr "" # @see #: ../lib/yard/handlers/base.rb:142 ../lib/yard/handlers/base.rb:290 msgid "tag|see|handles" msgstr "" # YARD::Handlers::Base.clear_subclasses #: ../lib/yard/handlers/base.rb:151 msgid "Clear all registered subclasses. Testing purposes only" msgstr "å…¨ã¦ã®ç™»éŒ²ã•れãŸã‚µãƒ–クラスを消去ã™ã‚‹ã€‚テスト用" # YARD::Handlers::Base.subclasses #: ../lib/yard/handlers/base.rb:157 msgid "Returns all registered handler subclasses." msgstr "å…¨ã¦ã®ç™»éŒ²ã•れãŸã‚µãƒ–クラスã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’è¿”ã™ã€‚" # @return [Array] #: ../lib/yard/handlers/base.rb:158 msgid "a list of handlers" msgstr "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ãƒªã‚¹ãƒˆ" # YARD::Handlers::Base.handles #: ../lib/yard/handlers/base.rb:168 msgid "" "Declares the statement type which will be processed\n" "by this handler." msgstr "ã“ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ã‚ˆã£ã¦å‡¦ç†ã•れるステートメントã®åž‹ã‚’宣言ã™ã‚‹ã€‚" # YARD::Handlers::Base.handles #: ../lib/yard/handlers/base.rb:171 msgid "" "A match need not be unique to a handler. Multiple\n" "handlers can process the same statement. However,\n" "in this case, care should be taken to make sure that\n" "{#parse_block} would only be executed by one of\n" "the handlers, otherwise the same code will be parsed\n" "multiple times and slow YARD down." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã§ãƒžãƒƒãƒã™ã‚‹ã‚‚ã®ã¯ã€ä¸€ã¤ã§ãªãã¦ã‚‚よã„。\n" "複数ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯åŒã˜ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’処ç†ã§ãる。\n" "ã—ã‹ã—ãªãŒã‚‰ã€ã“ã®ã‚±ãƒ¼ã‚¹ã®å ´åˆã¯ã€\n" "{#parse_block}ãŒãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ä¸€ã¤ã«ã‚ˆã£ã¦å®Ÿè¡Œã•れるã ã‘ã§ã€\n" "ä»–ã®åŒã˜ã‚³ãƒ¼ãƒ‰ãŒè¤‡æ•°å›žè§£æžã•れYARDãŒé…ããªã‚‹äº‹ã«æ³¨æ„ã—ãªã‘れã°ãªã‚‰ãªã„。" # @param [Parser::RubyToken, Symbol, String, Regexp] matches #: ../lib/yard/handlers/base.rb:185 msgid "" "statements that match the declaration will be\n" "processed by this handler. A {String} match is\n" "equivalent to a +/\\Astring/+ regular expression\n" "(match from the beginning of the line), and all\n" "token matches match only the first token of the\n" "statement." msgstr "" "ã“ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ã‚ˆã£ã¦å‡¦ç†ã•れる宣言ãŒãƒžãƒƒãƒã™ã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã€‚\n" "A {String} ã®ãƒžãƒƒãƒã¯ +/\\Astring/+ ã®æ­£è¦è¡¨ç¾ã¨åŒæ§˜ã¨ãªã‚‹ã€‚\n" "(è¡Œã®æœ€åˆã‹ã‚‰ãƒžãƒƒãƒ)ã€\n" "ãã—ã¦å…¨ã¦ã®ãƒˆãƒ¼ã‚¯ãƒ³ã®ãƒžãƒƒãƒã¯ã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®æœ€åˆã®ãƒˆãƒ¼ã‚¯ãƒ³ã«ã ã‘マッãƒã™ã‚‹ã€‚" # @param [Parser::RubyToken, Symbol, String, Regexp] #: ../lib/yard/handlers/base.rb:185 msgid "tag|param|matches" msgstr "" # YARD::Handlers::Base.handles? #: ../lib/yard/handlers/base.rb:190 msgid "" "This class is implemented by {Ruby::Base} and {Ruby::Legacy::Base}.\n" "To implement a base handler class for another language, implement\n" "this method to return true if the handler should process the given\n" "statement object. Use {handlers} to enumerate the matchers declared\n" "for the handler class." msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯ã€ {Ruby::Base} ã‚„ {Ruby::Legacy::Base} ã«ã‚ˆã£ã¦å®Ÿè£…ã•れる。\n" "ä»–ã®è¨€èªžç”¨ã®base handlerクラスを実装ã™ã‚‹ç‚ºã«ã¯ã€\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒä¸Žãˆã‚‰ã‚ŒãŸã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚ªãƒ–ジェクトを処ç†ã™ã‚‹å ´åˆã€\n" "trueã‚’è¿”ã™ç‚ºã«ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実装ã™ã‚‹ã€‚\n" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚¯ãƒ©ã‚¹ç”¨ã®ãƒžãƒƒãƒã™ã‚‹å®£è¨€ã‚’列挙ã™ã‚‹ã«ã¯ã€{handlers} を使用ã™ã‚‹ã€‚" # @param statement #: ../lib/yard/handlers/base.rb:198 msgid "a statement object or node (depends on language type)" msgstr "オブジェクトやノードã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ(言語タイプã«å·¦å³ã•れる)" # @return [Boolean] #: ../lib/yard/handlers/base.rb:198 msgid "" "whether or not this handler object should process\n" "the given statement" msgstr "ã„ãšã‚Œã«ã›ã‚ˆã€ã“ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æŒ‡å®šã•れãŸã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã¹ã" # @return [Array] #: ../lib/yard/handlers/base.rb:204 msgid "a list of matchers for the handler object." msgstr "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚ªãƒ–ジェクト用ã®ç…§åˆã•れるリスト" # @see #: ../lib/yard/handlers/base.rb:204 msgid "tag|see|handles?" msgstr "" # YARD::Handlers::Base.namespace_only #: ../lib/yard/handlers/base.rb:209 msgid "" "Declares that the handler should only be called when inside a\n" "{CodeObjects::NamespaceObject}, not a method body." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒ {CodeObjects::NamespaceObject} å†…éƒ¨ã®æ™‚ã ã‘\n" "呼ã³å‡ºã•れる事を宣言ã™ã‚‹ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æœ¬ä½“ã§ã¯ãªã„。" # @return [Boolean] #: ../lib/yard/handlers/base.rb:218 msgid "" "whether the handler should only be processed inside\n" "a namespace." msgstr "ã“ã®ãƒãƒ³ãƒ‰ãƒ©ãŒnamespace内ã ã‘ã§å‡¦ç†ã•れるã‹ã©ã†ã‹" # YARD::Handlers::Base.in_file #: ../lib/yard/handlers/base.rb:223 msgid "" "Declares that a handler should only be called when inside a filename\n" "by its basename or a regex match for the full path." msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒãƒ•ルパス用ã®ãƒ™ãƒ¼ã‚¹ãƒãƒ¼ãƒ ã‚„æ­£è¦è¡¨ç¾ãƒžãƒƒãƒã«ã‚ˆã£ã¦ã€\n" "ファイルãƒãƒ¼ãƒ å†…éƒ¨ã®æ™‚ã ã‘呼ã³å‡ºã•れる事を宣言ã™ã‚‹ã€‚" # @param [String, Regexp] filename #: ../lib/yard/handlers/base.rb:228 msgid "a matching filename or regex" msgstr "マッãƒã™ã‚‹ãƒ•ァイルãƒãƒ¼ãƒ ã‚„æ­£è¦è¡¨ç¾" # @return [Boolean] #: ../lib/yard/handlers/base.rb:235 msgid "" "whether the filename matches the declared file\n" "match for a handler. If no file match is specified, returns true." msgstr "" "ファイルåãŒå®£è¨€ã•れãŸãƒãƒ³ãƒ‰ãƒ©ãƒ¼ç”¨ã®ãƒ•ァイルã¨ãƒžãƒƒãƒã™ã‚‹ã‹ã©ã†ã‹ã€\n" "ファイルãŒãƒžãƒƒãƒã—ãªã„å ´åˆã¯ã€trueã‚’è¿”ã™ã€‚" # YARD::Handlers::Base.process #: ../lib/yard/handlers/base.rb:251 msgid "" "Generates a +process+ method, equivalent to +def process; ... end+.\n" "Blocks defined with this syntax will be wrapped inside an anonymous\n" "module so that the handler class can be extended with mixins that\n" "override the +process+ method without alias chaining." msgstr "" "+process+ メソッドを生æˆã™ã‚‹ã€ +def process; ...end+ ã¨åŒç­‰ã¨ãªã‚‹ã€‚\n" "ã“ã®æ§‹æ–‡ã‚’用ã„ãŸå®šç¾©ã•れるブロックã¯ã€ç„¡åモジュールã®å†…部ã§ãƒ©ãƒƒãƒ—ã•れる。\n" "ç†ç”±ã¨ã—ã¦ã¯ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚¯ãƒ©ã‚¹ãŒ +procecc+ メソッドã®ä¸Šæ›¸ãã‚’\n" "エイリアスãƒã‚§ãƒ¼ãƒ³ç„¡ã—ã§mixinã‚’ç”¨ã„æ‹¡å¼µã§ãるよã†ã«ã™ã‚‹ç‚ºã§ã‚る。" # @since #: ../lib/yard/handlers/base.rb:262 #: ../lib/yard/handlers/ruby/class_condition_handler.rb:11 #: ../lib/yard/parser/ruby/legacy/statement.rb:49 #: ../lib/yard/templates/erb_cache.rb:16 #: ../lib/yard/templates/helpers/html_helper.rb:510 msgid "0.5.4" msgstr "" # @see #: ../lib/yard/handlers/base.rb:262 msgid "tag|see|#process" msgstr "" # @return [Base] #: ../lib/yard/handlers/base.rb:269 ../lib/yard/parser/base.rb:25 #: ../lib/yard/serializers/base.rb:27 ../lib/yard/server/commands/base.rb:74 msgid "a new instance of Base" msgstr "ãƒ™ãƒ¼ã‚¹ã®æ–°ã—ã„インスタンス" # YARD::Handlers::Base#process #: ../lib/yard/handlers/base.rb:275 msgid "" "The main handler method called by the parser on a statement\n" "that matches the {handles} declaration." msgstr "" "主ãªãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ {handles} ã®å®£è¨€ã§\n" "マッãƒã™ã‚‹statementã®ãƒ‘ーサーã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れる。" # YARD::Handlers::Base#process #: ../lib/yard/handlers/base.rb:278 msgid "" "Subclasses should override this method to provide the handling\n" "functionality for the class." msgstr "" "サブクラスã¯ã‚¯ãƒ©ã‚¹ç”¨ã®å‡¦ç†æ©Ÿèƒ½ã‚’æä¾›ã™ã‚‹ç‚ºã«ã€\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’上書ãã™ã‚‹ã€‚" # @return [Array, CodeObjects::Base, Object] #: ../lib/yard/handlers/base.rb:290 msgid "" "If this method returns a code object (or a list of them),\n" "they are passed to the +#register+ method which adds basic\n" "attributes. It is not necessary to return any objects and in\n" "some cases you may want to explicitly avoid the returning of\n" "any objects for post-processing by the register method." msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクト(ã‚„ãれらã®ãƒªã‚¹ãƒˆ)ã‚’è¿”ã™å ´åˆã€\n" "ãれらã¯ã€+#register+ メソッドã«è§£æžã•れã€åŸºæœ¬å±žæ€§ãŒè¿½åŠ ã•れる。\n" "何らã‹ã®ã‚ªãƒ–ジェクトを返ã™ã®ã¯å¿…é ˆã§ã¯ãªãã€\n" "å ´åˆã«ã‚ˆã£ã¦ã¯ã€\n" "ã‚ãªãŸã¯registerメソッドã«ã‚ˆã£ã¦å¾Œå‡¦ç†ç”¨ã®\n" "何らã‹ã®ã‚ªãƒ–ジェクトを返ã™ã“ã¨ã‚’明確ã«ç„¡è¦–ã§ãる。" # YARD::Handlers::Base#parse_block #: ../lib/yard/handlers/base.rb:295 msgid "Parses the semantic \"block\" contained in the statement node." msgstr "ステートメントノードã«å«ã¾ã‚Œã¦ã„ã‚‹æ„味ã®ã‚ã‚‹\"block\"ã‚’è§£æžã™ã‚‹ã€‚" # @abstract #: ../lib/yard/handlers/base.rb:297 msgid "Subclasses should call {Processor#process parser.process}" msgstr "{Processor#process parser.process} を呼ã³å‡ºã—サブクラス化ã™ã‚‹ã€‚" # @return [Processor] #: ../lib/yard/handlers/base.rb:303 msgid "" "the processor object that manages all global state\n" "during handling." msgstr "å…¨ã¦ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«ãªçŠ¶æ…‹ã®å‡¦ç†ã®é–“ã«æ‰±ã†ãƒ—ロセッサーオブジェクト" # @return [Object] #: ../lib/yard/handlers/base.rb:308 msgid "" "the statement object currently being processed. Usually\n" "refers to one semantic language statement, though the strict definition\n" "depends on the parser used." msgstr "" "ç¾åœ¨ã®å‡¦ç†ã•れるステートメントオブジェクト。\n" "厳格ãªå®šç¾©ã¯ä½¿ã‚れるパーサー次第ã¨ã¯ã„ãˆã€\n" "一般的ã«ã¯ã€ä¸€ã¤ã®æ„味ã®ã‚る言語をå‚ç…§ã™ã‚‹ã€‚" # @param value #: ../lib/yard/handlers/base.rb:311 ../lib/yard/handlers/base.rb:333 #: ../lib/yard/tags/ref_tag.rb:4 ../lib/yard/tags/ref_tag_list.rb:4 msgid "the value to set the attribute owner to." msgstr "owner属性を設定ã™ã‚‹ç‚ºã®å€¤" # YARD::Tags::RefTag#owner # YARD::Tags::RefTagList#owner #: ../lib/yard/handlers/base.rb:312 ../lib/yard/handlers/base.rb:333 #: ../lib/yard/tags/ref_tag.rb:5 ../lib/yard/tags/ref_tag_list.rb:5 msgid "Returns the value of attribute owner" msgstr "owner属性ã®å€¤ã‚’è¿”ã™" # YARD::Tags::RefTag#owner= # YARD::Tags::RefTagList#owner= #: ../lib/yard/handlers/base.rb:312 ../lib/yard/handlers/base.rb:334 #: ../lib/yard/tags/ref_tag.rb:5 ../lib/yard/tags/ref_tag_list.rb:5 msgid "Sets the attribute owner" msgstr "owner属性を設定ã™ã‚‹" # @param value #: ../lib/yard/handlers/base.rb:314 ../lib/yard/handlers/base.rb:335 msgid "the value to set the attribute namespace to." msgstr "値ã«namespace属性を設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::CodeObjects::ExtraFileObject#name= # YARD::Tags::RefTagList#name= # YARD::Templates::Section#name= #: ../lib/yard/handlers/base.rb:315 ../lib/yard/handlers/base.rb:336 msgid "Sets the attribute namespace" msgstr "namespace属性を設定ã™ã‚‹" # @param value #: ../lib/yard/handlers/base.rb:317 ../lib/yard/handlers/base.rb:337 msgid "the value to set the attribute visibility to." msgstr "値ã«visibility属性を設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::RipperParser#ast # YARD::Parser::Ruby::RipperParser#root #: ../lib/yard/handlers/base.rb:318 ../lib/yard/handlers/base.rb:337 msgid "Returns the value of attribute visibility" msgstr "visibility属性ã®å€¤ã‚’è¿”ã™" # YARD::Parser::Ruby::AstNode#file= #: ../lib/yard/handlers/base.rb:318 ../lib/yard/handlers/base.rb:338 msgid "Sets the attribute visibility" msgstr "visibility属性を設定ã™ã‚‹ã€‚" # @param value #: ../lib/yard/handlers/base.rb:320 ../lib/yard/handlers/base.rb:339 msgid "the value to set the attribute scope to." msgstr "値ã«ã‚¹ã‚³ãƒ¼ãƒ—属性を設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::Legacy::RubyToken::TkOPASGN#op #: ../lib/yard/handlers/base.rb:321 ../lib/yard/handlers/base.rb:339 msgid "Returns the value of attribute scope" msgstr "スコープ属性ã®å€¤ã‚’è¿”ã™" # YARD::Parser::Ruby::AstNode#source= #: ../lib/yard/handlers/base.rb:321 ../lib/yard/handlers/base.rb:340 msgid "Sets the attribute scope" msgstr "スコープ属性を設定ã™ã‚‹" # YARD::Tags::Library.labels #: ../lib/yard/handlers/base.rb:324 ../lib/yard/handlers/base.rb:341 msgid "Returns the value of attribute globals" msgstr "globals(全体)属性ã®å€¤ã‚’è¿”ã™" # YARD::Parser::Ruby::Legacy::RubyLex#lex_state #: ../lib/yard/handlers/base.rb:327 ../lib/yard/handlers/base.rb:342 msgid "Returns the value of attribute extra_state" msgstr "extra_state属性ã®å€¤ã‚’è¿”ã™" # YARD::Handlers::Base#push_state #: ../lib/yard/handlers/base.rb:344 msgid "" "Executes a given block with specific state values for {#owner},\n" "{#namespace} and {#scope}." msgstr "" "{#owner}, {#namespace} , {#scope}メソッド用ã®ç‰¹å®šã®çŠ¶æ…‹å€¤ã¨\n" "一緒ã«ä¸Žãˆã‚‰ã‚ŒãŸãƒ–ロックを実行ã™ã‚‹ã€‚" # @yield #: ../lib/yard/handlers/base.rb:355 msgid "a block to execute with the given state values." msgstr "状態を指定ã™ã‚‹ã¨å…±ã«å®Ÿè¡Œã™ã‚‹ãƒ–ロック。" # @param [Proc] #: ../lib/yard/handlers/base.rb:355 msgid "tag|param|block" msgstr "" # @param [Proc] block #: ../lib/yard/handlers/base.rb:355 msgid "the block to execute with specific state" msgstr "与ãˆã‚‰ã‚ŒãŸå€¤ã®çŠ¶æ…‹ã¨å…±ã«å®Ÿè¡Œã™ã‚‹ãƒ–ロック。" # YARD::Handlers::Base#register #: ../lib/yard/handlers/base.rb:378 msgid "" "Do some post processing on a list of code objects.\n" "Adds basic attributes to the list of objects like\n" "the filename, line number, {CodeObjects::Base#dynamic},\n" "source code and {CodeObjects::Base#docstring},\n" "but only if they don't exist." msgstr "" "コードオブジェクトã®ãƒªã‚¹ãƒˆã®ã„ãã¤ã‹ã®å¾Œå‡¦ç†ã‚’ã™ã‚‹ã€‚\n" "ファイルåã€è¡Œæ•°ã€{CodeObjects::Base#dynamic} ã€ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã€\n" "{CodeObjects::Base#docstring}ã®ã‚ˆã†ãªã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã«ã€\n" "基本属性を追加ã™ã‚‹ã€‚\n" "ã—ã‹ã—ã€ãれらãŒå­˜åœ¨ã—ãªã„å ´åˆã ã‘ã§ã‚る。" # @return [CodeObjects::Base, Array] #: ../lib/yard/handlers/base.rb:389 msgid "returns whatever is passed in, for chainability." msgstr "メソッドãƒã‚§ãƒ¼ãƒ³ã®ç‚ºã€è§£æžã•れるもã®ã‚’è¿”ã™" # @param [Array] #: ../lib/yard/handlers/base.rb:389 ../lib/yard/i18n/pot_generator.rb:90 #: ../lib/yard/templates/engine.rb:100 msgid "tag|param|objects" msgstr "" # @param [Array] objects #: ../lib/yard/handlers/base.rb:389 msgid "the list of objects to post-process." msgstr "後処ç†ã®ç‚ºã®ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ" # YARD::Handlers::Base#register_ensure_loaded #: ../lib/yard/handlers/base.rb:406 msgid "" "Ensures that the object's namespace is loaded before attaching it\n" "to the namespace." msgstr "" # @param [CodeObjects::Base] object #: ../lib/yard/handlers/base.rb:411 ../lib/yard/handlers/base.rb:424 #: ../lib/yard/handlers/base.rb:433 ../lib/yard/handlers/base.rb:456 #: ../lib/yard/handlers/base.rb:470 ../lib/yard/handlers/base.rb:483 #: ../lib/yard/handlers/base.rb:495 ../lib/yard/handlers/base.rb:520 #: ../lib/yard/registry.rb:174 msgid "the object to register" msgstr "記録ã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Logger#enter_level #: ../lib/yard/handlers/base.rb:420 msgid "Registers the file/line of the declaration with the object" msgstr "オブジェクトを用ã„宣言ã®ãƒ•ァイル/行を登録ã™ã‚‹" # YARD::Handlers::Base#expand_macro #: ../lib/yard/handlers/base.rb:429 msgid "Registers any docstring found for the object and expands macros" msgstr "オブジェクト用ã«è¦‹ã¤ã‹ã£ãŸä»»æ„ã®docstringを登録ã—ã€ãƒžã‚¯ãƒ­ã‚’æ‹¡å¼µã™ã‚‹" # YARD::Registry.at # YARD::Registry.[] #: ../lib/yard/handlers/base.rb:452 msgid "Registers the object as being inside a specific group" msgstr "特定ã®ã‚°ãƒ«ãƒ¼ãƒ—内部ã®ã‚‚ã®ã¨ã—ã¦ã‚ªãƒ–ジェクトを登録ã™ã‚‹" # YARD::CodeObjects::MethodObject#aliases #: ../lib/yard/handlers/base.rb:466 msgid "Registers any transitive tags from the namespace on the object" msgstr "オブジェクト上ã®namespaceã‹ã‚‰å…¨ã¦ã®transitiveタグを登録ã™ã‚‹" # YARD::Handlers::Base#register_visibility #: ../lib/yard/handlers/base.rb:490 msgid "" "Registers visibility on a method object. If the object does not\n" "respond to setting visibility, nothing is done." msgstr "" # @param [Array] # @param [Array] # @param [Array] #: ../lib/yard/handlers/base.rb:495 msgid "tag|param|visibility" msgstr "" # @return [String] #: ../lib/yard/handlers/base.rb:495 msgid "the visibility to set on the object" msgstr "オブジェクトを設定ã™ã‚‹ãŸã‚ã®visibility" # YARD::Handlers::Base#register_module_function #: ../lib/yard/handlers/base.rb:501 msgid "" "Registers the same method information on the module function, if\n" "the object was defined as a module function." msgstr "" # @param [CodeObjects::Base] object #: ../lib/yard/handlers/base.rb:506 msgid "" "the possible module function object\n" "to copy data for" msgstr "" # YARD::Handlers::Base#register_dynamic #: ../lib/yard/handlers/base.rb:515 msgid "" "Registers the object as dynamic if the object is defined inside\n" "a method or block (owner != namespace)" msgstr "" # YARD::Handlers::Base#ensure_loaded! #: ../lib/yard/handlers/base.rb:525 msgid "" "Ensures that a specific +object+ has been parsed and loaded into the\n" "registry. This is necessary when adding data to a namespace, for instance,\n" "since the namespace may not have been processed yet (it can be located\n" "in a file that has not been handled)." msgstr "" "特定㮠+object+ ã¯è§£æžã•れã¦ã€ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã®ä¸­ã¸ãƒ­ãƒ¼ãƒ‰ã•れる事をä¿è¨¼ã™ã‚‹ã€‚\n" "例ãˆã°ã€namespaceã¯ã€ã¾ã å‡¦ç†ã•れãªã„ã‹ã‚‚ã—れãªã„ã®ã§\n" "(処ç†ã•れãªã„ファイルã®ä¸­ã«ãれã¯ã‚ã‚‹å¯èƒ½æ€§ãŒã‚る。)\n" "ã“れã¯namespaceã«ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹æ™‚ã«å¿…è¦ã§ã‚る。" # YARD::Handlers::Base#ensure_loaded! #: ../lib/yard/handlers/base.rb:530 msgid "" "Calling this method defers the handler until all other files have been\n" "processed. If the object gets resolved, the rest of the handler continues,\n" "otherwise an exception is raised." msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—ã¯\n" "ä»–ã®å…¨ã¦ã®ãƒ•ァイルãŒå‡¦ç†ã•れるã¾ã§ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’延期ã™ã‚‹ã€‚\n" "ã‚‚ã—オブジェクトãŒè§£æ±ºã•れãŸå ´åˆã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®æ®‹ã‚ŠãŒç¶šãã€\n" "ã•ã‚‚ãªã‘れã°ã€ä¾‹å¤–を上ã’る。" # @example Adding a mixin to the String class programmatically #: ../lib/yard/handlers/base.rb:544 msgid "" "ensure_loaded! P('String')\n" "# \"String\" is now guaranteed to be loaded\n" "P('String').mixins << P('MyMixin')" msgstr "" # @raise [NamespaceMissingError] #: ../lib/yard/handlers/base.rb:544 msgid "" "if the object is not resolved within\n" "+max_retries+ attempts, this exception is raised and the handler\n" "finishes processing." msgstr "" "オブジェクト㌠+max_retries+ を試ã¿ã¦ã‚‚解決ã•れãªã„å ´åˆã€\n" "ã“ã®ä¾‹å¤–を上ã’ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒå‡¦ç†ã‚’終了ã•ã›ã‚‹ã€‚" # @example #: ../lib/yard/handlers/base.rb:544 msgid "tag|example|Adding a mixin to the String class programmatically" msgstr "Stringクラスã®ãƒ—ログラムã«mixinを追加ã™ã‚‹" # @param [Integer] #: ../lib/yard/handlers/base.rb:544 msgid "tag|param|max_retries" msgstr "" # @param [Integer] max_retries #: ../lib/yard/handlers/base.rb:544 msgid "" "the number of times to defer the handler\n" "before raising a +NamespaceMissingError+." msgstr "+NamespaceMissingError+ を上ã’ã‚‹å‰ã«ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒãƒªãƒˆãƒ©ã‚¤ã™ã‚‹å›žæ•°" # @param [Proxy, CodeObjects::Base] object #: ../lib/yard/handlers/base.rb:544 msgid "the object to resolve." msgstr "解決ã—ãŸã„オブジェクト" # @abstract #: ../lib/yard/handlers/base.rb:567 msgid "" "Implement this method to return the parameters in a method call\n" "statement. It should return an empty list if the statement is not a\n" "method call." msgstr "" "メソッド呼ã³å‡ºã—ステートメントã®ä¸­ã®ãƒ‘ラメータを返ã™ç‚ºã«ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実装ã™ã‚‹ã€‚\n" "ステートメントãŒãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã§ãªã„å ´åˆã¯ç©ºã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ã¹ã。" # YARD::Handlers::Base#call_params # YARD::Handlers::Base#caller_method # YARD::Handlers::Base#find_or_create_macro # YARD::Handlers::Base#expand_macro #: ../lib/yard/handlers/base.rb:567 ../lib/yard/handlers/base.rb:576 msgid "Macro Support" msgstr "マクロã®ã‚µãƒãƒ¼ãƒˆ" # @return [Array] #: ../lib/yard/handlers/base.rb:567 msgid "a list of argument names" msgstr "引数ã®åå‰ã®ãƒªã‚¹ãƒˆ" # @abstract #: ../lib/yard/handlers/base.rb:576 msgid "" "Implement this method to return the method being called in\n" "a method call. It should return nil if the statement is not a method\n" "call." msgstr "" "メソッド呼ã³å‡ºã—ã®ä¸­ã§å‘¼ã³å‡ºã•れるメソッドãŒè¿”ã™ç‚ºã«\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå®Ÿè£…ã™ã‚‹ã€‚\n" "ステートメントãŒãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã§ãªã„å ´åˆã¯nilã‚’è¿”ã™ã¹ã。" # @return [nil] #: ../lib/yard/handlers/base.rb:576 msgid "if the statement is not a method call" msgstr "ステートメントãŒãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã§ãªã„å ´åˆ" # @return [String] #: ../lib/yard/handlers/base.rb:576 msgid "the method name being called" msgstr "呼ã³å‡ºã•れるメソッドå" # YARD::Handlers::C::AliasHandler#process # YARD::Handlers::C::AttributeHandler#process # YARD::Handlers::C::ClassHandler#process # YARD::Handlers::C::ConstantHandler#process # YARD::Handlers::C::InitHandler#process # YARD::Handlers::C::MethodHandler#process # YARD::Handlers::C::MixinHandler#process # YARD::Handlers::C::ModuleHandler#process # YARD::Handlers::C::OverrideCommentHandler#process # YARD::Handlers::C::PathHandler#process # YARD::Handlers::C::StructHandler#process # YARD::Handlers::C::SymbolHandler#process # YARD::Handlers::Ruby::AliasHandler#process # YARD::Handlers::Ruby::AttributeHandler#process # YARD::Handlers::Ruby::ClassConditionHandler#process # YARD::Handlers::Ruby::ClassHandler#process # YARD::Handlers::Ruby::ClassVariableHandler#process # YARD::Handlers::Ruby::CommentHandler#process # YARD::Handlers::Ruby::ConstantHandler#process # YARD::Handlers::Ruby::DSLHandler#process # YARD::Handlers::Ruby::ExceptionHandler#process # YARD::Handlers::Ruby::Legacy::AliasHandler#process # YARD::Handlers::Ruby::Legacy::AttributeHandler#process # YARD::Handlers::Ruby::Legacy::ClassConditionHandler#process # YARD::Handlers::Ruby::Legacy::ClassHandler#process # YARD::Handlers::Ruby::Legacy::ClassVariableHandler#process # YARD::Handlers::Ruby::Legacy::CommentHandler#process # YARD::Handlers::Ruby::Legacy::ConstantHandler#process # YARD::Handlers::Ruby::Legacy::DSLHandler#process # YARD::Handlers::Ruby::Legacy::ExceptionHandler#process # YARD::Handlers::Ruby::Legacy::MethodHandler#process # YARD::Handlers::Ruby::Legacy::MixinHandler#process # YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler#process # YARD::Handlers::Ruby::Legacy::ModuleHandler#process # YARD::Handlers::Ruby::Legacy::PrivateConstantHandler#process # YARD::Handlers::Ruby::Legacy::VisibilityHandler#process # YARD::Handlers::Ruby::Legacy::YieldHandler#process # YARD::Handlers::Ruby::MethodConditionHandler#process # YARD::Handlers::Ruby::MethodHandler#process # YARD::Handlers::Ruby::MixinHandler#process # YARD::Handlers::Ruby::ModuleFunctionHandler#process # YARD::Handlers::Ruby::ModuleHandler#process # YARD::Handlers::Ruby::PrivateConstantHandler#process # YARD::Handlers::Ruby::VisibilityHandler#process # YARD::Handlers::Ruby::YieldHandler#process #: ../lib/yard/handlers/c/alias_handler.rb:10 #: ../lib/yard/handlers/c/attribute_handler.rb:6 #: ../lib/yard/handlers/c/class_handler.rb:19 #: ../lib/yard/handlers/c/constant_handler.rb:8 #: ../lib/yard/handlers/c/init_handler.rb:8 #: ../lib/yard/handlers/c/method_handler.rb:22 #: ../lib/yard/handlers/c/mixin_handler.rb:7 #: ../lib/yard/handlers/c/module_handler.rb:9 #: ../lib/yard/handlers/c/override_comment_handler.rb:7 #: ../lib/yard/handlers/c/path_handler.rb:6 #: ../lib/yard/handlers/c/struct_handler.rb:8 #: ../lib/yard/handlers/c/symbol_handler.rb:7 #: ../lib/yard/handlers/ruby/alias_handler.rb:7 #: ../lib/yard/handlers/ruby/attribute_handler.rb:10 #: ../lib/yard/handlers/ruby/class_condition_handler.rb:16 #: ../lib/yard/handlers/ruby/class_handler.rb:8 #: ../lib/yard/handlers/ruby/class_variable_handler.rb:7 #: ../lib/yard/handlers/ruby/comment_handler.rb:7 #: ../lib/yard/handlers/ruby/constant_handler.rb:8 #: ../lib/yard/handlers/ruby/dsl_handler.rb:11 #: ../lib/yard/handlers/ruby/exception_handler.rb:6 #: ../lib/yard/handlers/ruby/legacy/alias_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/attribute_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/class_condition_handler.rb:8 #: ../lib/yard/handlers/ruby/legacy/class_handler.rb:8 #: ../lib/yard/handlers/ruby/legacy/class_variable_handler.rb:8 #: ../lib/yard/handlers/ruby/legacy/comment_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/constant_handler.rb:9 #: ../lib/yard/handlers/ruby/legacy/dsl_handler.rb:12 #: ../lib/yard/handlers/ruby/legacy/exception_handler.rb:6 #: ../lib/yard/handlers/ruby/legacy/method_handler.rb:6 #: ../lib/yard/handlers/ruby/legacy/mixin_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/module_function_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/module_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/private_constant_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/visibility_handler.rb:7 #: ../lib/yard/handlers/ruby/legacy/yield_handler.rb:6 #: ../lib/yard/handlers/ruby/method_condition_handler.rb:6 #: ../lib/yard/handlers/ruby/method_handler.rb:6 #: ../lib/yard/handlers/ruby/mixin_handler.rb:7 #: ../lib/yard/handlers/ruby/module_function_handler.rb:8 #: ../lib/yard/handlers/ruby/module_handler.rb:7 #: ../lib/yard/handlers/ruby/private_constant_handler.rb:7 #: ../lib/yard/handlers/ruby/visibility_handler.rb:9 #: ../lib/yard/handlers/ruby/yield_handler.rb:6 msgid "Main processing callback" msgstr "" # @return [Boolean] #: ../lib/yard/handlers/c/base.rb:9 msgid "whether the handler handles this statement" msgstr "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’æ“作ã™ã‚‹ã‹ã©ã†ã‹" # @return [CodeObjects::Base] #: ../lib/yard/handlers/c/base.rb:36 ../lib/yard/handlers/c/base.rb:40 #: ../lib/yard/handlers/c/base.rb:44 ../lib/yard/handlers/c/base.rb:48 msgid "Registering objects" msgstr "オブジェクトを登録ã™ã‚‹" # YARD::Handlers::C::Base#namespace_for_variable # YARD::Handlers::C::Base#namespaces # YARD::Handlers::C::Base#override_comments # YARD::Handlers::C::Base#processed_files # YARD::Handlers::C::Base#symbols #: ../lib/yard/handlers/c/base.rb:54 ../lib/yard/handlers/c/base.rb:58 #: ../lib/yard/handlers/c/base.rb:62 ../lib/yard/handlers/c/base.rb:68 #: ../lib/yard/handlers/c/base.rb:72 msgid "Looking up Symbol and Var Values" msgstr "" # YARD::Handlers::Ruby::Base#parse_block #: ../lib/yard/handlers/c/base.rb:78 ../lib/yard/handlers/ruby/base.rb:132 msgid "Parsing an Inner Block" msgstr "内部ã®ãƒ–ロックを解æžã™ã‚‹" # @return [String] #: ../lib/yard/handlers/c/base.rb:87 ../lib/yard/handlers/c/base.rb:104 msgid "Processing other files" msgstr "ä»–ã®ãƒ•ァイルを処ç†ã™ã‚‹" # YARD::Handlers::Ruby::MethodConditionHandler #: ../lib/yard/handlers/c/init_handler.rb:2 msgid "Handles the Init_Libname() method" msgstr "Init_Libname()メソッドをæ“作ã™ã‚‹" # YARD::CLI::Yardoc#parse_arguments #: ../lib/yard/handlers/c/override_comment_handler.rb:2 msgid "Parses comments" msgstr "コメントを解æžã™ã‚‹" # YARD::Handlers::C::SymbolHandler #: ../lib/yard/handlers/c/symbol_handler.rb:2 msgid "" "Keeps track of function bodies for symbol lookup during Ruby method " "declarations" msgstr "" # YARD::Handlers::Processor #: ../lib/yard/handlers/processor.rb:6 msgid "" "Iterates over all statements in a file and delegates them to the\n" "{Handlers::Base} objects that are registered to handle the statement." msgstr "" "ファイルã®ä¸­ã®å…¨ã¦ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«ã¾ãŸãŒã‚Šç¹°ã‚Šè¿”ã—ã€\n" "ステートメントをæ“作ã™ã‚‹ç‚ºã«è¨˜éŒ²ã•れる{Handlers::Base}オブジェクトã«å§”è­²ã™" "る。" # YARD::Handlers::Processor #: ../lib/yard/handlers/processor.rb:9 msgid "" "This class is passed to each handler and keeps overall processing state.\n" "For example, if the {#visibility} is set in a handler, all following\n" "statements will have access to this state. This allows \"public\",\n" "\"protected\" and \"private\" statements to be handled in classes and " "modules.\n" "In addition, the {#namespace} can be set during parsing to control\n" "where objects are being created from. You can also access extra stateful\n" "properties that any handler can set during the duration of the post\n" "processing of a file from {#extra_state}. If you need to access state\n" "across different files, look at {#globals}." msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯ãれãžã‚Œã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒæ¸¡ã•れる。\n" "ãã—ã¦ã€ç·åˆçš„ãªå‡¦ç†ã®çŠ¶æ…‹ã‚’ç¶­æŒã™ã‚‹ã€‚\n" "例ãˆã°ã€{#visibility}ã¯ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ä¸­ã§è¨­å®šã•れる。\n" "å…¨ã¦ã®æ¬¡ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€ã“ã®çŠ¶æ…‹ã«ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚る。\n" "ã“れã¯ã€ã‚¯ãƒ©ã‚¹ã‚„モジュールã®ä¸­ã§æ“作ã•れる\n" "\"public\",\"protected\",\"private\"ステートメントをå—ã‘入れる。\n" "ã•らã«ã€{#namespace}メソッドã¯ã€\n" "オブジェクトãŒä½œæˆã•れる場所ã§ã€åˆ¶å¾¡ã®ç‚ºã«è§£æžã—ã¦ã„ã‚‹é–“ã«è¨­å®šã•れる。\n" "ã‚ãªãŸã¯ã€è¿½åŠ ã®å‡¦ç†çŠ¶æ…‹ã‚’æŠŠæ¡ã™ã‚‹å±žæ€§ã«ã‚¢ã‚¯ã‚»ã‚¹ã‚‚出æ¥ã‚‹ã€‚\n" "ä»»æ„ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒ\n" "{#extra_state}メソッドã‹ã‚‰ãƒ•ァイルã®å¾Œå‡¦ç†ã‚’ã—ã¦ã„ã‚‹é–“ã«\n" "設定ã§ãる。\n" "ã‚ãªãŸãŒè¤‡æ•°ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ¸¡ã£ã¦çŠ¶æ…‹ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€\n" "{#globals}メソッドã§èª¿ã¹ã‚‰ã‚Œã‚‹ã€‚" # @see #: ../lib/yard/handlers/processor.rb:19 ../lib/yard/handlers/ruby/base.rb:62 #: ../lib/yard/parser/source_parser.rb:62 msgid "tag|see|Handlers::Base" msgstr "" # YARD::Handlers::Processor.register_handler_namespace #: ../lib/yard/handlers/processor.rb:23 msgid "Registers a new namespace for handlers of the given type." msgstr "与ãˆã‚‹åž‹ã®å…¥ã£ãŸãƒãƒ³ãƒ‰ãƒ©ãƒ¼ç”¨ã®è¨˜éŒ²ã™ã‚‹ã€‚" # @return [Hash] #: ../lib/yard/handlers/processor.rb:31 ../lib/yard/handlers/processor.rb:33 #: ../lib/yard/parser/source_parser.rb:158 #: ../lib/yard/parser/source_parser.rb:160 msgid "a list of registered parser type extensions" msgstr "parser type extensionsãŒ,記録ã•れるリスト" # @return [String] #: ../lib/yard/handlers/processor.rb:41 msgid "the filename" msgstr "ファイルå" # @return [CodeObjects::NamespaceObject] #: ../lib/yard/handlers/processor.rb:44 msgid "the current namespace" msgstr "ç¾åœ¨ã®namespace" # @return [Symbol] #: ../lib/yard/handlers/processor.rb:47 msgid "the current visibility (public, private, protected)" msgstr "ç¾åœ¨ã®å¯è¦–性(public,private,protected)" # @return [Symbol] #: ../lib/yard/handlers/processor.rb:50 msgid "the current scope (class, instance)" msgstr "ç¾åœ¨ã®ã‚¹ã‚³ãƒ¼ãƒ—(クラス,インスタンス)" # @return [CodeObjects::Base, nil] #: ../lib/yard/handlers/processor.rb:56 msgid "" "unlike the namespace, the owner\n" "is a non-namespace object that should be stored between statements.\n" "For instance, when parsing a method body, the {CodeObjects::MethodObject}\n" "is set as the owner, in case any extra method information is processed." msgstr "" "namespaceã¨ã¯ç•°ãªã‚Šã€ownerã¯ã€\n" "ステートメントã®é–“ã«è¨˜éŒ²ã•れるnamespaceオブジェクトをæŒãŸãªã„。\n" "例ãˆã°ã€ãƒ¡ã‚½ãƒƒãƒ‰æœ¬ä½“ã‚’è§£æžã™ã‚‹æ™‚ã€{CodeObjects::MethodObject}ã¯ã€\n" "ã“ã®ownerã®ã‚ˆã†ã«è¨­å®šã•れる。ã“ã®å ´åˆã€ä½•らã‹ã®è¿½åŠ ã®ãƒ¡ã‚½ãƒƒãƒ‰æƒ…å ±ãŒå‡¦ç†ã•れ" "る。" # @return [Symbol] #: ../lib/yard/handlers/processor.rb:59 msgid "the parser type (:ruby, :ruby18, :c)" msgstr "パーサー型(:ruby, :ruby18, :c)" # YARD::Handlers::Base#globals # YARD::Handlers::Processor#globals # YARD::Handlers::Processor#globals= #: ../lib/yard/handlers/processor.rb:62 msgid "" "Handlers can share state for the entire post processing stage through\n" "this attribute. Note that post processing stage spans multiple files.\n" "To share state only within a single file, use {#extra_state}" msgstr "" "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã“ã®å±žæ€§ã‚’通ã—ã¦å…¨ä½“ã®å¾Œå‡¦ç†ç’°å¢ƒç”¨ã®çŠ¶æ…‹ã‚’å…±æœ‰ã§ãる。\n" "以下ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" "後処ç†ã®çŠ¶æ…‹ã¯ã€è¤‡æ•°ãƒ•ã‚¡ã‚¤ãƒ«ã«æ¸¡ã™ã€‚\n" "å˜ä¸€ã®ãƒ•ァイルã®ä¸­ã§ã ã‘状態を共有ã™ã‚‹ã«ã¯ã€ {#extra_state} を使用ã™ã‚‹ã€‚" # @example Sharing state among two handlers #: ../lib/yard/handlers/processor.rb:77 msgid "" "class Handler1 < YARD::Handlers::Ruby::Base\n" " handles :class\n" " process { globals.foo = :bar }\n" "end\n" "\n" "class Handler2 < YARD::Handlers::Ruby::Base\n" " handles :method\n" " process { puts globals.foo }\n" "end" msgstr "" # @return [OpenStruct] #: ../lib/yard/handlers/processor.rb:77 msgid "global shared state for post-processing stage" msgstr "後処ç†ç’°å¢ƒç”¨ã«çŠ¶æ…‹ã‚’å…±æœ‰ã•れる,global" # @example #: ../lib/yard/handlers/processor.rb:77 msgid "tag|example|Sharing state among two handlers" msgstr "2ã¤ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®é–“ã§çŠ¶æ…‹ã‚’å…±æœ‰ã™ã‚‹" # @see #: ../lib/yard/handlers/processor.rb:77 msgid "tag|see|#extra_state" msgstr "" # YARD::Handlers::Base#extra_state # YARD::Handlers::Processor#extra_state # YARD::Handlers::Processor#extra_state= #: ../lib/yard/handlers/processor.rb:80 msgid "" "Share state across different handlers inside of a file.\n" "This attribute is similar to {#visibility}, {#scope}, {#namespace}\n" "and {#owner}, in that they all maintain state across all handlers\n" "for the entire source file. Use this attribute to store any data\n" "your handler might need to save during the parsing of a file. If\n" "you need to save state across files, see {#globals}." msgstr "" "ファイルã®å†…部ã®åˆ¥ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®è¡Œãæ¥ã®çŠ¶æ…‹ã‚’å…±æœ‰ã™ã‚‹ã€‚\n" "ãれらã¯å…¨ä½“ã®ã‚½ãƒ¼ã‚¹ãƒ•ァイルã®ç‚ºã«å…¨ã¦ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®è¡Œãæ¥ã®çŠ¶æ…‹ã‚’\n" "å…¨ã¦ç¶­æŒã™ã‚‹ã¨ã„ã†ç‚¹ã§ {#visibility}, {#scope}, {#namespace}, {#owner}属性ã¨" "ä¼¼ã¦ã„る。\n" "ã“ã®å±žæ€§ã‚’使ã£ã¦ã€ã‚ãªãŸã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒå¿…è¦ã¨ã™ã‚‹ã‹ã‚‚ã—れãªã„データを格ç´ã—\n" "ファイルã®è§£æžä¸­ã«ä¿å­˜ã™ã‚‹ã€‚\n" "ファイル全体ã®çŠ¶æ…‹ã®ä¿å­˜ãŒå¿…è¦ãªå ´åˆã€ {#globals} ã‚’å‚照。" # @return [OpenStruct] #: ../lib/yard/handlers/processor.rb:88 msgid "an open structure that can store arbitrary data" msgstr "ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ã‚’記録ã§ãã‚‹ç°¡å˜ãªæ§‹é€ ä½“" # @see #: ../lib/yard/handlers/processor.rb:88 msgid "tag|see|#globals" msgstr "" # YARD::Handlers::Processor#initialize #: ../lib/yard/handlers/processor.rb:91 msgid "Creates a new Processor for a +file+." msgstr "+file+ç”¨ã®æ–°ã—ã„Processorを作æˆã™ã‚‹" # @return [Processor] #: ../lib/yard/handlers/processor.rb:92 msgid "a new instance of Processor" msgstr "ãƒ—ãƒ­ã‚»ãƒƒã‚µãƒ¼ã®æ–°ã—ã„インスタンス" # @param [Array] # @param [Hash] #: ../lib/yard/handlers/processor.rb:92 ../lib/yard/tags/directives.rb:54 #: ../lib/yard/tags/library.rb:290 msgid "tag|param|parser" msgstr "" # @param [Integer] char_no #: ../lib/yard/handlers/processor.rb:92 msgid "the parser used to initialize the processor" msgstr "ãƒ—ãƒ­ã‚»ãƒƒã‚µã‚’åˆæœŸåŒ–ã™ã‚‹ãŸã‚ã«ä½¿ã£ãŸãƒ‘ーサー" # YARD::Handlers::Processor#process #: ../lib/yard/handlers/processor.rb:106 msgid "" "Processes a list of statements by finding handlers to process each\n" "one." msgstr "" "処ç†ã®å„自ã®å‡¦ç†ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒè¦‹ã¤ã‘ã‚‹ã“ã¨ã«ã‚ˆã£ã¦\n" "処ç†ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ãƒªã‚¹ãƒˆ\n" # @param [Array] statements #: ../lib/yard/handlers/processor.rb:110 msgid "a list of statements" msgstr "ステートメントã®ãƒªã‚¹ãƒˆ" # @param [Array] #: ../lib/yard/handlers/processor.rb:110 msgid "tag|param|statements" msgstr "statements" # YARD::Handlers::Processor#parse_remaining_files #: ../lib/yard/handlers/processor.rb:133 msgid "" "Continue parsing the remainder of the files in the +globals.ordered_parser+\n" "object. After the remainder of files are parsed, processing will continue\n" "on the current file." msgstr "" # @see #: ../lib/yard/handlers/processor.rb:138 msgid "tag|see|Parser::OrderedParser" msgstr "" # YARD::Handlers::Processor#find_handlers #: ../lib/yard/handlers/processor.rb:146 msgid "" "Searches for all handlers in {Base.subclasses} that match the +statement+" msgstr "" "+statement+ ã«ãƒžãƒƒãƒã™ã‚‹{Base.sublasses}ã®ä¸­ã®å…¨ã¦ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ç”¨ã«æ¤œç´¢ã™ã‚‹ã€‚" # @return [Array] #: ../lib/yard/handlers/processor.rb:149 msgid "a list of handlers to process the statement with." msgstr "ステートメントã¨å…±ã«å‡¦ç†ã™ã‚‹ç‚ºã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ãƒªã‚¹ãƒˆ" # @param statement #: ../lib/yard/handlers/processor.rb:149 msgid "the statement object to match." msgstr "オブジェクトã«ãƒžãƒƒãƒã™ã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ" # YARD::Handlers::Processor#handler_base_class #: ../lib/yard/handlers/processor.rb:169 msgid "Returns the handler base class" msgstr "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®baseクラスを返ã™" # @return [Base] #: ../lib/yard/handlers/processor.rb:170 msgid "the base class" msgstr "" # YARD::Handlers::Processor#handler_base_namespace #: ../lib/yard/handlers/processor.rb:175 msgid "The module holding the handlers to be loaded" msgstr "ロードã•れるãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’ä¿æŒã™ã‚‹,モジュール" # @return [Module] #: ../lib/yard/handlers/processor.rb:178 msgid "" "the module containing the handlers depending on\n" "{#parser_type}." msgstr "{#parser_type}メソッドã«ä¾å­˜ã—ã¦ã„ã‚‹ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’å«ã‚“ã§ã„ã‚‹,モジュール" # YARD::Handlers::Processor#load_handlers #: ../lib/yard/handlers/processor.rb:183 msgid "" "Loads handlers from {#handler_base_namespace}. This ensures that\n" "Ruby1.9 handlers are never loaded into 1.8; also lowers the amount\n" "of modules that are loaded" msgstr "" "{#handler_base_namespace}ã‹ã‚‰ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’ロードã™ã‚‹ã€‚\n" "ã“れã¯ãƒ­ãƒ¼ãƒ‰ã•れるモジュールã®é‡ã‚’減少ã•ã›ã‚‹ã¨å…±ã«\n" "Ruby1.9ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒ1.8ã§ãƒ­ãƒ¼ãƒ‰ã•れãªã„事をä¿è¨¼ã™ã‚‹ã€‚" # YARD::Handlers::Ruby::Legacy::AliasHandler # YARD::Handlers::Ruby::AliasHandler #: ../lib/yard/handlers/ruby/alias_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/alias_handler.rb:2 msgid "Handles alias and alias_method calls" msgstr "aliasã‚’æ“作ã—ã€alias_methodを呼ã³å‡ºã™ã€‚" # YARD::Handlers::Ruby::Legacy::AttributeHandler # YARD::Handlers::Ruby::AttributeHandler #: ../lib/yard/handlers/ruby/attribute_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/attribute_handler.rb:2 msgid "Handles +attr_*+ statements in modules/classes" msgstr "モジュール/クラスã®ä¸­ã® +attr_+ ステートメントをæ“作ã™ã‚‹ã€‚" # YARD::Handlers::Ruby::AttributeHandler#validated_attribute_names #: ../lib/yard/handlers/ruby/attribute_handler.rb:65 msgid "Strips out any non-essential arguments from the attr statement." msgstr "attrステートメントã‹ã‚‰ã€ä»»æ„ã®é‡è¦ã§ã¯ãªã„引数をå–り除ã" # @param [Array] params #: ../lib/yard/handlers/ruby/attribute_handler.rb:70 msgid "" "a list of the parameters\n" "in the attr call." msgstr "attrã®ä¸­ã§å‘¼ã°ã‚Œã‚‹å¼•æ•°ã®ãƒªã‚¹ãƒˆ" # @raise [Parser::UndocumentableError] #: ../lib/yard/handlers/ruby/attribute_handler.rb:70 msgid "if the arguments are not valid." msgstr "å¼•æ•°ãŒæœ‰åйã§ãªã„å ´åˆ" # @param [Array] # @param [Hash] #: ../lib/yard/handlers/ruby/attribute_handler.rb:70 #: ../lib/yard/templates/helpers/base_helper.rb:138 msgid "tag|param|params" msgstr "params" # @return [Array] #: ../lib/yard/handlers/ruby/attribute_handler.rb:70 msgid "the validated attribute names" msgstr "有効化ã•れãŸå±žæ€§å" # YARD::Handlers::Ruby::HandlesExtension #: ../lib/yard/handlers/ruby/base.rb:5 msgid "" "To implement a custom handler matcher, subclass this class and implement\n" "{#matches?} to return whether a node matches the handler." msgstr "" "カスタムãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ãƒžãƒƒãƒãƒ£ãƒ¼ã‚’実装ã™ã‚‹ã«ã¯ã€ã“ã®ã‚¯ãƒ©ã‚¹ã‚’サブクラス化ã™" "る。\n" "ãã—ã¦ã€ãƒŽãƒ¼ãƒ‰ãŒãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ãƒžãƒƒãƒã™ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã™ç‚ºã«{#matches?}メソッドを" "実装ã™ã‚‹ã€‚" # @example A Custom Handler Matcher Extension #: ../lib/yard/handlers/ruby/base.rb:18 msgid "" "# Implements a handler that checks for a specific string\n" "# in the node's source.\n" "class MyExtension < HandlesExtension\n" " def matches?(node) node.source.include?(name) end\n" "end\n" "\n" "# This handler will handle any node where the source includes 'foo'\n" "class MyHandler < Handlers::Ruby::Base\n" " handles MyExtension.new('foo')\n" "end" msgstr "" "# ç‰¹å®šã®æ–‡å­—列をãƒã‚§ãƒƒã‚¯ã™ã‚‹ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’実装ã™ã‚‹\n" "# ノードã®ã‚½ãƒ¼ã‚¹ã®ä¸­ã§\n" "class MyExtension < HandlesExtension\n" " def matches?(node) node.source.include?(name) end\n" "end\n" "\n" "# ã“ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯'foo'ã‚’å«ã‚“ã§ã„ã‚‹ã‚½ãƒ¼ã‚¹ã®æ‰€ã§ä»»æ„ã®ãƒŽãƒ¼ãƒ‰ã‚’æ“作ã™ã‚‹ã€‚\n" "class MyHandler < Handlers::Ruby::Base\n" " handles MyExtension.new('foo')\n" "end" # @example #: ../lib/yard/handlers/ruby/base.rb:18 msgid "tag|example|A Custom Handler Matcher Extension" msgstr "カスタムãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®ãƒžãƒƒãƒãƒ£ãƒ¼ã®æ‹¡å¼µ" # YARD::Handlers::Ruby::HandlesExtension#initialize #: ../lib/yard/handlers/ruby/base.rb:20 msgid "Creates a new extension with a specific matcher value +name+" msgstr "特定ã®ãƒžãƒƒãƒãƒ£ãƒ¼ã®å€¤ã® +name+ ã¨å…±ã«ã€æ–°ãŸãªæ‹¡å¼µã‚’作æˆã™ã‚‹" # @return [HandlesExtension] #: ../lib/yard/handlers/ruby/base.rb:21 msgid "a new instance of HandlesExtension" msgstr "HandlesExtensionã®æ–°ã—ã„インスタンス" # @param [Object] name #: ../lib/yard/handlers/ruby/base.rb:21 msgid "the matcher value to check against {#matches?}" msgstr "{#matches?}メソッドã«å‚™ãˆã¦ç¢ºèªã™ã‚‹,マッãƒãƒ£ãƒ¼ã®å€¤" # YARD::Handlers::Ruby::HandlesExtension#matches? #: ../lib/yard/handlers/ruby/base.rb:24 msgid "Tests if the node matches the handler" msgstr "ノードãŒãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ãƒžãƒƒãƒã™ã‚‹å ´åˆã€ãƒ†ã‚¹ãƒˆã™ã‚‹ã€‚" # @param [Parser::Ruby::AstNode] node #: ../lib/yard/handlers/ruby/base.rb:26 msgid "a Ruby node" msgstr "Rubyã®ãƒŽãƒ¼ãƒ‰" # @param [Parser::Ruby::AstNode] #: ../lib/yard/handlers/ruby/base.rb:26 msgid "tag|param|node" msgstr "node" # @return [Boolean] #: ../lib/yard/handlers/ruby/base.rb:26 msgid "whether the +node+ matches the handler" msgstr "+node+ ãŒãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ãƒžãƒƒãƒã™ã‚‹ã‹ã©ã†ã‹" # @return [String] #: ../lib/yard/handlers/ruby/base.rb:31 msgid "the extension matcher value" msgstr "æ‹¡å¼µã®ãƒžãƒƒãƒãƒ£ãƒ¼ã®å€¤" # YARD::Handlers::Ruby::Base #: ../lib/yard/handlers/ruby/base.rb:55 msgid "" "This is the base handler class for the new-style (1.9) Ruby parser.\n" "All handlers that subclass this base class will be used when the\n" "new-style parser is used. For implementing legacy handlers, see\n" "{Legacy::Base}." msgstr "" "ã“れã¯ã€æ–°ã—ã„(1.9用)Rubyパーサー用ã®åŸºæœ¬ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚¯ãƒ©ã‚¹ã¨ãªã‚‹ã€‚\n" "ã“ã®åŸºæœ¬ã‚¯ãƒ©ã‚¹ã‹ã‚‰ã‚µãƒ–クラス化ã™ã‚‹å…¨ã¦ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¯ã€\n" "æ–°ã—ã„スタイルã®ãƒ‘ãƒ¼ã‚µãƒ¼ã‚’ä½¿ã†æ™‚ã«åˆ©ç”¨ã•れる。\n" "レガシーãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã®å®Ÿè£…ã«ã¯ã€{Legacy::Base}ã‚’å‚照。" # @abstract #: ../lib/yard/handlers/ruby/base.rb:62 msgid "See {Handlers::Base} for subclassing information." msgstr "ã‚µãƒ–ã‚¯ãƒ©ã‚¹åŒ–ç”¨ã®æƒ…å ±ã«ã¯ã€{Handlers::Base}ã‚’å‚ç…§" # @see #: ../lib/yard/handlers/ruby/base.rb:62 msgid "tag|see|Legacy::Base" msgstr "" # YARD::Handlers::Ruby::Base.method_call #: ../lib/yard/handlers/ruby/base.rb:69 msgid "" "Matcher for handling any type of method call. Method calls can\n" "be expressed by many {AstNode} types depending on the syntax\n" "with which it is called, so YARD allows you to use this matcher\n" "to simplify matching a method call." msgstr "" "ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã®åž‹ã‚’æ“作ã™ã‚‹ç‚ºã®ãƒžãƒƒãƒãƒ£ãƒ¼\n" "メソッド呼ã³å‡ºã—ã¯ã€\n" "æ§‹æ–‡ã‹ã‚‰å¤šãã®{AstNode}åž‹ã¨ãªã£ã¦è¡¨ã•れ\n" "呼ã³å‡ºã™äº‹ãŒã§ãる。\n" "ãªã®ã§ã€YARDã¯\n" "ã‚ãªãŸãŒãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã®ãƒžãƒƒãƒã‚’ç°¡å˜ã«ã™ã‚‹ç‚ºã«\n" "ã“ã®ãƒžãƒƒãƒãƒ£ãƒ¼ã‚’使ã†äº‹ã‚’許å¯ã™ã‚‹ã€‚" # YARD::Handlers::Ruby::Base.method_call # YARD::Handlers::Ruby::Base.meta_type #: ../lib/yard/handlers/ruby/base.rb:83 ../lib/yard/handlers/ruby/base.rb:102 msgid "Statement Matcher Extensions" msgstr "ステートメントマッãƒãƒ£ãƒ¼ã®æ‹¡å¼µ" # @example Match the "describe" method call #: ../lib/yard/handlers/ruby/base.rb:83 msgid "" "handles method_call(:describe)\n" "\n" "# The following will be matched:\n" "# describe(...)\n" "# object.describe(...)\n" "# describe \"argument\" do ... end" msgstr "" # @param [#to_s] name #: ../lib/yard/handlers/ruby/base.rb:83 msgid "matches the method call of this name" msgstr "ã“ã®åå‰ã®ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã®ãƒžãƒƒãƒãƒ£ãƒ¼" # @example #: ../lib/yard/handlers/ruby/base.rb:83 msgid "tag|example|Match the \"describe\" method call" msgstr "\"describe\"メソッド呼ã³å‡ºã—ã«ãƒžãƒƒãƒã™ã‚‹" # YARD::Handlers::Ruby::Base.meta_type #: ../lib/yard/handlers/ruby/base.rb:88 msgid "" "Matcher for handling a node with a specific meta-type. An {AstNode}\n" "has a {AstNode#type} to define its type but can also be associated\n" "with a set of types. For instance, +:if+ and +:unless+ are both\n" "of the meta-type +:condition+." msgstr "" "特定ã®ãƒ¡ã‚¿ã‚¿ã‚¤ãƒ—ã¨å…±ã«ãƒŽãƒ¼ãƒ‰ã‚’処ç†ã™ã‚‹ç‚ºã®ãƒžãƒƒãƒãƒ£ãƒ¼ã€‚\n" "{AstNode}ã¯AstNodeã®åž‹ã‚’定義ã™ã‚‹ç‚ºã«\n" "{AstNode#type}メソッドをæŒã£ã¦ã„る。\n" "ã—ã‹ã—ã€åž‹ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¨å…±ã«é–¢é€£ä»˜ã‘る事もã§ãる。\n" "例ãˆã°ã€ +:if+ 㨠+:unless+ ã¯ã€ä¸¡æ–¹ã¨ã‚‚ +:condition+ ã®ãƒ¡ã‚¿ã‚¿ã‚¤ãƒ—ã¨ãªã‚‹ã€‚" # YARD::Handlers::Ruby::Base.meta_type #: ../lib/yard/handlers/ruby/base.rb:93 msgid "" "A meta-type is any method on the {AstNode} class ending in \"?\",\n" "though you should not include the \"?\" suffix in your declaration.\n" "Some examples are: \"condition\", \"call\", \"literal\", \"kw\", \"token\",\n" "\"ref\"." msgstr "" "メタタイプã¯ã€\"?\"ã§çµ‚ã‚ã‚‹{AstNode}クラスã®ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ã‚る。\n" "ãªã®ã§ã€ã‚ãªãŸã¯ã€è‡ªèº«ã®å®£è¨€ã®ä¸­ã§\"?\"サフィックスをå«ã‚€ã¹ãã§ã¯ãªã„。\n" "ã„ãã¤ã‹ã®ä¾‹ã‚’上ã’ã‚‹ã¨ã€\"condition\", \"call\", \"literal\", \"kw\", \"token" "\",\"ref\" ã¨ãªã‚‹ã€‚" # @example Handling any conditional statement (if, unless) #: ../lib/yard/handlers/ruby/base.rb:102 msgid "handles meta_type(:condition)" msgstr "" # @example #: ../lib/yard/handlers/ruby/base.rb:102 msgid "tag|example|Handling any conditional statement (if, unless)" msgstr "ä»»æ„ã®æ¡ä»¶æ–‡(if, unless)ã‚’æ“作ã™ã‚‹" # @param [Symbol] type #: ../lib/yard/handlers/ruby/base.rb:102 msgid "" "the meta-type to match. A meta-type can be\n" "any method name + \"?\" that {AstNode} responds to." msgstr "" "マッãƒã™ã‚‹ãƒ¡ã‚¿ã‚¿ã‚¤ãƒ—。\n" "メタタイプã¯ã€{AstNode}ã«å¯¾å¿œã™ã‚‹ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰å + \"?\" ã§ã§ãる。" # YARD::Handlers::Ruby::Base.handles? #: ../lib/yard/handlers/ruby/base.rb:110 msgid "Testing for a Handler" msgstr "ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ç”¨ã«ãƒ†ã‚¹ãƒˆã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/handlers/ruby/base.rb:110 msgid "" "whether or not an {AstNode} object should be\n" "handled by this handler" msgstr "{AstNode}オブジェクトã¯ã“ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ã‚ˆã£ã¦å‡¦ç†ã•れるã‹ã©ã†ã‹" # YARD::Handlers::Ruby::Base#call_params # YARD::Handlers::Ruby::Base#caller_method #: ../lib/yard/handlers/ruby/base.rb:141 ../lib/yard/handlers/ruby/base.rb:152 msgid "Macro Handling" msgstr "マクロを処ç†ã™ã‚‹" # YARD::Handlers::Ruby::Legacy::ClassConditionHandler # YARD::Handlers::Ruby::ClassConditionHandler #: ../lib/yard/handlers/ruby/class_condition_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/class_condition_handler.rb:2 msgid "" "Matches if/unless conditions inside classes and attempts to process only\n" "one branch (by evaluating the condition if possible)." msgstr "" "クラス内部ã®if/unlessæ¡ä»¶ã«ãƒžãƒƒãƒã—ã€ä¸€ã¤ã®ãƒ–ランãƒã ã‘を処ç†ã™ã‚‹ã€‚(æ¡ä»¶ã‚’è©•" "価ã—å¯èƒ½ãªã‚‰ã°)" # @example A simple class conditional #: ../lib/yard/handlers/ruby/class_condition_handler.rb:11 msgid "" "class Foo\n" " if 0\n" " # This method is ignored\n" " def xyz; end\n" " end\n" "end" msgstr "" "class Foo\n" " if 0\n" " # ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ç„¡è¦–ã•れる\n" " def xyz; end\n" " end\n" "end" # @example #: ../lib/yard/handlers/ruby/class_condition_handler.rb:11 msgid "tag|example|A simple class conditional" msgstr "ã‚·ãƒ³ãƒ—ãƒ«ãªæ¡ä»¶ã®ã‚¯ãƒ©ã‚¹" # YARD::Handlers::Ruby::Legacy::ClassConditionHandler#parse_condition # YARD::Handlers::Ruby::ClassConditionHandler#parse_condition #: ../lib/yard/handlers/ruby/class_condition_handler.rb:31 #: ../lib/yard/handlers/ruby/legacy/class_condition_handler.rb:23 msgid "Parses the condition part of the if/unless statement" msgstr "if/unlessステートメントã®éƒ¨åˆ†ã®æ¡ä»¶ã‚’è§£æžã™ã‚‹ã€‚" # @return [true, false, nil] #: ../lib/yard/handlers/ruby/class_condition_handler.rb:35 #: ../lib/yard/handlers/ruby/legacy/class_condition_handler.rb:28 msgid "" "true if the condition can be definitely\n" "parsed to true, false if not, and nil if the condition cannot be\n" "parsed with certainty (it's dynamic)" msgstr "" "æ¡ä»¶ãŒé–“é•ã„ãªãè§£æžã§ãã‚‹å ´åˆã€true\n" "ãã†ã§ãªã„å ´åˆã€falseã‚„ã€\n" "æ¡ä»¶ãŒå®Œç’§ã«è§£æžã§ããªã„å ´åˆã€nilã¨ãªã‚‹ã€‚\n" "(it's dynamic)" # YARD::Handlers::Ruby::Legacy::ClassHandler # YARD::Handlers::Ruby::ClassHandler #: ../lib/yard/handlers/ruby/class_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/class_handler.rb:2 msgid "Handles class declarations" msgstr "クラスã®å®£è¨€ã‚’æ“作ã™ã‚‹" # YARD::Handlers::Ruby::ClassHandler#extract_parameters # YARD::Handlers::Ruby::ConstantHandler#extract_parameters #: ../lib/yard/handlers/ruby/class_handler.rb:63 #: ../lib/yard/handlers/ruby/constant_handler.rb:35 msgid "" "Extract the parameters from the Struct.new AST node, returning them as a " "list\n" "of strings" msgstr "" "パラメータをStrct.new Astノードã‹ã‚‰æŠ½å‡ºã—ã€æ–‡å­—列ã®ãƒªã‚¹ãƒˆã¨ã—ã¦Astノードを返" "ã™ã€‚" # @param [MethodCallNode] # @param [String] #: ../lib/yard/handlers/ruby/class_handler.rb:67 #: ../lib/yard/handlers/ruby/constant_handler.rb:39 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:91 msgid "tag|param|superclass" msgstr "superclass" # @param [MethodCallNode] superclass #: ../lib/yard/handlers/ruby/class_handler.rb:67 #: ../lib/yard/handlers/ruby/constant_handler.rb:39 msgid "the AST node for the Struct.new call" msgstr "Struct.new呼ã³å‡ºã—用ã®ASTノード" # @return [Array] #: ../lib/yard/handlers/ruby/class_handler.rb:67 #: ../lib/yard/handlers/ruby/constant_handler.rb:39 msgid "the member names to generate methods for" msgstr "memberåã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’生æˆã™ã‚‹,memberå" # YARD::Handlers::Ruby::Legacy::ClassVariableHandler # YARD::Handlers::Ruby::ClassVariableHandler #: ../lib/yard/handlers/ruby/class_variable_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/class_variable_handler.rb:2 msgid "Handles a class variable (@@variable)" msgstr "クラス変数をæ“作ã™ã‚‹(@@変数)" # YARD::Handlers::Ruby::Legacy::ConstantHandler # YARD::Handlers::Ruby::ConstantHandler #: ../lib/yard/handlers/ruby/comment_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/comment_handler.rb:2 msgid "Handles any lone comment statement in a Ruby file" msgstr "Rubyã®ãƒ•ァイルã®ä¸­ã®ä»»æ„ã®å˜ä¸€ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’æ“作ã™ã‚‹" # YARD::Handlers::Ruby::Legacy::ConstantHandler # YARD::Handlers::Ruby::ConstantHandler #: ../lib/yard/handlers/ruby/constant_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/constant_handler.rb:2 msgid "Handles any constant assignment" msgstr "ä»»æ„ã®å®šæ•°å‰²ã‚Šå½“ã¦ã‚’æ“作ã™ã‚‹" # YARD::Handlers::Ruby::Legacy::MacroHandler # YARD::Handlers::Ruby::MacroHandler #: ../lib/yard/handlers/ruby/dsl_handler.rb:5 #: ../lib/yard/handlers/ruby/legacy/dsl_handler.rb:6 msgid "Handles automatic detection of dsl-style methods" msgstr "DSLスタイルã®ãƒ¡ã‚½ãƒƒãƒ‰ã®è‡ªå‹•宣言をæ“作ã™ã‚‹" # YARD::Handlers::Ruby::Legacy::ExceptionHandler # YARD::Handlers::Ruby::ExceptionHandler #: ../lib/yard/handlers/ruby/exception_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/exception_handler.rb:2 msgid "Handles 'raise' calls inside methods" msgstr "メソッドã®å†…部ã§å‘¼ã³å‡ºã™'raise'ã‚’æ“作ã™ã‚‹" # YARD::Handlers::Ruby::Legacy::ExtendHandler # YARD::Handlers::Ruby::ExtendHandler #: ../lib/yard/handlers/ruby/extend_handler.rb:2 #: ../lib/yard/handlers/ruby/legacy/extend_handler.rb:2 msgid "" "Handles 'extend' call to include modules into the class scope of another" msgstr "" "ä»–ã®ã‚¯ãƒ©ã‚¹ã‚¹ã‚³ãƒ¼ãƒ—ã®ä¸­ã¸ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’å«ã‚る為ã«ã€'extend'呼ã³å‡ºã—ã‚’æ“作ã™ã‚‹ã€‚" # @see #: ../lib/yard/handlers/ruby/extend_handler.rb:3 msgid "tag|see|MixinHandler" msgstr "" # YARD::Handlers::Ruby::Legacy::Base #: ../lib/yard/handlers/ruby/legacy/base.rb:5 msgid "" "This is the base handler for the legacy parser. To implement a legacy\n" "handler, subclass this class." msgstr "" "ã“れã¯ã€legacy parser用ã®base handlerã¨ãªã‚‹ã€‚\n" "legacy handlerã®å®Ÿè£…ã«ã¯ã€ã“ã®ã‚¯ãƒ©ã‚¹ã‚’サブクラスã«ã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/handlers/ruby/legacy/base.rb:14 msgid "" "whether or not a {Parser::Ruby::Legacy::Statement} object should be handled\n" "by this handler." msgstr "" "{Parser::Ruby::Legacy::Statement}オブジェクトãŒã€\n" "ã“ã®ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã«ã‚ˆã£ã¦æ“作ã•れるã‹ã©ã†ã‹" # YARD::Handlers::Ruby::Legacy::Base#parse_block #: ../lib/yard/handlers/ruby/legacy/base.rb:28 msgid "" "Parses a statement's block with a set of state values. If the\n" "statement has no block, nothing happens. A description of state\n" "values can be found at {Handlers::Base#push_state}" msgstr "" "値ã®çŠ¶æ…‹ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¨å…±ã«ã€ãƒ–ロックã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’è§£æžã™ã‚‹ã€‚\n" "ステートメントãŒãƒ–ロックをæŒãŸãªã„å ´åˆã€ä½•ã‚‚èµ·ã“らãªã„。\n" "値ã®çŠ¶æ…‹ã®èª¬æ˜Žã¯ã€{Handlers::Base#push_state}ã§è¦‹ã¤ã‘られる。" # @see Handlers::Base#push_state #: ../lib/yard/handlers/ruby/legacy/base.rb:34 msgid "#push_state" msgstr "" # @param [Hash] opts #: ../lib/yard/handlers/ruby/legacy/base.rb:34 msgid "State options" msgstr "オプションã®çŠ¶æ…‹" # @see #: ../lib/yard/handlers/ruby/legacy/base.rb:34 msgid "tag|see|Handlers::Base#push_state" msgstr "" # YARD::Handlers::Ruby::Legacy::Base#extract_method_details #: ../lib/yard/handlers/ruby/legacy/base.rb:67 msgid "Extracts method information for macro expansion only" msgstr "" # @todo #: ../lib/yard/handlers/ruby/legacy/base.rb:71 msgid "This is a duplicate implementation of {MethodHandler}. Refactor." msgstr "" # @return [Array>>] #: ../lib/yard/handlers/ruby/legacy/base.rb:71 msgid "" "the method name followed by method\n" "arguments (name and optional value)" msgstr "" # YARD::Handlers::Ruby::Legacy::Base#tokval #: ../lib/yard/handlers/ruby/legacy/base.rb:85 msgid "" "The string value of a token. For example, the return value for the symbol :" "sym\n" "would be :sym. The return value for a string +\"foo #{ bar}\"+ would be the " "literal\n" "+\"foo #{ bar}\"+ without any interpolation. The return value of the " "identifier\n" "'test' would be the same value: 'test'. Here is a list of common types and\n" "their return values:" msgstr "" "ãƒˆãƒ¼ã‚¯ãƒ³ã®æ–‡å­—列ã®å€¤ã€‚例ãˆã°ã€ã‚·ãƒ³ãƒœãƒ«:sym用ã«è¿”ã™å€¤ã¯ã€:symã«ãªã‚‹ã€‚\n" "文字列 +\"foo #{ bar}\"+ 用ã«è¿”ã™å€¤ã¯ã€è£œå®Œã‚’å«ã¾ãªã„ +\"foo #{ bar}\"+ リテ" "ラルã«ãªã‚‹ã€‚\n" "'test'識別å­ã®è¿”ã™å€¤ã¯ã€'test'ã¨åŒã˜å€¤ã«ãªã‚‹ã ã‚ã†ã€‚\n" "ã“ã“ã§ã¯ã€ä¸€èˆ¬çš„ãªåž‹ã®ãƒªã‚¹ãƒˆã‚„ãれらã®å€¤ã‚’è¿”ã™ã€‚" # @param [Array>, Symbol] accepted_types #: ../lib/yard/handlers/ruby/legacy/base.rb:116 msgid "" "The allowed token types that this token can be. Defaults to [{TkVal}].\n" "A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return\n" "the token's value if it is either of those types. If +TkVal+ is accepted,\n" "+TkNode+ is also accepted.\n" "\n" "Certain symbol keys are allowed to specify multiple types in one fell " "swoop.\n" "These symbols are:\n" " :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+\n" " :attr => +TkSYMBOL+ and +TkSTRING+\n" " :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+.\n" " :number => +TkFLOAT+, +TkINTEGER+" msgstr "" "トークンã«ã§ãã‚‹å—ã‘入れられるトークンã®åž‹ã¨ãªã‚‹ã€‚\n" "デフォルトã§ã¯ã€[{TkVal}]ã«ãªã‚‹ã€‚\n" "åž‹ã®ãƒªã‚¹ãƒˆã«ãªã‚‹ã€\n" "\n" "例ãˆã°ã€[+TkSTRING+, +TkSYMBOL+]ã¯ã€\n" "ã©ã¡ã‚‰ã‹ãŒã“れらã®åž‹ã®å ´åˆã€ãƒˆãƒ¼ã‚¯ãƒ³ã®å€¤ã‚’è¿”ã™ã€‚\n" "+TkVal+ãŒå—ã‘入れられる場åˆã€+TkNode+ã‚‚å—ã‘入れられる。\n" "\n" "特定ã®ã‚·ãƒ³ãƒœãƒ«ã‚­ãƒ¼ã¯ã€ä¸€ã¤ã§è¤‡æ•°ã®åž‹ã‚’ä¸€æ°—ã«æŒ‡å®šã™ã‚‹ç‚ºã«å—ã‘入れられる。\n" "ã“ã®ã‚ˆã†ãªã‚·ãƒ³ãƒœãƒ«ã¨ãªã‚‹:\n" " :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+\n" " :attr => +TkSYMBOL+ and +TkSTRING+\n" " :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+.\n" " :number => +TkFLOAT+, +TkINTEGER+" # @param [Token] token #: ../lib/yard/handlers/ruby/legacy/base.rb:116 msgid "The token of the class" msgstr "クラスã®ãƒˆãƒ¼ã‚¯ãƒ³" # @return [nil] #: ../lib/yard/handlers/ruby/legacy/base.rb:116 msgid "if the token is not any of the specified accepted types" msgstr "ãƒˆãƒ¼ã‚¯ãƒ³ãŒæŒ‡å®šã•れå—ã‘入れられる型ã®ã©ã‚Œã§ã‚‚ãªã„å ´åˆã€" # @return [Object] #: ../lib/yard/handlers/ruby/legacy/base.rb:116 msgid "" "if the token is one of the accepted types, in its real value form.\n" "It should be noted that identifiers and constants are kept in String form." msgstr "" "トークンãŒå—ã‘入れられる型ã®ä¸€ã¤ã®å ´åˆã€ãã®ä¸­ã¯ã€å®Ÿéš›ã®å€¤ã®å½¢å¼ã«ãªã‚‹ã€‚\n" "ãã—ã¦ã€è­˜åˆ¥å­ã¨å®šæ•°ãŒStringå½¢å¼ã§æ³¨é‡ˆã•れる。" # @param [Array>, Symbol] # @param [Array>] #: ../lib/yard/handlers/ruby/legacy/base.rb:116 #: ../lib/yard/handlers/ruby/legacy/base.rb:182 msgid "tag|param|accepted_types" msgstr "accepted_types" # @param [Token] #: ../lib/yard/handlers/ruby/legacy/base.rb:116 msgid "tag|param|token" msgstr "token" # @example #: ../lib/yard/handlers/ruby/legacy/base.rb:116 msgid "" "tokval(TokenList.new('\"foo\"').first) => \"foo\"\n" "tokval(TokenList.new(':foo').first) => :foo\n" "tokval(TokenList.new('CONSTANT').first, RubyToken::TkId) => \"CONSTANT\"\n" "tokval(TokenList.new('identifier').first, RubyToken::TkId) => \"identifier" "\"\n" "tokval(TokenList.new('3.25').first) => 3.25\n" "tokval(TokenList.new('/xyz/i').first) => /xyz/i" msgstr "" # YARD::Handlers::Ruby::Legacy::Base#tokval_list #: ../lib/yard/handlers/ruby/legacy/base.rb:162 msgid "" "Returns a list of symbols or string values from a statement.\n" "The list must be a valid comma delimited list, and values\n" "will only be returned to the end of the list only." msgstr "" "ステートメントã‹ã‚‰ã€ã‚·ãƒ³ãƒœãƒ«,åˆã¯,文字列ã®å€¤ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ã€‚\n" "リストã¯ã€æœ‰åйãªã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸãƒªã‚¹ãƒˆã§ãªã‘れã°ãªã‚‰ãªã„ã€\n" "ãã—ã¦ã€å€¤ã¯ãƒªã‚¹ãƒˆã§è¿”ã•れるã ã‘ã«ã—ãªã‘れã°ãªã‚‰ãªã„。" # YARD::Handlers::Ruby::Legacy::Base#tokval_list #: ../lib/yard/handlers/ruby/legacy/base.rb:166 msgid "" "Example:\n" " attr_accessor :a, 'b', :c, :d => ['a', 'b', 'c', 'd']\n" " attr_accessor 'a', UNACCEPTED_TYPE, 'c' => ['a', 'c']" msgstr "" # YARD::Handlers::Ruby::Legacy::Base#tokval_list #: ../lib/yard/handlers/ruby/legacy/base.rb:170 msgid "" "The tokval list of a {Parser::Ruby::Legacy::TokenList} of the above\n" "code would be the {#tokval} value of :a, 'b',\n" ":c and :d." msgstr "" "上ã®ã‚³ãƒ¼ãƒ‰{Parser::Ruby::Legacy::TokenList}ã®tokvalã®ãƒªã‚¹ãƒˆã¯ã€\n" ":a, 'b', :c, :d ã®å…¥ã£ãŸ{#tokval}ã®å€¤ã«ãªã‚‹ã€‚" # YARD::Handlers::Ruby::Legacy::Base#tokval_list #: ../lib/yard/handlers/ruby/legacy/base.rb:174 msgid "" "It should also be noted that this function stops immediately at\n" "any ruby keyword encountered:\n" " \"attr_accessor :a, :b, :c if x == 5\" => ['a', 'b', 'c']" msgstr "" "ãれã¯ã€ã“ã®æ©Ÿèƒ½ãŒä»»æ„ã®rubyキーワードãŒå‡ºä¼šã£ãŸæ‰€ã§ã€\n" "ç›´å¾Œã«æ­¢ã‚ã¦æ³¨é‡ˆã•れる。\n" " \"attr_accessor :a, :b, :c if x == 5\" => ['a', 'b', 'c']" # @param [TokenList] tokenlist #: ../lib/yard/handlers/ruby/legacy/base.rb:182 msgid "The list of tokens to process." msgstr "処ç†ã•れるトークンã®ãƒªã‚¹ãƒˆ" # @return [Array] #: ../lib/yard/handlers/ruby/legacy/base.rb:182 msgid "if there are no symbols or Strings in the list" msgstr "ã‚·ãƒ³ãƒœãƒ«ã‚„ãƒªã‚¹ãƒˆã®æ–‡å­—列ãŒãªã„å ´åˆ" # @param [Array>] accepted_types #: ../lib/yard/handlers/ruby/legacy/base.rb:182 msgid "passed to {#tokval}" msgstr "{#tokval}ã«æ¸¡ã•れる" # @param [TokenList] #: ../lib/yard/handlers/ruby/legacy/base.rb:182 msgid "tag|param|tokenlist" msgstr "tokenlist" # @see #: ../lib/yard/handlers/ruby/legacy/base.rb:182 msgid "tag|see|#tokval" msgstr "" # @return [Array] #: ../lib/yard/handlers/ruby/legacy/base.rb:182 msgid "the list of tokvalues in the list." msgstr "リストã®ä¸­ã®tokvaluesã®ãƒªã‚¹ãƒˆ" # YARD::Handlers::Ruby::Legacy::ClassHandler#extract_parameters #: ../lib/yard/handlers/ruby/legacy/class_handler.rb:62 msgid "" "Extracts the parameter list from the Struct.new declaration and returns it\n" "formatted as a list of member names. Expects the user will have used " "symbols\n" "to define the struct member names" msgstr "" "Struct.new宣言ã‹ã‚‰ã€å¼•æ•°ã®ãƒªã‚¹ãƒˆã‚’抽出ã—ã€\n" "ãれをメンãƒãƒ¼åã®ãƒªã‚¹ãƒˆã¨ã—ã¦ã€æ›¸å¼åŒ–ã—ã¦è¿”ã™\n" "ユーザーã¯ã€structメンãƒãƒ¼åを定義ã™ã‚‹ç‚ºã«ã€ã‚·ãƒ³ãƒœãƒ«ã‚’\n" "利用ã™ã‚‹äº‹ã‚’è¦æ±‚ã™ã‚‹ã ã‚ã†ã€‚" # @return [Array] # @param [Array] members #: ../lib/yard/handlers/ruby/legacy/class_handler.rb:67 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:133 msgid "a list of member names" msgstr "メンãƒãƒ¼åã®ãƒªã‚¹ãƒˆ" # @param [String] #: ../lib/yard/handlers/ruby/legacy/class_handler.rb:67 msgid "tag|param|superstring" msgstr "superstring" # @param [String] superstring #: ../lib/yard/handlers/ruby/legacy/class_handler.rb:67 msgid "the string declaring the superclass" msgstr "文字列ã§å®£è¨€ã—ã¦ã„ã‚‹superclass" # YARD::Handlers::Ruby::Legacy::MethodHandler # YARD::Handlers::Ruby::MethodHandler #: ../lib/yard/handlers/ruby/legacy/method_handler.rb:2 #: ../lib/yard/handlers/ruby/method_handler.rb:2 msgid "Handles a method definition" msgstr "メソッドã®å®šç¾©ã‚’æ“作ã™ã‚‹" # YARD::Handlers::Ruby::Legacy::MixinHandler # YARD::Handlers::Ruby::MixinHandler #: ../lib/yard/handlers/ruby/legacy/mixin_handler.rb:2 #: ../lib/yard/handlers/ruby/mixin_handler.rb:2 msgid "Handles the 'include' statement to mixin a module in the instance scope" msgstr "" "インスタンススコープã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’mixinã™ã‚‹ç‚ºã«ã€'include'ステートメントをæ“" "作ã™ã‚‹ã€‚" # YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler # YARD::Handlers::Ruby::ModuleFunctionHandler #: ../lib/yard/handlers/ruby/legacy/module_function_handler.rb:2 #: ../lib/yard/handlers/ruby/module_function_handler.rb:2 msgid "" "Handles module_function calls to turn methods into public class methods.\n" "Also creates a private instance copy of the method." msgstr "" # YARD::Handlers::Ruby::Legacy::ModuleHandler # YARD::Handlers::Ruby::ModuleHandler #: ../lib/yard/handlers/ruby/legacy/module_handler.rb:2 #: ../lib/yard/handlers/ruby/module_handler.rb:2 msgid "Handles the declaration of a module" msgstr "モジュールã®å®£è¨€ã‚’æ“作ã™ã‚‹" # YARD::Handlers::Ruby::Legacy::PrivateConstantHandler # YARD::Handlers::Ruby::PrivateConstantHandler #: ../lib/yard/handlers/ruby/legacy/private_constant_handler.rb:2 #: ../lib/yard/handlers/ruby/private_constant_handler.rb:2 msgid "Sets visibility of a constant (class, module, const)" msgstr "定数ã®å¯è¦–性を設定ã™ã‚‹(クラス,モジュール,定数)" # YARD::Handlers::Ruby::Legacy::VisibilityHandler # YARD::Handlers::Ruby::VisibilityHandler #: ../lib/yard/handlers/ruby/legacy/visibility_handler.rb:2 #: ../lib/yard/handlers/ruby/visibility_handler.rb:2 msgid "Handles 'private', 'protected', and 'public' calls." msgstr "'private', 'protected', 'public' 呼ã³å‡ºã—ã‚’æ“作ã™ã‚‹ã€‚" # YARD::Handlers::Ruby::Legacy::YieldHandler # YARD::Handlers::Ruby::YieldHandler #: ../lib/yard/handlers/ruby/legacy/yield_handler.rb:2 #: ../lib/yard/handlers/ruby/yield_handler.rb:2 msgid "Handles 'yield' calls" msgstr "'yield'を呼ã³å‡ºã—æ“作ã™ã‚‹" # YARD::Handlers::Ruby::MethodConditionHandler #: ../lib/yard/handlers/ruby/method_condition_handler.rb:2 msgid "Handles a conditional inside a method" msgstr "メソッドã®å†…éƒ¨ã®æ¡ä»¶ã‚’æ“作ã™ã‚‹" # YARD::Handlers::Ruby::StructHandlerMethods #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:2 msgid "Helper methods to parse @attr_* tags on a class." msgstr "クラスã®@attr_* ã‚¿ã‚°ã‚’è§£æžã™ã‚‹ç‚ºã®Helperメソッド" # @deprecated #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:6 msgid "" "The use of +@attr+ tags are deprecated since 0.8.0 in favour of\n" "the +@!attribute+ directive. This module should not be relied on." msgstr "" # YARD::Handlers::Ruby::StructHandlerMethods#member_tag_for_member #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:10 msgid "" "Extracts the user's defined @member tag for a given class and its member. " "Returns\n" "nil if the user did not define a @member tag for this struct entry." msgstr "" "与ãˆã‚‰ã‚ŒãŸã‚¯ãƒ©ã‚¹ã¨ãã®ãƒ¡ãƒ³ãƒãƒ¼ç”¨ã«\n" "ユーザーã®å®šç¾©ã—ãŸ@memberタグを抽出ã™ã‚‹ã€‚\n" "ã“ã®æ§‹é€ ä½“ã®ç™»éŒ²ç”¨ã®@memberã‚¿ã‚°ãŒæœªå®šç¾©ã ã£ãŸå ´åˆã€nilã‚’è¿”ã™ã€‚" # @param [Symbol] type #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:16 msgid "reader method, or writer method?" msgstr "readerメソッドã‹writerメソッドã‹?" # @param [ClassObject] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:16 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:25 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:37 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:61 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:76 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:103 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:120 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:133 msgid "tag|param|klass" msgstr "klass" # @param [String] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:16 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:37 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:61 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:76 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:103 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:120 msgid "tag|param|member" msgstr "member" # @param [ClassObject] klass #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:16 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:37 msgid "the class whose tags we're searching" msgstr "検索ã—ã¦ã„ã‚‹ã‚¿ã‚°ã®ã‚¯ãƒ©ã‚¹" # @param [String] member #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:16 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:37 msgid "the name of the struct member we need" msgstr "å¿…è¦ã¨ã™ã‚‹æ§‹é€ ä½“memberã®åå‰" # @return [Tags::Tag, nil] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:16 msgid "the tag matching the request, or nil if not found" msgstr "マッãƒã—ã¦ã„ã‚‹ã‚¿ã‚°ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã€è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯ã€nil" # YARD::Handlers::Ruby::StructHandlerMethods#members_from_tags #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:22 msgid "Retrieves all members defined in @attr* tags" msgstr "@attr* ã‚¿ã‚°ã®ä¸­ã§å®šç¾©ã—ãŸå…¨ã¦ã®ãƒ¡ãƒ³ãƒãƒ¼ã‚’回åŽã™ã‚‹" # @param [ClassObject] klass #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:25 msgid "the class with the attributes" msgstr "属性ã¨ä¸€ç·’ã®ã‚¯ãƒ©ã‚¹" # @return [Array] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:25 msgid "the list of members defined as attributes on the class" msgstr "クラス上ã®å±žæ€§ã¨ã—ã¦ã€å®šç¾©ã—ãŸãƒ¡ãƒ³ãƒãƒ¼ã®ãƒªã‚¹ãƒˆ" # YARD::Handlers::Ruby::StructHandlerMethods#create_member_method? #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:31 msgid "" "Determines whether to create an attribute method based on the class's\n" "tags." msgstr "クラス上ã§ã€åŸºåº•ã®ãƒ¡ã‚½ãƒƒãƒ‰å±žæ€§ã‚’作æˆã™ã‚‹ã‹ã©ã†ã‹ã€ç¢ºå®šã™ã‚‹ã€‚" # @param [Symbol] type #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:37 msgid "(:read) reader method, or writer method?" msgstr "(:read) readerメソッドã‹ã€writerメソッドã‹?" # @return [Boolean] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:37 msgid "should the attribute be created?" msgstr "属性ãŒä½œæˆã•れるã‹ã©ã†ã‹?" # YARD::Handlers::Ruby::StructHandlerMethods#return_type_from_tag #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:45 msgid "" "Gets the return type for the member in a nicely formatted string. Used\n" "to be injected into auto-generated docstrings." msgstr "" "ã‚ˆã‚Šè‰¯ãæ›¸å¼åŒ–ã•ã‚ŒãŸæ–‡å­—列ã§member用ã«è¿”ã™åž‹ã‚’å–å¾—ã™ã‚‹ã€‚\n" "自動生æˆã•れãŸdocstrigã®ä¸­ã¸å…¥ã‚Œã‚‹ç‚ºã«åˆ©ç”¨ã•れる" # @param [String] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:50 msgid "tag|param|member_tag" msgstr "" # @param [CodeObjects::Base] object #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:50 msgid "the tag object to check for types" msgstr "型をãƒã‚§ãƒƒã‚¯ã™ã‚‹ç‚ºã®ã‚¿ã‚°ã‚ªãƒ–ジェクト" # @return [String] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:50 msgid "" "the user-declared type of the struct member, or [Object] if\n" "the user did not define a type for this member." msgstr "" "構造体memberã®å®£è¨€ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åž‹ã€\\n\n" "åˆã¯ã“ã®member用ã«userãŒã€åž‹ã‚’定義ã—ãªã‹ã£ãŸå ´åˆ [Object] ã¨ãªã‚‹ã€‚" # YARD::Handlers::Ruby::StructHandlerMethods#add_reader_tags #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:55 msgid "" "Creates the auto-generated docstring for the getter method of a struct's\n" "member. This is used so the generated documentation will look just like " "that\n" "of an attribute defined using attr_accessor." msgstr "" "構造体memberã®getterメソッド用ã«è‡ªå‹•生æˆã•れるdocstringを作æˆã™ã‚‹ã€‚\n" "ã“れを用ã„ã¦ç”Ÿæˆã•れるドキュメントã¯ã€attr_accessorã«ã‚ˆã£ã¦å®šç¾©ã•れãŸå±žæ€§ã®ã‚ˆ" "ã†ã«è¦‹ãˆã‚‹ã€‚" # @return [String] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:61 msgid "a docstring to be attached to the getter method for this member" msgstr "ã“ã®member用ã«getterメソッドã«åŠ ãˆã‚‰ã‚Œã‚‹docstring" # @param [ClassObject] klass #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:61 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:76 msgid "the class whose members we're working with" msgstr "æ“作ã™ã‚‹memberクラスã«ç”¨ã„るクラス" # @param [String] member #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:61 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:76 msgid "the name of the member we're generating documentation for" msgstr "生æˆã•れるドキュメントã®memberã®åå‰" # YARD::Handlers::Ruby::StructHandlerMethods#add_writer_tags #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:70 msgid "" "Creates the auto-generated docstring for the setter method of a struct's\n" "member. This is used so the generated documentation will look just like " "that\n" "of an attribute defined using attr_accessor." msgstr "" "構造体ã®ãƒ¡ãƒ³ãƒãƒ¼ã®setterメソッド用ã«ã€è‡ªå‹•生æˆã•れãŸdocstringを作æˆã™ã‚‹ã€‚\n" "ã“れã¯ã€ç”Ÿæˆã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒã€\n" "attr_accessorã«ã‚ˆã£ã¦å®šç¾©ã•れãŸå±žæ€§ã®ã‚ˆã†ã«è¦‹ãˆã‚‹ã‚ˆã†ã«åˆ©ç”¨ã•れる。" # @return [String] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:76 msgid "a docstring to be attached to the setter method for this member" msgstr "ã“ã®ãƒ¡ãƒ³ãƒãƒ¼ç”¨ã«setterメソッドã«åŠ ãˆã‚‰ã‚Œã‚‹docstring" # YARD::Handlers::Ruby::StructHandlerMethods#create_class #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:86 msgid "" "Creates and registers a class object with the given name and superclass " "name.\n" "Returns it for further use." msgstr "" "与ãˆã‚‰ã‚ŒãŸã‚¯ãƒ©ã‚¹åã€ã‚¹ãƒ¼ãƒ‘ークラスåã¨å…±ã«ã€\n" "クラスオブジェクトを作æˆ,記録ã™ã‚‹ã€‚\n" "æ›´ã«åˆ©ç”¨ã™ã‚‹ç‚ºã«è¿”ã™ã€‚" # @param [String] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:91 msgid "tag|param|classname" msgstr "classname" # @return [ClassObject] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:91 msgid "the class object for further processing/method attaching" msgstr "処ç†/メソッドを加ãˆã‚‹ç‚ºã®ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクト" # @param [String] classname #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:91 msgid "the name of the class" msgstr "クラスã®åå‰" # @param [String] superclass #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:91 msgid "the name of the superclass" msgstr "スーパークラスã®åå‰" # YARD::Handlers::Ruby::StructHandlerMethods#create_writer #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:99 msgid "" "Creates the setter (writer) method and attaches it to the class as an " "attribute.\n" "Also sets up the docstring to prettify the documentation output." msgstr "" "setter(writer)メソッドを作æˆã—ã€å±žæ€§ã¨ã—ã¦ã‚¯ãƒ©ã‚¹ã«è¿½åŠ ã™ã‚‹ã€‚\n" "ãれã«åŠ ãˆã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå‡ºåŠ›ã‚’è£…é£¾ã™ã‚‹ç‚ºã«docstringをセットアップã™ã‚‹ã€‚" # @param [ClassObject] klass #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:103 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:120 msgid "the class to attach the method to" msgstr "クラスã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’追加ã™ã‚‹ã‚¯ãƒ©ã‚¹" # @param [String] member #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:103 #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:120 msgid "the name of the member we're generating a method for" msgstr "ç§é”ãŒãƒ¡ã‚½ãƒƒãƒ‰ç”¨ã«ç”Ÿæˆã™ã‚‹ãƒ¡ãƒ³ãƒãƒ¼ã®åå‰" # YARD::Handlers::Ruby::StructHandlerMethods#create_reader #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:116 msgid "" "Creates the getter (reader) method and attaches it to the class as an " "attribute.\n" "Also sets up the docstring to prettify the documentation output." msgstr "" "getter(reader)メソッドを作æˆã—ã€å±žæ€§ã¨ã—ã¦ã€ã‚¯ãƒ©ã‚¹ã«è¿½åŠ ã™ã‚‹ã€‚\n" "ã•らã«ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå‡ºåŠ›ã‚’è£…é£¾ã™ã‚‹ç‚ºã«ã€docstringをセットアップã™ã‚‹ã€‚" # YARD::Handlers::Ruby::StructHandlerMethods#create_attributes #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:130 msgid "" "Creates the given member methods and attaches them to the given ClassObject." msgstr "" "与ãˆã‚‰ã‚ŒãŸãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’作æˆã—ã€ä¸Žãˆã‚‰ã‚ŒãŸClassObjectã«ãれらを加ãˆã‚‹ã€‚" # @param [Array] #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:133 msgid "tag|param|members" msgstr "members" # @param [ClassObject] klass #: ../lib/yard/handlers/ruby/struct_handler_methods.rb:133 msgid "the class to generate attributes for" msgstr "属性を生æˆã™ã‚‹ã‚¯ãƒ©ã‚¹ç”¨ã®ã‚¯ãƒ©ã‚¹" # YARD::I18n::Locale #: ../lib/yard/i18n/locale.rb:7 msgid "" "+Locale+ is a unit of translation. It has {#name} and a set of\n" "messages." msgstr "" # @see http://tools.ietf.org/rfc/bcp/bcp47.txt #: ../lib/yard/i18n/locale.rb:15 msgid "BCP 47 - Tags for Identifying Languages" msgstr "" # @see #: ../lib/yard/i18n/locale.rb:15 msgid "tag|see|http://tools.ietf.org/rfc/bcp/bcp47.txt" msgstr "" # @return [String] #: ../lib/yard/i18n/locale.rb:15 msgid "" "the name of the locale. It used IETF language\n" "tag format +[language[_territory][.codeset][@modifier]]+." msgstr "" # YARD::Handlers::Processor#initialize #: ../lib/yard/i18n/locale.rb:18 msgid "Creates a locale for +name+ locale." msgstr "+name+ ã®è¨€èªžåˆ¥ã«localeを作æˆã™ã‚‹" # @return [Logger] #: ../lib/yard/i18n/locale.rb:20 msgid "a new instance of Locale" msgstr "Localeã®æ–°ã—ã„インスタンス" # @return [String] #: ../lib/yard/i18n/locale.rb:20 msgid "the locale name." msgstr "言語å(地域å)" # YARD::I18n::Locale#load #: ../lib/yard/i18n/locale.rb:26 msgid "Loads translation messages from +locale_directory+/{#name}.po." msgstr "+locale_directory+/{#name}.po.ã‹ã‚‰ç¿»è¨³ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ロードã™ã‚‹" # @return [Boolean] #: ../lib/yard/i18n/locale.rb:30 msgid "+true+ if PO file exists, +false+ otherwise." msgstr "POファイルãŒå­˜åœ¨ã™ã‚Œã°trueã€ãã†ã§ãªã‘れã°ã€false" # @param [Boolean] #: ../lib/yard/i18n/locale.rb:30 msgid "tag|param|locale_directory" msgstr "" # @param [String] locale_directory #: ../lib/yard/i18n/locale.rb:30 msgid "" "the directory path that has\n" "{#name}.po." msgstr "" # @since #: ../lib/yard/i18n/locale.rb:45 ../lib/yard/logging.rb:11 #: ../lib/yard/logging.rb:15 ../lib/yard/logging.rb:82 #: ../lib/yard/logging.rb:106 ../lib/yard/logging.rb:117 msgid "0.8.2" msgstr "" # @param [NamespaceObject] # @param [CodeObjects::NamespaceObject, nil] # @param [CodeObjects::NamespaceObject] #: ../lib/yard/i18n/locale.rb:45 msgid "tag|param|message" msgstr "" # @param [CodeObjects::NamespaceObject] namespace #: ../lib/yard/i18n/locale.rb:45 msgid "the translation target message." msgstr "翻訳目標ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸" # @return [String] #: ../lib/yard/i18n/locale.rb:45 msgid "" "translated message. If tarnslation isn't\n" "registered, the +message+ is returned." msgstr "" # YARD::I18n::Message #: ../lib/yard/i18n/message.rb:6 msgid "" "+Message+ is a translation target message. It has message ID as\n" "{#id} and some properties {#locations} and {#comments}." msgstr "" # @param tag_name #: ../lib/yard/i18n/message.rb:11 msgid "the message ID of the trnslation target message." msgstr "翻訳目標ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ID" # @param [Fixnum, nil] line #: ../lib/yard/i18n/message.rb:14 msgid "path and line number where the message is appered." msgstr "メッセージãŒç¾ã‚Œã‚‹ã¨ã“ã‚ã®ãƒ‘スã¨è¡Œæ•°" # @return [Set] #: ../lib/yard/i18n/message.rb:15 msgid "the set of locations. Location is an array of" msgstr "" # @return [Array] #: ../lib/yard/i18n/message.rb:18 msgid "the set of comments for the messages." msgstr "メッセージ用ã®ã‚³ãƒ¡ãƒ³ãƒˆã®ã‚°ãƒ«ãƒ¼ãƒ—" # YARD::Handlers::Processor#initialize #: ../lib/yard/i18n/message.rb:21 msgid "Creates a trasnlate target message for message ID +id+." msgstr "メッセージID +id+ 用ã®ç¿»è¨³ç›®æ¨™ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’作æˆã™ã‚‹" # @return [Tag] #: ../lib/yard/i18n/message.rb:23 msgid "a new instance of Message" msgstr "ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ–°ã—ã„インスタンス" # @param [Fixnum] #: ../lib/yard/i18n/message.rb:23 ../lib/yard/i18n/messages.rb:26 #: ../lib/yard/i18n/messages.rb:36 msgid "tag|param|id" msgstr "" # @param [String] id #: ../lib/yard/i18n/message.rb:23 msgid "the message ID of the translate target message." msgstr "翻訳目標ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ID" # YARD::I18n::Message#add_location #: ../lib/yard/i18n/message.rb:30 msgid "Adds location information for the message." msgstr "メッセージ用ã®åœ°åŸŸæƒ…報を追加ã™ã‚‹" # @param [Fixnum, nil] line #: ../lib/yard/i18n/message.rb:34 msgid "the line number where the message appears." msgstr "メッセージãŒè¦‹ãˆã‚‹ã¨ã“ã‚ã®è¡Œæ•°" # @return [String] #: ../lib/yard/i18n/message.rb:34 msgid "the path where the message appears." msgstr "メッセージãŒè¦‹ãˆã‚‹ã¨ã“ã‚ã®ãƒ‘ス" # YARD::I18n::Message#add_comment #: ../lib/yard/i18n/message.rb:39 msgid "Adds a comment for the message." msgstr "メッセージ用ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’追加ã™ã‚‹" # @param [String, Array, Docstring] # @param [String] #: ../lib/yard/i18n/message.rb:42 msgid "tag|param|comment" msgstr "" # @return [String] #: ../lib/yard/i18n/message.rb:42 msgid "the comment for the message to be added." msgstr "追加ã•れるメッセージ用ã®ã‚³ãƒ¡ãƒ³ãƒˆ" # @return [Boolean] #: ../lib/yard/i18n/message.rb:48 msgid "checks whether this message is equal to another." msgstr "ã“ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä»–ã¨åŒã˜ã‹ã©ã†ã‹" # @param [String] content #: ../lib/yard/i18n/message.rb:48 msgid "the +Message+ to be compared." msgstr "比較ã•れる為㮠+message+" # YARD::I18n::Messages #: ../lib/yard/i18n/messages.rb:4 msgid "Acts as a container for {Message} objects." msgstr "" # YARD::Logger#initialize #: ../lib/yard/i18n/messages.rb:10 msgid "Creates a new container." msgstr "æ–°ã—ã„コンテナを作æˆã™ã‚‹" # @return [Tag] #: ../lib/yard/i18n/messages.rb:10 msgid "a new instance of Messages" msgstr "ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ–°ã—ã„インスタンス" # YARD::I18n::Messages#each #: ../lib/yard/i18n/messages.rb:15 msgid "Enumerates each {Message} in the container." msgstr "" # @yieldparam [Tags::Tag] #: ../lib/yard/i18n/messages.rb:19 msgid "tag|yieldparam|message" msgstr "" # @return [CodeObjects::RootObject] #: ../lib/yard/i18n/messages.rb:19 msgid "" "the next message object in\n" "the enumeration." msgstr "é…列ã®ä¸­ã®æ¬¡ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚ªãƒ–ジェクト" # @return [Message, nil] #: ../lib/yard/i18n/messages.rb:26 msgid "" "a registered message for the given +id+,\n" "or nil if no message for the ID is found." msgstr "" # @param [String] id #: ../lib/yard/i18n/messages.rb:26 msgid "the message ID to perform a lookup on." msgstr "" # YARD::I18n::Messages#register #: ../lib/yard/i18n/messages.rb:31 msgid "" "Registers a {Message}, the mssage ID of which is +id+. If\n" "corresponding +Message+ is already registered, the previously\n" "registered object is returned." msgstr "" # @param [String] path #: ../lib/yard/i18n/messages.rb:36 msgid "the ID of the message to be registered." msgstr "記録ã•れるメッセージã®ID" # @return [CodeObjects::Base] #: ../lib/yard/i18n/messages.rb:36 msgid "the registered +Message+." msgstr "記録ã•れ㟠+Message+" # YARD::I18n::Messages#== #: ../lib/yard/i18n/messages.rb:41 msgid "Checks if this messages list is equal to another messages list." msgstr "" # @param [#to_s] tag #: ../lib/yard/i18n/messages.rb:44 msgid "the container to compare." msgstr "比較ã™ã‚‹ãŸã‚ã®ã‚³ãƒ³ãƒ†ãƒŠ" # @return [Boolean] #: ../lib/yard/i18n/messages.rb:44 msgid "whether +self+ and +other+ is equivalence or not." msgstr "" # @return [Array] #: ../lib/yard/i18n/messages.rb:52 msgid "the set of message objects" msgstr "メッセージオブジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:6 msgid "" "The +PotGenerator+ generates POT format string from\n" "{CodeObjects::Base} and {CodeObjects::ExtraFileObject}." msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:9 msgid "== POT and PO" msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:11 msgid "" "POT is an acronym for \"Portable Object Template\". POT is a\n" "template file to create PO file. The extension for POT is\n" "\".pot\". PO file is an acronym for \"Portable Object\". PO file has\n" "many parts of message ID (msgid) that is translation target\n" "message and message string (msgstr) that is translated message\n" "of message ID. If you want to tranlsate \"Hello\" in English into\n" "\"Bonjour\" in French, \"Hello\" is the msgid ID and \"Bonjour\" is\n" "msgstr. The extension for PO is \".po\"." msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:20 msgid "== How to extract msgids" msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:22 msgid "The +PotGenerator+ has two parse methods:" msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:24 msgid "" "* {#parse_objects} for {CodeObjects::Base}\n" "* {#parse_files} for {CodeObjects::ExtraFileObject}" msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:27 msgid "" "{#parse_objects} extracts msgids from docstring and tags of\n" "{CodeObjects::Base} objects. The docstring of\n" "{CodeObjects::Base} object is parsed and a paragraph is\n" "extracted as a msgid. Tag name and tag text are extracted as\n" "msgids from a tag." msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:33 msgid "" "{#parse_files} extracts msgids from\n" "{CodeObjects::ExtraFileObject} objects. The file content of\n" "{CodeObjects::ExtraFileObject} object is parsed and a paragraph\n" "is extracted as a msgid." msgstr "" # YARD::I18n::PotGenerator #: ../lib/yard/i18n/pot_generator.rb:40 msgid "" "To create a .pot file by +PotGenerator+, instantiate a\n" "+PotGenerator+ with a relative working directory path from a\n" "directory path that has created .pot file, parse\n" "{CodeObjects::Base} objects and {CodeObjects::ExtraFileObject}\n" "objects, generate a POT and write the generated POT to a .pot\n" "file. The relative working directory path is \"..\" when the\n" "working directory path is \".\" and the POT is wrote into\n" "\"po/yard.pot\"." msgstr "" # @see http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html #: ../lib/yard/i18n/pot_generator.rb:64 msgid "GNU gettext manual about details of PO file" msgstr "" # @example Generate a .pot file #: ../lib/yard/i18n/pot_generator.rb:64 msgid "" "po_file_path = \"po/yard.pot\"\n" "po_file_directory_pathname = Pathname.new(po_file_path).directory)\n" "working_directory_pathname = Pathname.new(\".\")\n" "relative_base_path = working_directory_pathname.relative_path_from" "(po_file_directory_pathname).to_s\n" "# relative_base_path -> \"..\"\n" "generator = YARD::I18n::PotGenerator.new(relative_base_path)\n" "generator.parse_objects(objects)\n" "generator.parse_files(files)\n" "pot = generator.generate\n" "po_file_directory_pathname.mkpath\n" "File.open(po_file_path, \"w\") do |pot_file|\n" " pot_file.print(pot)\n" "end" msgstr "" # @example #: ../lib/yard/i18n/pot_generator.rb:64 msgid "tag|example|Generate a .pot file" msgstr "tag|example|.popファイルを生æˆã™ã‚‹" # @see #: ../lib/yard/i18n/pot_generator.rb:64 msgid "" "tag|see|http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html" msgstr "" # YARD::I18n::PotGenerator#messages #: ../lib/yard/i18n/pot_generator.rb:66 msgid "Extracted messages." msgstr "" # YARD::I18n::PotGenerator#initialize #: ../lib/yard/i18n/pot_generator.rb:72 msgid "" "Creates a POT generator that uses +relative_base_path+ to\n" "generate locations for a msgid. +relative_base_path+ is\n" "prepended to all locations." msgstr "" # @return [Router] #: ../lib/yard/i18n/pot_generator.rb:78 msgid "a new instance of PotGenerator" msgstr "PotGeneratorã®æ–°ã—ã„インスタンス" # @param [String] relative_base_path #: ../lib/yard/i18n/pot_generator.rb:78 msgid "" "a relative working\n" "directory path from a directory path that has created .pot\n" "file." msgstr "" # @param [Boolean] #: ../lib/yard/i18n/pot_generator.rb:78 msgid "tag|param|relative_base_path" msgstr "" # @param [Array] objects #: ../lib/yard/i18n/pot_generator.rb:85 msgid "" "Parses {CodeObjects::Base} objects and stores extracted msgids\n" "into {#messages}" msgstr "" "{CodeObjects::Base}オブジェクトを解æžã—ã€\n" "{#messages}メソッドã®ä¸­ã¸æŠ½å‡ºã•れãŸmsgidを登録ã™ã‚‹" # @param [Array] objects #: ../lib/yard/i18n/pot_generator.rb:90 msgid "" "a list of\n" "{CodeObjects::Base} to be parsed." msgstr "è§£æžã•れる {CodeObjects::Base} ã®ãƒªã‚¹ãƒˆ" # @deprecated #: ../lib/yard/i18n/pot_generator.rb:97 msgid "" "Parses {CodeObjects::ExtraFileObject} objects and stores\n" "extracted msgids into {#messages}." msgstr "" "{CodeObjects::ExtraFileObject} オブジェクトを解æžã—ã€\n" "抽出ã•れãŸmsgidã‚’{#messages}ã®ä¸­ã¸ç™»éŒ²ã™ã‚‹ã€‚" # @deprecated #: ../lib/yard/i18n/pot_generator.rb:102 msgid "" "a list\n" "of {CodeObjects::ExtraFileObject} objects to be parsed." msgstr "è§£æžã•れる {CodeObjects::ExtraFileObject} オブジェクトã®ãƒªã‚¹ãƒˆ" # YARD::I18n::PotGenerator#generate #: ../lib/yard/i18n/pot_generator.rb:109 msgid "Generates POT from +@messages+." msgstr "" # YARD::I18n::PotGenerator#generate #: ../lib/yard/i18n/pot_generator.rb:111 msgid "" "One PO file entry is generated from a +Message+ in\n" "+@messages+." msgstr "" # YARD::I18n::PotGenerator#generate #: ../lib/yard/i18n/pot_generator.rb:114 msgid "" "Locations of the +Message+ are used to generate the reference\n" "line that is started with \"#: \". +relative_base_path+ passed\n" "when the generater is created is prepended to each path in location." msgstr "" # YARD::I18n::PotGenerator#generate #: ../lib/yard/i18n/pot_generator.rb:118 msgid "" "Comments of the +Message+ are used to generate the\n" "translater-comment line that is started with \"# \"." msgstr "" # @return [String] #: ../lib/yard/i18n/pot_generator.rb:121 msgid "POT format string" msgstr "" # YARD::I18n::Text #: ../lib/yard/i18n/text.rb:4 msgid "Provides some convenient features for translating a text." msgstr "" # YARD::I18n::Text#initialize #: ../lib/yard/i18n/text.rb:6 msgid "" "Creates a text object that has translation related features for\n" "the input text." msgstr "" # @return [Text] #: ../lib/yard/i18n/text.rb:11 msgid "a new instance of Text" msgstr "Textã®æ–°ã—ã„インスタンス" # @param [String] text #: ../lib/yard/i18n/text.rb:11 msgid "a text to be translated." msgstr "翻訳ã•れるテキスト" # @param [Fixnum, nil] #: ../lib/yard/i18n/text.rb:11 msgid "tag|param|input" msgstr "" # YARD::I18n::Text#extract_messages #: ../lib/yard/i18n/text.rb:17 msgid "Extracts translation target messages from +@input+." msgstr "" # @yieldparam [Array] #: ../lib/yard/i18n/text.rb:34 msgid "tag|yieldparam|line_no" msgstr "" # @yieldparam [Tags::Tag] #: ../lib/yard/i18n/text.rb:34 msgid "tag|yieldparam|name" msgstr "" # @yieldparam [Tags::Tag] #: ../lib/yard/i18n/text.rb:34 msgid "tag|yieldparam|start_line_no" msgstr "" # @yieldparam [Tags::Tag] #: ../lib/yard/i18n/text.rb:34 msgid "tag|yieldparam|text" msgstr "" # @yieldparam [Array] #: ../lib/yard/i18n/text.rb:34 ../lib/yard/options.rb:142 msgid "tag|yieldparam|value" msgstr "" # @yield [:paragraph, text, start_line_no] #: ../lib/yard/i18n/text.rb:34 msgid "" "the block that\n" "recieves extracted a paragraph in body. Paragraph is a text\n" "block separated by one or more empty lines. Empty line is a\n" "line that contains only zero or more whitespaces. It may\n" "called many times." msgstr "" # @yield [:attribute, name, value, line_no] #: ../lib/yard/i18n/text.rb:34 msgid "" "the block that\n" "recieves extracted an attribute in header. It may called many\n" "times." msgstr "" # @return [Fixnum] #: ../lib/yard/i18n/text.rb:34 msgid "" "the defined line number of extracted\n" "attribute." msgstr "抽出ã•れãŸå±žæ€§ã®å®šç¾©ã•れãŸè¡Œæ•°" # @param [#to_s] key #: ../lib/yard/i18n/text.rb:34 msgid "the name of extracted attribute." msgstr "抽出ã•れãŸå±žæ€§ã®åå‰" # @return [Fixnum] #: ../lib/yard/i18n/text.rb:34 msgid "" "the start line number of\n" "extracted paragraph." msgstr "抽出ã•ã‚ŒãŸæ®µè½ã®æœ€åˆã®è¡Œæ•°" # @param [String] text #: ../lib/yard/i18n/text.rb:34 msgid "the text of extracted paragraph." msgstr "抽出ã•ã‚ŒãŸæ®µè½ã®ãƒ†ã‚­ã‚¹ãƒˆ" # @param value #: ../lib/yard/i18n/text.rb:34 msgid "the value of extracted attribute." msgstr "抽出ã•れãŸå±žæ€§ã®å€¤" # YARD::I18n::Text#translate #: ../lib/yard/i18n/text.rb:49 msgid "Translates into +locale+." msgstr "" # @param [Object] #: ../lib/yard/i18n/text.rb:52 msgid "tag|param|locale" msgstr "" # @return [String] #: ../lib/yard/i18n/text.rb:52 msgid "the translation target locale." msgstr "翻訳目標ã®åœ°åŸŸ" # @return [String] #: ../lib/yard/i18n/text.rb:52 msgid "translated text." msgstr "翻訳ã•れãŸãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Logger #: ../lib/yard/logging.rb:6 msgid "" "Handles console logging for info, warnings and errors.\n" "Uses the stdlib Logger class in Ruby for all the backend logic." msgstr "" "コンソールãŒinfoã‚„,警告や,エラー用ã«ãƒ­ã‚®ãƒ³ã‚°ã—æ“作ã™ã‚‹ã€‚\n" "å…¨ã¦ã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã®å‡¦ç†ã®ç‚ºã«Ruby標準ライブラリã®loggerクラスを使ã†ã€‚" # YARD::Logger::PROGRESS_INDICATORS #: ../lib/yard/logging.rb:9 msgid "" "The list of characters displayed beside the progress bar to indicate\n" "\"movement\"." msgstr "" # @return [CodeObjects::Base] #: ../lib/yard/logging.rb:15 msgid "the IO object being logged to" msgstr "IOオブジェクトã«è¨˜éŒ²ã•れるIOオブジェクト" # @return [Boolean] #: ../lib/yard/logging.rb:19 msgid "" "whether backtraces should be shown (by default\n" "this is on)." msgstr "" # @param value #: ../lib/yard/logging.rb:20 msgid "the value to set the attribute show_backtraces to." msgstr "show_backtraces属性を設定ã™ã‚‹å€¤" # YARD::Logger#show_backtraces= #: ../lib/yard/logging.rb:21 msgid "Sets the attribute show_backtraces" msgstr "show_backtraces属性を設定ã™ã‚‹" # @return [Boolean] #: ../lib/yard/logging.rb:24 msgid "" "whether progress indicators should be shown when\n" "logging CLIs (by default this is off)." msgstr "" # @param value #: ../lib/yard/logging.rb:30 msgid "the value to set the attribute show_progress to." msgstr "値ã«show_progress属性を設定ã™ã‚‹ç‚ºã®å€¤" # YARD::Logger#show_backtraces= #: ../lib/yard/logging.rb:31 msgid "Sets the attribute show_progress" msgstr "show_progress属性を設定ã™ã‚‹" # YARD::Logger.instance #: ../lib/yard/logging.rb:33 msgid "The logger instance" msgstr "loggerインスタンス" # @return [Logger] #: ../lib/yard/logging.rb:34 msgid "the logger instance" msgstr "loggerインスタンス" # YARD::Logger#initialize #: ../lib/yard/logging.rb:39 msgid "Creates a new logger" msgstr "æ–°ã—ã„loggerを作æˆã™ã‚‹" # @return [Logger] #: ../lib/yard/logging.rb:39 msgid "a new instance of Logger" msgstr "Loggerã®æ–°ã—ã„インスタンス" # YARD::Logger#debug #: ../lib/yard/logging.rb:51 msgid "" "Changes the debug level to DEBUG if $DEBUG is set\n" "and writes a debugging message." msgstr "" "$DEBUGãŒè¨­å®šã•れãŸå ´åˆã€debug levelã‚’DEBUGã«å¤‰æ›´ã—ã€\n" "デãƒãƒƒã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’書ã込む。" # YARD::Logger#capture #: ../lib/yard/logging.rb:58 msgid "" "Captures the duration of a block of code for benchmark analysis. Also\n" "calls {#progress} on the message to display it to the user." msgstr "" # @todo #: ../lib/yard/logging.rb:66 msgid "Implement capture storage for reporting of benchmarks" msgstr "" # @param [String] content #: ../lib/yard/logging.rb:66 msgid "a block of arbitrary code to benchmark" msgstr "ベンãƒãƒžãƒ¼ã‚¯ã®ç‚ºã®ä»»æ„ã®ã‚³ãƒ¼ãƒ‰ã®å…¥ã£ãŸãƒ–ロック" # @param [Symbol] # @param [#to_s] #: ../lib/yard/logging.rb:66 ../lib/yard/logging.rb:82 #: ../lib/yard/logging.rb:117 msgid "tag|param|msg" msgstr "" # @param [TokenList, String] # @param [String] # @param [String, #read, Object] #: ../lib/yard/logging.rb:66 ../lib/yard/logging.rb:82 msgid "tag|param|nontty_log" msgstr "" # @param [Symbol, nil] nontty_log #: ../lib/yard/logging.rb:66 ../lib/yard/logging.rb:82 msgid "" "the level to log as if the output\n" "stream is not a TTY. Use +nil+ for no alternate logging." msgstr "" # @return [String] #: ../lib/yard/logging.rb:66 ../lib/yard/logging.rb:117 msgid "the message to display" msgstr "表示ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸" # YARD::Logger#progress #: ../lib/yard/logging.rb:74 msgid "" "Displays a progress indicator for a given message. This progress report\n" "is only displayed on TTY displays, otherwise the message is passed to\n" "the +nontty_log+ level." msgstr "" # @param [String, CodeObjects::ExtraFileObject] filename # @param [String] filename #: ../lib/yard/logging.rb:82 msgid "the message to log" msgstr "記録ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸" # YARD::Logger#clear_progress #: ../lib/yard/logging.rb:104 msgid "Clears the progress indicator in the TTY display." msgstr "" # YARD::Logger#puts #: ../lib/yard/logging.rb:113 msgid "" "Displays an unformatted line to the logger output stream. Similar to\n" "the +#<<+ method, but adds a newline." msgstr "" # YARD::Logger#backtrace #: ../lib/yard/logging.rb:122 msgid "Prints the backtrace +exc+ to the logger as error data." msgstr "+exc+ ã®ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’エラーデータã¨ã—ã¦loggerã«ãƒ—リントã™ã‚‹ã€‚" # @param [Array] #: ../lib/yard/logging.rb:126 msgid "tag|param|exc" msgstr "exc" # @param [Fixnum] #: ../lib/yard/logging.rb:126 msgid "tag|param|level_meth" msgstr "" # @param [Array] exc #: ../lib/yard/logging.rb:126 msgid "the backtrace list" msgstr "ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã®ãƒªã‚¹ãƒˆ" # @param [Array] exc #: ../lib/yard/logging.rb:126 msgid "the level to log backtrace at" msgstr "ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’記録ã™ã‚‹éšŽå±¤" # YARD::Logger#warn_no_continuations #: ../lib/yard/logging.rb:134 msgid "" "Warns that the Ruby environment does not support continuations. Applies\n" "to JRuby, Rubinius and MacRuby. This warning will only display once\n" "per Ruby process." msgstr "" "Rubyã®ç’°å¢ƒãŒcontinuationをサãƒãƒ¼ãƒˆã—ãªã„警告を出ã™ã€‚\n" "JRuby,Rubinius,MacRubyã«é©ç”¨ã•れる。\n" "ã“ã®è­¦å‘Šã¯ã€Rubyã®å‡¦ç†æ¯Žã«ä¸€åº¦ã ã‘表示ã•れるã ã‚ã†" # @deprecated #: ../lib/yard/logging.rb:139 msgid "Continuations are no longer needed by YARD 0.8.0+." msgstr "" # YARD::Logger#enter_level #: ../lib/yard/logging.rb:143 msgid "Sets the logger level for the duration of the block" msgstr "ブロックã®ç¶™ç¶šã™ã‚‹logger levelを設定ã™ã‚‹ã€‚" # @example #: ../lib/yard/logging.rb:151 msgid "" "log.enter_level(Logger::ERROR) do\n" " YARD.parse_string \"def x; end\"\n" "end" msgstr "" # @param [Fixnum] #: ../lib/yard/logging.rb:151 msgid "tag|param|new_level" msgstr "new_level" # @yield #: ../lib/yard/logging.rb:151 msgid "the block with the logger temporarily set to +new_level+" msgstr "loggerãŒä¸€æ™‚çš„ã«+new_level+を設定ã™ã‚‹ãƒ–ロック" # @param [Fixnum] new_level #: ../lib/yard/logging.rb:151 msgid "" "the logger level for the duration of the block.\n" "values can be found in Ruby's Logger class." msgstr "" "ブロックã®ç¶™ç¶šã™ã‚‹logger level.\n" "値ã¯Ruby loggerクラスã§è¦‹ã¤ã‘る事ãŒå‡ºæ¥ã‚‹ã€‚" # YARD::Logger#format_log #: ../lib/yard/logging.rb:160 msgid "Log format (from Logger implementation). Used by Logger internally" msgstr "ログ書å¼(loggerã®å®Ÿè£…ã‹ã‚‰)。Loggerã«ã‚ˆã£ã¦å†…部ã§åˆ©ç”¨ã•れる。" # YARD::Options #: ../lib/yard/options.rb:3 msgid "" "Generalized options class for passing around large amounts of options " "between objects." msgstr "" # YARD::Options #: ../lib/yard/options.rb:5 msgid "" "The options class exists for better visibility and documentability of " "options being\n" "passed through to other objects. Because YARD has parser and template " "architectures\n" "that are heavily reliant on options, it is necessary to make these option " "keys easily\n" "visible and understood by developers. Since the options class is more than " "just a\n" "basic Hash, the subclass can provide aliasing and convenience methods to " "simplify\n" "option property access, and, if needed, support backward-compatibility for " "deprecated\n" "key names." msgstr "" # YARD::Options #: ../lib/yard/options.rb:13 msgid "== Hash and OpenStruct-like Access" msgstr "" # YARD::Options #: ../lib/yard/options.rb:15 msgid "" "Although the options class allows for Hash-like access (opts[:key]), the recommended\n" "mechanism for accessing an option key will be via standard method calls on " "attributes" msgstr "" # YARD::Options #: ../lib/yard/options.rb:18 msgid "" "The options class can also act as an open ended key value storage structure " "(like a\n" "Hash or OpenStruct), and allows for setting and getting of unregistered " "option keys.\n" "This methodology is not recommended, however, and is only supported for " "backward\n" "compatibility inside YARD. Whenever possible, developers should define all " "keys used\n" "by an options class." msgstr "" # YARD::Options #: ../lib/yard/options.rb:24 msgid "== Declaring Default Values" msgstr "" # YARD::Options #: ../lib/yard/options.rb:26 msgid "" "Note that the options class can contain default value definitions for " "certain options,\n" "but to initialize these defaults, {#reset_defaults} must be called manually " "after\n" "initialization; the options object is always created empty until defaults " "are applied." msgstr "" # @abstract #: ../lib/yard/options.rb:68 msgid "" "Subclasses should define (and document) custom attributes that are expected\n" "to be made available as option keys." msgstr "" # @example Deprecating an option while still supporting it #: ../lib/yard/options.rb:68 msgid "" "class TemplateOptions < YARD::Options\n" " # @return [Boolean] if syntax highlighting should be performed on code " "blocks.\n" " # Defaults to true.\n" " attr_accessor :highlight\n" "\n" " # @deprecated Use {#highlight} instead.\n" " # @return [Boolean] if no syntax highlighting should be performs on code " "blocks.\n" " # Defaults to false.\n" " attr_accessor :no_highlight\n" " def no_highlight=(value) @highlight = !value end\n" " def no_highlight; !highlight end\n" "end" msgstr "" # @example Defining an Options class with custom option keys #: ../lib/yard/options.rb:68 msgid "" "class TemplateOptions < YARD::Options\n" " # @return [Symbol] the output format to generate templates in\n" " attr_accessor :format\n" "\n" " # @return [Symbol] the template to use when generating output\n" " attr_accessor :template\n" "end" msgstr "" # @example Initializing default option values #: ../lib/yard/options.rb:68 msgid "" "class TemplateOptions < YARD::Options\n" " def reset_defaults\n" " super\n" " self.format = :html\n" " self.template = :default\n" " self.highlight = true\n" " # ...\n" " end\n" "end" msgstr "" # @example Using +default_attr+ to create default attributes #: ../lib/yard/options.rb:68 msgid "" "class TemplateOptions < YARD::Options\n" " default_attr :format, :html\n" " default_attr :template, :default\n" " default_attr :highlight, true\n" "end" msgstr "" # @example #: ../lib/yard/options.rb:68 msgid "tag|example|Defining an Options class with custom option keys" msgstr "カスタムオプションã®keyを用ã„ãŸã‚ªãƒ—ションクラス定義" # @example #: ../lib/yard/options.rb:68 msgid "tag|example|Deprecating an option while still supporting it" msgstr "ã¾ã ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã‘れã©å»ƒæ­¢ã™ã‚‹ã‚ªãƒ—ション" # @example #: ../lib/yard/options.rb:68 msgid "tag|example|Initializing default option values" msgstr "tag|example|åˆæœŸåŒ–ã•れãŸãƒ‡ãƒ•ォルトã®ã‚ªãƒ—ション値" # @example #: ../lib/yard/options.rb:68 msgid "tag|example|Using +default_attr+ to create default attributes" msgstr "tag|example|デフォルト属性を作æˆã™ã‚‹ãŸã‚ã® +default_attr+ を用ã„ã‚‹" # YARD::Options.default_attr #: ../lib/yard/options.rb:70 msgid "Defines an attribute named +key+ and sets a default value for it" msgstr "" # @example Defining a default option key #: ../lib/yard/options.rb:79 msgid "" "default_attr :name, 'Default Name'\n" "default_attr :time, lambda { Time.now }" msgstr "" # @example #: ../lib/yard/options.rb:79 msgid "tag|example|Defining a default option key" msgstr "tag|example|デフォルトã®ã‚ªãƒ—ションキーã®å®šç¾©" # @param [Object] #: ../lib/yard/options.rb:79 msgid "tag|param|default" msgstr "" # @param [Object, Proc] default #: ../lib/yard/options.rb:79 msgid "" "the default object value. If the default\n" "value is a proc, it is executed upon initialization." msgstr "" # @param [String, Symbol] section #: ../lib/yard/options.rb:79 msgid "the option key name" msgstr "オプションキーå" # YARD::Options#[] #: ../lib/yard/options.rb:85 msgid "Delegates calls with Hash syntax to actual method with key name" msgstr "" # @example Calling on an option key with Hash syntax #: ../lib/yard/options.rb:90 msgid "options[:format] # equivalent to: options.format" msgstr "" # @example #: ../lib/yard/options.rb:90 msgid "tag|example|Calling on an option key with Hash syntax" msgstr "tag|example|ãƒãƒƒã‚·ãƒ¥æ§‹æ–‡ã‚’用ã„ãŸã‚ªãƒ—ションキーを呼ã³å‡ºã™" # @param [Hash] opts #: ../lib/yard/options.rb:90 msgid "the option name to access" msgstr "アクセスã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ションå" # @param value #: ../lib/yard/options.rb:90 msgid "the value of the option named +key+" msgstr "+key+ ã¨å付ã‘られãŸã‚ªãƒ—ションã®å€¤" # YARD::Options#[]= #: ../lib/yard/options.rb:93 msgid "" "Delegates setter calls with Hash syntax to the attribute setter with the key " "name" msgstr "" # @example Setting an option with Hash syntax #: ../lib/yard/options.rb:99 msgid "options[:format] = :html # equivalent to: options.format = :html" msgstr "" # @example #: ../lib/yard/options.rb:99 msgid "tag|example|Setting an option with Hash syntax" msgstr "tag|example|ãƒãƒƒã‚·ãƒ¥æ§‹æ–‡ã‚’用ã„ãŸã‚ªãƒ—ションã®è¨­å®š" # @param [Hash] options #: ../lib/yard/options.rb:99 msgid "the optin to set" msgstr "設定ã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ション" # @param [Object] value # @param [Object] val #: ../lib/yard/options.rb:99 msgid "the value being set" msgstr "設定ã•れる値" # @param [String] title #: ../lib/yard/options.rb:99 msgid "the value to set for the option" msgstr "オプション用ã«è¨­å®šã™ã‚‹ãŸã‚ã®å€¤" # YARD::Options#update #: ../lib/yard/options.rb:102 msgid "" "Updates values from an options hash or options object on this object.\n" "All keys passed should be key names defined by attributes on the class." msgstr "" # @example Updating a set of options on an Options object #: ../lib/yard/options.rb:108 msgid "opts.update(:template => :guide, :type => :fulldoc)" msgstr "" # @example #: ../lib/yard/options.rb:108 msgid "tag|example|Updating a set of options on an Options object" msgstr "tag|example|オプションオブジェクトã§ã‚ªãƒ—ションã®ã‚°ãƒ«ãƒ¼ãƒ—ã®æ›´æ–°" # YARD::Options#merge #: ../lib/yard/options.rb:117 msgid "" "Creates a new options object and sets options hash or object value\n" "onto that object." msgstr "" # @see #: ../lib/yard/options.rb:122 msgid "tag|see|#update" msgstr "" # @return [Base] # @return [MacroObject] #: ../lib/yard/options.rb:122 msgid "the newly created options object" msgstr "æ–°ãŸã«ä½œæˆã•れãŸã‚ªãƒ—ションオブジェクト" # @return [Hash] #: ../lib/yard/options.rb:128 msgid "" "Converts options object to an options hash. All keys\n" "will be symbolized." msgstr "" # YARD::Options#each #: ../lib/yard/options.rb:138 msgid "Yields over every option key and value" msgstr "" # @yield [key, value] #: ../lib/yard/options.rb:142 msgid "every option key and value" msgstr "" # @yieldparam [Base] #: ../lib/yard/options.rb:142 msgid "tag|yieldparam|key" msgstr "" # @param [Hash] options #: ../lib/yard/options.rb:142 msgid "the option key" msgstr "オプションã®ã‚­ãƒ¼" # @param [Hash] options #: ../lib/yard/options.rb:142 msgid "the option value" msgstr "オプションã®å€¤" # @return [String] #: ../lib/yard/options.rb:150 msgid "Inspects the object" msgstr "オブジェクトを解æžã™ã‚‹" # @return [Boolean] #: ../lib/yard/options.rb:156 msgid "" "whether another Options object equals the\n" "keys and values of this options object" msgstr "" # YARD::Options#method_missing #: ../lib/yard/options.rb:165 msgid "" "Handles setting and accessing of unregistered keys similar\n" "to an OpenStruct object." msgstr "" # @note #: ../lib/yard/options.rb:169 msgid "" "It is not recommended to set and access unregistered keys on\n" "an Options object. Instead, register the attribute before using it." msgstr "" # YARD::Tags::DefaultTag#defaults #: ../lib/yard/options.rb:182 msgid "Resets all values to their defaults." msgstr "ãれらã®ãƒ‡ãƒ•ォルトã®å…¨ã¦ã®å€¤ã‚’リセットã™ã‚‹" # @abstract #: ../lib/yard/options.rb:187 msgid "" "Subclasses should override this method to perform custom\n" "value initialization if not using {default_attr}. Be sure to call\n" "+super+ so that default initialization can take place." msgstr "" # YARD::Options#delete #: ../lib/yard/options.rb:201 msgid "Deletes an option value for +key+" msgstr "" # @param [#to_sym] key #: ../lib/yard/options.rb:204 msgid "the key to delete a value for" msgstr "キー用ã«å€¤ã‚’削除ã™ã‚‹ç‚ºã®ã‚­ãƒ¼" # @param [String] data #: ../lib/yard/options.rb:204 msgid "the value that was deleted" msgstr "削除ã•れãŸå€¤" # YARD::Parser::Base #: ../lib/yard/parser/base.rb:4 msgid "" "Represents the abstract base parser class that parses source code in\n" "a specific way. A parser should implement {#parse}, {#tokenize} and\n" "{#enumerator}." msgstr "" "ç‹¬è‡ªã®æ–¹æ³•ã§ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’è§£æžã™ã‚‹æŠ½è±¡çš„ãªãƒ™ãƒ¼ã‚¹ãƒ‘ーサークラスを表ã™ã€‚\n" "パーサーã¯{#parse}ã‚„,{#tokenize}ã‚„{#enumerator}メソッドを実装ã—ãªãã¦ã¯ãªã‚‰ãª" "ã„。" # YARD::Parser::Base #: ../lib/yard/parser/base.rb:8 msgid "" "== Registering a Custom Parser\n" "To register a parser, see {SourceParser.register_parser_type}" msgstr "" "== カスタムパーサーを記録ã™ã‚‹\n" "パーサーを記録ã™ã‚‹ç‚ºã«ã¯ã€{SourceParser.register_parser_type}ã‚’å‚照。" # @see #: ../lib/yard/parser/base.rb:15 msgid "tag|see|#enumerator" msgstr "" # @see #: ../lib/yard/parser/base.rb:15 msgid "tag|see|#parse" msgstr "" # @see #: ../lib/yard/parser/base.rb:15 msgid "tag|see|#tokenize" msgstr "" # YARD::Parser::Base.parse #: ../lib/yard/parser/base.rb:17 msgid "Convenience method to create a new parser and {#parse}" msgstr "æ–°ã—ã„パーサーや(#parse)メソッドを作æˆã™ã‚‹ç‚ºã®ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰" # YARD::Parser::Base#initialize #: ../lib/yard/parser/base.rb:22 msgid "" "This default constructor does nothing. The subclass is responsible for\n" "storing the source contents and filename if they are required." msgstr "" "ã“ã®ãƒ‡ãƒ•ォルトã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã¯ä½•ã‚‚ã—ãªã„。\n" "サブクラスãŒã‚½ãƒ¼ã‚¹ã®å†…容やファイルåãŒå¿…è¦ã¨ã•れる場åˆã€ãれらを記憶ã™ã‚‹è²¬ä»»" "ãŒã‚る。" # @param [String] filename #: ../lib/yard/parser/base.rb:25 msgid "the name of the file if from disk" msgstr "ディスクã‹ã‚‰ã®å ´åˆã€ãƒ•ァイルã®åå‰" # @param [String] source #: ../lib/yard/parser/base.rb:25 msgid "the source contents" msgstr "ソースã®å†…容" # YARD::Parser::Base#parse #: ../lib/yard/parser/base.rb:30 msgid "" "This method should be implemented to parse the source and return itself." msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚½ãƒ¼ã‚¹ã®è§£æžã‚„ãれ自身を返ã™ç‚ºã«\n" "実装ã•れãªãã¦ã¯ãªã‚‰ãªã„。" # @return [Base] #: ../lib/yard/parser/base.rb:32 msgid "this method should return itself" msgstr "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãれ自身を返ã•ãªãã¦ã¯ãªã‚‰ãªã„。" # YARD::Parser::Base#tokenize #: ../lib/yard/parser/base.rb:37 msgid "This method should be implemented to tokenize given source" msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ä¸Žãˆã‚‰ã‚ŒãŸã‚½ãƒ¼ã‚¹ã‚’\n" "トークナイズã™ã‚‹ç‚ºã«å®Ÿè£…ã•れãªã‘れã°ãªã‚‰ãªã„。" # @return [Array] #: ../lib/yard/parser/base.rb:39 msgid "a list/tree of lexical tokens" msgstr "å˜èªžã®ãƒˆãƒ¼ã‚¯ãƒ³ã®å…¥ã£ãŸãƒªã‚¹ãƒˆã‚„ツリー" # YARD::Parser::Base#enumerator #: ../lib/yard/parser/base.rb:44 msgid "" "This method should be implemented to return a list of semantic tokens\n" "representing the source code to be post-processed. Otherwise the method\n" "should return nil." msgstr "" "後処ç†ã•れる為ã«ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’表ã—ã¦ã„ã‚‹æ„味ã®ã‚るトークンã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ç‚º" "ã«\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å®Ÿè£…ã•れãªã‘れã°ãªã‚‰ãªã„。\n" "ãã†ã§ãªã‘れã°ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€nilã‚’è¿”ã•ãªã‘れã°ãªã‚‰ãªã„。" # @return [Array] #: ../lib/yard/parser/base.rb:51 msgid "" "a list of semantic tokens representing the source code\n" "to be post-processed" msgstr "後処ç†ã•れる為ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’è¡¨ã™æ„味ã®ã‚るトークンã®ãƒªã‚¹ãƒˆ" # @return [nil] #: ../lib/yard/parser/base.rb:51 msgid "if no post-processing should be done" msgstr "後処ç†ãŒãªã„å ´åˆã€nilã‚’è¿”ã•ãªã‘れã°ãªã‚‰ãªã„。" # @return [CParser] #: ../lib/yard/parser/c/c_parser.rb:5 msgid "a new instance of CParser" msgstr "Cãƒ‘ãƒ¼ã‚µãƒ¼ã®æ–°ã—ã„インスタンス" # @param value #: ../lib/yard/parser/c/statement.rb:5 ../lib/yard/parser/ruby/ast_node.rb:42 msgid "the value to set the attribute source to." msgstr "ソースã®å±žæ€§ã‚’設定ã™ã‚‹,値" # YARD::Parser::Ruby::AstNode#to_s #: ../lib/yard/parser/c/statement.rb:6 ../lib/yard/parser/ruby/ast_node.rb:53 msgid "Returns the value of attribute source" msgstr "source属性ã®å…¥ã£ãŸå€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::AstNode#source= #: ../lib/yard/parser/c/statement.rb:6 ../lib/yard/parser/ruby/ast_node.rb:43 msgid "Sets the attribute source" msgstr "ソース属性を設定ã™ã‚‹ã€‚" # @param value #: ../lib/yard/parser/c/statement.rb:6 msgid "the value to set the attribute line to." msgstr "値ã«è¡Œå±žæ€§ã‚’設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader#line_num #: ../lib/yard/parser/c/statement.rb:7 msgid "Returns the value of attribute line" msgstr "行属性ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::ExtraFileObject#name= # YARD::Tags::RefTagList#name= # YARD::Templates::Section#name= #: ../lib/yard/parser/c/statement.rb:7 msgid "Sets the attribute line" msgstr "行属性を設定" # @param value #: ../lib/yard/parser/c/statement.rb:7 ../lib/yard/parser/ruby/ast_node.rb:48 msgid "the value to set the attribute file to." msgstr "ファイル属性を設定ã™ã‚‹,値" # YARD::Parser::Ruby::RipperParser#file # YARD::RegistryStore#file #: ../lib/yard/parser/c/statement.rb:8 #: ../lib/yard/parser/ruby/ruby_parser.rb:26 ../lib/yard/registry_store.rb:12 msgid "Returns the value of attribute file" msgstr "file属性ã®å€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::AstNode#file= #: ../lib/yard/parser/c/statement.rb:8 ../lib/yard/parser/ruby/ast_node.rb:49 msgid "Sets the attribute file" msgstr "ファイル属性を設定ã™ã‚‹ã€‚" # @deprecated #: ../lib/yard/parser/c/statement.rb:11 ../lib/yard/parser/ruby/ast_node.rb:46 #: ../lib/yard/parser/ruby/legacy/statement.rb:9 msgid "Groups are now defined by directives" msgstr "" # @see #: ../lib/yard/parser/c/statement.rb:11 ../lib/yard/parser/ruby/ast_node.rb:46 #: ../lib/yard/parser/ruby/legacy/statement.rb:9 msgid "tag|see|Tags::GroupDirective" msgstr "" # @param value #: ../lib/yard/parser/c/statement.rb:13 #: ../lib/yard/parser/ruby/legacy/statement.rb:11 msgid "the value to set the attribute comments_hash_flag to." msgstr "comments_hash_flag属性を設定ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::Statement#comments_hash_flag #: ../lib/yard/parser/c/statement.rb:14 #: ../lib/yard/parser/ruby/legacy/statement.rb:12 msgid "Returns the value of attribute comments_hash_flag" msgstr "comments_hash_flag属性を返ã™ã€‚" # YARD::Parser::Ruby::Legacy::Statement#comments_hash_flag= #: ../lib/yard/parser/c/statement.rb:14 #: ../lib/yard/parser/ruby/legacy/statement.rb:12 msgid "Sets the attribute comments_hash_flag" msgstr "comments_hash_flag属性を設定ã™ã‚‹ã€‚" # @return [Statement] #: ../lib/yard/parser/c/statement.rb:15 #: ../lib/yard/parser/ruby/legacy/statement.rb:13 msgid "a new instance of Statement" msgstr "ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®æ–°ã—ã„インスタンス" # @param value #: ../lib/yard/parser/c/statement.rb:39 ../lib/yard/parser/c/statement.rb:45 msgid "the value to set the attribute comments to." msgstr "値ã«ã‚³ãƒ¡ãƒ³ãƒˆå±žæ€§ã‚’設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::Legacy::Statement#comments # YARD::Parser::Ruby::RipperParser#comments #: ../lib/yard/parser/c/statement.rb:40 ../lib/yard/parser/c/statement.rb:46 #: ../lib/yard/parser/ruby/legacy/statement.rb:5 #: ../lib/yard/parser/ruby/ruby_parser.rb:26 msgid "Returns the value of attribute comments" msgstr "コメント属性ã®å€¤ã‚’è¿”ã™ã€‚" # YARD::CodeObjects::NamespaceObject#meths= #: ../lib/yard/parser/c/statement.rb:40 ../lib/yard/parser/c/statement.rb:46 msgid "Sets the attribute comments" msgstr "コメント属性を設定ã™ã‚‹" # @param value #: ../lib/yard/parser/c/statement.rb:43 msgid "the value to set the attribute block to." msgstr "値ã«block属性を設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::Legacy::Statement#block #: ../lib/yard/parser/c/statement.rb:44 #: ../lib/yard/parser/ruby/legacy/statement.rb:5 msgid "Returns the value of attribute block" msgstr "ブロック属性ã®å€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::AstNode#source= #: ../lib/yard/parser/c/statement.rb:44 msgid "Sets the attribute block" msgstr "block属性を設定ã™ã‚‹ã€‚" # @param value #: ../lib/yard/parser/c/statement.rb:44 msgid "the value to set the attribute declaration to." msgstr "値ã«å®£è¨€å±žæ€§ã‚’設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Templates::Template#section #: ../lib/yard/parser/c/statement.rb:45 msgid "Returns the value of attribute declaration" msgstr "宣言属性ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Template#section= #: ../lib/yard/parser/c/statement.rb:45 msgid "Sets the attribute declaration" msgstr "宣言属性を設定ã™ã‚‹" # @param value #: ../lib/yard/parser/c/statement.rb:51 msgid "the value to set the attribute type to." msgstr "値ã«åž‹å±žæ€§ã‚’設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::Legacy::RubyToken::TkOPASGN#op #: ../lib/yard/parser/c/statement.rb:52 msgid "Returns the value of attribute type" msgstr "型属性ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::ExtraFileObject#name= # YARD::Tags::RefTagList#name= # YARD::Templates::Section#name= #: ../lib/yard/parser/c/statement.rb:52 msgid "Sets the attribute type" msgstr "型属性を設定ã™ã‚‹" # @param value #: ../lib/yard/parser/c/statement.rb:52 msgid "the value to set the attribute overrides to." msgstr "値ã«ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰å±žæ€§ã‚’設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::Parser::Ruby::Legacy::RubyToken::TkNode#node #: ../lib/yard/parser/c/statement.rb:53 msgid "Returns the value of attribute overrides" msgstr "オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰å±žæ€§ã®å€¤ã‚’è¿”ã™" # YARD::Tags::RefTag#owner= # YARD::Tags::RefTagList#owner= #: ../lib/yard/parser/c/statement.rb:53 msgid "Sets the attribute overrides" msgstr "オーãƒãƒ¼ãƒ©ã‚¤ãƒ‰å±žæ€§ã‚’設定ã™ã‚‹" # @param value #: ../lib/yard/parser/c/statement.rb:53 msgid "the value to set the attribute statement to." msgstr "値ã«ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆå±žæ€§ã‚’設定ã™ã‚‹ãŸã‚ã®å€¤" # YARD::CodeObjects::ExtraFileObject#name # YARD::CodeObjects::ExtraFileObject#path # YARD::Parser::Ruby::Legacy::RubyToken::TkId#name # YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar#name # YARD::Tags::RefTagList#name # YARD::Templates::Section#name #: ../lib/yard/parser/c/statement.rb:54 msgid "Returns the value of attribute statement" msgstr "ステートメント属性ã®å€¤ã‚’è¿”ã™" # YARD::CodeObjects::ExtraFileObject#name= # YARD::Tags::RefTagList#name= # YARD::Templates::Section#name= #: ../lib/yard/parser/c/statement.rb:54 msgid "Sets the attribute statement" msgstr "ステートメント属性を設定ã™ã‚‹" # @return [Token] #: ../lib/yard/parser/c/statement.rb:55 msgid "a new instance of Comment" msgstr "ã‚³ãƒ¡ãƒ³ãƒˆã®æ–°ã—ã„インスタンス" # YARD::Parser::Ruby#s #: ../lib/yard/parser/ruby/ast_node.rb:5 msgid "" "Builds and s-expression by creating {AstNode} objects with\n" "the type provided by the first argument." msgstr "" "最åˆã®å¼•æ•°ã«ã‚ˆã£ã¦æä¾›ã•れãŸåž‹ã‚’用ã„{AstNode}オブジェクトを作æˆã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n" "ビルドã•れSå¼ã«ã•れる。" # @example An implicit list of keywords #: ../lib/yard/parser/ruby/ast_node.rb:24 msgid "" "ast = s(s(:kw, \"if\"), s(:kw, \"else\"))\n" "ast.type # => :list" msgstr "" # @example A method call #: ../lib/yard/parser/ruby/ast_node.rb:24 msgid "s(:command, s(:var_ref, \"mymethod\"))" msgstr "" # @example #: ../lib/yard/parser/ruby/ast_node.rb:24 msgid "tag|example|A method call" msgstr "メソッド呼ã³å‡ºã—" # @example #: ../lib/yard/parser/ruby/ast_node.rb:24 msgid "tag|example|An implicit list of keywords" msgstr "ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®æš—é»™ã®ãƒªã‚¹ãƒˆ" # @overload #: ../lib/yard/parser/ruby/ast_node.rb:24 msgid "tag|overload|s" msgstr "" # @see #: ../lib/yard/parser/ruby/ast_node.rb:24 msgid "tag|see|AstNode#initialize" msgstr "" # YARD::Parser::Ruby::AstNode #: ../lib/yard/parser/ruby/ast_node.rb:31 msgid "" "An AST node is characterized by a type and a list of children. It\n" "is most easily represented by the s-expression {#s} such as:\n" " # AST for \"if true; 5 end\":\n" " s(s(:if, s(:var_ref, s(:kw, \"true\")), s(s(:int, \"5\")), nil))" msgstr "" "ASTノードã¯åž‹ã‚„å­ã®ãƒªã‚¹ãƒˆã«ã‚ˆã£ã¦ç‰¹å¾´ä»˜ã‘られる。\n" "ãã‚Œã¯æœ€ã‚‚ç°¡å˜ã«Så¼ {#s}メソッドã«ã‚ˆã£ã¦è¡¨ã•れる。\n" "以下ã®é€šã‚Šã€‚\n" " # AST for \"if true; 5 end\":\n" " s(s(:if, s(:var_ref, s(:kw, \"true\")), s(s(:int, \"5\")), nil))" # YARD::Parser::Ruby::AstNode #: ../lib/yard/parser/ruby/ast_node.rb:36 msgid "" "The node type is not considered part of the list, only its children.\n" "So +ast[0]+ does not refer to the type, but rather the first child\n" "(or object). Items that are not +AstNode+ objects can be part of the\n" "list, like Strings or Symbols representing names. To return only\n" "the AstNode children of the node, use {#children}." msgstr "" "ノードã®åž‹ã¯ã€ãƒªã‚¹ãƒˆã®ä¸€éƒ¨ã¨ã¯è€ƒãˆã‚‰ã‚Œã¦ã„ãªã„。\n" "ãã®ç‚º,ãã®ãƒªã‚¹ãƒˆã¯å­ã ã‘ã¨ãªã‚‹ã€‚\n" "ãã—㦠+ast[0]+ ã¯åž‹ã‚’å‚ç…§ã—ãªã„ã€\n" "ã—ã‹ã—ã€æœ€åˆã®å­(やオブジェクト)ãŒé¸ã°ã‚Œã‚‹ã€‚\n" "+AstNode+ オブジェクトã§ã¯ãªã„事項ã¯ã€ãƒªã‚¹ãƒˆã®ä¸€éƒ¨ã«ã§ãã€\n" "文字列やシンボルã®ã‚ˆã†ã«ã€åå‰ã‚’表ç¾ã—ã¦ã„る。\n" "ノードã‹ã‚‰AstNodeã®å­ã ã‘è¿”ã™ã«ã¯ã€{#children}メソッドを使用ã™ã‚‹ã€‚" # @param value #: ../lib/yard/parser/ruby/ast_node.rb:41 msgid "the value to set the attribute docstring_hash_flag to." msgstr "docstring_hash_flag属性を設定ã™ã‚‹,値" # YARD::Parser::Ruby::AstNode#docstring_hash_flag # YARD::Parser::Ruby::AstNode#comments_hash_flag #: ../lib/yard/parser/ruby/ast_node.rb:42 #: ../lib/yard/parser/ruby/ast_node.rb:52 msgid "Returns the value of attribute docstring_hash_flag" msgstr "docstring_hash_flag属性ã®å€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::AstNode#docstring_hash_flag= #: ../lib/yard/parser/ruby/ast_node.rb:42 msgid "Sets the attribute docstring_hash_flag" msgstr "docstring_hash_flag属性を設定ã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/parser/ruby/ast_node.rb:42 #: ../lib/yard/parser/ruby/ast_node.rb:88 msgid "the parse of {#full_source} that the node represents" msgstr "ノードを表ã™{#full_source}ã®å…¥ã£ãŸ,parse" # @param value #: ../lib/yard/parser/ruby/ast_node.rb:42 msgid "the value to set the attribute docstring to." msgstr "docstring属性を設定ã™ã‚‹,値" # @param value #: ../lib/yard/parser/ruby/ast_node.rb:42 msgid "the value to set the attribute docstring_range to." msgstr "docstring_range属性を設定ã™ã‚‹,値" # YARD::Parser::Ruby::AstNode#docstring # YARD::Parser::Ruby::AstNode#comments # YARD::Tags::OverloadTag#docstring #: ../lib/yard/parser/ruby/ast_node.rb:43 #: ../lib/yard/parser/ruby/ast_node.rb:50 ../lib/yard/tags/overload_tag.rb:5 msgid "Returns the value of attribute docstring" msgstr "docstring属性ã®å…¥ã£ãŸå€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::AstNode#docstring_range # YARD::Parser::Ruby::AstNode#comments_range #: ../lib/yard/parser/ruby/ast_node.rb:43 #: ../lib/yard/parser/ruby/ast_node.rb:51 msgid "Returns the value of attribute docstring_range" msgstr "docstring_range属性ã®å…¥ã£ãŸå€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::AstNode#docstring= #: ../lib/yard/parser/ruby/ast_node.rb:43 msgid "Sets the attribute docstring" msgstr "docstring属性を設定ã™ã‚‹ã€‚" # YARD::Parser::Ruby::AstNode#docstring_range= #: ../lib/yard/parser/ruby/ast_node.rb:43 msgid "Sets the attribute docstring_range" msgstr "docstring_range属性を設定ã™ã‚‹ã€‚" # @param value #: ../lib/yard/parser/ruby/ast_node.rb:48 msgid "the value to set the attribute full_source to." msgstr "full_source属性を設定ã™ã‚‹,値" # @param value #: ../lib/yard/parser/ruby/ast_node.rb:48 msgid "the value to set the attribute line_range to." msgstr "line_range属性を設定ã™ã‚‹,値" # @param value #: ../lib/yard/parser/ruby/ast_node.rb:48 msgid "the value to set the attribute source_range to." msgstr "source_range属性を設定ã™ã‚‹,値" # YARD::Parser::Ruby::AstNode#full_source= #: ../lib/yard/parser/ruby/ast_node.rb:49 msgid "Sets the attribute full_source" msgstr "full_source属性を設定ã™ã‚‹ã€‚" # YARD::Parser::Ruby::AstNode#line_range= #: ../lib/yard/parser/ruby/ast_node.rb:49 msgid "Sets the attribute line_range" msgstr "line_range属性を設定ã™ã‚‹ã€‚" # YARD::Parser::Ruby::AstNode#source_range= #: ../lib/yard/parser/ruby/ast_node.rb:49 msgid "Sets the attribute source_range" msgstr "source_range属性を設定ã™ã‚‹ã€‚" # @return [Symbol] #: ../lib/yard/parser/ruby/ast_node.rb:55 msgid "the node's unique symbolic type" msgstr "独自ã®symbolicåž‹ã®ãƒŽãƒ¼ãƒ‰ç¾¤ã€‚" # @return [AstNode, nil] #: ../lib/yard/parser/ruby/ast_node.rb:58 msgid "the node's parent or nil if it is a root node." msgstr "親ノード群(ルートノードã®å ´åˆ,nilã¨ãªã‚‹ã€‚)" # @return [Range] #: ../lib/yard/parser/ruby/ast_node.rb:62 msgid "" "the character range in {#full_source} represented\n" "by the node" msgstr "ノードã«ã‚ˆã£ã¦è¡¨ã•れる{#full_source}メソッドã®ä¸­ã®å›ºæœ‰ã®ç¯„囲。" # @return [Range] #: ../lib/yard/parser/ruby/ast_node.rb:69 msgid "" "the line range in {#full_source} represented\n" "by the node" msgstr "ノードã«ã‚ˆã£ã¦è¡¨ã•れる{#full_source}メソッドã®ä¸­ã®è¡Œã®ç¯„囲。" # @return [String] #: ../lib/yard/parser/ruby/ast_node.rb:75 msgid "the filename the node was parsed from" msgstr "ノードを解æžã—ãŸ,ファイルå" # @return [String] #: ../lib/yard/parser/ruby/ast_node.rb:81 msgid "the full source that the node was parsed from" msgstr "ノードã‹ã‚‰è§£æžã•れãŸã‚½ãƒ¼ã‚¹ã®å…¨ã¦ã€‚" # YARD::Parser::Ruby::AstNode::KEYWORDS #: ../lib/yard/parser/ruby/ast_node.rb:94 msgid "List of all known keywords" msgstr "è‘—åãªã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®ãƒªã‚¹ãƒˆã€‚" # YARD::Parser::Ruby::AstNode.node_class_for #: ../lib/yard/parser/ruby/ast_node.rb:106 msgid "" "Finds the node subclass that should be instantiated for a specific\n" "node type" msgstr "" "特定ã®ãƒŽãƒ¼ãƒ‰åž‹ç”¨ã®\n" "インスタンス化ã•れるã¹ãサブクラスã®ãƒŽãƒ¼ãƒ‰ã‚’見ã¤ã‘る。" # YARD::Parser::Ruby::AstNode.node_class_for # YARD::Parser::Ruby::AstNode#initialize # YARD::Parser::Ruby::AstNode#== #: ../lib/yard/parser/ruby/ast_node.rb:110 #: ../lib/yard/parser/ruby/ast_node.rb:152 #: ../lib/yard/parser/ruby/ast_node.rb:165 msgid "Creating an AstNode" msgstr "AstNodeを作æˆã™ã‚‹ã€‚" # @return [Class] #: ../lib/yard/parser/ruby/ast_node.rb:110 msgid "a subclass of AstNode to instantiate the node with." msgstr "nodeをインスタンス化ã™ã‚‹AstNodeã®ã‚µãƒ–クラス" # @param [Symbol] type #: ../lib/yard/parser/ruby/ast_node.rb:110 msgid "the node type to find a subclass for" msgstr "ノードã®åž‹ç”¨ã®ã‚µãƒ–クラスを見ã¤ã‘ã‚‹,åž‹" # YARD::Parser::Ruby::AstNode#initialize #: ../lib/yard/parser/ruby/ast_node.rb:140 msgid "Creates a new AST node" msgstr "æ–°ã—ã„ASTノードを作æˆã™ã‚‹ã€‚" # @return [AstNode] #: ../lib/yard/parser/ruby/ast_node.rb:152 msgid "a new instance of AstNode" msgstr "AstNodeã®æ–°ã—ã„インスタンス" # @param [Hash] opts #: ../lib/yard/parser/ruby/ast_node.rb:152 msgid "any extra line options" msgstr "行ã®ç‚ºã®è¿½åŠ ã®è¨­å®š" # @param [Array] #: ../lib/yard/parser/ruby/ast_node.rb:152 msgid "tag|param|arr" msgstr "" # @param [Array] arr #: ../lib/yard/parser/ruby/ast_node.rb:152 msgid "the child nodes" msgstr "å­ã®ãƒŽãƒ¼ãƒ‰" # @param [Symbol] type #: ../lib/yard/parser/ruby/ast_node.rb:152 msgid "the type of node being created" msgstr "作æˆã•れるノードã®ã‚¿ã‚¤ãƒ—" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:165 msgid "" "whether the node is equal to another by checking\n" "the list and type" msgstr "ノードãŒãƒªã‚¹ãƒˆã‹åž‹ã‹ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ä»–ã¨ç­‰ã—ããªã‚‹ã‹ã©ã†ã‹" # YARD::Parser::Ruby::AstNode#jump #: ../lib/yard/parser/ruby/ast_node.rb:172 msgid "" "Searches through the node and all descendants and returns the\n" "first node with a type matching any of +node_types+, otherwise\n" "returns the original node (self)." msgstr "" "ノードや,å…¨ã¦ã®å­å­«ã®ä¸­ã‚’検索ã™ã‚‹ã€‚\n" "+node_types+ ã®å…¥ã£ãŸåž‹ãƒžãƒƒãƒã¨å…±ã«\n" "最åˆã®ãƒŽãƒ¼ãƒ‰ã‚’è¿”ã™ã€‚\n" "ã•ã‚‚ãªã‘れã°ã€(自身ã®)オリジナルノードを返ã™ã€‚" # YARD::Parser::Ruby::AstNode#jump # YARD::Parser::Ruby::AstNode#children # YARD::Parser::Ruby::AstNode#traverse #: ../lib/yard/parser/ruby/ast_node.rb:191 #: ../lib/yard/parser/ruby/ast_node.rb:197 #: ../lib/yard/parser/ruby/ast_node.rb:206 msgid "Traversing a Node" msgstr "ノードを辿る。" # @param [Array] node_types #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "a set of node types to match" msgstr "マッãƒã™ã‚‹ãƒŽãƒ¼ãƒ‰ã®åž‹ã®è¨­å®šã€‚" # @example If the node types are not present in the AST #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "" "ast = YARD.parse(\"def x; end\")\n" "ast.jump(:def)" msgstr "" # @example Returns first 'def' or 'class' statement #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "" "ast = YARD.parse_string(\"class X; def y; end end\")\n" "ast.jump(:def, :class).first\n" "# =>" msgstr "" # @example Returns the first method definition in a block of code #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "" "ast = YARD.parse_string(\"if true; def x; end end\").ast\n" "ast.jump(:def)\n" "# => s(:def, s(:ident, \"x\"), s(:params, nil, nil, nil, nil,\n" "# nil), s(s(:void_stmt, )))" msgstr "" # @return [self] #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "if no node was found" msgstr "ノードãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆ" # @example #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "tag|example|If the node types are not present in the AST" msgstr "ノードã®åž‹ãŒASTã®ä¸­ã«æ¸¡ã•ãªã„å ´åˆ" # @example #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "tag|example|Returns first 'def' or 'class' statement" msgstr "最åˆã®'def'ã‚„'class'ステートメントを返ã™ã€‚" # @example #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "tag|example|Returns the first method definition in a block of code" msgstr "コードã®ãƒ–ロックã®ä¸­ã®æœ€åˆã®ãƒ¡ã‚½ãƒƒãƒ‰å®šç¾©ã‚’è¿”ã™ã€‚" # @param [Array] #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "tag|param|node_types" msgstr "" # @return [AstNode] #: ../lib/yard/parser/ruby/ast_node.rb:191 msgid "the matching node, if one was found" msgstr "マッãƒã™ã‚‹ãƒŽãƒ¼ãƒ‰(一ã¤è¦‹ã¤ã‹ã£ãŸå ´åˆ)" # @return [Array] #: ../lib/yard/parser/ruby/ast_node.rb:197 msgid "the {AstNode} children inside the node" msgstr "ノード内部ã®{AstNode}ã®å­ã€‚" # YARD::Parser::Ruby::AstNode#traverse #: ../lib/yard/parser/ruby/ast_node.rb:202 msgid "" "Traverses the object and yields each node (including descendants) in order." msgstr "" "オブジェクトを辿りã€\n" "順番ã«ãれãžã‚Œã®ãƒŽãƒ¼ãƒ‰(å­å­«ã‚’å«ã‚“ã§ã„ã‚‹)ã‚’\n" "yieldã™ã‚‹ã€‚" # @yield #: ../lib/yard/parser/ruby/ast_node.rb:206 msgid "each descendant node in order" msgstr "æ•´ç†ã•れãŸãれãžã‚Œã®å­å­«ã®ãƒŽãƒ¼ãƒ‰ã€‚" # @yieldparam [AstNode] self, #: ../lib/yard/parser/ruby/ast_node.rb:206 msgid "or a child/descendant node" msgstr "自身やå­ã‚„å­å­«ã®ãƒŽãƒ¼ãƒ‰ã€‚" # @yieldparam [AstNode] #: ../lib/yard/parser/ruby/ast_node.rb:206 msgid "tag|yieldparam|self," msgstr "" # YARD::Parser::Ruby::AstNode#token? # YARD::Parser::Ruby::AstNode#ref? # YARD::Parser::Ruby::AstNode#literal? # YARD::Parser::Ruby::AstNode#kw? # YARD::Parser::Ruby::AstNode#call? # YARD::Parser::Ruby::AstNode#condition? #: ../lib/yard/parser/ruby/ast_node.rb:217 #: ../lib/yard/parser/ruby/ast_node.rb:223 #: ../lib/yard/parser/ruby/ast_node.rb:228 #: ../lib/yard/parser/ruby/ast_node.rb:233 #: ../lib/yard/parser/ruby/ast_node.rb:238 #: ../lib/yard/parser/ruby/ast_node.rb:243 #: ../lib/yard/parser/ruby/ast_node.rb:248 #: ../lib/yard/parser/ruby/ast_node.rb:253 #: ../lib/yard/parser/ruby/ast_node.rb:258 msgid "Node Meta Types" msgstr "" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:217 msgid "whether the node is a token" msgstr "ノードãŒãƒˆãƒ¼ã‚¯ãƒ³ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:223 msgid "" "whether the node is a reference (variable,\n" "constant name)" msgstr "ノードãŒå‚ç…§ã™ã‚‹ã‹ã©ã†ã‹(変数,定数å)" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:228 msgid "whether the node is a literal value" msgstr "ノードãŒãƒªãƒ†ãƒ©ãƒ«å€¤ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:233 msgid "whether the node is a keyword" msgstr "ノードãŒã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:238 msgid "whether the node is a method call" msgstr "ノードãŒãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:243 msgid "whether the node is a method definition" msgstr "ノードãŒãƒ¡ã‚½ãƒƒãƒ‰å®šç¾©ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:248 msgid "whether the node is a if/elsif/else condition" msgstr "ノードãŒifã‚„elsifã‚„elseã®æ¡ä»¶ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:253 msgid "whether the node is a loop" msgstr "ノードãŒãƒ«ãƒ¼ãƒ—ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:258 msgid "whether the node has a block" msgstr "ノードãŒblockã‹ã©ã†ã‹" # YARD::Parser::Ruby::AstNode#has_line? # YARD::Parser::Ruby::AstNode#line # YARD::Parser::Ruby::AstNode#first_line #: ../lib/yard/parser/ruby/ast_node.rb:265 #: ../lib/yard/parser/ruby/ast_node.rb:270 #: ../lib/yard/parser/ruby/ast_node.rb:275 msgid "Getting Line Information" msgstr "è¡Œã®æƒ…報をå–å¾—ã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/parser/ruby/ast_node.rb:265 msgid "whether the node has a {#line_range} set" msgstr "ノードãŒ{#line_range}設定をæŒã£ã¦ã„ã‚‹ã‹ã©ã†ã‹" # @return [Fixnum] #: ../lib/yard/parser/ruby/ast_node.rb:270 msgid "the starting line number of the node" msgstr "ãƒŽãƒ¼ãƒ‰ã®æ–‡å­—列ã®è¡Œæ•°" # @return [String] #: ../lib/yard/parser/ruby/ast_node.rb:275 msgid "the first line of source represented by the node." msgstr "ノードã«ã‚ˆã£ã¦è¡¨ã•ã‚Œã‚‹ã‚½ãƒ¼ã‚¹ã®æœ€åˆã®è¡Œ" # YARD::Parser::Ruby::AstNode#show # YARD::Parser::Ruby::AstNode#pretty_print # YARD::Parser::Ruby::AstNode#inspect #: ../lib/yard/parser/ruby/ast_node.rb:282 #: ../lib/yard/parser/ruby/ast_node.rb:287 #: ../lib/yard/parser/ruby/ast_node.rb:322 msgid "Printing a Node" msgstr "ノードをプリントã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/parser/ruby/ast_node.rb:282 msgid "the first line of source the node represents" msgstr "ノードを表ã™ã‚½ãƒ¼ã‚¹ã®æœ€åˆã®è¡Œ" # @return [nil] #: ../lib/yard/parser/ruby/ast_node.rb:287 msgid "pretty prints the node" msgstr "ノードã®å‡ºåŠ›" # @return [String] #: ../lib/yard/parser/ruby/ast_node.rb:322 msgid "inspects the object" msgstr "è§£æžã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Templates::Helpers::BaseHelper#globals #: ../lib/yard/parser/ruby/ast_node.rb:330 #: ../lib/yard/parser/ruby/ast_node.rb:340 #: ../lib/yard/parser/ruby/ast_node.rb:358 #: ../lib/yard/parser/ruby/ast_node.rb:359 #: ../lib/yard/parser/ruby/ast_node.rb:361 #: ../lib/yard/parser/ruby/ast_node.rb:365 #: ../lib/yard/parser/ruby/ast_node.rb:370 #: ../lib/yard/parser/ruby/ast_node.rb:371 #: ../lib/yard/parser/ruby/ast_node.rb:374 #: ../lib/yard/parser/ruby/ast_node.rb:375 #: ../lib/yard/parser/ruby/ast_node.rb:378 #: ../lib/yard/parser/ruby/ast_node.rb:379 #: ../lib/yard/parser/ruby/ast_node.rb:380 #: ../lib/yard/parser/ruby/ast_node.rb:381 #: ../lib/yard/parser/ruby/ast_node.rb:382 #: ../lib/yard/parser/ruby/ast_node.rb:383 #: ../lib/yard/parser/ruby/ast_node.rb:386 #: ../lib/yard/parser/ruby/ast_node.rb:387 #: ../lib/yard/parser/ruby/ast_node.rb:388 #: ../lib/yard/parser/ruby/ast_node.rb:390 #: ../lib/yard/parser/ruby/ast_node.rb:395 #: ../lib/yard/parser/ruby/ast_node.rb:404 #: ../lib/yard/parser/ruby/ast_node.rb:405 #: ../lib/yard/parser/ruby/ast_node.rb:411 #: ../lib/yard/parser/ruby/ast_node.rb:415 #: ../lib/yard/parser/ruby/ast_node.rb:420 #: ../lib/yard/parser/ruby/ast_node.rb:421 #: ../lib/yard/parser/ruby/ast_node.rb:422 #: ../lib/yard/parser/ruby/ast_node.rb:423 #: ../lib/yard/parser/ruby/ast_node.rb:425 #: ../lib/yard/parser/ruby/ast_node.rb:430 #: ../lib/yard/parser/ruby/ast_node.rb:436 #: ../lib/yard/parser/ruby/ast_node.rb:440 #: ../lib/yard/parser/ruby/ast_node.rb:445 #: ../lib/yard/parser/ruby/ast_node.rb:446 #: ../lib/yard/parser/ruby/ast_node.rb:447 #: ../lib/yard/parser/ruby/ast_node.rb:448 #: ../lib/yard/parser/ruby/ast_node.rb:450 #: ../lib/yard/parser/ruby/ast_node.rb:458 #: ../lib/yard/parser/ruby/ast_node.rb:461 #: ../lib/yard/parser/ruby/ast_node.rb:462 #: ../lib/yard/parser/ruby/ast_node.rb:463 #: ../lib/yard/parser/ruby/ast_node.rb:464 #: ../lib/yard/parser/ruby/ast_node.rb:467 #: ../lib/yard/parser/ruby/ast_node.rb:468 #: ../lib/yard/parser/ruby/ast_node.rb:469 #: ../lib/yard/parser/ruby/ast_node.rb:472 #: ../lib/yard/parser/ruby/ast_node.rb:473 #: ../lib/yard/parser/ruby/ast_node.rb:474 #: ../lib/yard/parser/ruby/ast_node.rb:475 #: ../lib/yard/parser/ruby/ast_node.rb:479 #: ../lib/yard/parser/ruby/ast_node.rb:480 #: ../lib/yard/parser/ruby/ast_node.rb:481 #: ../lib/yard/parser/ruby/ast_node.rb:482 #: ../lib/yard/parser/ruby/ast_node.rb:484 #: ../lib/yard/parser/ruby/ast_node.rb:485 msgid "Managing node state" msgstr "ノードã®çŠ¶æ…‹ã®ç®¡ç†" # YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd #: ../lib/yard/parser/ruby/ast_node.rb:330 msgid "Resets node state in tree" msgstr "ツリーã®ä¸­ã§ãƒŽãƒ¼ãƒ‰ã®çŠ¶æ…‹ã‚’ãƒªã‚»ãƒƒãƒˆã™ã‚‹" # YARD::Parser::Ruby::AstNode#reset_line_info #: ../lib/yard/parser/ruby/ast_node.rb:339 msgid "Resets line information" msgstr "行情報をリセットã™ã‚‹ã€‚" # YARD::CodeObjects::MethodObject #: ../lib/yard/parser/ruby/ast_node.rb:479 msgid "Represents a lone comment block in source" msgstr "ソースã®ä¸­ã®å˜ä¸€ã®ã‚³ãƒ¡ãƒ³ãƒˆãƒ–ロックを表ã™" # YARD::Parser::Ruby::Legacy::RubyToken #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:7 msgid "Legacy lexical tokenizer module." msgstr "" # YARD::Parser::Ruby::Legacy::RubyToken::Token #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:17 msgid "Represents a token in the Ruby lexer" msgstr "Ruby lexerã®ä¸­ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’表ã™" # @return [Integer] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:20 msgid "" "the line number in the file/stream the token is\n" "located." msgstr "トークンãŒä½ç½®ã™ã‚‹,ファイルやストリームã®ä¸­ã®è¡Œã®æ•°" # @return [Integer] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:24 msgid "" "the character number in the file/stream the token\n" "is located." msgstr "トークンãŒä½ç½®ã™ã‚‹,ファイルやストリームã®ä¸­ã®characterã®æ•°" # @return [String] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:27 msgid "the token text value" msgstr "トークンã®ãƒ†ã‚­ã‚¹ãƒˆã®å€¤" # @return [Symbol] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:30 msgid "the lexical state at the token" msgstr "トークンã«ãŠã‘ã‚‹å˜èªžã®çŠ¶æ…‹" # YARD::Parser::Ruby::Legacy::RubyToken::Token#initialize #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:36 msgid "Creates a new Token object" msgstr "æ–°ã—ã„トークンオブジェクトを作æˆã™ã‚‹" # @return [Token] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:38 msgid "a new instance of Token" msgstr "ãƒˆãƒ¼ã‚¯ãƒ³ã®æ–°ã—ã„インスタンス" # @param [Integer] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:38 msgid "tag|param|char_no" msgstr "" # @param [Integer] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:38 msgid "tag|param|line_no" msgstr "" # @param [Integer] char_no #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:38 msgid "the char number to initialize the token to" msgstr "char numberをトークンã«ã‚¤ãƒ‹ã‚·ãƒ£ãƒ©ã‚¤ã‚ºã™ã‚‹, char number" # @param [Integer] line_no #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:38 msgid "the line number to initialize the token to" msgstr "行数をトークンã«ã‚¤ãƒ‹ã‚·ãƒ£ãƒ©ã‚¤ã‚ºã™ã‚‹ã€‚行数" # YARD::Parser::Ruby::Legacy::RubyToken::Token#set_text #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:45 msgid "Chainable way to sets the text attribute" msgstr "テキスト属性を設定ã™ã‚‹ç‚ºã®æ–¹æ³•ã‚’ç´ä»˜ã‘る。" # @param [String] text #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:48 msgid "the new text" msgstr "æ–°ã—ã„テキスト" # @return [Token] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:48 msgid "this token object" msgstr "ã“ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚ªãƒ–ジェクト" # YARD::Parser::Ruby::Legacy::RubyToken::TkBlockContents #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:55 msgid "Represents a block" msgstr "ブロックを表ã™" # YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:60 msgid "Represents an end statement" msgstr "ステートメントã®çµ‚りを表ã™ã€‚" # YARD::Parser::Ruby::Legacy::RubyToken::TkNode#node #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:66 msgid "Returns the value of attribute node" msgstr "node属性ã®å€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:69 msgid "Represents whitespace" msgstr "空白を表ã™" # YARD::Parser::Ruby::Legacy::RubyToken::TkId #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:73 msgid "Represents a Ruby identifier" msgstr "Rubyã®IDを表ã™ã€‚" # @return [TkId] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:74 msgid "a new instance of TkId" msgstr "TkIdã®æ–°ã—ã„インスタンス" # YARD::Parser::Ruby::Legacy::RubyToken::TkKW #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:82 msgid "Represents a Ruby keyword" msgstr "Rubyキーワードを表ã™ã€‚" # YARD::Parser::Ruby::Legacy::RubyToken::TkVal #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:86 msgid "Represents a Ruby value" msgstr "Rubyã®å€¤ã‚’表ã™ã€‚" # @return [TkVal] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:87 msgid "a new instance of TkVal" msgstr "TkValã®æ–°ã—ã„インスタンス" # @return [TkOPASGN] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:100 msgid "a new instance of TkOPASGN" msgstr "TkOPASGNã®æ–°ã—ã„インスタンス" # YARD::Parser::Ruby::Legacy::RubyToken::TkOPASGN#op #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:106 msgid "Returns the value of attribute op" msgstr "op属性ã®å€¤ã‚’è¿”ã™ã€‚" # @return [TkUnknownChar] #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:109 msgid "a new instance of TkUnknownChar" msgstr "TkUnknownCharã®æ–°ã—ã„インスタンス" # YARD::Parser::Ruby::Legacy::RubyToken::TkReading2Token #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:284 msgid "" "{ reading => token_class }\n" "{ reading => [token_class, *opt] }" msgstr "" # YARD::Parser::Ruby::Legacy::RubyLex #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:330 msgid "Lexical analyzer for Ruby source" msgstr "Rubyソース用ã®å˜èªžè§£æž" # YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:333 msgid "" "Read an input stream character by character. We allow for unlimited\n" "ungetting of characters just read." msgstr "" "character毎ã«ã‚¹ãƒˆãƒªãƒ¼ãƒ ã®å…¥åŠ›ã‚’èª­ã¿è¾¼ã‚€ã€‚\n" "ãã“ã§èª­ã¾ã‚ŒãŸcharacterã®æ›¸ã戻ã—を無制é™ã«è¨±å¯ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:336 msgid "" "We simplify the implementation greatly by reading the entire input\n" "into a buffer initially, and then simply traversing it using\n" "pointers." msgstr "" "最åˆã«ãƒãƒƒãƒ•ã‚¡ã®ä¸­ã¸å…¨ã¦ã®å…¥åŠ›ã‚’èª­ã¿è¾¼ã‚€äº‹ã«ã‚ˆã£ã¦\n" "実装ã™ã‚‹äº‹ã‚’éžå¸¸ã«ç°¡æ½”ã«ã™ã‚‹ã€‚\n" "ãã—ã¦ã€ãれã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’利用ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ç°¡å˜ã«è¾¿ã‚‹ã“ã¨ãŒã§ãる。" # YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:340 msgid "" "We also have to allow for the here document diversion. This\n" "little gem comes about when the lexer encounters a here\n" "document. At this point we effectively need to split the input\n" "stream into two parts: one to read the body of the here document,\n" "the other to read the rest of the input line where the here\n" "document was initially encountered. For example, we might have" msgstr "" "ç§é”㯠複数ã®ãƒ’アドキュメント も考慮ã—ãªã‘れã°ãªã‚‰ãªã„。\n" "ã“ã®è¤‡æ•°ã®ãƒ’アドキュメントã¯ã€å­—å¥è§£æžå™¨ãŒãƒ’アドキュメントã«å‡ºä¼šã†æ™‚ã«èµ·ã“" "る。\n" "ã“ã®æ™‚点ã§ç§é”ã¯ã€äº‹å®Ÿä¸Š2ã¤ã®éƒ¨åˆ†ã«å…¥åŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’åˆ†å‰²ã™ã‚‹å¿…è¦ãŒã‚る。\n" "一ã¤ã¯ãƒ’ã‚¢ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æœ¬ä½“を読ã¿è¾¼ã‚€éƒ¨åˆ†ã€\n" "ã‚‚ã†ä¸€ã¤ã¯ã€ãれ以外ã®\n" "ãƒ’ã‚¢ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒæœ€åˆã«å‡ºä¼šã£ãŸæ‰€ã‹ã‚‰ã€\n" "å…¥åŠ›è¡Œã®æ®‹ã‚Šã‚’読ã¿è¾¼ã‚€ç‚ºã®éƒ¨åˆ†ã€‚\n" "例ãˆã°ã€" # YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:347 msgid "" " do_something(<<-A, <<-B)\n" " stuff\n" " for\n" " A\n" " stuff\n" " for\n" " B" msgstr "" # YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader #: ../lib/yard/parser/ruby/legacy/ruby_lex.rb:355 msgid "" "When the lexer encounters the <] #: ../lib/yard/parser/ruby/legacy/statement.rb:49 msgid "the first to last lines of Ruby source" msgstr "Rubyã®ã‚½ãƒ¼ã‚¹ã®å…¥ã£ãŸ,最åˆã‹ã‚‰æœ€å¾Œã¾ã§ã®è¡Œ" # @param value #: ../lib/yard/parser/ruby/legacy/statement_list.rb:6 msgid "the value to set the attribute encoding_line to." msgstr "encoding_line属性を設定ã™ã‚‹,値" # @param value #: ../lib/yard/parser/ruby/legacy/statement_list.rb:6 msgid "the value to set the attribute shebang_line to." msgstr "shebang_line属性を設定ã™ã‚‹,値" # YARD::Parser::Ruby::Legacy::StatementList#encoding_line # YARD::Parser::Ruby::RipperParser#encoding_line #: ../lib/yard/parser/ruby/legacy/statement_list.rb:7 #: ../lib/yard/parser/ruby/ruby_parser.rb:27 msgid "Returns the value of attribute encoding_line" msgstr "encoding_line属性を返ã™ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#shebang_line # YARD::Parser::Ruby::RipperParser#shebang_line #: ../lib/yard/parser/ruby/legacy/statement_list.rb:7 #: ../lib/yard/parser/ruby/ruby_parser.rb:27 msgid "Returns the value of attribute shebang_line" msgstr "shebang_line属性ã®å€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#encoding_line= #: ../lib/yard/parser/ruby/legacy/statement_list.rb:7 msgid "Sets the attribute encoding_line" msgstr "encoding_line属性を設定ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#shebang_line= #: ../lib/yard/parser/ruby/legacy/statement_list.rb:7 msgid "Sets the attribute shebang_line" msgstr "shebang_line属性を設定ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList::OPEN_BLOCK_TOKENS #: ../lib/yard/parser/ruby/legacy/statement_list.rb:9 msgid "" "The following list of tokens will require a block to be opened\n" "if used at the beginning of a statement." msgstr "" "ç¶šãトークンã®ãƒªã‚¹ãƒˆã¯ã€\n" "ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®æœ€åˆã§ä½¿ã†å ´åˆã€ãƒ–ロックを必è¦ã¨ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#initialize #: ../lib/yard/parser/ruby/legacy/statement_list.rb:14 msgid "Creates a new statement list" msgstr "æ–°ã—ã„ステートメントã®ãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹ã€‚" # @return [StatementList] #: ../lib/yard/parser/ruby/legacy/statement_list.rb:16 msgid "a new instance of StatementList" msgstr "StatementListã®æ–°ã—ã„インスタンス" # @param [TokenList, String] content #: ../lib/yard/parser/ruby/legacy/statement_list.rb:16 msgid "the tokens to create the list from" msgstr "トークンã®ãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹,トークン" # YARD::Parser::Ruby::Legacy::StatementList#next_statement #: ../lib/yard/parser/ruby/legacy/statement_list.rb:37 msgid "Returns the next statement in the token stream" msgstr "処ç†ã™ã‚‹ãƒˆãƒ¼ã‚¯ãƒ³ã®ä¸­ã®æ¬¡ã®æ–‡ã‚’è¿”ã™ã€‚" # @return [Statement] #: ../lib/yard/parser/ruby/legacy/statement_list.rb:39 msgid "the next statement" msgstr "次ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ" # YARD::Parser::Ruby::Legacy::StatementList#process_token #: ../lib/yard/parser/ruby/legacy/statement_list.rb:117 msgid "Processes a single token" msgstr "å˜ä¸€ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’処ç†ã™ã‚‹ã€‚" # @param [RubyToken::Token] #: ../lib/yard/parser/ruby/legacy/statement_list.rb:119 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:183 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:202 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:257 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:282 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:294 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:349 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:367 msgid "tag|param|tk" msgstr "" # @param [RubyToken::Token] tk #: ../lib/yard/parser/ruby/legacy/statement_list.rb:119 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:183 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:202 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:257 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:282 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:294 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:349 #: ../lib/yard/parser/ruby/legacy/statement_list.rb:367 msgid "the token to process" msgstr "処ç†ã®ç‚ºã®ãƒˆãƒ¼ã‚¯ãƒ³" # YARD::Parser::Ruby::Legacy::StatementList#process_block_token #: ../lib/yard/parser/ruby/legacy/statement_list.rb:181 msgid "Processes a token in a block" msgstr "ブロックã®ä¸­ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’処ç†ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#process_initial_comment #: ../lib/yard/parser/ruby/legacy/statement_list.rb:199 msgid "Processes a comment token that comes before a statement" msgstr "statement処ç†ã®å‰ã«ãƒˆãƒ¼ã‚¯ãƒ³ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/parser/ruby/legacy/statement_list.rb:202 msgid "whether or not +tk+ was processed as an initial comment" msgstr "" "+tk+ ãŒã“ã®#process_initial_commentãƒ¡ã‚½ãƒƒãƒ‰ãŒæ­£å¸¸ã«å‡¦ç†ã•れãŸã‹ã©ã†ã‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#process_simple_block_opener #: ../lib/yard/parser/ruby/legacy/statement_list.rb:253 msgid "" "Processes a simple block-opening token;\n" "that is, a block opener such as +begin+ or +do+\n" "that isn't followed by an expression" msgstr "" "後ã«å¼ãŒãªã„ +begin+ ã‚„ +do+ ç­‰ã®ã‚ˆã†ãªå˜ç´”ãªãƒˆãƒ¼ã‚¯ãƒ³ã®\n" "blockã‚’é–‹ã処ç†ã‚’ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#process_complex_block_opener #: ../lib/yard/parser/ruby/legacy/statement_list.rb:278 msgid "" "Processes a complex block-opening token;\n" "that is, a block opener such as +while+ or +for+\n" "that is followed by an expression" msgstr "" "後ã«å¼ãŒæ¥ã‚‹ +while+ ã‚„ +for+ ç­‰ã®ã‚ˆã†ãªãƒˆãƒ¼ã‚¯ãƒ³ã®\n" "複雑ãªblockã‚’é–‹ã処ç†ã‚’ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#process_statement_end #: ../lib/yard/parser/ruby/legacy/statement_list.rb:292 msgid "Processes a token that closes a statement" msgstr "ステートメントを閉ã˜ã‚‹ãƒˆãƒ¼ã‚¯ãƒ³ã‚’処ç†ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#balances? #: ../lib/yard/parser/ruby/legacy/statement_list.rb:345 msgid "Handles the balancing of parentheses and blocks" msgstr "丸括弧ã¨ãƒ–ロックã®ä¸¡ç«‹ã®ç‚ºã®å‡¦ç†ã™ã‚‹ã€‚" # @return [Boolean] #: ../lib/yard/parser/ruby/legacy/statement_list.rb:349 msgid "" "whether or not the current statement's parentheses and blocks\n" "are balanced after +tk+" msgstr "ç¾åœ¨ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ä¸¸æ‹¬å¼§ã¨ãƒ–ロック㌠+tk+ ã®å¾Œã§ä¸¡ç«‹ã™ã‚‹ã‹ã©ã†ã‹ã€‚" # YARD::Parser::Ruby::Legacy::StatementList#push_token #: ../lib/yard/parser/ruby/legacy/statement_list.rb:364 msgid "" "Adds a token to the current statement,\n" "unless it's a newline, semicolon, or comment" msgstr "" "ç¾åœ¨ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ç‚ºã«ãƒˆãƒ¼ã‚¯ãƒ³ã‚’追加ã™ã‚‹ã€‚\n" "ãŸã ã—改行やã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ã‚„ã€ã‚³ãƒ¡ãƒ³ãƒˆã®å ´åˆã‚’除ã。" # YARD::Parser::Ruby::Legacy::StatementList#peek_no_space #: ../lib/yard/parser/ruby/legacy/statement_list.rb:373 msgid "Returns the next token in the stream that's not a space" msgstr "スペースã®ç„¡ã„ストリームã®ä¸­ã®æ¬¡ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’è¿”ã™ã€‚" # @return [RubyToken::Token] #: ../lib/yard/parser/ruby/legacy/statement_list.rb:375 msgid "the next non-space token" msgstr "スペースã®ç„¡ã„次ã®ãƒˆãƒ¼ã‚¯ãƒ³" # @return [TokenList] #: ../lib/yard/parser/ruby/legacy/token_list.rb:6 msgid "a new instance of TokenList" msgstr "TokenListã®æ–°ã—ã„インスタンス" # @param [TokenList, Token, String] tokens #: ../lib/yard/parser/ruby/legacy/token_list.rb:25 msgid "" "A list of tokens. If the token is a string, it\n" "is parsed with {RubyLex}." msgstr "トークンã®ãƒªã‚¹ãƒˆã€‚ãƒˆãƒ¼ã‚¯ãƒ³ãŒæ–‡å­—列ã®å ´åˆã€{RubyLex}ã¨å…±ã«è§£æžã•れる。" # @param [TokenList, Token, String] #: ../lib/yard/parser/ruby/legacy/token_list.rb:25 msgid "tag|param|tokens" msgstr "" # YARD::Parser::Ruby::RubyParser #: ../lib/yard/parser/ruby/ruby_parser.rb:7 #: ../lib/yard/parser/ruby/ruby_parser.rb:11 #: ../lib/yard/parser/ruby/ruby_parser.rb:18 #: ../lib/yard/parser/ruby/ruby_parser.rb:19 #: ../lib/yard/parser/ruby/ruby_parser.rb:20 msgid "Ruby 1.9 parser" msgstr "" # YARD::Parser::Ruby::RipperParser#ast # YARD::Parser::Ruby::RipperParser#root #: ../lib/yard/parser/ruby/ruby_parser.rb:26 #: ../lib/yard/parser/ruby/ruby_parser.rb:28 msgid "Returns the value of attribute ast" msgstr "ast属性ã®å€¤ã‚’è¿”ã™ã€‚" # YARD::Parser::Ruby::RipperParser#charno #: ../lib/yard/parser/ruby/ruby_parser.rb:26 msgid "Returns the value of attribute charno" msgstr "charno属性ã®å€¤ã‚’è¿”ã™ã€‚" # @return [RipperParser] #: ../lib/yard/parser/ruby/ruby_parser.rb:29 msgid "a new instance of RipperParser" msgstr "RipperParserã®æ–°ã—ã„インスタンス" # YARD::Parser::UndocumentableError #: ../lib/yard/parser/source_parser.rb:7 msgid "" "Raised when an object is recognized but cannot be documented. This\n" "generally occurs when the Ruby syntax used to declare an object is\n" "too dynamic in nature." msgstr "" "オブジェクトãŒèªè­˜ã•れる時ã«ä¾‹å¤–を上ã’る。\n" "ã—ã‹ã—ã€è¨˜è¿°ã•れる事ã¯ãªã„。\n" "ã“れã¯é€šå¸¸ã‚ªãƒ–ジェクトを宣言ã™ã‚‹ç‚ºã«\n" "使ã‚れãŸRubyæ§‹æ–‡ãŒå‹•çš„ã™ãŽã‚‹æ™‚ã«èµ·ã‚‹ã€‚" # YARD::Parser::ParserSyntaxError #: ../lib/yard/parser/source_parser.rb:12 msgid "Raised when the parser sees a Ruby syntax error" msgstr "パーサーãŒRubyã®æ§‹æ–‡ã®ã‚¨ãƒ©ãƒ¼ã‚’発見ã—ãŸæ™‚ã€ä¾‹å¤–を上ã’る。" # YARD::Parser::OrderedParser #: ../lib/yard/parser/source_parser.rb:15 msgid "" "Responsible for parsing a list of files in order. The\n" "{#parse} method of this class can be called from the\n" "{SourceParser#globals} globals state list to re-enter\n" "parsing for the remainder of files in the list recursively." msgstr "" # @see #: ../lib/yard/parser/source_parser.rb:20 #: ../lib/yard/parser/source_parser.rb:41 msgid "tag|see|Processor#parse_remaining_files" msgstr "" # @param [Array] files #: ../lib/yard/parser/source_parser.rb:22 msgid "the list of remaining files to parse" msgstr "è§£æžã®ãŸã‚ã®æ®‹ã‚Šã®ãƒ•ァイルã®ãƒªã‚¹ãƒˆ" # YARD::Parser::OrderedParser#initialize #: ../lib/yard/parser/source_parser.rb:25 msgid "" "Creates a new OrderedParser with the global state and a list\n" "of files to parse." msgstr "" # @note #: ../lib/yard/parser/source_parser.rb:32 msgid "" "OrderedParser sets itself as the +ordered_parser+ key on\n" "global_state for later use in {Handlers::Processor}." msgstr "" # @return [CParser] #: ../lib/yard/parser/source_parser.rb:32 msgid "a new instance of OrderedParser" msgstr "OrderedParserã®æ–°ã—ã„インスタンス" # @return [Processor] #: ../lib/yard/parser/source_parser.rb:32 msgid "" "a structure containing all global\n" "state during parsing" msgstr "è§£æžä¸­ã®å…¨ã¦ã®å…¨ä½“ã®çŠ¶æ…‹ã‚’å«ã‚“ã§ã„る構造体" # @yieldparam [OpenStruct] #: ../lib/yard/parser/source_parser.rb:32 msgid "tag|param|global_state" msgstr "" # YARD::Handlers::Ruby::Legacy::ClassConditionHandler#parse_condition # YARD::Handlers::Ruby::ClassConditionHandler#parse_condition #: ../lib/yard/parser/source_parser.rb:39 msgid "Parses the remainder of the {#files} list." msgstr "{#files} ã®ãƒªã‚¹ãƒˆã®æ®‹ã‚Šã‚’è§£æžã™ã‚‹" # YARD::Parser::SourceParser #: ../lib/yard/parser/source_parser.rb:51 msgid "" "Responsible for parsing a source file into the namespace. Parsing\n" "also invokes handlers to process the parsed statements and generate\n" "any code objects that may be recognized." msgstr "" "namespaceã®ä¸­ã®ã‚½ãƒ¼ã‚¹ãƒ•ァイルを解æžã™ã‚‹ç‚ºã®è²¬ä»»ãŒã‚る。\n" "ãã—ã¦è§£æžã™ã‚‹äº‹ã¯ã€è§£æžã•れるステートメントや\n" "èªè­˜ã•れるã‹ã‚‚ã—れãªã„コードオブジェクトを生æˆã™ã‚‹\n" "処ç†ã®ç‚ºã«ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚‚èµ·å‹•ã™ã‚‹ã€‚" # YARD::Parser::SourceParser #: ../lib/yard/parser/source_parser.rb:55 msgid "" "== Custom Parsers\n" "SourceParser allows custom parsers to be registered and called when\n" "a certain filetype is recognized. To register a parser and hook it\n" "up to a set of file extensions, call {register_parser_type}" msgstr "" "== カスタムパーサー\n" "ソースパーサーã«ã‚ˆã£ã¦ã‚«ã‚¹ã‚¿ãƒ ãƒ‘ーサーã¯\n" "明確ã«ãƒ•ァイルタイプãŒèªè­˜ã•れる時ã«\n" "記録ã•れ呼ã³å‡ºã•れる。\n" "パーサーを記録ã—ファイル拡張å­ã®è¨­å®šã‚’ã¤ãªãã«ã¯ã€\n" "{register_parser_type}を呼ã³å‡ºã™ã€‚" # @see #: ../lib/yard/parser/source_parser.rb:62 msgid "tag|see|register_parser_type" msgstr "" # YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS #: ../lib/yard/parser/source_parser.rb:67 msgid "Byte order marks for various encodings" msgstr "様々ãªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ç”¨ã®ãƒã‚¤ãƒˆã‚ªãƒ¼ãƒ€ãƒ¼ãƒžãƒ¼ã‚¯" # @return [Symbol] #: ../lib/yard/parser/source_parser.rb:79 msgid "the default parser type (defaults to :ruby)" msgstr "デフォルトã®ãƒ‘ーサータイプ(デフォルト :ruby)" # YARD::Parser::SourceParser.parse #: ../lib/yard/parser/source_parser.rb:86 msgid "Parses a path or set of paths" msgstr "パスやパスã®è¨­å®šã‚’è§£æžã™ã‚‹ã€‚" # @param [Array] excluded #: ../lib/yard/parser/source_parser.rb:93 msgid "a list of excluded path matchers" msgstr "パスã®ç…§åˆã‚’除外ã•れるリスト。" # @param [String, Array] paths #: ../lib/yard/parser/source_parser.rb:93 msgid "" "a path, glob, or list of paths to\n" "parse" msgstr "パス,glob,è§£æžã®ç‚ºã®ãƒ‘スã®ãƒªã‚¹ãƒˆ" # @param [Array] #: ../lib/yard/parser/source_parser.rb:93 msgid "tag|param|excluded" msgstr "excluded" # @param [Fixnum] #: ../lib/yard/parser/source_parser.rb:93 msgid "tag|param|level" msgstr "level" # @param [Array] # @param [String, Array] #: ../lib/yard/parser/source_parser.rb:93 ../lib/yard/server/router.rb:122 msgid "tag|param|paths" msgstr "paths" # @param [Fixnum] level #: ../lib/yard/parser/source_parser.rb:93 msgid "" "the logger level to use during parsing. See\n" "{YARD::Logger}" msgstr "" "è§£æžã•れる間ã€ä½¿ç”¨ã™ã‚‹ç‚ºã®loggerレベル。\n" "{YARD::Logger}å‚照。" # YARD::Parser::SourceParser.parse_string #: ../lib/yard/parser/source_parser.rb:112 msgid "Parses a string +content+" msgstr "" "+content+ ã®æ–‡å­—列を解æžã™ã‚‹ã€‚\n" "Parses a string +content+" # @param [Symbol] #: ../lib/yard/parser/source_parser.rb:116 #: ../lib/yard/parser/source_parser.rb:125 msgid "tag|param|ptype" msgstr "ptype" # @param [String] content #: ../lib/yard/parser/source_parser.rb:116 msgid "the block of code to parse" msgstr "è§£æžã™ã‚‹ç‚ºã®ã‚³ãƒ¼ãƒ‰ã®å…¥ã£ãŸãƒ–ロック。" # @return #: ../lib/yard/parser/source_parser.rb:116 msgid "the parser object that was used to parse +content+" msgstr "+content+ ã‚’è§£æžã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れるパーサーオブジェクト。" # @param [Symbol] ptype #: ../lib/yard/parser/source_parser.rb:116 #: ../lib/yard/parser/source_parser.rb:125 msgid "the parser type to use. See {parser_type}." msgstr "利用ã™ã‚‹ãƒ‘ーサーã®åž‹ã€‚{parser_type}å‚照。" # YARD::Parser::SourceParser.tokenize #: ../lib/yard/parser/source_parser.rb:121 msgid "Tokenizes but does not parse the block of code" msgstr "トークナイズã™ã‚‹ã€‚ã—ã‹ã—コードã®å…¥ã£ãŸãƒ–ロックã¯è§£æžã—ãªã„。" # @return [Array] #: ../lib/yard/parser/source_parser.rb:125 #: ../lib/yard/parser/source_parser.rb:460 msgid "a list of tokens" msgstr "トークンã®å…¥ã£ãŸãƒªã‚¹ãƒˆã€‚" # @param [String] content #: ../lib/yard/parser/source_parser.rb:125 #: ../lib/yard/parser/source_parser.rb:460 msgid "the block of code to tokenize" msgstr "トークナイズã™ã‚‹ç‚ºã®ã‚³ãƒ¼ãƒ‰ã®å…¥ã£ãŸãƒ–ロック。" # YARD::Parser::SourceParser.register_parser_type #: ../lib/yard/parser/source_parser.rb:130 msgid "Registers a new parser type." msgstr "æ–°ã—ã„パーサーã®åž‹ã‚’記録ã™ã‚‹ã€‚" # @example Registering a parser for "java" files #: ../lib/yard/parser/source_parser.rb:139 msgid "SourceParser.register_parser_type :java, JavaParser, 'java'" msgstr "" # @param [Base] parser_klass #: ../lib/yard/parser/source_parser.rb:139 msgid "a class that implements parsing and tokenization" msgstr "è§£æžã‚„トークナイズを実装ã™ã‚‹ã‚¯ãƒ©ã‚¹ã€‚" # @param [Array, String, Regexp] extensions #: ../lib/yard/parser/source_parser.rb:139 msgid "" "a list of extensions or a\n" "regex to match against the file extension" msgstr "æ‹¡å¼µå­ã®ãƒªã‚¹ãƒˆã‚„ファイル拡張å­ã«å¯¾ã—マッãƒã™ã‚‹æ­£è¦è¡¨ç¾ã€‚" # @param [Symbol] type #: ../lib/yard/parser/source_parser.rb:139 msgid "a symbolic name for the parser type" msgstr "パーサー型用ã®ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯å。" # @example #: ../lib/yard/parser/source_parser.rb:139 msgid "tag|example|Registering a parser for \"java\" files" msgstr "\"java\"ファイル用ã«ãƒ‘ーサーを記録ã™ã‚‹" # @param [Array, String, Regexp] #: ../lib/yard/parser/source_parser.rb:139 msgid "tag|param|extensions" msgstr "extensions" # @param [Base] #: ../lib/yard/parser/source_parser.rb:139 msgid "tag|param|parser_klass" msgstr "parser_klass" # @see #: ../lib/yard/parser/source_parser.rb:139 msgid "tag|see|Parser::Base" msgstr "" # @return [Hash{Symbol=>Object}] #: ../lib/yard/parser/source_parser.rb:150 #: ../lib/yard/parser/source_parser.rb:152 msgid "a list of registered parser types" msgstr "パーサーã®åž‹ãŒè¨˜éŒ²ã•れるリスト。" # YARD::Parser::SourceParser.parser_type_for_extension #: ../lib/yard/parser/source_parser.rb:164 msgid "" "Finds a parser type that is registered for the extension. If no\n" "type is found, the default Ruby type is returned." msgstr "" "拡張用ã®è¨˜éŒ²ã•れるパーサーã®åž‹ã‚’見ã¤ã‘る。\n" "åž‹ãŒè¦‹ã¤ã‹ã‚‰ãªã„ç„¡ã„å ´åˆã€ãƒ‡ãƒ•ォルトã®Rubyåž‹ãŒè¿”ã•れる。" # @return [Symbol] #: ../lib/yard/parser/source_parser.rb:168 msgid "the parser type to be used for the extension" msgstr "拡張用ã«åˆ©ç”¨ã•れるパーサーã®åž‹ã€‚" # YARD::Parser::SourceParser.validated_parser_type #: ../lib/yard/parser/source_parser.rb:176 msgid "" "Returns the validated parser type. Basically, enforces that :ruby\n" "type is never set if the Ripper library is not available" msgstr "" "有効ãªãƒ‘ーサー型を返ã™ã€‚\n" "基本的ã«ã€RipperライブラリãŒåˆ©ç”¨ä¸å¯ã®å ´åˆã€\n" ":rubyåž‹ãŒè¨­å®šã•れãªã„よã†å®Ÿè¡Œã•れる。" # @param [Symbol] type #: ../lib/yard/parser/source_parser.rb:181 msgid "the parser type to set" msgstr "設定ã™ã‚‹ãƒ‘ーサーã®åž‹ã€‚" # @return [Symbol] #: ../lib/yard/parser/source_parser.rb:181 msgid "the validated parser type" msgstr "有効ãªãƒ‘ーサーã®åž‹ã€‚" # YARD::Parser::SourceParser.before_parse_list #: ../lib/yard/parser/source_parser.rb:188 msgid "" "Registers a callback to be called before a list of files is parsed\n" "via {parse}. The block passed to this method will be called on\n" "subsequent parse calls." msgstr "" "{parse} 経由ã§ãƒ•ァイルã®ãƒªã‚¹ãƒˆãŒè§£æžã•れるå‰ã«å‘¼ã³å‡ºã•れるコールãƒãƒƒã‚¯ã‚’記録ã™ã‚‹\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•れるブロックã¯ãれã«ç¶šãã€parse呼ã³å‡ºã—上ã§å‘¼ã³å‡ºã•れる。" # YARD::Parser::SourceParser.before_parse_list # YARD::Parser::SourceParser.after_parse_list # YARD::Parser::SourceParser.before_parse_file # YARD::Parser::SourceParser.after_parse_file # YARD::Parser::SourceParser.before_parse_list_callbacks # YARD::Parser::SourceParser.after_parse_list_callbacks # YARD::Parser::SourceParser.before_parse_file_callbacks # YARD::Parser::SourceParser.after_parse_file_callbacks #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 #: ../lib/yard/parser/source_parser.rb:292 #: ../lib/yard/parser/source_parser.rb:321 #: ../lib/yard/parser/source_parser.rb:328 #: ../lib/yard/parser/source_parser.rb:335 #: ../lib/yard/parser/source_parser.rb:342 #: ../lib/yard/parser/source_parser.rb:349 #: ../lib/yard/parser/source_parser.rb:361 #: ../lib/yard/parser/source_parser.rb:384 #: ../lib/yard/parser/source_parser.rb:388 #: ../lib/yard/parser/source_parser.rb:393 #: ../lib/yard/parser/source_parser.rb:397 #: ../lib/yard/parser/source_parser.rb:404 #: ../lib/yard/parser/source_parser.rb:416 #: ../lib/yard/parser/source_parser.rb:460 #: ../lib/yard/parser/source_parser.rb:469 #: ../lib/yard/parser/source_parser.rb:490 #: ../lib/yard/parser/source_parser.rb:497 #: ../lib/yard/parser/source_parser.rb:505 #: ../lib/yard/parser/source_parser.rb:512 msgid "Parser Callbacks" msgstr "パーサーã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯" # @example Setting global state #: ../lib/yard/parser/source_parser.rb:231 msgid "" "SourceParser.before_parse_list do |files, globals|\n" " globals.method_count = 0\n" "end\n" "SourceParser.after_parse_list do |files, globals|\n" " puts \"Found #{globals.method_count} methods\"\n" "end\n" "class MyCountHandler < Handlers::Ruby::Base\n" " handles :def, :defs\n" " process { globals.method_count += 1 }\n" "end\n" "YARD.parse\n" "# Prints: \"Found 37 methods\"" msgstr "" # @example Installing a simple callback #: ../lib/yard/parser/source_parser.rb:231 msgid "" "SourceParser.before_parse_list do |files, globals|\n" " puts \"Starting to parse...\"\n" "end\n" "YARD.parse('lib/**/*.rb')\n" "# prints \"Starting to parse...\"" msgstr "" # @example Using a global callback to cancel parsing #: ../lib/yard/parser/source_parser.rb:231 msgid "" "SourceParser.before_parse_list do |files, globals|\n" " return false if files.include?('foo.rb')\n" "end\n" "\n" "YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method\n" "YARD.parse('bar.rb') # parses normally" msgstr "" # @yieldparam [OpenStruct] globals #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 msgid "" "a global structure to store arbitrary\n" "state for post processing (see {Handlers::Processor#globals})" msgstr "" "後処ç†ç”¨ã®ä»»æ„ã®çŠ¶æ…‹ã‚’æ ¼ç´ã™ã‚‹ã€globalãªãƒ‡ãƒ¼ã‚¿(see {Handlers::" "Processor#globals})" # @yieldreturn [Boolean] #: ../lib/yard/parser/source_parser.rb:231 msgid "" "if the block returns +false+, parsing is\n" "cancelled." msgstr "ブロック㌠+false+ ã‚’è¿”ã™å ´åˆã€è§£æžå‡¦ç†ã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れる。" # @example #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:292 msgid "tag|example|Installing a simple callback" msgstr "ç°¡å˜ãªã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’実装ã™ã‚‹" # @example #: ../lib/yard/parser/source_parser.rb:231 msgid "tag|example|Setting global state" msgstr "globalã®çŠ¶æ…‹ã‚’è¨­å®šã™ã‚‹" # @example #: ../lib/yard/parser/source_parser.rb:231 msgid "tag|example|Using a global callback to cancel parsing" msgstr "è§£æžã™ã‚‹ã®ã‚’キャンセルã™ã‚‹ç‚ºã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã«globalを使ã†" # @see #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:321 msgid "tag|see|after_parse_list" msgstr "" # @see #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 #: ../lib/yard/parser/source_parser.rb:321 msgid "tag|see|before_parse_file" msgstr "" # @yieldparam [Array] #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 msgid "tag|yieldparam|files" msgstr "files" # @yieldparam [OpenStruct] #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 msgid "tag|yieldparam|globals" msgstr "globals" # @yieldparam [Array] files #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 msgid "the list of files that will be parsed." msgstr "è§£æžã•れるファイルã®ãƒªã‚¹ãƒˆã€‚" # @return [Proc] #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 #: ../lib/yard/parser/source_parser.rb:292 #: ../lib/yard/parser/source_parser.rb:321 msgid "the yielded block" msgstr "yieldã•れるブロック。" # @yield [files, globals] #: ../lib/yard/parser/source_parser.rb:231 #: ../lib/yard/parser/source_parser.rb:255 msgid "" "the yielded block is called once before\n" "parsing all files" msgstr "" "yieldã•れãŸãƒ–ロックã¯\n" "å…¨ã¦ã®ãƒ•ァイルを解æžã™ã‚‹å‰ã«ä¸€åº¦ã ã‘呼ã³å‡ºã•れる。" # YARD::Parser::SourceParser.after_parse_list #: ../lib/yard/parser/source_parser.rb:236 msgid "" "Registers a callback to be called after a list of files is parsed\n" "via {parse}. The block passed to this method will be called on\n" "subsequent parse calls." msgstr "" "ファイルã®ãƒªã‚¹ãƒˆãŒ {parse} 経由ã§è§£æžã•れãŸå¾Œã§å‘¼ã³å‡ºã•れる為ã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã‚’記録ã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ç‚ºã«æ¸¡ã•れるブロックã¯ãã®å¾Œã®parse呼ã³å‡ºã—上ã§å‘¼ã³å‡ºã•れる。" # @example Printing results after parsing occurs #: ../lib/yard/parser/source_parser.rb:255 msgid "" "SourceParser.after_parse_list do\n" " puts \"Finished parsing!\"\n" "end\n" "YARD.parse\n" "# Prints \"Finished parsing!\" after parsing files" msgstr "" # @example #: ../lib/yard/parser/source_parser.rb:255 msgid "tag|example|Printing results after parsing occurs" msgstr "è§£æžãŒçµ‚ã‚ã£ãŸå¾Œã§ã€çµæžœã‚’プリントã™ã‚‹ã€‚" # @see #: ../lib/yard/parser/source_parser.rb:255 #: ../lib/yard/parser/source_parser.rb:292 msgid "tag|see|before_parse_list" msgstr "" # @yieldreturn [void] #: ../lib/yard/parser/source_parser.rb:255 #: ../lib/yard/parser/source_parser.rb:321 msgid "the return value for the block is ignored." msgstr "ブロックãŒç„¡è¦–ã•ã‚Œã‚‹ç‚ºã®æˆ»ã‚Šå€¤" # YARD::Parser::SourceParser.before_parse_file #: ../lib/yard/parser/source_parser.rb:260 msgid "" "Registers a callback to be called before an individual file is parsed.\n" "The block passed to this method will be called on subsequent parse\n" "calls." msgstr "" "個々ã®ãƒ•ァイルãŒè§£æžã•れるå‰ã«å‘¼ã³å‡ºã•れるコールãƒãƒƒã‚¯ã‚’記録ã™ã‚‹\n" "blockã¯ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒç¶šãparse呼ã³å‡ºã—ã§å‘¼ã³å‡ºã•れるãŸã‚ã«è§£æžã•れる。" # YARD::Parser::SourceParser.before_parse_file #: ../lib/yard/parser/source_parser.rb:264 msgid "" "To register a callback that is called before the entire list of files\n" "is processed, see {before_parse_list}." msgstr "" "å…¨ã¦ã®ãƒ•ァイルã®ãƒªã‚¹ãƒˆãŒå‡¦ç†ã•れるå‰ã«å‘¼ã³å‡ºã•れる\n" "コールãƒãƒƒã‚¯ã‚’記録ã™ã‚‹ç‚ºã«ã¯ã€{before_parse_list}å‚照。" # @example Installing a simple callback #: ../lib/yard/parser/source_parser.rb:292 msgid "" "SourceParser.before_parse_file do |parser|\n" " puts \"I'm parsing #{parser.file}\"\n" "end\n" "YARD.parse('lib/**/*.rb')\n" "# prints:\n" "\"I'm parsing lib/foo.rb\"\n" "\"I'm parsing lib/foo_bar.rb\"\n" "\"I'm parsing lib/last_file.rb\"" msgstr "" # @example Cancel parsing of any test_*.rb files #: ../lib/yard/parser/source_parser.rb:292 msgid "" "SourceParser.before_parse_file do |parser|\n" " return false if parser.file =~ /^test_.+\\.rb$/\n" "end" msgstr "" # @yieldreturn [Boolean] #: ../lib/yard/parser/source_parser.rb:292 msgid "" "if the block returns +false+, parsing for\n" "the file is cancelled." msgstr "" "ブロック㌠+false+ ã‚’è¿”ã™å ´åˆã€\n" "ファイルãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れる為ã«è§£æžã™ã‚‹ã€‚" # @example #: ../lib/yard/parser/source_parser.rb:292 msgid "tag|example|Cancel parsing of any test_*.rb files" msgstr "å…¨ã¦ã®test_*.rbファイルã®è§£æžã‚’キャンセルã™ã‚‹" # @see #: ../lib/yard/parser/source_parser.rb:292 msgid "tag|see|after_parse_file" msgstr "" # @yieldparam [SourceParser] parser #: ../lib/yard/parser/source_parser.rb:292 msgid "" "the parser object that will {#parse}\n" "the file." msgstr "ファイルを{#parse}メソッドã§è§£æžã™ã‚‹ãƒ‘ーサーオブジェクト。" # @yield [parser] #: ../lib/yard/parser/source_parser.rb:292 msgid "" "the yielded block is called once before each\n" "file that is parsed. This might happen many times for a single\n" "codebase." msgstr "" "yieldã•れるブロックã¯ã€ãれãžã‚Œã®ãƒ•ァイルãŒè§£æžã•れるå‰ã«ä¸€åº¦å‘¼ã³å‡ºã•れる。\n" "ã“れã¯ã€å˜ä¸€ã®ã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã§ã¯ä½•回も起ãã‚‹å¯èƒ½æ€§ãŒã‚る。" # YARD::Parser::SourceParser.after_parse_file #: ../lib/yard/parser/source_parser.rb:297 msgid "" "Registers a callback to be called after an individual file is parsed.\n" "The block passed to this method will be called on subsequent parse\n" "calls." msgstr "" "個々ã®ãƒ•ァイルãŒè§£æžã•れãŸå¾Œã§å‘¼ã³å‡ºã•れるコールãƒãƒƒã‚¯ã‚’登録ã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•れãŸãƒ–ãƒ­ãƒƒã‚¯ã¯æ¬¡ã®parseメソッドã®å‘¼ã³å‡ºã—ã§å‘¼ã³å‡ºã•れる。" # YARD::Parser::SourceParser.after_parse_file #: ../lib/yard/parser/source_parser.rb:301 msgid "" "To register a callback that is called after the entire list of files\n" "is processed, see {after_parse_list}." msgstr "" "ファイルリストãŒå…¨ã¦å‡¦ç†ã•れãŸå¾Œã§å‘¼ã³å‡ºã•れる。\n" "コールãƒãƒƒã‚¯ã‚’記録ã™ã‚‹ã«ã¯ã€{after_parse_list}å‚照。" # @example Printing the length of each file after it is parsed #: ../lib/yard/parser/source_parser.rb:321 msgid "" "SourceParser.after_parse_file do |parser|\n" " puts \"#{parser.file} is #{parser.contents.size} characters\"\n" "end\n" "YARD.parse('lib/**/*.rb')\n" "# prints:\n" "\"lib/foo.rb is 1240 characters\"\n" "\"lib/foo_bar.rb is 248 characters\"" msgstr "" # @example #: ../lib/yard/parser/source_parser.rb:321 msgid "tag|example|Printing the length of each file after it is parsed" msgstr "tag|example|è§£æžã•れãŸå¾Œã§ãれãžã‚Œã®ãƒ•ァイルã®ã‚µã‚¤ã‚ºã‚’プリントã™ã‚‹" # @yieldparam [SourceParser] parser #: ../lib/yard/parser/source_parser.rb:321 msgid "" "the parser object that parsed\n" "the file." msgstr "ファイルを解æžã—ãŸã€ãƒ‘ーサーオブジェクト。" # @yield [parser] #: ../lib/yard/parser/source_parser.rb:321 msgid "" "the yielded block is called once after each file\n" "that is parsed. This might happen many times for a single codebase." msgstr "" "yieldã•れãŸãƒ–ロックã¯è§£æžã•れる個々ã®ãƒ•ァイルã®å¾Œã§ä¸€åº¦å‘¼ã³å‡ºã•れる。\n" "ã“れã¯å˜ä¸€ã®ã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã®ç‚ºã«ä½•回も起るå¯èƒ½æ€§ãŒã‚る。" # @return [Array] #: ../lib/yard/parser/source_parser.rb:328 msgid "" "the list of callbacks to be called before\n" "parsing a list of files. Should only be used for testing." msgstr "" "ファイルã®ãƒªã‚¹ãƒˆã‚’è§£æžã™ã‚‹å‰ã«å‘¼ã³å‡ºã•れるコールãƒãƒƒã‚¯ã®ãƒªã‚¹ãƒˆã€‚\n" "検査用ã«ã ã‘利用ã•れるã¹ãã§ã‚る。" # @return [Array] #: ../lib/yard/parser/source_parser.rb:335 msgid "" "the list of callbacks to be called after\n" "parsing a list of files. Should only be used for testing." msgstr "" "ファイルã®ãƒªã‚¹ãƒˆã‚’è§£æžã™ã‚‹å‰ã«å‘¼ã³å‡ºã•れる為ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã®ãƒªã‚¹ãƒˆã€‚\n" "検査用ã«ã ã‘利用ã•れるã¹ãã§ã‚る。" # @return [Array] #: ../lib/yard/parser/source_parser.rb:342 msgid "" "the list of callbacks to be called before\n" "parsing a file. Should only be used for testing." msgstr "" "ファイルãŒè§£æžã™ã‚‹å‰ã«å‘¼ã³å‡ºã•れる為ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã®ãƒªã‚¹ãƒˆã€‚\n" "検査用ã«ã ã‘利用ã•れるã¹ãã§ã‚る。" # @return [Array] #: ../lib/yard/parser/source_parser.rb:349 msgid "" "the list of callbacks to be called after\n" "parsing a file. Should only be used for testing." msgstr "" "ファイルãŒè§£æžã™ã‚‹å‰ã«å‘¼ã³å‡ºã•れる為ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã®ãƒªã‚¹ãƒˆã€‚\n" "検査用ã«ã ã‘利用ã•れるã¹ãã§ã‚る。" # @param [Array] files #: ../lib/yard/parser/source_parser.rb:358 msgid "Parses a list of files in a queue." msgstr "キューã®ãªã‹ã®ãƒ•ァイルã®ãƒªã‚¹ãƒˆã‚’è§£æžã™ã‚‹" # @param [Array] files #: ../lib/yard/parser/source_parser.rb:361 msgid "a list of files to queue for parsing" msgstr "è§£æžç”¨ã®ã‚­ãƒ¥ãƒ¼ã®ç‚ºã®ãƒ•ァイルã®ãƒªã‚¹ãƒˆã€‚" # @return [String] #: ../lib/yard/parser/source_parser.rb:384 msgid "the filename being parsed by the parser." msgstr "パーサーã«ã‚ˆã£ã¦è§£æžã•れã¦ã„るファイルå。" # @return [Symbol] #: ../lib/yard/parser/source_parser.rb:388 msgid "" "the parser type associated with the parser instance.\n" "This should be set by the {#initialize constructor}." msgstr "" "パーサーã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¨å…±ã«é–¢é€£ä»˜ã‚‰ã‚Œã‚‹ãƒ‘ーサーã®åž‹ã€‚\n" "ã“れã¯ã€{#initialize constructor}メソッドã«ã‚ˆã£ã¦è¨­å®šã•れるã¹ãã§ã‚る。" # @return [OpenStruct] #: ../lib/yard/parser/source_parser.rb:393 msgid "" "an open struct containing arbitrary global state\n" "shared between files and handlers." msgstr "" "ファイルã¨ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã¨ã®é–“ã§å…±æœ‰ã•れる\n" "ä»»æ„ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«ãªçŠ¶æ…‹ã‚’å«ã‚“ã§ã„ã‚‹OpenStruct" # @return [String] #: ../lib/yard/parser/source_parser.rb:397 msgid "the contents of the file to be parsed" msgstr "è§£æžã•れるファイルã®å†…容。" # @return [SourceParser] #: ../lib/yard/parser/source_parser.rb:404 msgid "a new instance of SourceParser" msgstr "ã‚½ãƒ¼ã‚¹ãƒ‘ãƒ¼ã‚µãƒ¼ã®æ–°ã—ã„インスタンス。" # @overload #: ../lib/yard/parser/source_parser.rb:404 msgid "tag|overload|initialize" msgstr "" # YARD::Parser::SourceParser#parse #: ../lib/yard/parser/source_parser.rb:412 msgid "" "The main parser method. This should not be called directly. Instead,\n" "use the class methods {parse} and {parse_string}." msgstr "" "主ãªãƒ‘ーサーメソッド。ã“れã¯ç›´æŽ¥å‘¼ã°ã‚Œã‚‹ã¹ãã§ã¯ãªã„。\n" "代ã‚りã«ã€{parse}ã‚„{parse_string}クラスメソッドを利用ã™ã‚‹ã€‚" # @return [Object, nil] #: ../lib/yard/parser/source_parser.rb:416 msgid "the parser object used to parse the source" msgstr "ソースを解æžã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れるパーサーオブジェクト。" # @param [String, #read, Object] content #: ../lib/yard/parser/source_parser.rb:416 msgid "the source file to parse" msgstr "è§£æžã®ç‚ºã®ã‚½ãƒ¼ã‚¹ãƒ•ァイル。" # YARD::Parser::SourceParser#tokenize #: ../lib/yard/parser/source_parser.rb:457 msgid "" "Tokenizes but does not parse the block of code using the current " "{#parser_type}" msgstr "" "トークナイズã™ã‚‹ã€‚ã—ã‹ã—ã€\n" "ç¾åœ¨ã®{#parser_type}メソッドを使用ã—ã¦ã€ã‚³ãƒ¼ãƒ‰ã®å…¥ã£ãŸãƒ–ロックã¯è§£æžã—ãªã„。" # YARD::Parser::SourceParser#convert_encoding #: ../lib/yard/parser/source_parser.rb:468 msgid "Searches for encoding line and forces encoding" msgstr "エンコーディング行を検索ã—ã€ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’強制ã™ã‚‹ã€‚" # YARD::Parser::SourceParser#post_process #: ../lib/yard/parser/source_parser.rb:489 msgid "" "Runs a {Handlers::Processor} object to post process the parsed statements." msgstr "è§£æžã—ãŸã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®å¾Œå‡¦ç†ã®ç‚ºã«ã€{Handlers::Processor}オブジェクトを起動ã™ã‚‹ã€‚" # YARD::Parser::SourceParser#parser_type_for_filename #: ../lib/yard/parser/source_parser.rb:502 msgid "Guesses the parser type to use depending on the file extension." msgstr "ファイル拡張å­ã«å¿œã˜ã¦ä½¿ç”¨ã™ã‚‹ãƒ‘ーサーã®åž‹ã‚’推測ã™ã‚‹ã€‚" # @return [Symbol] #: ../lib/yard/parser/source_parser.rb:505 msgid "a parser type that matches the filename" msgstr "ファイルåã®æ‹¡å¼µå­ã«å¿œã˜ãŸãƒ‘ーサータイプ。" # @param [String] filename #: ../lib/yard/parser/source_parser.rb:505 msgid "the filename to use to guess the parser type" msgstr "パーサー型を推測ã™ã‚‹ç‚ºã«åˆ©ç”¨ã™ã‚‹ãƒ•ァイルå。" # YARD::Rake::YardocTask #: ../lib/yard/rake/yardoc_task.rb:8 msgid "The rake task to run {CLI::Yardoc} and generate documentation." msgstr "{CLI::Yardoc}ã‚’èµ·å‹•ã™ã‚‹ç‚ºã®rake taskã¨ãªã‚Šã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’生æˆã™ã‚‹ã€‚" # YARD::Rake::YardocTask#name # YARD::Rake::YardocTask#name= #: ../lib/yard/rake/yardoc_task.rb:10 msgid "The name of the task" msgstr "taskã®åå‰" # @return [String] #: ../lib/yard/rake/yardoc_task.rb:11 msgid "the task name" msgstr "taskå" # YARD::Rake::YardocTask#options # YARD::Rake::YardocTask#options= #: ../lib/yard/rake/yardoc_task.rb:14 msgid "Options to pass to {CLI::Yardoc}" msgstr "{CLI::Yardoc}ã®ç‚ºã®ãƒ‘スã®è¨­å®š" # @return [Hash] #: ../lib/yard/rake/yardoc_task.rb:15 msgid "the options passed to the commandline utility" msgstr "コマンドライン用途ã®ç‚ºã«æ¸¡ã•れる設定" # YARD::Rake::YardocTask#files # YARD::Rake::YardocTask#files= #: ../lib/yard/rake/yardoc_task.rb:18 msgid "" "The Ruby source files (and any extra documentation files separated by '-')\n" "to process." msgstr "" "処ç†ã®ç‚ºã®Rubyソースファイル(ã¨'-'ã«ã‚ˆã£ã¦åˆ†å‰²ã•れãŸã€ä»»æ„ã®ç‰¹åˆ¥ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³" "トファイル)" # @example Task files assignment #: ../lib/yard/rake/yardoc_task.rb:24 msgid "" "YARD::Rake::YardocTask.new do |t|\n" " t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes." "md']\n" "end" msgstr "" # @example #: ../lib/yard/rake/yardoc_task.rb:24 msgid "tag|example|Task files assignment" msgstr "Taskã®ãƒ•ァイルを代入ã™ã‚‹" # YARD::Rake::YardocTask#before # YARD::Rake::YardocTask#before= #: ../lib/yard/rake/yardoc_task.rb:27 msgid "Runs a +Proc+ before the task" msgstr "taskã®å‰ã« +Proc+ ã‚’èµ·å‹•ã™ã‚‹ã€‚" # @return [Proc] #: ../lib/yard/rake/yardoc_task.rb:28 msgid "a proc to call before running the task" msgstr "task ã‚’èµ·å‹•ã™ã‚‹å‰ã«ã€å‘¼ã³å‡ºã•れる,proc" # YARD::Rake::YardocTask#after # YARD::Rake::YardocTask#after= #: ../lib/yard/rake/yardoc_task.rb:31 msgid "Runs a +Proc+ after the task" msgstr "taskã®å¾Œã§èµ·å‹•ã™ã‚‹ +Proc+" # @return [Proc] #: ../lib/yard/rake/yardoc_task.rb:32 msgid "a proc to call after running the task" msgstr "taskã‚’èµ·å‹•ã—ãŸå¾Œã§å‘¼ã³å‡ºã•れる,proc" # @return [Verifier, Proc] #: ../lib/yard/rake/yardoc_task.rb:38 msgid "" "an optional {Verifier} to run against all objects\n" "being generated. Any object that the verifier returns false for will be\n" "excluded from documentation. This attribute can also be a lambda." msgstr "" "å…¨ã¦ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦èµ·å‹•ã™ã‚‹ãŸã‚ã®ä»»æ„ã® {Verifier}(èªè¨¼è€…)\n" "verifierãŒãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‹ã‚‰é™¤å¤–ã•れる為ã®falseã‚’è¿”ã™ä»»æ„ã®ã‚ªãƒ–ジェクト\n" "ã“ã®å±žæ€§ã¯lmbdaã«ã‚‚ã§ãる。" # YARD::Rake::YardocTask#initialize #: ../lib/yard/rake/yardoc_task.rb:41 msgid "Creates a new task with name +name+." msgstr "+name+ åを用ã„ã‚‹æ–°ã—ã„タスクを作æˆã™ã‚‹" # @yield #: ../lib/yard/rake/yardoc_task.rb:46 msgid "a block to allow any options to be modified on the task" msgstr "task上ã§å¤‰æ›´ã•れる為ã«ä»»æ„ã®ã‚ªãƒ—ションをå—ã‘入れる,block" # @return [YardocTask] #: ../lib/yard/rake/yardoc_task.rb:46 msgid "a new instance of YardocTask" msgstr "YardocTaskã®æ–°ã—ã„インスタンス" # @yieldparam [YardocTask] #: ../lib/yard/rake/yardoc_task.rb:46 msgid "tag|yieldparam|_self" msgstr "" # @param [String, Symbol] name #: ../lib/yard/rake/yardoc_task.rb:46 msgid "the name of the rake task" msgstr "rake taskã®åå‰" # @yieldparam [YardocTask] _self #: ../lib/yard/rake/yardoc_task.rb:46 msgid "" "the task object to allow any parameters\n" "to be changed." msgstr "変更ã•れる任æ„ã®ãƒ‘ラメータをå—ã‘入れるtask オブジェクト" # YARD::Rake::YardocTask#define #: ../lib/yard/rake/yardoc_task.rb:61 msgid "Defines the rake task" msgstr "rake taskを定義ã™ã‚‹ã€‚" # YARD::Registry #: ../lib/yard/registry.rb:6 msgid "" "The +Registry+ is the centralized data store for all {CodeObjects} created\n" "during parsing. The storage is a key value store with the object's path\n" "(see {CodeObjects::Base#path}) as the key and the object itself as the " "value.\n" "Object paths must be unique to be stored in the Registry. All lookups for\n" "objects are done on the singleton Registry instance using the {Registry.at}\n" "or {Registry.resolve} methods." msgstr "" "+Registry+ ã¯è§£æžã—ã¦ã„ã‚‹é–“ã«ã€\n" "å…¨ã¦ã®{CodeObjects}ãŒä½œæˆã•れる為ã®\n" "集中データストアã¨ãªã‚‹ã€‚\n" "ストレージã¯ã€\n" "キーã®ã‚ˆã†ãªã‚ªãƒ–ジェクトパス(see {CodeObjects::Base#path})ã¨\n" "値ã®ã‚ˆã†ãªã‚ªãƒ–ジェクトを用ã„ã€key valueストアã¨ãªã‚‹ã€‚\n" "オブジェクトパスã¯ã€Registryã®ä¸­ã§è¨˜éŒ²ã•れる為ã«å›ºæœ‰ã§ãªã‘れã°ãªã‚‰ãªã„。\n" "オブジェクト用ã®å…¨ã¦ã®æ¤œç´¢ã¯ã€\n" "{Registry.at} ã‚„ {Registry.resolve}メソッドã«ã‚ˆã£ã¦\n" "シングルトンレジストリインスタンスã®ä¸Šã§è¡Œã‚れる。\n" # YARD::Registry #: ../lib/yard/registry.rb:13 msgid "" "== Saving / Loading a Registry\n" "The registry is saved to a \"yardoc file\" (actually a directory), which " "can\n" "be loaded back to perform any lookups. See {Registry.load!} and\n" "{Registry.save} for information on saving and loading of a yardoc file." msgstr "" "== レジストリーをセーブ/ロードã™ã‚‹\n" "レジストリーã¯\"yardoc file\"(実際ã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª)ã«ã‚»ãƒ¼ãƒ–ã•れã€\n" "ä»»æ„ã®æ¤œç´¢ã‚’実行ã™ã‚‹ç‚ºã«ã€ãƒ­ãƒ¼ãƒ‰ã§ãる。\n" "yardocファイルã®ã‚»ãƒ¼ãƒ–ã‚„ãƒ­ãƒ¼ãƒ‰ã®æƒ…å ±ã¯ã€\n" "{Registry.load!} , {Registry.save}ã‚’å‚照。" # YARD::Registry #: ../lib/yard/registry.rb:18 msgid "" "== Threading Notes\n" "The registry class is a singleton class that is accessed directly in many\n" "places across YARD. To mitigate threading issues, YARD (0.6.5+) makes\n" "the Registry thread local. This means all access to a registry for a " "specific\n" "object set must occur in the originating thread." msgstr "" "== ã‚¹ãƒ¬ãƒƒãƒ‰ã®æ³¨æ„\n" "レジストリークラスã¯ã€YARD全体ã§ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã•れるシングルトンクラスã¨ãªã‚‹ã€‚\n" "スレッドã®å•題を緩和ã™ã‚‹ã«ã¯ã€YARD(0.6.5+)ã§thread localãªãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã‚’作る。\n" "ã“れã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã®ä¸­ã§å›ºæœ‰ã®ã‚ªãƒ–ジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒç”Ÿæˆã•れるã€\n" "レジストリーã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å…¨ã¦ã®ã‚‚ã®ã‚’æ„味ã™ã‚‹ã€‚" # @example Getting an object by a specific path #: ../lib/yard/registry.rb:31 msgid "Registry.at('YARD::CodeObjects::Base#docstring')" msgstr "" # @example Loading a Registry #: ../lib/yard/registry.rb:31 msgid "" "Registry.load!('/path/to/yardocfile') # loads all objects into memory\n" "Registry.at('YARD::CodeObjects::Base').docstring\n" "# => \"+Base+ is the superclass of all code objects ...\"" msgstr "" # @example Performing a lookup on a method anywhere in the inheritance tree #: ../lib/yard/registry.rb:31 msgid "Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true)" msgstr "" # @example #: ../lib/yard/registry.rb:31 msgid "tag|example|Getting an object by a specific path" msgstr "tag|example|パスã«ã‚ˆã£ã¦ã‚ªãƒ–ジェクトをå–å¾—ã™ã‚‹" # @example #: ../lib/yard/registry.rb:31 msgid "tag|example|Loading the Registry" msgstr "tag|example|レジストリーをロードã™ã‚‹" # @example #: ../lib/yard/registry.rb:31 msgid "" "tag|example|Performing a lookup on a method anywhere in the inheritance tree" msgstr "tag|example|継承ツリーã®ã©ã“ã§ã‚‚ãƒ¡ã‚½ãƒƒãƒ‰ã§æ¤œç´¢ã‚’実行ã™ã‚‹" # YARD::Registry.yardoc_file_for_gem #: ../lib/yard/registry.rb:41 msgid "Returns the .yardoc file associated with a gem." msgstr "gemã¨å…±ã«é–¢é€£ã—ãŸ.yardocファイルを返ã™ã€‚" # YARD::Registry.yardoc_file_for_gem # YARD::Registry.yardoc_file # YARD::Registry.yardoc_file= #: ../lib/yard/registry.rb:51 ../lib/yard/registry.rb:73 #: ../lib/yard/registry.rb:75 ../lib/yard/registry.rb:76 msgid "Getting .yardoc File Locations" msgstr ".yardocファイルã®å ´æ‰€ã‚’å–å¾—ã™ã‚‹ã€‚" # @param [String] ver_require #: ../lib/yard/registry.rb:51 msgid "an optional Gem version requirement" msgstr "ä»»æ„ã®Gemã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³è¦æ±‚" # @return [String] #: ../lib/yard/registry.rb:51 msgid "" "if +for_writing+ is set to +true+, returns the best\n" "location suitable to write the .yardoc file. Otherwise, the first\n" "existing location associated with the gem's .yardoc file." msgstr "" "+for_writing+ ã«trueをセットã—ãŸå ´åˆã€\n" ".yardocファイルを書ãè¾¼ã‚€ç‚ºã«æœ€é©ãªå ´æ‰€ã‚’è¿”ã™ã€‚\n" "è‹¥ã—ãã¯ã€.yardocファイルã«é–¢é€£ã¥ã‘られãŸ\n" "既存ã®å ´æ‰€ã«ãªã‚‹ã€‚" # @return [nil] #: ../lib/yard/registry.rb:51 msgid "" "if +for_writing+ is set to false and no yardoc file\n" "is found, returns nil." msgstr "" "+for_writing+ ãŒfalseを設定ã™ã‚‹å ´åˆã¨ã€\n" "yardocファイルãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯ã€nilã‚’è¿”ã™ã€‚" # @param [Boolean] #: ../lib/yard/registry.rb:51 msgid "tag|param|for_writing" msgstr "" # @param [String] #: ../lib/yard/registry.rb:51 msgid "tag|param|gem" msgstr "" # @param [String] #: ../lib/yard/registry.rb:51 msgid "tag|param|ver_require" msgstr "" # @param [String] gem #: ../lib/yard/registry.rb:51 msgid "the name of the gem to search for" msgstr "検索ã™ã‚‹gemã®åå‰" # @param [Boolean] for_writing #: ../lib/yard/registry.rb:51 msgid "" "whether or not the method should search\n" "for writable locations" msgstr "ãƒ¡ã‚½ãƒƒãƒ‰ãŒæ›¸ãè¾¼ã¿å¯èƒ½ãªå ´æ‰€ã‚’検索ã™ã‚‹ã‹ã©ã†ã‹" # YARD::Registry.yardoc_file # YARD::Registry.yardoc_file= #: ../lib/yard/registry.rb:71 msgid "Gets/sets the yardoc filename" msgstr "yardocã®ãƒ•ァイルåã‚’å–å¾—/設定ã™ã‚‹ã€‚" # @see #: ../lib/yard/registry.rb:73 ../lib/yard/registry.rb:75 #: ../lib/yard/registry.rb:76 msgid "tag|see|DEFAULT_YARDOC_FILE" msgstr "" # @return [String] #: ../lib/yard/registry.rb:73 ../lib/yard/registry.rb:75 #: ../lib/yard/registry.rb:76 msgid "the yardoc filename" msgstr "yardocã®ãƒ•ァイルå" # YARD::Registry.load #: ../lib/yard/registry.rb:83 msgid "Loads the registry and/or parses a list of files" msgstr "レジストリã®ãƒ­ãƒ¼ãƒ‰ã‚„ファイルã®ãƒªã‚¹ãƒˆã‚’è§£æžã™ã‚‹" # YARD::Registry.load # YARD::Registry.load_yardoc # YARD::Registry.load! # YARD::Registry.load_all #: ../lib/yard/registry.rb:97 ../lib/yard/registry.rb:118 #: ../lib/yard/registry.rb:132 ../lib/yard/registry.rb:147 msgid "Loading Data from Disk" msgstr "ディスクã‹ã‚‰ã€ãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹" # @example Loads the yardoc file or parses files 'a', 'b' and 'c' (but not both) #: ../lib/yard/registry.rb:97 msgid "Registry.load(['a', 'b', 'c'])" msgstr "" # @example Reparses files 'a' and 'b' regardless of whether yardoc file exists #: ../lib/yard/registry.rb:97 msgid "Registry.load(['a', 'b'], true)" msgstr "" # @param [String, Array] files #: ../lib/yard/registry.rb:97 msgid "" "if +files+ is an Array, it should represent\n" "a list of files that YARD should parse into the registry. If reload is\n" "set to false and the yardoc file already exists, these files are skipped.\n" "If files is a String, it should represent the yardoc file to load\n" "into the registry." msgstr "" "+files+ãŒé…列ã®å ´åˆã€YARDãŒãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã®ä¸­ã‚’è§£æžã™ã‚‹ã¹ãファイルã®ãƒªã‚¹ãƒˆã‚’表ã™ã€‚\n" "reloadãŒfalseを設定ã•れãŸå ´åˆã‚„ã€yardocãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€\n" "ã“れらã®ãƒ•ァイルã¯ã€ã‚¹ã‚­ãƒƒãƒ—ã•れる。\n" "ファイルãŒStringã®å ´åˆã€\n" "レジストリーã®ä¸­ã¸ãƒ­ãƒ¼ãƒ‰ã™ã‚‹yardocファイルを表ã™ã€‚" # @raise [ArgumentError] #: ../lib/yard/registry.rb:97 msgid "if files is not a String or Array" msgstr "ファイルãŒStringã‚„Arrayã§ãªã„å ´åˆ" # @param [Boolean] reparse #: ../lib/yard/registry.rb:97 msgid "" "if reparse is false and a yardoc file already\n" "exists, any files passed in will be ignored." msgstr "" "reparseãŒfalseã®å ´åˆã‚„ã€yardocãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€\n" "オプションã®è§£æžã•れるファイルã¯ã€ç„¡è¦–ã•れる。" # @example #: ../lib/yard/registry.rb:97 msgid "" "tag|example|Loads the yardoc file or parses files 'a', 'b' and 'c' (but not " "both)" msgstr "" "yardocファイルをロードã™ã‚‹ã€‚åˆã¯ã€'a','b','c'ã®ãƒ•ァイルを解æžã™ã‚‹ã€‚(ã©ã¡ã‚‰ã‹" "ã ã‘行ã†)" # @example #: ../lib/yard/registry.rb:97 msgid "" "tag|example|Reparses files 'a' and 'b' regardless of whether yardoc file " "exists" msgstr "" "yardocファイルãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã«ã‹ã‹ã‚らãšã€ãƒ•ァイル'a'ã¨'b'ã‚’å†è§£æžã™ã‚‹ã€‚" # @param [Boolean] #: ../lib/yard/registry.rb:97 msgid "tag|param|reparse" msgstr "" # @return [Registry] #: ../lib/yard/registry.rb:97 ../lib/yard/registry.rb:118 #: ../lib/yard/registry.rb:132 ../lib/yard/registry.rb:147 msgid "the registry object (for chaining)" msgstr "レジストリオブジェクト(ãƒã‚§ãƒ¼ãƒ³ç”¨)" # YARD::Registry.load_yardoc #: ../lib/yard/registry.rb:115 msgid "Loads a yardoc file directly" msgstr "直接yardocファイルをロードã™ã‚‹" # @param [String] file #: ../lib/yard/registry.rb:118 msgid "the yardoc file to load." msgstr "ロードã™ã‚‹yardocファイル" # YARD::Registry.load! #: ../lib/yard/registry.rb:125 msgid "" "Loads a yardoc file and forces all objects cached on disk into\n" "memory. Equivalent to calling {load_yardoc} followed by {load_all}" msgstr "" "yardocファイルをロードã—ã€\n" "メモリã®ä¸­ã¸ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®å…¨ã¦ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•れるオブジェクトを強制ã™ã‚‹ã€‚\n" "{load_all}ã«ç¶šã„ã¦å‘¼ã³å‡ºã™{load_yardoc}ã¨åŒç­‰ã§ã‚る。" # @see #: ../lib/yard/registry.rb:132 ../lib/yard/registry_store.rb:130 msgid "tag|see|#load_all" msgstr "" # @see #: ../lib/yard/registry.rb:132 msgid "tag|see|#load_yardoc" msgstr "" # @param [String] file #: ../lib/yard/registry.rb:132 msgid "the yardoc file to load" msgstr "ロードã™ã‚‹yardocファイル" # YARD::Registry.load_all #: ../lib/yard/registry.rb:139 msgid "Forces all objects cached on disk into memory" msgstr "メモリã®ä¸­ã¸ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•れる全ã¦ã®ã‚ªãƒ–ジェクトを強制ã™ã‚‹" # @example Loads all objects from disk #: ../lib/yard/registry.rb:147 msgid "" "Registry.load\n" "Registry.all.count #=> 0\n" "Registry.load_all\n" "Registry.all.count #=> 17" msgstr "" # @example #: ../lib/yard/registry.rb:147 msgid "tag|example|Loads all objects from disk" msgstr "ディスクã‹ã‚‰å…¨ã¦ã®ã‚ªãƒ–ジェクトをロードã™ã‚‹" # YARD::Registry.save #: ../lib/yard/registry.rb:155 msgid "Saves the registry to +file+" msgstr "+file+ をレジストリーã«ã‚»ãƒ¼ãƒ–ã™ã‚‹" # YARD::Registry.save # YARD::Registry.delete_from_disk #: ../lib/yard/registry.rb:158 ../lib/yard/registry.rb:164 msgid "Saving and Deleting Data from Disk" msgstr "ディスクã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’セーブ/削除ã™ã‚‹ã€‚" # @param [String] file #: ../lib/yard/registry.rb:158 msgid "the yardoc file to save to" msgstr "セーブã•れるyardocファイル" # @return [Boolean] #: ../lib/yard/registry.rb:158 msgid "true if the file was saved" msgstr "ファイルãŒã‚»ãƒ¼ãƒ–ã•れãŸå ´åˆã€trueã‚’è¿”ã™" # YARD::Registry.delete_from_disk #: ../lib/yard/registry.rb:163 msgid "Deletes the yardoc file from disk" msgstr "ディスクã‹ã‚‰yardocファイルを削除ã™ã‚‹" # YARD::Registry.register #: ../lib/yard/registry.rb:171 msgid "Registers a new object with the registry" msgstr "ãƒªã‚¸ã‚¹ãƒˆãƒªã‚’ç”¨ã„æ–°ã—ã„オブジェクトを記録ã™ã‚‹" # YARD::Registry.register # YARD::Registry.delete # YARD::Registry.clear #: ../lib/yard/registry.rb:174 ../lib/yard/registry.rb:182 #: ../lib/yard/registry.rb:188 msgid "Adding and Deleting Objects from the Registry" msgstr "レジストリã‹ã‚‰ã€ã‚ªãƒ–ジェクトを追加,削除ã™ã‚‹ã€‚" # @return [CodeObjects::Base] #: ../lib/yard/registry.rb:174 msgid "the registered object" msgstr "記録ã•れãŸã‚ªãƒ–ジェクト" # YARD::Registry.delete #: ../lib/yard/registry.rb:180 msgid "Deletes an object from the registry" msgstr "レジストリーã‹ã‚‰ã€ã‚ªãƒ–ジェクトを削除ã™ã‚‹" # @param [CodeObjects::Base] object #: ../lib/yard/registry.rb:182 msgid "the object to remove" msgstr "削除ã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Registry.clear #: ../lib/yard/registry.rb:187 msgid "Clears the registry" msgstr "レジストリーを空ã«ã™ã‚‹" # YARD::Registry.each # YARD::Registry.all # YARD::Registry.paths # YARD::Registry.at # YARD::Registry.[] # YARD::Registry.root # YARD::Registry.resolve # YARD::Registry.partial_resolve #: ../lib/yard/registry.rb:195 ../lib/yard/registry.rb:211 #: ../lib/yard/registry.rb:226 ../lib/yard/registry.rb:235 #: ../lib/yard/registry.rb:236 ../lib/yard/registry.rb:240 #: ../lib/yard/registry.rb:270 ../lib/yard/registry.rb:368 msgid "Accessing Objects in the Registry" msgstr "レジストリーã®ä¸­ã§ã‚ªãƒ–ジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹" # YARD::Registry.each #: ../lib/yard/registry.rb:195 msgid "Iterates over {all} with no arguments" msgstr "引数無ã—ã§{all}を繰り返ã™ã€‚" # YARD::Registry.all #: ../lib/yard/registry.rb:200 msgid "" "Returns all objects in the registry that match one of the types provided\n" "in the +types+ list (if +types+ is provided)." msgstr "" "+types+ リスト(タイプãŒä¾›çµ¦ã•ã‚Œã‚‹å ´åˆ )\n" "供給ã•れる型ã®ä¸€ã¤ã«ãƒžãƒƒãƒã™ã‚‹ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ã®ä¸­ã§ã‚ªãƒ–ジェクトã®å…¨ã¦ã‚’è¿”ã™" # @example Returns all objects #: ../lib/yard/registry.rb:211 msgid "Registry.all" msgstr "" # @example Returns all classes and modules #: ../lib/yard/registry.rb:211 msgid "Registry.all(:class, :module)" msgstr "" # @param [Array] types #: ../lib/yard/registry.rb:211 msgid "" "an optional list of types to narrow the\n" "objects down by. Equivalent to performing a select:\n" " +Registry.all.select {|o| types.include(o.type) }+" msgstr "" "ä»»æ„ã®åž‹ã®ãƒªã‚¹ãƒˆã‚’絞り込む。次ã®é¸æŠžã¨åŒæ§˜ã§ã‚る。\n" " +Registry.all.select {|o| types.include(o.type) }+" # @example #: ../lib/yard/registry.rb:211 msgid "tag|example|Returns all classes and modules" msgstr "å…¨ã¦ã®ã‚¯ãƒ©ã‚¹ã¨ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’è¿”ã™" # @example #: ../lib/yard/registry.rb:211 msgid "tag|example|Returns all objects" msgstr "å…¨ã¦ã®ã‚ªãƒ–ジェクトを返ã™" # @param [Array] # @param [Array] #: ../lib/yard/registry.rb:211 ../lib/yard/tags/tag.rb:43 msgid "tag|param|types" msgstr "" # @see #: ../lib/yard/registry.rb:211 msgid "tag|see|CodeObjects::Base#type" msgstr "" # @return [Array] #: ../lib/yard/registry.rb:211 msgid "the list of objects found" msgstr "オブジェクトã®ãƒªã‚¹ãƒˆã‚’ã¿ã¤ã‘ã‚‹" # YARD::Registry.paths #: ../lib/yard/registry.rb:224 msgid "Returns the paths of all of the objects in the registry." msgstr "レジストリーã®ä¸­ã®å…¨ã¦ã®ã‚ªãƒ–ジェクトã®ãƒ‘スを返ã™" # @return [Array] #: ../lib/yard/registry.rb:226 msgid "all of the paths in the registry." msgstr "レジストリーã®ä¸­ã®ãƒ‘スã®å…¨ã¦" # @param [Boolean] #: ../lib/yard/registry.rb:226 ../lib/yard/registry_store.rb:80 #: ../lib/yard/registry_store.rb:88 msgid "tag|param|reload" msgstr "" # @param [Boolean] reload #: ../lib/yard/registry.rb:226 msgid "whether to load entire database" msgstr "データベース全体をロードã™ã‚‹ã‹ã©ã†ã‹" # YARD::Registry.at # YARD::Registry.[] #: ../lib/yard/registry.rb:231 ../lib/yard/registry.rb:237 msgid "Returns the object at a specific path." msgstr "固有ã®ãƒ‘スã§ã‚ªãƒ–ジェクトを返ã™" # @return [CodeObjects::Base] #: ../lib/yard/registry.rb:235 msgid "the object at path" msgstr "パスã®ã‚ªãƒ–ジェクト" # @param [String, :root] path #: ../lib/yard/registry.rb:235 msgid "" "the pathname to look for. If +path+ is +root+,\n" "returns the {root} object." msgstr "" "検索ã®ç‚ºã®ãƒ‘スå〠+path+ ㌠+root+ ã®å ´åˆ\n" "{root}ã‚’è¿”ã™ã€‚" # YARD::Registry.root #: ../lib/yard/registry.rb:239 msgid "The root namespace object." msgstr "rootã¯åå‰ç©ºé–“オブジェクトã¨ãªã‚‹" # @return [CodeObjects::RootObject] #: ../lib/yard/registry.rb:240 msgid "the root object in the namespace" msgstr "namespaceã®ä¸­ã®rootオブジェクト" # YARD::Registry.resolve #: ../lib/yard/registry.rb:243 msgid "" "Attempts to find an object by name starting at +namespace+, performing\n" "a lookup similar to Ruby's method of resolving a constant in a namespace." msgstr "" "+namespace+ ã§nameã§å§‹ã¾ã‚‹ã‚ªãƒ–ジェクトãŒè¦‹ã¤ã‹ã‚‹ã‹è©¦ã¿ã‚‹\n" "namespaceã®ä¸­ã§å®šæ•°ã‚’解決ã™ã‚‹ã®ã«ã€Rubyメソッドã¨åŒæ§˜ã«æ¤œç´¢ã‚’実行ã™ã‚‹ã€‚" # @param [Boolean] inheritance #: ../lib/yard/registry.rb:270 msgid "" "Follows inheritance chain (mixins, superclass)\n" "when performing name resolution if set to +true+." msgstr "" "+true+ãŒè¨­å®šã•ã‚ŒãŸæ™‚ã€åå‰è§£æ±ºã‚’実行ã™ã‚‹ã€ç¶™æ‰¿ã®ãƒã‚§ãƒ¼ãƒ³(mixin,superクラス)" # @param [Boolean] proxy_fallback #: ../lib/yard/registry.rb:270 msgid "" "If +true+, returns a proxy representing\n" "the unresolved path (namespace + name) if no object is found." msgstr "" "+true+ã®å ´åˆã‚„オブジェクトãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã€\n" "未解決ã®ãƒ‘ス(namespace + name)を表ã™proxyã‚’è¿”ã™ã€‚" # @example Looks for instance method #reverse starting from A::B::C #: ../lib/yard/registry.rb:270 msgid "Registry.resolve(P(\"A::B::C\"), \"#reverse\")" msgstr "" # @example Looks for a complex path from a namespace #: ../lib/yard/registry.rb:270 msgid "Registry.resolve(P('A::B'), 'B::D') # => #" msgstr "Registry.resolve(P('A::B'), 'B::D') # => #" # @example Looks for a constant but returns a proxy if not found #: ../lib/yard/registry.rb:270 msgid "" "Registry.resolve(P('A::B::C'), 'D', false, true) # => #" msgstr "" # @example Looks for a class method respecting the inheritance tree #: ../lib/yard/registry.rb:270 msgid "Registry.resolve(myclass, 'mymethod', true)" msgstr "" # @example Looks for a constant in the root namespace #: ../lib/yard/registry.rb:270 msgid "Registry.resolve(nil, 'CONSTANT')" msgstr "" # @return [CodeObjects::Proxy] #: ../lib/yard/registry.rb:270 msgid "" "a Proxy representing the object if\n" "+proxy_fallback+ is +true+." msgstr "+proxy_fallback+ ㌠+true+ã®å ´åˆã€ã‚ªãƒ–ジェクトを表ã™proxyã¨ãªã‚‹ã€‚" # @return [nil] #: ../lib/yard/registry.rb:270 msgid "if +proxy_fallback+ is +false+ and no object was found." msgstr "+proxy_fallback+ ㌠+false+ åˆã¯ã€ã‚ªãƒ–ジェクトãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆ" # @example #: ../lib/yard/registry.rb:270 msgid "tag|example|Looks for a class method respecting the inheritance tree" msgstr "関連ã™ã‚‹ç¶™æ‰¿ãƒ„リーã®ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’探ã™" # @example #: ../lib/yard/registry.rb:270 msgid "tag|example|Looks for a complex path from a namespace" msgstr "namespaceã‹ã‚‰è¤‡é›‘ãªãƒ‘スを検索ã™ã‚‹" # @example #: ../lib/yard/registry.rb:270 msgid "tag|example|Looks for a constant but returns a proxy if not found" msgstr "定数を探ã™ãŒã€è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯ã€proxyã‚’è¿”ã™ã€‚" # @example #: ../lib/yard/registry.rb:270 msgid "tag|example|Looks for a constant in the root namespace" msgstr "root namespaseã®ä¸­ã®å®šæ•°ã‚’を探ã™" # @example #: ../lib/yard/registry.rb:270 msgid "tag|example|Looks for instance method #reverse starting from A::B::C" msgstr "A::B::Cã§å§‹ã¾ã‚‹ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰#reverseを探ã™" # @param [Boolean] #: ../lib/yard/registry.rb:270 msgid "tag|param|inheritance" msgstr "継承" # @param [Boolean] #: ../lib/yard/registry.rb:270 msgid "tag|param|proxy_fallback" msgstr "" # @see #: ../lib/yard/registry.rb:270 msgid "tag|see|P" msgstr "" # @param [String, Symbol] name #: ../lib/yard/registry.rb:270 msgid "" "the name (or complex path) to look for from\n" "+namespace+." msgstr "+namespace+ ã‹ã‚‰æ¤œç´¢ã™ã‚‹åå‰(や複雑ãªãƒ‘ス)" # @return [CodeObjects::Base] #: ../lib/yard/registry.rb:270 msgid "the object if it is found" msgstr "見ã¤ã‹ã£ãŸã‚ªãƒ–ジェクト" # @param [CodeObjects::NamespaceObject, nil] namespace #: ../lib/yard/registry.rb:270 msgid "" "the starting namespace\n" "(module or class). If +nil+ or +:root+, starts from the {root} object." msgstr "" "å§‹ã¾ã‚Šã®namespace(モジュールやクラス)。\n" "+nil+ ã‚„ +:root+ ã®å ´åˆã€{root}オブジェクトã‹ã‚‰å§‹ã¾ã‚‹ã€‚" # @param [Symbol, nil] type #: ../lib/yard/registry.rb:270 msgid "" "the {CodeObjects::Base#type} that the resolved\n" "object must be equal to. No type checking if nil." msgstr "" # YARD::Registry.checksums # YARD::Registry.checksum_for #: ../lib/yard/registry.rb:317 ../lib/yard/registry.rb:323 msgid "Managing Source File Checksums" msgstr "ソースファイルãƒã‚§ãƒƒã‚¯ã‚µãƒ ã‚’管ç†ã™ã‚‹" # @return [Hash{String => String}] #: ../lib/yard/registry.rb:317 msgid "a set of checksums for files" msgstr "ファイル用ã®ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã®ã‚°ãƒ«ãƒ¼ãƒ—" # @param [String] data #: ../lib/yard/registry.rb:323 msgid "data to checksum" msgstr "ãƒã‚§ãƒƒã‚¯ã‚µãƒ ã™ã‚‹ãƒ‡ãƒ¼ã‚¿" # @return [String] #: ../lib/yard/registry.rb:323 msgid "the SHA1 checksum for data" msgstr "データã®SHA1ãƒã‚§ãƒƒã‚¯ã‚µãƒ " # YARD::Registry.single_object_db # YARD::Registry.single_object_db= #: ../lib/yard/registry.rb:330 msgid "" "Whether or not the Registry storage should load everything into a\n" "single object database (for disk efficiency), or spread them out\n" "(for load time efficiency)." msgstr "" "レジストリーストレージã¯å˜ä¸€ã®ã‚ªãƒ–ジェクトã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¸­ã¸\n" "毎回ロードã™ã‚‹ã‹ã€(ディスク効率ã®ç‚º)\n" "åˆã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’展開ã™ã‚‹ã€‚(ロード時間効率ã®ç‚º)" # YARD::Registry.single_object_db # YARD::Registry.single_object_db= # YARD::Registry.proxy_types #: ../lib/yard/registry.rb:337 ../lib/yard/registry.rb:339 #: ../lib/yard/registry.rb:340 ../lib/yard/registry.rb:346 msgid "Managing Internal State (Advanced / Testing Only)" msgstr "内部ã®çŠ¶æ…‹ã‚’ç®¡ç†ã™ã‚‹(Advanced / Testing Only)" # @note #: ../lib/yard/registry.rb:337 ../lib/yard/registry.rb:339 #: ../lib/yard/registry.rb:340 msgid "" "Setting this attribute to nil will offload the decision to\n" "the {RegistryStore storage adapter}." msgstr "" "ã“ã®å±žæ€§ã«nilを設定ã™ã‚‹ã¨ã€{RegistryStore storage adapter}ã®æ±ºå®šã‚’unloadã™" "る。" # @return [Boolean, nil] #: ../lib/yard/registry.rb:337 ../lib/yard/registry.rb:339 #: ../lib/yard/registry.rb:340 msgid "" "if this value is set to nil, the storage\n" "adapter will decide how to store the data." msgstr "" "ã“ã®å€¤ã«nilを設定ã—ãŸå ´åˆã€\n" "ストレージアダプターãŒãƒ‡ãƒ¼ã‚¿ã‚’記録ã™ã‚‹æ–¹æ³•を決ã‚る。" # YARD::Registry.proxy_types #: ../lib/yard/registry.rb:343 msgid "" "The assumed types of a list of paths. This method is used by CodeObjects::" "Base" msgstr "" "パスã®ãƒªã‚¹ãƒˆã®æƒ³å®šã•れる型。ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯CodeObjects::Baseã«ã‚ˆã£ã¦åˆ©ç”¨ã•れ" "る。" # @deprecated #: ../lib/yard/registry.rb:346 msgid "The registry no longer globally tracks proxy types." msgstr "" # @return [{String => Symbol}] #: ../lib/yard/registry.rb:346 msgid "a set of unresolved paths and their assumed type" msgstr "未解決ã®ãƒ‘スã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚„ãã®æƒ³å®šã•れる型" # YARD::Registry.instance #: ../lib/yard/registry.rb:353 msgid "The registry singleton instance." msgstr "レジストリーã®ã‚·ãƒ³ã‚°ãƒ«ãƒˆãƒ³ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹" # YARD::Registry.instance #: ../lib/yard/registry.rb:356 msgid "Legacy Methods" msgstr "Legacy Methods" # @return [Registry] #: ../lib/yard/registry.rb:356 msgid "returns the registry instance" msgstr "レジストリーインスタンスを返ã™" # @deprecated #: ../lib/yard/registry.rb:356 msgid "use Registry.methodname directly." msgstr "直接Registry.methodnameを使ã†" # YARD::Registry.partial_resolve #: ../lib/yard/registry.rb:363 msgid "Attempts to resolve a name in a namespace" msgstr "namespaceã®ä¸­ã§åå‰ã®è§£æ±ºã‚’試ã¿ã‚‹" # @param [String] name #: ../lib/yard/registry.rb:368 msgid "the name to look for" msgstr "検索ã™ã‚‹name" # @param [CodeObjects::NamespaceObject] namespace #: ../lib/yard/registry.rb:368 msgid "the starting namespace" msgstr "å§‹ã¾ã‚Šã®namespace" # @param [Symbol, nil] type #: ../lib/yard/registry.rb:368 msgid "" "the {CodeObjects::Base#type} that the resolved\n" "object must be equal to" msgstr "" # YARD::Registry.global_yardoc_file # YARD::Registry.local_yardoc_file #: ../lib/yard/registry.rb:385 ../lib/yard/registry.rb:395 msgid "Retrieving yardoc File Locations" msgstr "yardocファイルã®å ´æ‰€ã‚’å–り出ã™" # @since #: ../lib/yard/registry.rb:409 ../lib/yard/registry.rb:414 msgid "0.6.5" msgstr "" # YARD::Registry.thread_local_store # YARD::Registry.thread_local_store= #: ../lib/yard/registry.rb:409 ../lib/yard/registry.rb:414 msgid "Threading support" msgstr "スレッドをサãƒãƒ¼ãƒˆ" # YARD::RegistryStore #: ../lib/yard/registry_store.rb:5 msgid "The data store for the {Registry}." msgstr "{Registry}用ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢" # @see #: ../lib/yard/registry_store.rb:8 msgid "tag|see|Serializers::YardocSerializer" msgstr "" # YARD::Registry.instance #: ../lib/yard/registry_store.rb:10 ../lib/yard/registry_store.rb:213 #: ../lib/yard/registry_store.rb:250 ../lib/yard/registry_store.rb:291 #: ../lib/yard/serializers/yardoc_serializer.rb:36 msgid "The registry no longer tracks proxy types" msgstr "レジストリã¯ãƒ—ロキシタイプã®è¿½è·¡ã‚’ã—ãªã„" # YARD::RegistryStore#checksums #: ../lib/yard/registry_store.rb:12 msgid "Returns the value of attribute checksums" msgstr "checksums属性ã®å€¤ã‚’è¿”ã™" # @return [RegistryStore] #: ../lib/yard/registry_store.rb:13 msgid "a new instance of RegistryStore" msgstr "RegistryStoreã®æ–°ã—ã„インスタンス" # YARD::RegistryStore#get # YARD::RegistryStore#[] #: ../lib/yard/registry_store.rb:27 ../lib/yard/registry_store.rb:67 msgid "Gets a {CodeObjects::Base} from the store" msgstr "記録ã‹ã‚‰{CodeObjects::Base}ã‚’å–å¾—ã™ã‚‹" # @return [CodeObjects::Base, nil] #: ../lib/yard/registry_store.rb:31 msgid "a code object or nil if none is found" msgstr "コードオブジェクトã‹è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã¯nilã‚’è¿”ã™" # @param [String, Symbol] key #: ../lib/yard/registry_store.rb:31 msgid "" "the path name of the object to look for.\n" "If it is empty or :root, returns the {#root} object." msgstr "" "検索ã®ç‚ºã®ã‚ªãƒ–ジェクトã®ãƒ‘スå。\n" "空ã‹:rootã®å ´åˆã€{#root}オブジェクトを返ã™ã€‚" # YARD::RegistryStore#put # YARD::RegistryStore#[]= #: ../lib/yard/registry_store.rb:49 ../lib/yard/registry_store.rb:68 msgid "Associates an object with a path" msgstr "パスã¨ä¸€ç·’ã«ã‚ªãƒ–ジェクトを関連付ã‘る。" # @return [CodeObjects::Base] #: ../lib/yard/registry_store.rb:52 msgid "returns +value+" msgstr "+value+ ã‚’è¿”ã™" # @param [CodeObjects::Base] value #: ../lib/yard/registry_store.rb:52 msgid "the object to store" msgstr "記録ã™ã‚‹ã‚ªãƒ–ジェクト" # @param [String, Symbol] key #: ../lib/yard/registry_store.rb:52 msgid "the path name (:root or '' for root object)" msgstr "パスå(:rootã‚„rootオブジェクト用ã®'')" # YARD::RegistryStore#put # YARD::RegistryStore#[]= #: ../lib/yard/registry_store.rb:70 msgid "Deletes an object at a given path" msgstr "与ãˆã‚‰ã‚ŒãŸãƒ‘スã§ã‚ªãƒ–ジェクトを削除ã™ã‚‹" # YARD::RegistryStore#keys #: ../lib/yard/registry_store.rb:75 msgid "" "Gets all path names from the store. Loads the entire database\n" "if +reload+ is +true+" msgstr "" "記録ã‹ã‚‰å…¨ã¦ã®ãƒ‘スåã‚’å–å¾—ã™ã‚‹ã€‚\n" "+reload+ ㌠+true+ ã®å ´åˆã€å…¨ä½“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ロードã™ã‚‹ã€‚" # @param [Boolean] reload #: ../lib/yard/registry_store.rb:80 ../lib/yard/registry_store.rb:88 msgid "" "if false, does not load the entire database\n" "before a lookup." msgstr "falseã®å ´åˆã€æ¤œç´¢ã®å‰ã«å…¨ä½“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ロードã—ãªã„" # @return [Array] #: ../lib/yard/registry_store.rb:80 msgid "the path names of all the code objects" msgstr "å…¨ã¦ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ãƒ‘スå" # YARD::RegistryStore#values #: ../lib/yard/registry_store.rb:83 msgid "" "Gets all code objects from the store. Loads the entire database\n" "if +reload+ is +true+" msgstr "" "記録ã‹ã‚‰å…¨ã¦ã®ãƒ‘スåã‚’å–å¾—ã™ã‚‹ã€‚\n" "+reload+ ㌠+true+ ã®å ´åˆã€å…¨ä½“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ロードã™ã‚‹ã€‚" # @return [Array] #: ../lib/yard/registry_store.rb:88 msgid "all the code objects" msgstr "å…¨ã¦ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクト" # @return [Array] #: ../lib/yard/registry_store.rb:94 msgid "" "a list of object paths with a given\n" "{CodeObjects::Base#type}" msgstr "" # @param [String] name #: ../lib/yard/registry_store.rb:94 ../lib/yard/registry_store.rb:103 msgid "the type to look for" msgstr "åž‹ç”¨ã«æ¤œç´¢ã™ã‚‹åž‹" # @return [Array] #: ../lib/yard/registry_store.rb:103 msgid "" "a list of objects with a given\n" "{CodeObjects::Base#type}" msgstr "" # @return [CodeObjects::RootObject] #: ../lib/yard/registry_store.rb:109 msgid "the root object" msgstr "rootオブジェクト" # @param [String, nil] file #: ../lib/yard/registry_store.rb:113 ../lib/yard/registry_store.rb:130 msgid "the name of the yardoc db to load" msgstr "ロードã™ã‚‹yardoc dbã®åå‰" # @return [Boolean] #: ../lib/yard/registry_store.rb:113 ../lib/yard/registry_store.rb:130 msgid "whether the database was loaded" msgstr "データベースãŒãƒ­ãƒ¼ãƒ‰ã•れãŸã‹ã©ã†ã‹" # YARD::RegistryStore#load! #: ../lib/yard/registry_store.rb:124 msgid "" "Loads the .yardoc file and loads all cached objects into memory\n" "automatically." msgstr "" ".yardocファイルをロードã—ãŸã‚Šã€\n" "å…¨ã¦ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•れãŸã‚ªãƒ–ジェクトを自動的ã«ãƒ¡ãƒ¢ãƒªã®ä¸­ã¸ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã€‚" # YARD::RegistryStore#load_all #: ../lib/yard/registry_store.rb:140 msgid "Loads all cached objects into memory" msgstr "メモリã®ä¸­ã¸å…¨ã¦ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•れãŸã‚ªãƒ–ジェクトをロードã™ã‚‹" # YARD::RegistryStore#save #: ../lib/yard/registry_store.rb:160 msgid "Saves the database to disk" msgstr "ディスクã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’セーブã™ã‚‹" # @param [String, nil] file #: ../lib/yard/registry_store.rb:164 msgid "if supplied, the name of the file to save to" msgstr "指定ã•れãŸå ´åˆã€ã‚»ãƒ¼ãƒ–ã™ã‚‹ãƒ•ァイルã®åå‰ã¨ãªã‚‹" # @param [Boolean] merge #: ../lib/yard/registry_store.rb:164 msgid "" "if true, merges the data in memory with the\n" "data on disk, otherwise the data on disk is deleted." msgstr "" "trueã®å ´åˆã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã¨å…±ã«ãƒ¡ãƒ¢ãƒªã®ä¸­ã®ãƒ‡ãƒ¼ã‚¿ã‚’マージã™ã‚‹ã€‚\n" "ãã†ã§ãªã‘れã°ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã¯å‰Šé™¤ã•れる。" # @param [Boolean] #: ../lib/yard/registry_store.rb:164 msgid "tag|param|merge" msgstr "" # @return [Boolean] #: ../lib/yard/registry_store.rb:164 msgid "whether the database was saved" msgstr "データベースãŒã‚»ãƒ¼ãƒ–ã•れるã‹ã©ã†ã‹" # YARD::RegistryStore#destroy #: ../lib/yard/registry_store.rb:186 msgid "Deletes the .yardoc database on disk" msgstr "ディスク上ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®.yardocã®å‰Šé™¤" # @param [Boolean] force #: ../lib/yard/registry_store.rb:192 msgid "" "if force is not set to true, the file/directory\n" "will only be removed if it ends with .yardoc. This helps with\n" "cases where the directory might have been named incorrectly." msgstr "" "forceã«trueãŒè¨­å®šã•れãšã€ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ«å°¾ã«.yardocãŒä»˜ãå ´åˆã€\n" "ファイル/ディレクトリã¯å‰Šé™¤ã•れる。\n" "ã“れã¯ã€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãŒé–“é•ã£ã¦å付ã‘られãŸå ´åˆã€å½¹ç«‹ã¤ã ã‚ã†ã€‚" # @param [Boolean] #: ../lib/yard/registry_store.rb:192 msgid "tag|param|force" msgstr "" # @return [Boolean] #: ../lib/yard/registry_store.rb:192 msgid "" "true if the .yardoc database was deleted, false\n" "otherwise." msgstr "" ".yardocデータベースãŒå‰Šé™¤ã•れãŸå ´åˆã€true。\n" "ãれ以外ã¯false。" # YARD::Serializers::Base #: ../lib/yard/serializers/base.rb:4 msgid "" "The abstract base serializer. Serializers allow templates to be\n" "rendered to various endpoints. For instance, a {FileSystemSerializer}\n" "would allow template contents to be written to the filesystem" msgstr "" "ã“ã‚Œã¯æŠ½è±¡çš„ãªãƒ™ãƒ¼ã‚¹ã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã¨ãªã‚‹ã€‚\n" "シリアライザã¯ã€æ§˜ã€…ãªã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã§è¡¨ç¤ºã•れる\n" "テンプレートをå—ã‘入れる。\n" "例ãˆã°ã€{FileSystemSerializer}ã¯ã€\n" "ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã«æ›¸ã‹ã‚Œã‚‹å†…容ã®ãƒ†ãƒ³ãƒ—レートをå—ã‘入れる。" # YARD::Serializers::Base #: ../lib/yard/serializers/base.rb:8 msgid "" "To implement a custom serializer, override the following methods:\n" "* {#serialize}\n" "* {#serialized_path}" msgstr "" "カスタムシリアライザを実装ã™ã‚‹ã«ã¯ã€æ¬¡ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’上書ãã™ã‚‹ã€‚:\n" "* {#serialize}\n" "* {#serialized_path}" # YARD::Serializers::Base #: ../lib/yard/serializers/base.rb:12 msgid "" "Optionally, a serializer can implement before and after filters:\n" "* {#before_serialize}\n" "* {#after_serialize}" msgstr "" "ä»»æ„ã§ã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã¯ãƒ•ィルターã®å‰å¾Œã«å®Ÿè£…ã§ãる。:\n" "* {#before_serialize}\n" "* {#after_serialize}" # @abstract #: ../lib/yard/serializers/base.rb:16 msgid "Override this class to implement a custom serializer." msgstr "カスタムシリアライザを実装ã™ã‚‹ç‚ºã«ã€ã“ã®ã‚¯ãƒ©ã‚¹ã‚’上書ãã™ã‚‹ã€‚" # YARD::Serializers::Base#options #: ../lib/yard/serializers/base.rb:18 msgid "" "All serializer options are saved so they can be passed to other serializers." msgstr "" "å…¨ã¦ã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã®ã‚ªãƒ—ションã¯ã‚»ãƒ¼ãƒ–ã•れるã®ã§ã€ä»–ã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã«æ¸¡ã™äº‹ãŒ" "出æ¥ã‚‹ã€‚" # @return [SymbolHash] #: ../lib/yard/serializers/base.rb:20 msgid "the serializer options" msgstr "シリアライザã®ã‚ªãƒ—ション" # YARD::Serializers::Base#initialize #: ../lib/yard/serializers/base.rb:25 msgid "Creates a new serializer with options" msgstr "オプションã¨å…±ã«æ–°ã—ã„シリアライザを作æˆã™ã‚‹ã€‚" # YARD::Serializers::Base#initialize #: ../lib/yard/serializers/base.rb:27 msgid "Creating a New Serializer" msgstr "æ–°ã—ã„シリアライザを作æˆã™ã‚‹ã€‚" # @param [Hash] opts #: ../lib/yard/serializers/base.rb:27 msgid "the options to assign to {#options}" msgstr "{#options}メソッドã«å‰²ã‚Šå½“ã¦ã‚‹ã‚ªãƒ—ション" # YARD::Serializers::Base#serialize #: ../lib/yard/serializers/base.rb:34 msgid "Serializes an object." msgstr "シリアライズã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Serializers::Base#serialize # YARD::Serializers::Base#serialized_path # YARD::Serializers::Base#exists? #: ../lib/yard/serializers/base.rb:41 ../lib/yard/serializers/base.rb:50 #: ../lib/yard/serializers/base.rb:61 msgid "Serializing an Object" msgstr "シリアライズã™ã‚‹ã‚ªãƒ–ジェクト" # @abstract #: ../lib/yard/serializers/base.rb:41 msgid "" "This method should implement the logic that serializes\n" "+data+ to the respective endpoint. This method should also call\n" "the before and after callbacks {#before_serialize} and {#after_serialize}" msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãれãžã‚Œã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆã« +data+ をシリアライズã™ã‚‹ãƒ­ã‚¸ãƒƒã‚¯" "ã‚’\n" "実装ã™ã‚‹ã¹ãã§ã‚る。\n" "ã¾ãŸã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å‰å¾Œã«{#before_serialize} 㨠{#after_serialize}ã®\n" "コールãƒãƒƒã‚¯ã‚‚呼ã³å‡ºã™ã¹ãã§ã‚る。" # @param [String] data #: ../lib/yard/serializers/base.rb:41 msgid "the contents that should be serialized" msgstr "シリアライズã•れるã¹ã内容" # @param [CodeObjects::Base, String] object #: ../lib/yard/serializers/base.rb:41 msgid "" "the object to serialize the\n" "data for. The object can also be a string (for non-object serialization)" msgstr "" "オブジェクトã®ãƒ‡ãƒ¼ã‚¿ã‚’シリアライズã™ã‚‹ã‚ªãƒ–ジェクトã€\n" "ã“ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ–‡å­—列ã«ã‚‚ã§ãる。(éžã‚ªãƒ–ジェクトをシリアライズã™ã‚‹å ´åˆ)" # YARD::Serializers::Base#serialized_path #: ../lib/yard/serializers/base.rb:44 msgid "The serialized path of an object" msgstr "シリアライズã•れるオブジェクトã®ãƒ‘ス" # @abstract #: ../lib/yard/serializers/base.rb:50 msgid "" "This method should return the path of the object on the\n" "endpoint. For instance, for a file serializer, this should return\n" "the filename that represents the object on disk." msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆä¸Šã®ã‚ªãƒ–ジェクトã®ãƒ‘スを返ã™ã€‚\n" "例ãˆã°ã€ãƒ•ァイルシリアライザã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã®ä¸­ã®ãã®ã‚ªãƒ–ジェクトを表ã™ãƒ•ァイル" "åã‚’è¿”ã™ã€‚" # @param [CodeObjects::Base] object #: ../lib/yard/serializers/base.rb:50 msgid "the object to return a path for" msgstr "パスを返ã™ç‚ºã®ã‚ªãƒ–ジェクト" # @return [String] #: ../lib/yard/serializers/base.rb:50 msgid "the serialized path of an object" msgstr "シリアライズã•れãŸã‚ªãƒ–ジェクトã®ãƒ‘ス" # YARD::Serializers::Base#exists? #: ../lib/yard/serializers/base.rb:53 msgid "Returns whether an object has been serialized" msgstr "シリアライズã•れãŸã‚ªãƒ–ジェクトã‹ã©ã†ã‹ã‚’è¿”ã™" # @abstract #: ../lib/yard/serializers/base.rb:61 msgid "" "This method should return whether the endpoint already exists.\n" "For instance, a file system serializer would check if the file exists\n" "on disk. You will most likely use +#basepath+ and {#serialized_path} to\n" "get the endpoint's location." msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ—¢ã«ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã‚’è¿”ã™ã€‚\n" "例ãˆã°ã€ãƒ•ァイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã™ã‚‹å ´åˆã€\n" "ファイルシステムシリアライザã¯ã€ã“ã®ãƒã‚§ãƒƒã‚¯ã‚’行ã†ã ã‚ã†ã€‚\n" "ã‚ãªãŸã¯ã€æã‚‰ãエンドãƒã‚¤ãƒ³ãƒˆã®å ´æ‰€ã‚’å–å¾—ã™ã‚‹ç‚ºã«ã€\n" "+#basepath+ ã‚„ {#serialized_path} メソッドを使ã†ã ã‚ã†ã€‚" # @param [CodeObjects::Base] object #: ../lib/yard/serializers/base.rb:61 msgid "the object to check existence of" msgstr "存在ã™ã‚‹ã‹ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã‚ªãƒ–ジェクト" # @return [Boolean] #: ../lib/yard/serializers/base.rb:61 msgid "whether the endpoint exists." msgstr "エンドãƒã‚¤ãƒ³ãƒˆãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹" # YARD::Serializers::Base#before_serialize #: ../lib/yard/serializers/base.rb:66 msgid "Called before serialization." msgstr "シリアライズã™ã‚‹å‰ã«å‘¼ã³å‡ºã•れる" # YARD::Serializers::Base#before_serialize # YARD::Serializers::Base#after_serialize #: ../lib/yard/serializers/base.rb:70 ../lib/yard/serializers/base.rb:77 msgid "Callbacks" msgstr "" # @abstract #: ../lib/yard/serializers/base.rb:70 msgid "" "Should run code before serialization. Should return false\n" "if serialization should not occur." msgstr "" "シリアライズã™ã‚‹å‰ã«ã‚³ãƒ¼ãƒ‰ã‚’èµ·å‹•ã™ã‚‹ã€‚\n" "シリアライズã—ã¦ã‚‚何も存在ã—ãªã„å ´åˆã€falseã‚’è¿”ã™ã€‚" # @return [Boolean] #: ../lib/yard/serializers/base.rb:70 msgid "whether or not serialization should occur" msgstr "シリアライズãŒå­˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹" # YARD::Serializers::Base#after_serialize #: ../lib/yard/serializers/base.rb:73 msgid "Called after serialization." msgstr "後ã§å‘¼ã³å‡ºã•れるシリアライズ" # @abstract #: ../lib/yard/serializers/base.rb:77 msgid "Should run code after serialization." msgstr "後ã§ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã®ã‚³ãƒ¼ãƒ‰ã‚’èµ·å‹•ã™ã‚‹" # @param [String] data #: ../lib/yard/serializers/base.rb:77 msgid "the data that was serialized." msgstr "シリアライズã•れãŸãƒ‡ãƒ¼ã‚¿" # YARD::Serializers::FileSystemSerializer #: ../lib/yard/serializers/file_system_serializer.rb:4 msgid "Implements a serializer that reads from and writes to the filesystem." msgstr "ファイルシステムã«èª­ã¿æ›¸ãè¾¼ã¿ã™ã‚‹ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã‚’実装ã™ã‚‹ã€‚" # YARD::Serializers::FileSystemSerializer#basepath #: ../lib/yard/serializers/file_system_serializer.rb:6 msgid "The base path to write data to." msgstr "ãƒ‡ãƒ¼ã‚¿ã«æ›¸ã込む為ã®ãƒ™ãƒ¼ã‚¹ãƒ‘ス" # @return [String] #: ../lib/yard/serializers/file_system_serializer.rb:7 msgid "a base path" msgstr "ベースパス" # YARD::Serializers::FileSystemSerializer#extension #: ../lib/yard/serializers/file_system_serializer.rb:14 msgid "The extension of the filename (defaults to +html+)" msgstr "ファイルåã®æ‹¡å¼µå­(デフォルト㯠+html+ )" # @return [String] #: ../lib/yard/serializers/file_system_serializer.rb:16 msgid "the extension of the file. Empty string for no extension." msgstr "ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã€‚æ‹¡å¼µå­ç„¡ã—ã¯ç©ºæ–‡å­—" # YARD::Serializers::FileSystemSerializer#initialize #: ../lib/yard/serializers/file_system_serializer.rb:23 msgid "Creates a new FileSystemSerializer with options" msgstr "オプションã¨å…±ã«ã€æ–°ã—ã„FileSystemSerializerを作æˆã™ã‚‹ã€‚" # @return [FileSystemSerializer] #: ../lib/yard/serializers/file_system_serializer.rb:27 msgid "a new instance of FileSystemSerializer" msgstr "FileSystemSerializerã®æ–°ã—ã„インスタンス" # YARD::Serializers::FileSystemSerializer#serialize #: ../lib/yard/serializers/file_system_serializer.rb:34 msgid "" "Serializes object with data to its serialized path (prefixed by the " "+#basepath+)." msgstr "" "パス(+#basepath+ ãŒãƒ—レフィックスã•れる)をシリアライズã™ã‚‹ç‚ºã€\n" "データã¨å…±ã«ã€ã‚ªãƒ–ジェクトをシリアライズã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/serializers/file_system_serializer.rb:36 msgid "the written data (for chaining)" msgstr "書ãè¾¼ã¾ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿(ãƒã‚§ãƒ¼ãƒ³ç”¨)" # YARD::Serializers::FileSystemSerializer#serialized_path #: ../lib/yard/serializers/file_system_serializer.rb:43 msgid "Implements the serialized path of a code object." msgstr "コードオブジェクトã®ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れるパスを実装ã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/serializers/file_system_serializer.rb:48 msgid "" "if object is a String, returns\n" "object, otherwise the path on disk (without the basepath)." msgstr "" "オブジェクトãŒStringã®å ´åˆã€ã‚ªãƒ–ジェクトを返ã—ã€\n" "ãれ以外ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ‘スを返ã™ã€‚(basepathã‚’å«ã¾ãªã„)" # @param [CodeObjects::Base, CodeObjects::ExtraFileObject, String] object #: ../lib/yard/serializers/file_system_serializer.rb:48 msgid "" "the object to get a path for. The path of a string is the string itself." msgstr "パスをå–å¾—ã™ã‚‹ç‚ºã®ã‚ªãƒ–ジェクト。文字列ã®ãƒ‘スã¯ãã®æ–‡å­—列自身を返ã™ã€‚" # YARD::Serializers::FileSystemSerializer#exists? #: ../lib/yard/serializers/file_system_serializer.rb:66 msgid "Checks the disk for an object and returns whether it was serialized." msgstr "" "オブジェクト用ã«ãƒ‡ã‚£ã‚¹ã‚¯ã‚’ãƒã‚§ãƒƒã‚¯ã—ãŸã‚Šã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れãŸã‹ã©ã†ã‹è¿”ã™ã€‚" # @param [CodeObjects::Base] object #: ../lib/yard/serializers/file_system_serializer.rb:69 msgid "the object to check" msgstr "ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã‚ªãƒ–ジェクト" # @return [Boolean] #: ../lib/yard/serializers/file_system_serializer.rb:69 msgid "whether an object has been serialized to disk" msgstr "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ—¢ã«ãƒ‡ã‚£ã‚¹ã‚¯ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れã¦ã„ã‚‹ã‹ã©ã†ã‹" # YARD::Serializers::FileSystemSerializer#encode_path_components #: ../lib/yard/serializers/file_system_serializer.rb:76 msgid "" "Remove special chars from filenames.\n" "Windows disallows \\ / : * ? \" < > | but we will just remove any\n" "non alphanumeric (plus period, underscore and dash)." msgstr "" # YARD::Serializers::ProcessSerializer #: ../lib/yard/serializers/process_serializer.rb:4 msgid "Serializes an object to a process (like less)" msgstr "処ç†ã®ç‚ºã®ã‚ªãƒ–ジェクトをシリアライズã™ã‚‹ã€‚(lessã®ã‚ˆã†ãª)" # @example Serializing to a pager (less) #: ../lib/yard/serializers/process_serializer.rb:8 msgid "" "serializer = ProcessSerializer.new('less')\n" "serializer.serialize(object, \"data!\")" msgstr "" # @example #: ../lib/yard/serializers/process_serializer.rb:8 msgid "tag|example|Serializing to a pager (less)" msgstr "ページャーをシリアライズã™ã‚‹(less)" # YARD::Serializers::ProcessSerializer#initialize #: ../lib/yard/serializers/process_serializer.rb:10 msgid "Creates a new ProcessSerializer for the shell command +cmd+" msgstr "シェルコマンド +cmd+ ç”¨ã«æ–°ã—ã„ProcessSerializerを作æˆã™ã‚‹ã€‚" # @return [ProcessSerializer] #: ../lib/yard/serializers/process_serializer.rb:12 msgid "a new instance of ProcessSerializer" msgstr "ProcessSerializerã®æ–°ã—ã„インスタンス" # @param [String] #: ../lib/yard/serializers/process_serializer.rb:12 msgid "tag|param|cmd" msgstr "" # @param [String] cmd #: ../lib/yard/serializers/process_serializer.rb:12 msgid "the command that will accept data on stdin" msgstr "標準入力上ã§ãƒ‡ãƒ¼ã‚¿ã‚’å—ã‘入れるコマンド" # YARD::Serializers::ProcessSerializer#serialize #: ../lib/yard/serializers/process_serializer.rb:17 msgid "" "Overrides serialize behaviour and writes data to standard input\n" "of the associated command" msgstr "" "ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã®æŒ™å‹•を上書ãã—ã€\n" "関連付ã‘られãŸã‚³ãƒžãƒ³ãƒ‰ã®æ¨™æº–入力ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込む。" # YARD::Serializers::StdoutSerializer #: ../lib/yard/serializers/stdout_serializer.rb:4 msgid "A serializer that writes data to standard output." msgstr "標準出力ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ãシリアライザ" # YARD::Serializers::StdoutSerializer#initialize #: ../lib/yard/serializers/stdout_serializer.rb:6 msgid "Creates a serializer to print text to stdout" msgstr "標準出力ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’プリントã™ã‚‹ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚¶ã‚’作æˆã™ã‚‹ã€‚" # @return [StdoutSerializer] #: ../lib/yard/serializers/stdout_serializer.rb:9 msgid "a new instance of StdoutSerializer" msgstr "StdoutSerializerã®æ–°ã—ã„インスタンス" # @param [Fixnum, nil] wrap #: ../lib/yard/serializers/stdout_serializer.rb:9 msgid "" "if wrap is a number, wraps text to +wrap+\n" "columns, otherwise no wrapping is done." msgstr "" "wrapãŒæ•°å­—ã®å ´åˆã€+wrap+ カラムã«ãƒ†ã‚­ã‚¹ãƒˆã‚’ラップã™ã‚‹ã€‚\n" "ãれ以外ã§ã¯ã€ãƒ©ãƒƒãƒ—ã¯è¡Œã‚ãªã„。" # @param [Fixnum, nil] #: ../lib/yard/serializers/stdout_serializer.rb:9 msgid "tag|param|wrap" msgstr "" # YARD::Serializers::StdoutSerializer#serialize #: ../lib/yard/serializers/stdout_serializer.rb:14 msgid "Overrides serialize behaviour to write data to standard output" msgstr "標準出力ã«ãƒ‡ãƒ¼ã‚¿ã‚’書ã込む為ã«ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã®æŒ™å‹•を上書ãã™ã‚‹ã€‚" # YARD::Serializers::StdoutSerializer#word_wrap #: ../lib/yard/serializers/stdout_serializer.rb:21 msgid "Wraps text to a specific column length" msgstr "特定ã®ã‚«ãƒ©ãƒ ã®é•·ã•ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’ラップã™ã‚‹ã€‚" # @param [Fixnum] #: ../lib/yard/serializers/stdout_serializer.rb:25 msgid "tag|param|length" msgstr "" # @param [Fixnum] length #: ../lib/yard/serializers/stdout_serializer.rb:25 msgid "the column length to wrap to" msgstr "ラップã®ç‚ºã®ã‚«ãƒ©ãƒ ã®é•·ã•" # @param [String] text #: ../lib/yard/serializers/stdout_serializer.rb:25 msgid "the text to wrap" msgstr "ラップã•れるテキスト" # @return [String] #: ../lib/yard/serializers/stdout_serializer.rb:25 msgid "the wrapped text" msgstr "ラップã•れãŸãƒ†ã‚­ã‚¹ãƒˆ" # YARD::StubProxy #: ../lib/yard/serializers/yardoc_serializer.rb:3 msgid "Stubs marshal dumps and acts a delegate class for an object by path" msgstr "" "引抜ãã€é¸åˆ¥ã—ã€å‡ºåŠ›ã™ã‚‹ã€‚オブジェクトãŒãƒ‘スã«ã‚ˆã£ã¦å§”譲クラスã®ã‚ˆã†ã«æŒ¯ã‚‹èˆž" "ã†" # @return [StubProxy] #: ../lib/yard/serializers/yardoc_serializer.rb:12 msgid "a new instance of StubProxy" msgstr "StubProxyã®æ–°ã—ã„インスタンス" # @return [YardocSerializer] #: ../lib/yard/serializers/yardoc_serializer.rb:30 msgid "a new instance of YardocSerializer" msgstr "YardocSerializerã®æ–°ã—ã„インスタンス" # YARD::Server.register_static_path #: ../lib/yard/server.rb:4 msgid "Registers a static path to be used in static asset lookup." msgstr "é™çš„ãªè³‡æºã®æ¤œç´¢ã®ä¸­ã§åˆ©ç”¨ã•れるé™çš„パスを記録ã™ã‚‹ã€‚" # @param [String] path #: ../lib/yard/server.rb:7 msgid "the pathname to register" msgstr "記録ã™ã‚‹ç‚ºã®ãƒ‘スå" # YARD::Server::FinishRequest #: ../lib/yard/server/adapter.rb:5 msgid "" "Short circuits a request by raising an error. This exception is caught\n" "by {Commands::Base#call} to immediately end a request and return a response." msgstr "" "エラーを上ã’ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’çœã。\n" "ã“ã®ä¾‹å¤–ã¯ã™ãã«ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®çµ‚了ã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’è¿”ã™ç‚ºã«\n" "{Commands::Base#call} ã«ã‚ˆã£ã¦ã‚­ãƒ£ãƒƒãƒã•れる。" # YARD::Server::NotFoundError #: ../lib/yard/server/adapter.rb:9 msgid "" "Raises an error if a resource is not found. This exception is caught by\n" "{Commands::Base#call} to immediately end a request and return a 404 " "response\n" "code. If a message is provided, the body is set to the exception message." msgstr "" "リソースãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ã‚’上ã’る。\n" "ã“ã®ä¾‹å¤–ã¯ã€ã™ãã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®çµ‚りã¨404レスãƒãƒ³ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’è¿”ã™ç‚ºã«\n" "{Commands::Base#call}ã«ã‚ˆã£ã¦ã‚­ãƒ£ãƒƒãƒã•れる。\n" "ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæä¾›ã•れる場åˆã€æœ¬ä½“ã«ã€ä¾‹å¤–メッサージãŒè¨­å®šã•れる。" # YARD::Server::Adapter #: ../lib/yard/server/adapter.rb:14 msgid "" "This class implements the bridge between the {Router} and the server\n" "backend for a specific server type. YARD implements concrete adapters\n" "for WEBrick and Rack respectively, though other adapters can be made\n" "for other server architectures." msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯ {Router} ã¨å›ºæœ‰ã®ã‚µãƒ¼ãƒãƒ¼ã‚¿ã‚¤ãƒ—用ã«ã‚µãƒ¼ãƒãƒ¼ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã®é–“ã®\n" "ブリッジを実装ã™ã‚‹ã€‚\n" "YARDã¯WEBrickã¨Rackãれãžã‚Œã«\n" "具体的ãªã‚¢ãƒ€ãƒ—ターを実装ã™ã‚‹ã‘れã©ã‚‚ã€\n" "ä»–ã®ã‚¢ãƒ€ãƒ—ターをã€ä»–ã®ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ç”¨ã«ä½œã‚‹äº‹ã‚‚出æ¥ã‚‹ã€‚" # YARD::Server::Adapter #: ../lib/yard/server/adapter.rb:19 msgid "" "== Subclassing Notes\n" "To create a concrete adapter class, implement the {#start} method to\n" "initiate the server backend." msgstr "" "== サブクラス化ã™ã‚‹æ³¨æ„\n" "具体的ãªã‚¢ãƒ€ãƒ—タークラスを作æˆã™ã‚‹ã«ã¯ã€\n" "サーãƒãƒ¼ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã‚’é–‹å§‹ã™ã‚‹ç‚ºã«{#start}メソッドを実装ã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/server/adapter.rb:27 msgid "" "the location where static files are located, if any.\n" "To set this field on initialization, pass +:DocumentRoot+ to the\n" "+server_opts+ argument in {#initialize}" msgstr "" "ä»»æ„ã§ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ•ァイルãŒç¤ºã•れる場所。\n" "åˆæœŸã«ã“ã®ãƒ•ィールドを設定ã™ã‚‹ã«ã¯ã€\n" "{#initialize}メソッドã®ä¸­ã® +server_opts+ 引数ã«\n" "+:DocumentRoot+ を渡ã™ã€‚" # @see LibraryVersion #: ../lib/yard/server/adapter.rb:32 msgid "LibraryVersion for information on building a list of libraries" msgstr "" # @return [Hash{String=>Array}] #: ../lib/yard/server/adapter.rb:32 msgid "a map of libraries." msgstr "ライブラリã®ãƒžãƒƒãƒ—" # @see #: ../lib/yard/server/adapter.rb:32 msgid "tag|see|#add_library" msgstr "" # @see #: ../lib/yard/server/adapter.rb:32 ../lib/yard/server/library_version.rb:105 #: ../lib/yard/server/library_version.rb:111 msgid "tag|see|LibraryVersion" msgstr "" # @return [Hash] #: ../lib/yard/server/adapter.rb:36 msgid "" "options passed and processed by adapters. The actual\n" "options mostly depend on the adapters themselves." msgstr "" "アダプターã«ã‚ˆã£ã¦æ¸¡ã•れã€å‡¦ç†ã•れãŸoptions。\n" "実際ã®optionsã®å¤§æŠµã¯ã€ã‚¢ãƒ€ãƒ—ター自身ã«ä¾å­˜ã™ã‚‹ã€‚" # @return [Hash] #: ../lib/yard/server/adapter.rb:40 msgid "" "a set of options to pass to the server backend. Note\n" "that +:DocumentRoot+ also sets the {#document_root}." msgstr "" "サーãƒãƒ¼ã®ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã«æ¸¡ã™ç‚ºã®optionsã®ã‚°ãƒ«ãƒ¼ãƒ—\n" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚ +:DocumentRoot+ 㯠{#document_root} ã«ã‚‚設定ã™ã‚‹ã€‚" # @return [Router] #: ../lib/yard/server/adapter.rb:43 msgid "the router object used to route URLs to commands" msgstr "コマンドã«URLã‚’é€ã‚‹ç‚ºã«åˆ©ç”¨ã•れãŸã€routerオブジェクト" # YARD::Server::Adapter.setup #: ../lib/yard/server/adapter.rb:46 msgid "Performs any global initialization for the adapter." msgstr "アダプター用ã«ä»»æ„ã§å…¨ä½“ã®åˆæœŸåŒ–を実行ã™ã‚‹ã€‚" # @note #: ../lib/yard/server/adapter.rb:48 ../lib/yard/server/adapter.rb:56 msgid "If you subclass this method, make sure to call +super+." msgstr "" "ã‚ãªãŸãŒã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’サブクラス化ã™ã‚‹å ´åˆã€\n" "+super+ を呼ã³å‡ºã™ã‹ç¢ºèªã™ã‚‹äº‹ã€‚" # YARD::Server::Adapter.shutdown #: ../lib/yard/server/adapter.rb:54 msgid "Performs any global shutdown procedures for the adapter." msgstr "ä»»æ„ã§å…¨ä½“çš„ãªã‚¢ãƒ€ãƒ—ã‚¿ãƒ¼ç”¨ã®æ‰‹ç¶šãã®ã‚·ãƒ£ãƒƒãƒˆãƒ€ã‚¦ãƒ³ã‚’実行ã™ã‚‹ã€‚" # YARD::Server::Adapter#initialize #: ../lib/yard/server/adapter.rb:62 msgid "Creates a new adapter object" msgstr "æ–°ã—ã„アダプターオブジェクトを作æˆã™ã‚‹ã€‚" # @param [Hash{String=>Array}] libs #: ../lib/yard/server/adapter.rb:71 msgid "" "a list of libraries,\n" "see {#libraries} for formulating this list." msgstr "" "ライブラリã®ãƒªã‚¹ãƒˆã€\n" "ã“ã®ãƒªã‚¹ãƒˆã‚’å…¬å¼åŒ–ã™ã‚‹ç‚ºã«ã¯ã€{#librathries}ã‚’å‚照。" # @return [Adapter] #: ../lib/yard/server/adapter.rb:71 msgid "a new instance of Adapter" msgstr "ã‚¢ãƒ€ãƒ—ã‚¿ãƒ¼ã®æ–°ã—ã„インスタンス" # @param [Hash] opts #: ../lib/yard/server/adapter.rb:71 msgid "extra options to pass to the adapter" msgstr "ã‚¢ãƒ€ãƒ—ã‚¿ãƒ¼ã«æ¸¡ã™ç‚ºã®è¿½åŠ ã®options" # @param [Hash{String=>Array}] #: ../lib/yard/server/adapter.rb:71 msgid "tag|param|libs" msgstr "" # YARD::Server::Adapter#add_library #: ../lib/yard/server/adapter.rb:85 msgid "Adds a library to the {#libraries} mapping for a given library object." msgstr "" "与ãˆã‚‰ã‚ŒãŸãƒ©ã‚¤ãƒ–ラリオブジェクト用ã®{#libraries}マッピングã«ãƒ©ã‚¤ãƒ–ラリを追加" "ã™ã‚‹ã€‚" # @param [LibraryVersion] library #: ../lib/yard/server/adapter.rb:88 msgid "a library to add" msgstr "追加ã™ã‚‹ç‚ºã®ãƒ©ã‚¤ãƒ–ラリ" # @example Adding a new library to an adapter #: ../lib/yard/server/adapter.rb:88 msgid "" "adapter.add_library LibraryVersion.new('mylib', '1.0', '/path/to/.yardoc')" msgstr "" # @example #: ../lib/yard/server/adapter.rb:88 msgid "tag|example|Adding a new library to an adapter" msgstr "ã‚¢ãƒ€ãƒ—ã‚¿ãƒ¼ã«æ–°ã—ã„ライブラリを追加ã™ã‚‹ã€‚" # YARD::Server::Adapter#start #: ../lib/yard/server/adapter.rb:94 msgid "Implement this method to connect your adapter to your server." msgstr "" "ã‚ãªãŸã®ã‚µãƒ¼ãƒãƒ¼ã«ã‚ãªãŸã®ã‚¢ãƒ€ãƒ—ターを接続ã™ã‚‹ç‚ºã«ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実装ã™ã‚‹ã€‚" # YARD::Server::Commands::Base #: ../lib/yard/server/commands/base.rb:7 msgid "" "This is the base command class used to implement custom commands for\n" "a server. A command will be routed to by the {Router} class and return\n" "a Rack-style response." msgstr "" "ã“れã¯ã€ã‚µãƒ¼ãƒãƒ¼ç”¨ã«ã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒžãƒ³ãƒ‰ã‚’実装ã™ã‚‹ç‚ºã«ã€\n" "利用ã•れるベースコマンドクラスã§ã‚る。\n" "コマンドã¯ã€{Router}クラスã«ã‚ˆã£ã¦é€ã‚‰ã‚Œã€Rackスタイルã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’è¿”ã™ã€‚" # YARD::Server::Commands::Base #: ../lib/yard/server/commands/base.rb:11 msgid "" "== Attribute Initializers\n" "All attributes can be initialized via options passed into the {#initialize}\n" "method. When creating a custom command, the {Adapter#options} will\n" "automatically be mapped to attributes by the same name on your class." msgstr "" "== åˆæœŸåŒ–å­ã®å±žæ€§\n" "å…¨ã¦ã®å±žæ€§ã¯ã€{#initialize}ãƒ¡ã‚½ãƒƒãƒ‰ã¸æ¸¡ã•れãŸoptions経由ã§ã‚¤ãƒ‹ã‚·ãƒ£ãƒ©ã‚¤ã‚ºã•れ" "る。\n" "カスタムメソッドãŒä½œæˆã•れる時ã€{Adapter#options}メソッドã¯ã€\n" "ã‚ãªãŸã®ã‚¯ãƒ©ã‚¹ã®å±žæ€§ã¨åŒã˜åå‰ã§è‡ªå‹•çš„ã«ãƒžãƒƒãƒ”ングã•れるã ã‚ã†ã€‚" # YARD::Server::Commands::Base #: ../lib/yard/server/commands/base.rb:16 msgid "" " class MyCommand < Base\n" " attr_accessor :myattr\n" " end" msgstr "" # YARD::Server::Commands::Base #: ../lib/yard/server/commands/base.rb:20 msgid " Adapter.new(libs, {:myattr => 'foo'}).start" msgstr "" # YARD::Server::Commands::Base #: ../lib/yard/server/commands/base.rb:22 msgid " # when a request comes in, cmd.myattr == 'foo'" msgstr "" # YARD::Server::Commands::Base #: ../lib/yard/server/commands/base.rb:24 msgid "" "== Subclassing Notes\n" "To implement a custom command, override the {#run} method, not {#call}.\n" "In your implementation, you should set the body and status for requests.\n" "See details in the +#run+ method documentation." msgstr "" "== サブクラス化ã™ã‚‹æ™‚ã®æ³¨æ„\n" "カスタムコマンドを実装ã™ã‚‹ã«ã¯ã€{#run}メソッドを上書ãã™ã‚‹({#call}メソッドã§" "ã¯ãªã„)。\n" "ã‚ãªãŸã®å®Ÿè£…ã§ã€ã‚ãªãŸãŒãƒœãƒ‡ã‚£ã¨ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆç”¨ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’設定ã™ã‚‹ã¹ãã§ã‚" "る。\n" "詳細㯠+#run+ メソッドã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å‚照。" # YARD::Server::Commands::Base #: ../lib/yard/server/commands/base.rb:29 msgid "" "Note that if your command deals directly with libraries, you should\n" "consider subclassing the more specific {LibraryCommand} class instead." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚ã‚ãªãŸã®ã‚³ãƒžãƒ³ãƒ‰ãŒ\n" "直接ライブラリを用ã„処ç†ã™ã‚‹å ´åˆã€ä»£ã‚りã«ã€\n" "サブクラス化ã™ã‚‹{LibraryCommand}クラスã®è©³ç´°ã‚’考慮ã™ã‚‹ã¹ãã§ã‚る。" # YARD::Server::Commands::Base#command_options # YARD::Server::Commands::Base#command_options= # YARD::Server::Commands::Base#adapter # YARD::Server::Commands::Base#adapter= # YARD::Server::Commands::Base#caching # YARD::Server::Commands::Base#caching= #: ../lib/yard/server/commands/base.rb:37 #: ../lib/yard/server/commands/base.rb:40 #: ../lib/yard/server/commands/base.rb:43 msgid "Basic Command and Adapter Options" msgstr "基本的ãªã‚³ãƒžãƒ³ãƒ‰ã¨ã‚¢ãƒ€ãƒ—ターオプション" # @return [Hash] #: ../lib/yard/server/commands/base.rb:37 msgid "the options passed to the command's constructor" msgstr "コマンドã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ã«æ¸¡ã•れãŸoptions" # @return [Adapter] #: ../lib/yard/server/commands/base.rb:40 msgid "the server adapter" msgstr "サーãƒãƒ¼ã‚¢ãƒ€ãƒ—ター" # @return [Boolean] #: ../lib/yard/server/commands/base.rb:43 msgid "whether to cache" msgstr "キャッシュã™ã‚‹ã‹ã©ã†ã‹" # YARD::Server::Commands::Base#request # YARD::Server::Commands::Base#request= # YARD::Server::Commands::Base#path # YARD::Server::Commands::Base#path= # YARD::Server::Commands::Base#headers # YARD::Server::Commands::Base#headers= # YARD::Server::Commands::Base#status # YARD::Server::Commands::Base#status= # YARD::Server::Commands::Base#body # YARD::Server::Commands::Base#body= #: ../lib/yard/server/commands/base.rb:48 #: ../lib/yard/server/commands/base.rb:51 #: ../lib/yard/server/commands/base.rb:54 #: ../lib/yard/server/commands/base.rb:57 #: ../lib/yard/server/commands/base.rb:60 msgid "Attributes Set Per Request" msgstr "リクエスト毎ã®ã‚°ãƒ«ãƒ¼ãƒ—を属性化ã™ã‚‹ã€‚" # @return [Request] #: ../lib/yard/server/commands/base.rb:48 msgid "request object" msgstr "オブジェクトã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆ" # @return [String] #: ../lib/yard/server/commands/base.rb:51 msgid "the path after the command base URI" msgstr "コマンドã®ãƒ™ãƒ¼ã‚¹URIã®å¾Œã§è¿”ã™ã€ãƒ‘ス" # @return [Hash{String => String}] #: ../lib/yard/server/commands/base.rb:54 msgid "response headers" msgstr "ヘッダーã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹" # @return [Numeric] #: ../lib/yard/server/commands/base.rb:57 msgid "status code. Defaults to 200 per request" msgstr "コードã®çŠ¶æ…‹ã€‚ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§200リクエスト毎。" # @return [String] #: ../lib/yard/server/commands/base.rb:60 msgid "the response body. Defaults to empty string." msgstr "ボディã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã€‚デフォルトã§ã¯ç©ºã®æ–‡å­—列ã«ãªã‚‹ã€‚" # YARD::Server::Commands::Base#initialize #: ../lib/yard/server/commands/base.rb:65 msgid "" "Creates a new command object, setting attributes named by keys\n" "in the options hash. After initialization, the options hash\n" "is saved in {#command_options} for further inspection." msgstr "" "æ–°ã—ã„コマンドオブジェクトを作æˆã—ã€\n" "ãƒãƒƒã‚·ãƒ¥ã‚ªãƒ—ションã®ã‚­ãƒ¼ã«ã‚ˆã£ã¦ã€å付ã‘られãŸå±žæ€§ã‚’セッティングã™ã‚‹ã€‚\n" "イニシャライズã®å¾Œã§ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã¯ã€\n" "調査を進ã‚る為ã«{#command_options}メソッドã®ä¸­ã§ã‚»ãƒ¼ãƒ–ã•れる。" # YARD::Server::Commands::Base#initialize # YARD::Server::Commands::Base#call #: ../lib/yard/server/commands/base.rb:74 #: ../lib/yard/server/commands/base.rb:88 msgid "Instance Method Summary" msgstr "ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã®æ¦‚è¦" # @example Creating a Command #: ../lib/yard/server/commands/base.rb:74 msgid "" "cmd = DisplayObjectCommand.new(:caching => true, :library => mylib)\n" "cmd.library # => mylib\n" "cmd.command_options # => {:caching => true, :library => mylib}" msgstr "" # @example #: ../lib/yard/server/commands/base.rb:74 msgid "tag|example|Creating a Command" msgstr "コマンドを作æˆã™ã‚‹" # @param [Hash] opts #: ../lib/yard/server/commands/base.rb:74 msgid "" "the options hash, saved to {#command_options}\n" "after initialization." msgstr "" "ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã€ã‚¤ãƒ‹ã‚·ãƒ£ãƒ©ã‚¤ã‚ºã•れãŸå¾Œã§ã€\n" "{#command_options}ã«ã‚»ãƒ¼ãƒ–ã•れる。" # YARD::Server::Commands::Base#call #: ../lib/yard/server/commands/base.rb:82 msgid "The main method called by a router with a request object." msgstr "" "主ãªãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€requestオブジェクトを用ã„\n" "routerã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れる。" # @note #: ../lib/yard/server/commands/base.rb:88 msgid "" "This command should not be overridden by subclasses. Implement\n" "the callback method {#run} instead." msgstr "" "ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ã‚µãƒ–クラスã«ã‚ˆã£ã¦ä¸Šæ›¸ãã•れるã¹ãã§ã¯ãªã„ã€\n" "代ã‚りã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã®{#run}メソッドを実装ã™ã‚‹ã€‚" # @return [Array(Number,Hash,Array)] #: ../lib/yard/server/commands/base.rb:88 msgid "" "a Rack-style response\n" "of status, headers, and body wrapped in an array." msgstr "" "é…列ã§ãƒ©ãƒƒãƒ—ã•れãŸ\n" "Rackスタイルã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã€ãƒœãƒ‡ã‚£ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹" # @param [Adapter Dependent] #: ../lib/yard/server/commands/base.rb:88 ../lib/yard/server/router.rb:52 msgid "tag|param|request" msgstr "" # @param [Adapter Dependent] request #: ../lib/yard/server/commands/base.rb:88 ../lib/yard/server/router.rb:52 msgid "the request object" msgstr "リクエストã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Server::Commands::Base#run #: ../lib/yard/server/commands/base.rb:108 msgid "" "Subclass this method to implement a custom command. This method\n" "should set the {#status} and {#body}, and optionally modify the\n" "{#headers}. Note that +#status+ defaults to 200." msgstr "" "カスタムコマンドを実装ã™ã‚‹ç‚ºã«ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’サブクラス化ã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€{#status}ã¨{#body}を設定ã™ã‚‹ã¹ãã§ã€\n" "ä»»æ„ã§ã€{#headers}を変更ã™ã‚‹ã€‚\n" "ç•™æ„ã™ã‚‹äº‹ã¨ã—ã¦ã€ +#status+ ã¯ãƒ‡ãƒ•ォルトã§200ã«ãªã‚‹ã€‚" # YARD::Server::Commands::Base#run #: ../lib/yard/server/commands/base.rb:122 msgid "Abstract Methods" msgstr "抽象メソッド" # @example A custom command #: ../lib/yard/server/commands/base.rb:122 msgid "" "class ErrorCommand < Base\n" " def run\n" " self.body = 'ERROR! The System is down!'\n" " self.status = 500\n" " self.headers['Conten-Type'] = 'text/plain'\n" " end\n" "end" msgstr "" # @example #: ../lib/yard/server/commands/base.rb:122 msgid "tag|example|A custom command" msgstr "カスタムコマンド" # YARD::Server::Commands::Base#render #: ../lib/yard/server/commands/base.rb:131 msgid "" "Renders a specific object if provided, or a regular template rendering\n" "if object is not provided." msgstr "" "æä¾›ã•れãŸå ´åˆã€ç‰¹å®šã®ã‚ªãƒ–ジェクトを表示ã™ã‚‹ã‹ã€\n" "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæä¾›ã•れãªã„å ´åˆã€è¦å®šã®ãƒ†ãƒ³ãƒ—レートãŒè¡¨ç¤ºã•れる。" # YARD::Server::Commands::Base#render # YARD::Server::Commands::Base#cache # YARD::Server::Commands::Base#not_found # YARD::Server::Commands::Base#redirect #: ../lib/yard/server/commands/base.rb:138 #: ../lib/yard/server/commands/base.rb:159 #: ../lib/yard/server/commands/base.rb:174 #: ../lib/yard/server/commands/base.rb:184 msgid "Helper Methods" msgstr "ヘルパーメソッド" # @todo #: ../lib/yard/server/commands/base.rb:138 msgid "" "This method is dependent on +#options+, it should be in {LibraryCommand}." msgstr "" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ +#options+ メソッドã«ä¾å­˜ã—ã¦ã„る。\n" "+#options+ メソッド㯠{LibraryCommand} ã«ã™ã‚‹ã¹ãã§ã‚る。" # @param [CodeObjects::Base, nil] object #: ../lib/yard/server/commands/base.rb:138 msgid "" "calls {CodeObjects::Base#format} if\n" "an object is provided, or {Templates::Engine.render} if object is nil. Both\n" "receive +#options+ as an argument." msgstr "" "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæä¾›ã•れる場åˆã€\n" "{CodeObjects::Base#format}を呼ã³å‡ºã™ã€\n" "åˆã¯ã€ã‚ªãƒ–ジェクトãŒnilã®å ´åˆ\n" "{Templates::Engine.render}を呼ã³å‡ºã™ã€‚\n" "両者ã¯ã€å¼•æ•°ã¨ã—㦠+#options+ メソッドをå—ã‘å–る。" # @return [String] #: ../lib/yard/server/commands/base.rb:138 msgid "the resulting output to display" msgstr "表示ã™ã‚‹å‡ºåŠ›çµæžœ" # YARD::Server::Commands::Base#cache #: ../lib/yard/server/commands/base.rb:150 msgid "Override this method to implement custom caching mechanisms for" msgstr "カスタムキャッシュメカニズムを実装ã™ã‚‹ç‚ºã«ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’上書ãã™ã‚‹ã€‚" # @example Caching to memory #: ../lib/yard/server/commands/base.rb:159 msgid "" "$memory_cache = {}\n" "def cache(data)\n" " $memory_cache[path] = data\n" "end" msgstr "" # @example #: ../lib/yard/server/commands/base.rb:159 msgid "tag|example|Caching to memory" msgstr "メモリーã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã™ã‚‹" # @see #: ../lib/yard/server/commands/base.rb:159 msgid "tag|see|StaticCaching" msgstr "" # @param [String] data #: ../lib/yard/server/commands/base.rb:159 msgid "the data to cache" msgstr "キャッシュã™ã‚‹ãƒ‡ãƒ¼ã‚¿" # @return [String] #: ../lib/yard/server/commands/base.rb:159 msgid "the same cached data (for chaining)" msgstr "åŒã˜ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã•れãŸãƒ‡ãƒ¼ã‚¿(メソッドãƒã‚§ãƒ¼ãƒ³ç”¨)" # YARD::Server::Commands::Base#not_found #: ../lib/yard/server/commands/base.rb:171 msgid "" "Sets the body and headers (but not status) for a 404 response. Does\n" "nothing if the body is already set." msgstr "" "404レスãƒãƒ³ã‚¹ç”¨ã«ãƒœãƒ‡ã‚£ã¨ãƒ˜ãƒƒãƒ€ãƒ¼(ã—ã‹ã—ステータスã¯ãªã„)を設定ã™ã‚‹ã€‚\n" "ãƒœãƒ‡ã‚£ãŒæ—¢ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã¯ä½•ã‚‚ã—ãªã„。" # YARD::Server::Commands::Base#redirect #: ../lib/yard/server/commands/base.rb:182 msgid "Sets the headers and status code for a redirection to a given URL" msgstr "" "与ãˆã‚‰ã‚ŒãŸURLã¸ã®ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆç”¨ã«ãƒ˜ãƒƒãƒ€ãƒ¼ã¨ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’設定ã™ã‚‹ã€‚" # @raise [FinishRequest] #: ../lib/yard/server/commands/base.rb:184 msgid "causes the request to terminate." msgstr "打ã¡åˆ‡ã‚‹ç‚ºã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã™ã‚‹ã€‚" # @param [String] #: ../lib/yard/server/commands/base.rb:184 #: ../lib/yard/templates/helpers/base_helper.rb:138 msgid "tag|param|url" msgstr "" # @param [String] url #: ../lib/yard/server/commands/base.rb:184 msgid "the URL to redirect to" msgstr "リダイレクトã™ã‚‹URL" # YARD::Server::Commands::DisplayFileCommand #: ../lib/yard/server/commands/display_file_command.rb:5 msgid "Displays a README or extra file." msgstr "README åˆã¯ã€è¿½åŠ ã®ãƒ•ァイルを表示ã™ã‚‹ã€‚" # @todo #: ../lib/yard/server/commands/display_file_command.rb:7 msgid "Implement better support for detecting binary (image) filetypes" msgstr "ãƒã‚¤ãƒŠãƒª(ç”»åƒ)ファイルタイプを見ã¤ã‘る為ã®ã‚ˆã‚Šè‰¯ã„サãƒãƒ¼ãƒˆã‚’実装ã™ã‚‹ã€‚" # YARD::Server::Commands::DisplayObjectCommand #: ../lib/yard/server/commands/display_object_command.rb:5 msgid "Displays documentation for a specific object identified by the path" msgstr "パスã«ã‚ˆã£ã¦è­˜åˆ¥ã•れãŸå›ºæœ‰ã®ã‚ªãƒ–ジェクト用ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’表示ã™ã‚‹ã€‚" # YARD::Server::Commands::FramesCommand #: ../lib/yard/server/commands/frames_command.rb:5 msgid "Displays an object wrapped in frames" msgstr "フレームã®ä¸­ã®ãƒ©ãƒƒãƒ—ã•れãŸã‚ªãƒ–ジェクトを表示ã™ã‚‹ã€‚" # YARD::Server::Commands::LibraryCommand #: ../lib/yard/server/commands/library_command.rb:26 msgid "" "This is the base command for all commands that deal directly with " "libraries.\n" "Some commands do not, but most (like {DisplayObjectCommand}) do. If your\n" "command deals with libraries directly, subclass this class instead.\n" "See {Base} for notes on how to subclass a command." msgstr "" "ã“れã¯ã€ãƒ©ã‚¤ãƒ–ラリを用ã„直接処ç†ã™ã‚‹å…¨ã¦ã®ã‚³ãƒžãƒ³ãƒ‰ã®ç‚ºã®ãƒ™ãƒ¼ã‚¹ã‚³ãƒžãƒ³ãƒ‰ã€‚\n" "ã„ãã¤ã‹ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã¯ã€ç”¨ã„ãªã„ãŒ({DisplayObjectCommand}ã®ã‚ˆã†ã«)大抵ã®äº‹ã¯" "行ã†ã€‚\n" "ã‚ãªãŸã®ã‚³ãƒžãƒ³ãƒ‰ãŒç›´æŽ¥ãƒ©ã‚¤ãƒ–ラリを用ã„処ç†ã™ã‚‹å ´åˆã€ä»£ã‚りã«ã“ã®ã‚¯ãƒ©ã‚¹ã‚’サブ" "クラス化ã™ã‚‹ã€‚\n" "コマンドをサブクラス化ã™ã‚‹ç‚ºã®æ–¹æ³•ã«ã¤ã„ã¦ã¯{Base}ã‚’å‚照。\n" # @return [LibraryVersion] #: ../lib/yard/server/commands/library_command.rb:33 msgid "the object containing library information" msgstr "ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æƒ…å ±å«ã‚“ã§ã„るオブジェクト" # @return [Hash{Symbol => Object}] #: ../lib/yard/server/commands/library_command.rb:36 msgid "default options for the library" msgstr "ライブラリ用ã®ãƒ‡ãƒ•ォルトã®options" # @return [Serializers::Base] #: ../lib/yard/server/commands/library_command.rb:39 msgid "the serializer used to perform file linking" msgstr "ファイルリンクを実行ã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れるシリアライザ" # @return [Boolean] #: ../lib/yard/server/commands/library_command.rb:42 msgid "whether router should route for multiple libraries" msgstr "routerãŒè¤‡æ•°ã®ãƒ©ã‚¤ãƒ–ラリ用ã«é€ã‚‹ã¹ãã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/server/commands/library_command.rb:45 msgid "whether to reparse data" msgstr "データをå†è§£æžã™ã‚‹ã‹ã©ã†ã‹" # YARD::Server::Commands::LibraryCommand::@@library_chdir_lock #: ../lib/yard/server/commands/library_command.rb:48 msgid "Needed to synchronize threads in {#setup_yardopts}" msgstr "{#setup_yardopts}メソッドã®ä¸­ã§ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’åŒæœŸã™ã‚‹ç‚ºã®å¿…è¦ã¨ã•れる" # @return [LibraryCommand] #: ../lib/yard/server/commands/library_command.rb:51 msgid "a new instance of LibraryCommand" msgstr "LibraryCommandã®æ–°ã—ã„インスタンス" # YARD::Server::Commands::LibraryCommand#fulldoc_template #: ../lib/yard/server/commands/library_command.rb:127 msgid "" "Hack to load a custom fulldoc template object that does\n" "not do any rendering/generation. We need this to access the\n" "generate_*_list methods." msgstr "" # YARD::Server::Commands::LibraryIndexCommand #: ../lib/yard/server/commands/library_index_command.rb:5 msgid "Returns the index of libraries served by the server." msgstr "サーãƒãƒ¼ã«ã‚ˆã£ã¦æä¾›ã•れãŸãƒ©ã‚¤ãƒ–ラリã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’è¿”ã™" # YARD::Server::Commands::ListCommand #: ../lib/yard/server/commands/list_command.rb:5 msgid "Returns a list of objects of a specific type" msgstr "特定ã®åž‹ã®ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # YARD::Server::Commands::SearchCommand #: ../lib/yard/server/commands/search_command.rb:5 msgid "" "Performs a search over the objects inside of a library and returns\n" "the results as HTML or plaintext" msgstr "" "ライブラリã®å†…éƒ¨ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ¤œç´¢ã‚’実行ã—ã€\n" "HTMLやプレーンテキストã¨ã—ã¦çµæžœã‚’è¿”ã™ã€‚" # YARD::Server::Commands::StaticFileCommand #: ../lib/yard/server/commands/static_file_command.rb:7 msgid "Serves static content when no other router matches a request" msgstr "リクエストã«ãƒžãƒƒãƒã™ã‚‹ä»–ã®routerãŒç„¡ã„時ã€é™çš„ãªå†…容をæä¾›ã™ã‚‹ã€‚" # YARD::Server::Commands::StaticFileCommand::STATIC_PATHS #: ../lib/yard/server/commands/static_file_command.rb:13 msgid "" "Defines the paths used to search for static assets. To define an\n" "extra path, use {YARD::Server.register_static_path} rather than\n" "modifying this constant directly. Also note that files in the\n" "document root will always take precedence over these paths." msgstr "" "é™çš„ãªè³‡ç”£ç”¨ã«æ¤œç´¢ã«åˆ©ç”¨ã•れるパスを定義ã™ã‚‹ã€‚\n" "追加ã®ãƒ‘スを定義ã™ã‚‹ã«ã¯ã€ç›´æŽ¥ã“ã®å®šæ•°ã‚’変更ã™ã‚‹ã‚ˆã‚Šã‚‚\n" "{YARD::Server.register_static_path}を利用ã™ã‚‹ã€‚\n" "å°šã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®rootã®ãƒ•ァイルã¯å¸¸æ™‚ã“れらã®ãƒ‘スより優先ã™ã‚‹ã€‚" # YARD::Server::Commands::StaticFileCommand#favicon? #: ../lib/yard/server/commands/static_file_command.rb:39 msgid "" "Return an empty favicon.ico if it does not exist so that\n" "browsers don't complain." msgstr "" "favicon.icoãŒå­˜åœ¨ã—ãªã„å ´åˆã€ç©ºã®favicon.icoã‚’è¿”ã™ã€‚\n" "ãã®ç‚ºã€ãƒ–ラウザã«å•題ã¯ç™ºç”Ÿã—ãªã„。" # YARD::Server::DocServerHelper #: ../lib/yard/server/doc_server_helper.rb:4 msgid "" "A module that is mixed into {Templates::Template} in order to customize\n" "certain template methods." msgstr "" "テンプレートメソッドをカスタマイズã™ã‚‹ç‚ºã«ã€\n" "{Templates::Template}ã¸mixinã•れるモジュール。" # YARD::Server::DocServerHelper#url_for #: ../lib/yard/server/doc_server_helper.rb:7 msgid "" "Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead\n" "of a disk location." msgstr "" "ディスクã®ä¸Šã®å ´æ‰€ã®ä»£ã‚りã«URLã‚’è¿”ã™{Templates::Helpers::HtmlHelper#url_for}" "を変更ã™ã‚‹ã€‚" # YARD::Server::DocServerHelper#url_for_file #: ../lib/yard/server/doc_server_helper.rb:18 msgid "" "Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL " "instead\n" "of a disk location." msgstr "" "ディスク上ã®å ´æ‰€ã®ä»£ã‚りã«URLã‚’è¿”ã™{Templates::Helpers::" "HtmlHelper#url_for_file}を変更ã™ã‚‹ã€‚" # YARD::Server::DocServerHelper#url_for_file #: ../lib/yard/server/doc_server_helper.rb:30 msgid "" "Modifies {Templates::Helpers::HtmlHelper#url_for_list} to return a URL\n" "based on the list prefix instead of a HTML filename." msgstr "" "HTMLファイルåã®ä»£ã‚りã«ãƒªã‚¹ãƒˆã®ãƒ—レフィックス基準ã®URLã‚’è¿”ã™ã«ã¯ã€\n" "{Templates::Helpers::HtmlHelper#url_for_list} を変更ã™ã‚‹" # YARD::CodeObjects::MethodObject#name #: ../lib/yard/server/doc_server_helper.rb:38 msgid "Returns the frames URL for the page" msgstr "ページ用ã®ãƒ•レームã®URLã‚’è¿”ã™" # YARD::Server::DocServerHelper#url_for_main #: ../lib/yard/server/doc_server_helper.rb:46 msgid "" "Returns the main URL, first checking a readme and then linking to the index" msgstr "メインã®URLã‚’è¿”ã—ã€æœ€åˆã«readmeã‚’ãƒã‚§ãƒƒã‚¯ã—ãã®æ™‚インデックスã«ãƒªãƒ³ã‚¯ã™ã‚‹ã€‚" # YARD::Templates::Helpers::HtmlHelper#url_for_file #: ../lib/yard/server/doc_server_helper.rb:56 #: ../lib/yard/templates/helpers/html_helper.rb:385 msgid "Returns the URL for the alphabetic index page" msgstr "アルファベット順ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒšãƒ¼ã‚¸ç”¨ã«URLã‚’è¿”ã™" # @example The base path for a library 'foo' #: ../lib/yard/server/doc_server_helper.rb:65 msgid "base_path('docs') # => 'docs/foo'" msgstr "" # @example #: ../lib/yard/server/doc_server_helper.rb:65 msgid "tag|example|The base path for a library 'foo'" msgstr "'foo'ライブラリ用ã®ãƒ™ãƒ¼ã‚¹ãƒ‘ス" # @return [String] #: ../lib/yard/server/doc_server_helper.rb:65 msgid "the base URI for a library with an extra +path+ prefix" msgstr "追加㮠+path+ ã®ãƒ—レフィックスを用ã„ãŸãƒ©ã‚¤ãƒ–ラリ用ã®ãƒ™ãƒ¼ã‚¹URI" # @param [String] path #: ../lib/yard/server/doc_server_helper.rb:65 msgid "the path prefix for a base path URI" msgstr "URIベースパス用ã®ãƒ‘スã®ãƒ—レフィックス" # @return [Router] #: ../lib/yard/server/doc_server_helper.rb:71 msgid "convenience method for accessing the router" msgstr "routerã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ç‚ºã®ä¾¿åˆ©ãƒ¡ã‚½ãƒƒãƒ‰" # YARD::Server::DocServerSerializer #: ../lib/yard/server/doc_server_serializer.rb:6 msgid "" "A custom {Serializers::Base serializer} which returns resource URLs instead " "of\n" "static relative paths to files on disk." msgstr "" "カスタム{Serializers::Base serializer}。\n" "ディスク上ã®ãƒ•ァイルã®ç‚ºã«é™çš„ãªç›¸å¯¾ãƒ‘スã®ä»£ã‚りã«ã€URLリソースを返ã™ã€‚" # @return [DocServerSerializer] #: ../lib/yard/server/doc_server_serializer.rb:10 msgid "a new instance of DocServerSerializer" msgstr "DocServerSerializerã®æ–°ã—ã„インスタンス" # YARD::Server::LibraryNotPreparedError #: ../lib/yard/server/library_version.rb:6 msgid "" "This exception is raised when {LibraryVersion#prepare!} fails, or discovers\n" "that the library is not \"prepared\" to be served by" msgstr "" "ã“ã®ä¾‹å¤–ã¯ã€{LibraryVersion#prepare!}ãŒå¤±æ•—ã—ãŸæ™‚ã‚„ã€\n" "ãƒ©ã‚¤ãƒ–ãƒ©ãƒªãŒæä¾›ã•れる為ã«\"prepared\"ã•れãªã„事をã‹ãŽã¤ã‘ãŸå ´åˆã€ä¸Šã’られ" "る。" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:10 msgid "" "A library version encapsulates a library's documentation at a specific " "version.\n" "Although the version is optional, this allows for creating multiple " "documentation\n" "points for a specific library, each representing a unique version. The term\n" "\"library\" used in other parts of the YARD::Server documentation refers to\n" "objects of this class unless otherwise noted." msgstr "" "ライブラリãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€ç‰¹å®šã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ãƒ©ã‚¤ãƒ–ラリドキュメントをカプセル化" "ã™ã‚‹ã€‚\n" "ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ä»»æ„ã ã‘れã©ã‚‚ã€\n" "ã“れã¯ã€è¤‡æ•°ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ç‰¹å®šã®ãƒ©ã‚¤ãƒ–ラリ用ã«ãƒã‚¤ãƒ³ãƒˆã‚’作æˆã™ã‚‹ç‚ºã«å—å…¥" "れã€\n" "ãれãžã‚Œå›ºæœ‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表ã™ã€‚\n" "\"library\"ã®è¡¨ç¾ã¯ã€YARD::Serverドキュメントã®ä»–ã®éƒ¨åˆ†ã§åˆ©ç”¨ã•れã€\n" "ä»–ã®æ–¹æ³•ã§æ³¨æ„ã•れãªã‹ã£ãŸå ´åˆã€ã“ã®ã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクトをå‚ç…§ã™ã‚‹ã€‚" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:16 msgid "" "A library points to a location where a {#yardoc_file} is located so that\n" "its documentation may be loaded and served. Optionally, a {#source_path} is\n" "given to point to a location where any extra files (and {YARD::CLI::Yardoc ." "yardopts})\n" "should be loaded from. Both of these methods may not be known immediately,\n" "since the yardoc file may not be built until later. Resolving the yardoc\n" "file and source path are dependent on the specific library \"source type\" " "used.\n" "Source types (known as \"library source\") are discussed in detail below." msgstr "" "ライブラリã®{#yardoc_file}ãƒ¡ã‚½ãƒƒãƒ‰ã®æŒ‡ã™å ´æ‰€ã¯ã€\n" "ãã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒãƒ­ãƒ¼ãƒ‰ã•れセーブã•れる場所を示ã•れる。\n" "ä»»æ„ã§ã€{#source_path}メソッドã¯ã€\n" "追加ã®ãƒ•ァイル(ã¨{YARD::CLI::Yardoc .yardopts})ãŒã€\n" "ロードã•れるã¹ã場所ã®ãƒã‚¤ãƒ³ãƒˆã‚’与ãˆã‚‰ã‚Œã‚‹ã€‚\n" "ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸¡æ–¹ã¯ã€ç›´ãã«ç†è§£ã§ããªã„ã‹ã‚‚ã—れãªã„ã€\n" "ãªãœãªã‚‰ã€yardocãƒ•ã‚¡ã‚¤ãƒ«ãŒæœ€æ–°ã§ãªã„å ´åˆã€ãƒ“ルドã•れãªã„ã‹ã‚‚ã—れãªã„ã‹ã‚‰ã§ã‚" "る。\n" "yardocファイルã¨ã‚½ãƒ¼ã‚¹ãƒ‘スを解決ã™ã‚‹ã«ã¯ã€\"source type\"ã«åˆ©ç”¨ã•れる固有ã®ãƒ©" "イブラリã«ä¾å­˜ã™ã‚‹ã€‚\n" "ソースã®åž‹(\"library source\"ã¨ã—ã¦çŸ¥ã‚‰ã‚Œã‚‹)ã¯ã€ä¸‹ã®è©³ç´°ã®ä¸­ã§æ¤œè¨Žã•れる。" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:24 msgid "" "== Using with Adapters\n" "A list of libraries need to be passed into adapters upon creation. In\n" "most cases, you will never do this manually, but if you use a " "{RackMiddleware},\n" "you will need to pass in this list yourself. To build this list of " "libraries,\n" "you should create a hash of library names mapped to an *Array* of " "LibraryVersion\n" "objects. For example:" msgstr "" "== アダプタã¨ä¸€ç·’ã«ä½¿ç”¨ã™ã‚‹\n" "ライブラリã®ãƒªã‚¹ãƒˆã¯ã€\n" "作æˆã™ã‚‹ä¸Šã§ã‚¢ãƒ€ãƒ—ã‚¿ãƒ¼ã¸æ¸¡ã•れる必è¦ãŒã‚る。\n" "大抵ã®å ´åˆã€ã“れを手動ã§è¡Œã†äº‹ã¯ã—ãªã„ã ã‚ã†ã€\n" "ã ãŒã€ã‚ãªãŸãŒ {RackMiddleware}を利用ã™ã‚‹å ´åˆã€\n" "ã‚ãªãŸè‡ªèº«ãŒé…列ã§ã“ã®ä¸­ã¸æ¸¡ã™å¿…è¦ãŒã‚ã‚‹ã ã‚ã†ã€‚\n" "ã“ã®ãƒ©ã‚¤ãƒ–ラリã®é…列をビルドã™ã‚‹ã«ã¯ã€\n" "次ã®ã‚ˆã†ã«ã€ã‚ªãƒ–ジェクトã®LibraryVersionã®*é…列*ã«ã€\n" "マップã•れå付ã‘られãŸãƒ©ã‚¤ãƒ–ラリã®ãƒãƒƒã‚·ãƒ¥ã‚’作æˆã™ã¹ãã§ã‚る。" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:31 msgid "" " {'mylib' => [LibraryVersion.new('mylib', '1.0', ...),\n" " LibraryVersion.new('mylib', '2.0', ...)]}" msgstr "" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:34 msgid "Note that you can also use {Adapter#add_library} for convenience." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚ã‚ãªãŸã¯ã€\n" "便利ãª{Adapter#add_library}メソッドを\n" "使ã†äº‹ã‚‚ã§ãる。" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:36 msgid "The \"array\" part is required, even for just one library version." msgstr "\"é…列\"ã®éƒ¨åˆ†ã¯ã€ãŸã£ãŸä¸€ã¤ã®ãƒ©ã‚¤ãƒ–ラリã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã‚‚å¿…è¦ã¨ã•れる。" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:38 msgid "" "== Library Sources\n" "The {#source} method represents the library source type, ie. where the\n" "library \"comes from\". It might come from \"disk\", or it might come from " "a\n" "\"gem\" (technically the disk, but a separate type nonetheless). In these\n" "two cases, the yardoc file sits somewhere on your filesystem, though\n" "it may also be built dynamically if it does not yet exist. This behaviour\n" "is controlled through the {#prepare!} method, which prepares the yardoc " "file\n" "given a specific library source. We will see how this works in detail in\n" "the following section." msgstr "" "== ライブラリã®ã‚½ãƒ¼ã‚¹\n" "{#source}メソッドã¯ãƒ©ã‚¤ãƒ–ラリã®ã‚½ãƒ¼ã‚¹ã®ã‚¿ã‚¤ãƒ—を表ã™ã€\n" "ã¤ã¾ã‚Šã€ãƒ©ã‚¤ãƒ–ラリã®å ´æ‰€ã§ã‚る。\n" "ãれã¯ã€\"disk\"ã‹ã‚‰ãã‚‹ã‹ã‚‚ã—れãªã„ã€\n" "åˆã¯ã€\"gem\"ã‹ã‚‰ãã‚‹ã‹ã‚‚ã—れãªã„。\n" "(実際ã«ã¯ã©ã¡ã‚‰ã‚‚ディスク上ã ãŒã€åž‹ã¯åˆ¥ã‚Œã‚‹)\n" "ã“ã®äºŒã¤ã®ã‚±ãƒ¼ã‚¹ã®å ´åˆã€\n" "yardocã®ãƒ•ァイルã¯ã€ã‚ãªãŸã®ãƒ•ァイルシステムã®ä½•処ã‹ã«ç½®ã„ã¦ã‚りã€\n" "ã¾ã è¦‹ã¤ã‹ã£ã¦ã„ãªã„å ´åˆã€å‹•çš„ã«ãƒ“ルドã•れるã‹ã‚‚ã—れãªã„。\n" "ã“ã®æŒ™å‹•ã¯ã€{#prepare!}メソッドを通ã˜ã¦åˆ¶å¾¡ã•れã€\n" "与ãˆã‚‰ã‚ŒãŸå›ºæœ‰ã®ãƒ©ã‚¤ãƒ–ラリã®ã‚½ãƒ¼ã‚¹ã®yardocファイルを用æ„ã™ã‚‹ã€‚\n" "ç§é”ã¯ã€ç¶šãセクションã®ä¸­ã§ã“ã®ä»•組ã¿ã‚’ç†è§£ã™ã‚‹ã ã‚ã†ã€‚" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:48 msgid "" "== Implementing a Custom Library Source\n" "YARD can be extended to support custom library sources in order to\n" "build or retrieve a yardoc file at runtime from many different locations." msgstr "" "== カスタムライブラリã®ã‚½ãƒ¼ã‚¹ã‚’実装ã™ã‚‹\n" "YARDã¯ã‚«ã‚¹ã‚¿ãƒ ãƒ©ã‚¤ãƒ–ラリã®ã‚½ãƒ¼ã‚¹ã‚’ビルドã™ã‚‹ã®ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ç‚ºã€æ‹¡å¼µã•れã€\n" "多ãã®ã®ç•°ãªã‚‹å ´æ‰€ã‹ã‚‰å®Ÿè¡Œæ™‚ã«yardocファイルを読ã¿å‡ºã™ã€‚" # YARD::Server::LibraryVersion #: ../lib/yard/server/library_version.rb:52 msgid "" "To implement this behaviour, two methods must be added to the +LibraryVersion" "+\n" "class, +#load_yardoc_from_SOURCE+ and +#source_path_for_SOURCE+. In both\n" "cases, \"SOURCE\" represents the source type used in {#source} when " "creating\n" "the library object. The +#source_path_for_SOURCE+ method is called upon\n" "creation and should return the location where the source code for the " "library\n" "lives. The load method is called from {#prepare!} if there is no yardoc " "file\n" "and should set {#yardoc_file}. Below is a full example for\n" "implementing a custom library source, +:http+, which reads packaged .yardoc\n" "databases from zipped archives off of an HTTP server." msgstr "" "ã“ã®æŒ™å‹•を実装ã™ã‚‹ã«ã¯ã€\n" "+LibraryVersion+クラス㮠+#load_yardoc_from_SOURCE+ メソッド㨠" "+#source_path_for_SOURCE+ メソッドã®\n" "2ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå¤§æŠµè¿½åŠ ã•れる。\n" "ã©ã¡ã‚‰ã®å ´åˆã‚‚ã€ãƒ©ã‚¤ãƒ–ラリã®ã‚ªãƒ–ジェクトãŒä½œæˆã•れる時ã®ã€\n" "\"SOURCE\"ã¯{#source}メソッドã§åˆ©ç”¨ã•れãŸsource typeを表ã™ã€‚\n" "+#source_path_for_SOURCE+ メソッドã¯ã€ä½œæˆã•れる所ã§å‘¼ã³å‡ºã•れã€\n" "存在ã™ã‚‹ãƒ©ã‚¤ãƒ–ラリã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®å ´æ‰€ã‚’è¿”ã™ã¹ãã§ã‚る。\n" "loadメソッドã¯ã€yardocファイルãŒç„¡ã„å ´åˆã€{#prepare!}メソッドã‹ã‚‰å‘¼ã³å‡ºã•れ" "る。\n" "ãã—ã¦ã€{#yardoc_file}を設定ã™ã¹ãã§ã‚る。\n" "下ã¯ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ©ã‚¤ãƒ–ラリã®ã‚½ãƒ¼ã‚¹ã¨ +:http+ を実装ã™ã‚‹ç‚ºã®ã€å®Œå…¨ãªä¾‹ã§ã‚りã€\n" "ã“れã¯ã€HTTPサーãƒãƒ¼çµŒç”±ã§zipã•れãŸã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã‹ã‚‰ãƒ‘ーケージã•れãŸ.yardocデー" "タベースを読ã¿å‡ºã™ã€‚" # @example Implementing a Custom Library Source #: ../lib/yard/server/library_version.rb:87 msgid "" "# Adds the source type \"http\" for .yardoc files zipped on HTTP servers\n" "class LibraryVersion\n" " def load_yardoc_from_http\n" " return if yardoc_file # we have the library\n" "\n" " # otherwise download it in a thread and return immediately\n" " Thread.new do\n" " # zip/unzip method implementations are not shown\n" " download_zip_file(\"http://mysite.com/yardocs/#{self}.zip\")\n" " unzip_file_to(\"/path/to/yardocs/#{self}\")\n" " self.yardoc_file = \"/path/to/yardocs/#{self}/.yardoc\"\n" " self.source_path = self.yardoc_file\n" " end\n" "\n" " # tell the server it's not ready yet (but it might be next time)\n" " raise LibraryNotPreparedError\n" " end\n" "\n" " # we set this later\n" " def source_path_for_http; nil end\n" "end\n" "\n" "# Creating a library of this source type:\n" "LibraryVersion.new('name', '1.0', nil, :http)" msgstr "" "# HTTPサーãƒãƒ¼ä¸Šã§zipã•れãŸ.yardocファイル用ã«ã‚½ãƒ¼ã‚¹ã®åž‹\"http\"を追加ã™" "る。\n" "class LibraryVersion\n" " def load_yardoc_from_http\n" " return if yardoc_file #ライブラリをæŒã£ã¦ã„ã‚‹å ´åˆ\n" "\n" " # ãã®ä»–ã®å ´åˆã€ãã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®ä¸­ã§ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ç›´ãã«è¿”ã™\n" " Thread.new do\n" " # zip/unzip メソッドã®å®Ÿè£…ã¯ç¤ºã•ãªã„\n" " download_zip_file(\"http://mysite.com/yardocs/#{self}.zip\")\n" " unzip_file_to(\"/path/to/yardocs/#{self}\")\n" " self.yardoc_file = \"/path/to/yardocs/#{self}/.yardoc\"\n" " self.source_path = self.yardoc_file\n" " end\n" "\n" " # サーãƒãƒ¼ã‚’呼ã³å‡ºã™æº–å‚™ãŒã¾ã ã§ãã¦ã„ãªã„å ´åˆ(ã§ã‚‚次回ã«ãªã‚‹ã‹ã‚‚ã—れãª" "ã„)\n" " raise LibraryNotPreparedError\n" " end\n" "\n" " # 最新ã®ã‚‚ã®ã‚’設定ã™ã‚‹\n" " def source_path_for_http; nil end\n" "end\n" "\n" "#æ¬¡ã®æ§˜ã«ã€ã“ã®ã‚½ãƒ¼ã‚¹ã®åž‹ã‚’指定ã—ã¦ã€ãƒ©ã‚¤ãƒ–ラリを作æˆã™ã‚‹ã€‚\n" "LibraryVersion.new('name', '1.0', nil, :http)" # @example #: ../lib/yard/server/library_version.rb:87 msgid "tag|example|Implementing a Custom Library Source" msgstr "カスタムライブラリã®ã‚½ãƒ¼ã‚¹ã‚’実装ã™ã‚‹" # @return [String] # @param [String] name #: ../lib/yard/server/library_version.rb:89 #: ../lib/yard/server/library_version.rb:120 msgid "the name of the library" msgstr "ライブラリã®åå‰" # @return [String] #: ../lib/yard/server/library_version.rb:92 msgid "the version of the specific library" msgstr "固有ã®ãƒ©ã‚¤ãƒ–ラリã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³" # @return [nil] #: ../lib/yard/server/library_version.rb:98 msgid "" "if no yardoc file exists yet. In this case, {#prepare!} will\n" "be called on this library to build the yardoc file." msgstr "" "yardocファイルãŒã¾ã å­˜åœ¨ã—ãªã„å ´åˆã€\n" "yardocファイルをビルドã™ã‚‹ç‚ºã«ã€\n" "{#prepare!}ãŒã“ã®ãƒ©ã‚¤ãƒ–ラリ上ã§å‘¼ã³å‡ºã•れるã ã‚ã†ã€‚" # @return [String] #: ../lib/yard/server/library_version.rb:98 msgid "" "the location of the yardoc file used to load the object\n" "information from." msgstr "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æƒ…報をロードã™ã‚‹ã®ã«åˆ©ç”¨ã•れるyardocファイルã®å ´æ‰€" # @see LibraryVersion #: ../lib/yard/server/library_version.rb:105 #: ../lib/yard/server/library_version.rb:111 msgid "" "LibraryVersion documentation for \"Implementing a Custom Library Source\"" msgstr "" # @return [Symbol] #: ../lib/yard/server/library_version.rb:105 msgid "" "the source type representing where the yardoc should be\n" "loaded from. Defaults are +:disk+ and +:gem+, though custom sources\n" "may be implemented. This value is used to inform {#prepare!} about how\n" "to load the necessary data in order to display documentation for an object." msgstr "" "ソースã¯ã€yardocãŒãƒ­ãƒ¼ãƒ‰ã•れるã¹ã場所を表ã™ã€‚\n" "デフォルト㯠+:disk+ 㨠+:gem+ ã¨ãªã‚‹ãŒã€ã‚«ã‚¹ã‚¿ãƒ ã‚½ãƒ¼ã‚¹ã®å®Ÿè£…ã‚‚ã§ãる。\n" "ã“ã®å€¤ã¯ã€ã‚ªãƒ–ジェクト用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’表示ã™ã‚‹ç‚ºã«\n" "å¿…è¦ãªãƒ‡ãƒ¼ã‚¿ã‚’ロードã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã€{#prepare!}メソッドã«é€šçŸ¥ã™ã‚‹ç‚ºã«åˆ©ç”¨ã•" "れる。" # @return [nil] #: ../lib/yard/server/library_version.rb:111 msgid "if there is no source code" msgstr "ã“れらãŒã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã§ãªã„å ´åˆ" # @return [String] #: ../lib/yard/server/library_version.rb:111 msgid "" "the location of the source code for a library. This\n" "value is filled by calling +#source_path_for_SOURCE+ on this class." msgstr "" "ライブラリã®ç‚ºã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®å ´æ‰€ã€‚\n" "ã“ã®å€¤ã¯ã€ã“ã®ã‚¯ãƒ©ã‚¹ã§ +#source_path_for_SOURCE+ を呼ã³å‡ºã—ã¦åŸ‹ã‚られる。" # @return [LibraryVersion] #: ../lib/yard/server/library_version.rb:120 msgid "a new instance of LibraryVersion" msgstr "LibraryVersionã®æ–°ã—ã„インスタンス" # @param [String] #: ../lib/yard/server/library_version.rb:120 msgid "tag|param|version" msgstr "" # @param [String] #: ../lib/yard/server/library_version.rb:120 msgid "tag|param|yardoc" msgstr "" # @param [Symbol] source #: ../lib/yard/server/library_version.rb:120 msgid "" "the location of the files used to build the yardoc.\n" "Builtin source types are +:disk+ or +:gem+." msgstr "" "yardocをビルドã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れるファイルã®å ´æ‰€ã€‚\n" "組ã¿è¾¼ã¿ã®ã‚½ãƒ¼ã‚¹ã®åž‹ã¯ +:disk+ åˆã¯ +:gem+ 。" # @param [String] yardoc #: ../lib/yard/server/library_version.rb:120 msgid "" "the location of the yardoc file, or nil if it is\n" "generated later" msgstr "yardocã®å ´æ‰€ã€åˆã¯ã€æœ€æ–°ã®ã‚‚ã®ãŒç”Ÿæˆã•れる場åˆã¯ã€nil" # @param [String] version #: ../lib/yard/server/library_version.rb:120 msgid "" "the specific (usually, but not always, numeric) library\n" "version" msgstr "" "固有(æ™®é€šã¯æ•°å­—ã§è¡¨ã•れるãŒã€ã—ã‹ã—常ã«ã§ã¯ãªã„)ã®ãƒ©ã‚¤ãƒ–ラリã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³" # @param [Boolean] url_format #: ../lib/yard/server/library_version.rb:132 msgid "" "if true, returns the string in a URI-compatible\n" "format (for appending to a URL). Otherwise, it is given in a more human\n" "readable format." msgstr "" "trueã®å ´åˆã€URI-compatibleフォーマット(URL追加用)ã§æ–‡å­—列を返ã—ã€\n" "ãれ以外ã®å ´åˆã€äººé–“ãŒèª­ã‚るフォーマットãŒä¸Žãˆã‚‰ã‚Œã‚‹ã€‚" # @param [Boolean] #: ../lib/yard/server/library_version.rb:132 msgid "tag|param|url_format" msgstr "" # @return [String] #: ../lib/yard/server/library_version.rb:132 msgid "the string representation of the library." msgstr "ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æ–‡å­—列表ç¾" # @return [Fixnum] #: ../lib/yard/server/library_version.rb:137 msgid "used for Hash mapping." msgstr "ãƒãƒƒã‚·ãƒ¥ã®ãƒžãƒƒãƒ”ング用ã«åˆ©ç”¨ã•れる" # @return [Boolean] #: ../lib/yard/server/library_version.rb:140 msgid "whether another LibraryVersion is equal to this one" msgstr "LibraryVersionãŒæ¡ä»¶ã¨ä¸€è‡´ã™ã‚‹ã‹ã©ã†ã‹" # YARD::Server::LibraryVersion#prepare! #: ../lib/yard/server/library_version.rb:148 msgid "" "Prepares a library to be displayed by the server. This callback is\n" "performed before each request on a library to ensure that it is loaded\n" "and ready to be viewed. If any steps need to be performed prior to loading,\n" "they are performed through this method (though they should be implemented\n" "through the +load_yardoc_from_SOURCE+ method)." msgstr "" "サーãƒãƒ¼ã§è¡¨ç¤ºã•れるライブラリを準備ã™ã‚‹ã€‚\n" "ã“ã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã¯ã€ãƒ­ãƒ¼ãƒ‰ã•れãã®ä¸€è¦§ã‚’準備ã™ã‚‹äº‹ã‚’\n" "ä¿è¨¼ã™ã‚‹ç‚ºã«ãƒ©ã‚¤ãƒ–ラリ上ã§ã€å€‹ã€…ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å‰ã«å®Ÿè¡Œã•れる。\n" "ä»»æ„ã®ã‚¹ãƒ†ãƒƒãƒ—ãŒã€ãƒ­ãƒ¼ãƒ‰ã®ç‚ºã«å…ˆã«å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’通ã˜ã¦å®Ÿè¡Œã•れる。\n" "(ã‘れã©ã‚‚ã“れ㯠+load_yardoc_from_SOURCE+ メソッドを通ã˜ã¦å®Ÿè£…ã•れるã¹ãã§ã‚" "る。)" # @note #: ../lib/yard/server/library_version.rb:162 msgid "" "You should not directly override this method. Instead, implement\n" "+load_yardoc_from_SOURCENAME+ when implementing loading for a specific\n" "source type. See the {LibraryVersion} documentation for \"Implementing\n" "a Custom Library Source\"" msgstr "" "ã‚ãªãŸã¯ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’直接上書ãã™ã¹ãã§ã¯ãªã„。\n" "固有ã®ã‚½ãƒ¼ã‚¹ã®åž‹ç”¨ã«ãƒ­ãƒ¼ãƒ‰ã‚’実装ã™ã‚‹æ™‚ã¯ã€\n" "代ã‚りã«ã€ +load_yardoc_form_SOURCENAME+ を実装ã™ã‚‹ã€‚\n" "\"カスタムライブラリã®ã‚½ãƒ¼ã‚¹ã®å®Ÿè£…\"ã«ã¯ã€{LibraryVersion}ドキュメントをå‚" "照。" # @raise [LibraryNotPreparedError] #: ../lib/yard/server/library_version.rb:162 msgid "" "if the library is not ready to be\n" "displayed. Usually when raising this error, you would simultaneously\n" "begin preparing the library for subsequent requests, although this\n" "is not necessary." msgstr "" "ライブラリãŒè¡¨ç¤ºã™ã‚‹ç‚ºã®æº–å‚™ãŒã§ãã¦ã„ãªã„å ´åˆã€\n" "通常ã“ã®ã‚¨ãƒ©ãƒ¼ã‚’上ã’る時ã¯ã€\n" "次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ç‚ºã®ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æº–å‚™ãŒä¸€æ–‰ã«å§‹ã¾ã‚‹ã€‚\n" "ãªã®ã§ã€ã“れã¯ã€å¿…é ˆã§ã¯ãªã„。" # @return [Gem::Specification] #: ../lib/yard/server/library_version.rb:171 msgid "" "a gemspec object for a given library. Used\n" "for :gem source types." msgstr "" "与ãˆã‚‰ã‚ŒãŸãƒ©ã‚¤ãƒ–ラリ用ã®gemspecオブジェクト。\n" ":gemã®ã‚½ãƒ¼ã‚¹ã®åž‹ç”¨ã«åˆ©ç”¨ã•れる。" # @return [nil] #: ../lib/yard/server/library_version.rb:171 msgid "if there is no installed gem for the library" msgstr "ã“れらãŒã€ãƒ©ã‚¤ãƒ–ラリ用ã®gemをインストールã•れãªã„å ´åˆ" # YARD::Server::LibraryVersion#load_yardoc_from_disk #: ../lib/yard/server/library_version.rb:179 msgid "" "Called when a library of source type \"disk\" is to be prepared. In this\n" "case, the {#yardoc_file} should already be set, so nothing needs to be\n" "done." msgstr "" "ソースã®åž‹ãŒ\"disk\"ã®ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æ™‚呼ã³å‡ºã•ã‚Œã€æº–å‚™ã™ã‚‹ã€‚\n" "ã“ã®å ´åˆã€{#yardoc_file}ã¯ã€æ—¢ã«è¨­å®šã•れるã¹ãã§ã‚りã€\n" "何も必è¦ã¨ã—ãªã„。" # YARD::Server::LibraryVersion#load_yardoc_from_gem #: ../lib/yard/server/library_version.rb:186 msgid "" "Called when a library of source type \"gem\" is to be prepared. In this\n" "case, the {#yardoc_file} needs to point to the correct location for\n" "the installed gem. The yardoc file is built if it has not been done." msgstr "" "ソースã®åž‹ãŒ\"gem\"ã®ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æ™‚呼ã³å‡ºã•ã‚Œã€æº–å‚™ã™ã‚‹ã€‚\n" "ã“ã®å ´åˆã€{#yardoc_file}ã¯\n" "インストールã•れãŸgemã®æ­£è¦ã®å ´æ‰€ã‚’å¿…è¦ã¨ã™ã‚‹ã€‚\n" "yardocファイルをæŒã£ã¦ã„ãªã„å ´åˆã¯ã€ãƒ“ルドã•れる。" # @raise [LibraryNotPreparedError] #: ../lib/yard/server/library_version.rb:191 msgid "" "if the gem does not have an existing\n" "yardoc file." msgstr "gemãŒyardocファイルã«å­˜åœ¨ã—ãªã„å ´åˆ" # @return [String] #: ../lib/yard/server/library_version.rb:210 msgid "the source path for a disk source" msgstr "ディスクã®ã‚½ãƒ¼ã‚¹ç”¨ã®ã‚½ãƒ¼ã‚¹ã®ãƒ‘ス" # @return [String] #: ../lib/yard/server/library_version.rb:215 msgid "the source path for a gem source" msgstr "gemã®ã‚½ãƒ¼ã‚¹ç”¨ã®ã‚½ãƒ¼ã‚¹ã®ãƒ‘ス" # YARD::Server::RackMiddleware #: ../lib/yard/server/rack_adapter.rb:7 msgid "" "This class wraps the {RackAdapter} into a Rack-compatible middleware.\n" "See {#initialize} for a list of options to pass via Rack's +#use+ method." msgstr "" "ã“ã®ã‚¯ãƒ©ã‚¹ã¯ã€Rackã¨äº’æ›æ€§ã®ã‚るミドルウェアã®{RackAdapter}をラップã™ã‚‹ã€‚\n" "Rack ã® +#use+ ãƒ¡ã‚½ãƒƒãƒ‰çµŒç”±ã§æ¸¡ã™ç‚ºã®optionsã®ãƒªã‚¹ãƒˆã¯ã€{#initialize}メソッド" "ã‚’å‚照。\n" # @note #: ../lib/yard/server/rack_adapter.rb:16 msgid "" "You must pass a +:libraries+ option to the RackMiddleware via +#use+. To\n" "read about how to return a list of libraries, see {LibraryVersion} or look\n" "at the example below." msgstr "" "ã‚ãªãŸã¯ +#use+ メソッド経由ã§RackWiddlewareã« +:libraries+ ã®ã‚ªãƒ—ションを渡" "ã•ãªã‘れã°ãªã‚‰ãªã„。\n" "librariesã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ç‚ºã®æ–¹æ³•ã«ã¤ã„ã¦èª­ã‚€ã«ã¯ã€{LibraryVersion}åˆã¯ã€ä¸‹ã®ä¾‹" "ã‚’å‚照。" # @example Using the RackMiddleware in a Rack application #: ../lib/yard/server/rack_adapter.rb:16 msgid "" "libraries = {:mylib => [YARD::Server::LibraryVersion.new('mylib', nil, '/" "path/to/.yardoc')]}\n" "use YARD::Server::RackMiddleware, :libraries => libraries" msgstr "" # @example #: ../lib/yard/server/rack_adapter.rb:16 msgid "tag|example|Using the RackMiddleware in a Rack application" msgstr "Rackアプリケーションã§Rackミドルウェアを使用ã™ã‚‹ã€‚" # YARD::Server::RackMiddleware#initialize #: ../lib/yard/server/rack_adapter.rb:18 msgid "Creates a new Rack-based middleware for serving YARD documentation." msgstr "" "YARDãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«æä¾›ã™ã‚‹ç‚ºã«ã€\n" "æ–°ã—ãRackãŒåŸºæœ¬ã¨ãªã‚‹ãƒŸãƒ‰ãƒ«ã‚¦ã‚§ã‚¢ã‚’作æˆã™ã‚‹ã€‚" # @return [RackMiddleware] #: ../lib/yard/server/rack_adapter.rb:26 msgid "a new instance of RackMiddleware" msgstr "RackãƒŸãƒ‰ãƒ«ã‚¦ã‚§ã‚¢ã®æ–°ã—ã„インスタンス" # @param #: ../lib/yard/server/rack_adapter.rb:26 msgid "tag|param|app" msgstr "" # @param app #: ../lib/yard/server/rack_adapter.rb:26 msgid "the next Rack middleware in the stack" msgstr "スタックã®ä¸­ã®æ¬¡ã®Rackミドルウェア" # YARD::Server::RackAdapter #: ../lib/yard/server/rack_adapter.rb:43 msgid "" "A server adapter to respond to requests using the Rack server infrastructure." msgstr "" "Rackサーãƒãƒ¼ã®ã‚¤ãƒ³ãƒ•ラã«ã‚ˆã£ã¦ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ç­”ãˆã‚‹ç‚ºã®ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ€ãƒ—ター。" # YARD::Server::RackAdapter#call #: ../lib/yard/server/rack_adapter.rb:47 msgid "Responds to Rack requests and builds a response with the {Router}." msgstr "Rackã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã—ã€{Router}を用ã„レスãƒãƒ³ã‚¹ã‚’ビルドã™ã‚‹ã€‚" # @return [Array(Numeric,Hash,Array)] # @return [Array(Number,Hash,Array)] #: ../lib/yard/server/rack_adapter.rb:48 ../lib/yard/server/router.rb:100 #: ../lib/yard/server/static_caching.rb:33 msgid "the Rack-style response" msgstr "Rackスタイルã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹" # YARD::Server::RackAdapter#start #: ../lib/yard/server/rack_adapter.rb:59 msgid "" "Starts the +Rack::Server+. This method will pass control to the server and\n" "block." msgstr "" "+Rack::Server+ をスタートã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã¨ãƒ–ロックã«åˆ¶å¾¡ã‚’渡ã™ã ã‚ã†ã€‚" # YARD::Server::Router #: ../lib/yard/server/router.rb:4 msgid "" "A router class implements the logic used to recognize a request for a " "specific\n" "URL and run specific {Commands::Base commands}." msgstr "" "routerクラスã¯ã€ç‰¹å®šã®URL用ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’èªè­˜ã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れãŸãƒ­ã‚¸ãƒƒã‚¯ã‚’実装" "ã—ã€\n" "特定ã®{Commands::Base commands}ã‚’èµ·å‹•ã™ã‚‹ã€‚" # YARD::Server::Router #: ../lib/yard/server/router.rb:7 msgid "" "== Subclassing Notes\n" "To create a custom router, subclass this class and pass it into the adapter\n" "options through {Adapter#initialize} or by directly modifying " "{Adapter#router}." msgstr "" "== サブクラス化ã™ã‚‹æ™‚ã®æ³¨æ„\n" "カスタムrouterを作æˆã™ã‚‹ã«ã¯ã€\n" "ã“ã®ã‚¯ãƒ©ã‚¹ã‚’サブクラス化ã—ã€\n" "{Adapter#initialize}を通ã˜ã¦ã‚¢ãƒ€ãƒ—ã‚¿ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã¸æ¸¡ã™ã‹ã€\n" "直接{Adapter#router}を変更ã™ã‚‹ã€‚" # YARD::Server::Router #: ../lib/yard/server/router.rb:11 msgid "" "The most general customization is to change the URL prefixes recognized by\n" "routing, which can be done by overriding {#docs_prefix}, {#list_prefix}\n" "and {#search_prefix}." msgstr "" "多ãã®å ´åˆã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã¯ã€\n" "routerã§èªè­˜ã•れるURLã®ãƒ—レフィックスを変更ã™ã‚‹ç‚ºã§ã‚る。\n" "{#docs_prefix}ã€{#list_prefix}ã€{#search_prefix}メソッドを上書ãã™ã‚‹äº‹ã§ã€\n" "実ç¾ã§ãる。" # YARD::Server::Router #: ../lib/yard/server/router.rb:15 msgid "" "== Implementing Custom Caching\n" "By default, the Router class performs static disk-based caching on all\n" "requests through the +#check_static_cache+. To override this behaviour,\n" "or create your own caching mechanism, mixin your own custom module with\n" "this method implemented as per {StaticCaching#check_static_cache}." msgstr "" "== カスタムキャッシュを実装ã™ã‚‹\n" "デフォルトã§ã€Routerクラスã¯ã€\n" "+#check_static_cache+ を通ã˜ã¦\n" "å…¨ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§é™çš„ãªãƒ‡ã‚£ã‚¹ã‚¯ãƒ™ãƒ¼ã‚¹ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’実行ã™ã‚‹ã€‚\n" "ã“ã®æŒ™å‹•を上書ãã—ãŸã‚Šã€ã‚ãªãŸè‡ªèº«ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’作æˆã™ã‚‹ã«ã¯ã€\n" "{StaticCaching#check_static_cache}メソッドã¨ã—ã¦å®Ÿè£…ã•れãŸã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„" "ã¦\n" "ã‚ãªãŸè‡ªèº«ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’mixinã™ã‚‹ã€‚" # @example Creating a subclassed router #: ../lib/yard/server/router.rb:30 msgid "" "# Adds 'my' to all routing prefixes\n" "class MyRouter < YARD::Server::Router\n" " def docs_prefix; 'mydocs' end\n" " def list_prefix; 'mylist' end\n" " def search_prefix; 'mysearch' end\n" "end\n" "\n" "# Using it:\n" "WebrickAdapter.new(libraries, :router => MyRouter).start" msgstr "" # @example #: ../lib/yard/server/router.rb:30 msgid "tag|example|Creating a subclassed router" msgstr "サブクラス化ã•れãŸrouterを作æˆã™ã‚‹" # @return [Adapter Dependent] #: ../lib/yard/server/router.rb:35 msgid "the request data coming in with the routing" msgstr "routerを用ã„ã‚„ã£ã¦ãるデータã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆ" # @return [Adapter] #: ../lib/yard/server/router.rb:38 msgid "the adapter used by the router" msgstr "routerã«ã‚ˆã£ã¦åˆ©ç”¨ã•れãŸã‚¢ãƒ€ãƒ—ã‚¿" # YARD::Server::Router#initialize #: ../lib/yard/server/router.rb:41 msgid "Creates a new router for a specific adapter" msgstr "特定ã®ã‚¢ãƒ€ãƒ—ã‚¿ç”¨ã«æ–°ã—ã„routerを作æˆã™ã‚‹" # @return [Router] #: ../lib/yard/server/router.rb:43 msgid "a new instance of Router" msgstr "Routerã®æ–°ã—ã„インスタンス" # @param [Adapter] #: ../lib/yard/server/router.rb:43 msgid "tag|param|adapter" msgstr "" # @param [Adapter] adapter #: ../lib/yard/server/router.rb:43 msgid "the adapter to route requests to" msgstr "リクエストをé€ã‚‹ç‚ºã®ã‚¢ãƒ€ãƒ—ã‚¿" # YARD::Server::Router#call #: ../lib/yard/server/router.rb:48 msgid "" "Perform routing on a specific request, serving the request as a static\n" "file through {Commands::StaticFileCommand} if no route is found." msgstr "" "特定ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§routerを実行ã—ã€\n" "routeãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€\n" "{Commands::StaticFileCommand}を通ã˜ã¦ã€\n" "é™çš„ãªãƒ•ァイルã¨ã—ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’æä¾›ã™ã‚‹ã€‚" # @return [Array(Number,Hash,Array)] #: ../lib/yard/server/router.rb:52 msgid "the Rack-style server response data" msgstr "Rackスタイルサーãƒãƒ¼ãŒè¿”ã™ãƒ‡ãƒ¼ã‚¿" # YARD::Server::Router#docs_prefix # YARD::Server::Router#list_prefix # YARD::Server::Router#search_prefix #: ../lib/yard/server/router.rb:64 ../lib/yard/server/router.rb:67 #: ../lib/yard/server/router.rb:70 msgid "Route Prefixes" msgstr "プレフィックスをé€ã‚‹" # @return [String] #: ../lib/yard/server/router.rb:64 msgid "the URI prefix for all object documentation requests" msgstr "å…¨ã¦ã®ã‚ªãƒ–ジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆç”¨ã®URIã®ãƒ—レフィックス" # @return [String] #: ../lib/yard/server/router.rb:67 msgid "the URI prefix for all class/method/file list requests" msgstr "" "å…¨ã¦ã®ã‚¯ãƒ©ã‚¹/メソッド/ファイルã®ãƒªã‚¹ãƒˆã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆç”¨ã®URIã®ãƒ—レフィックス" # @return [String] #: ../lib/yard/server/router.rb:70 msgid "the URI prefix for all search requests" msgstr "å…¨ã¦ã®æ¤œç´¢ãƒªã‚¯ã‚¨ã‚¹ãƒˆç”¨ã®URIプレフィックス" # YARD::Server::Router#parse_library_from_path # YARD::Server::Router#route # YARD::Server::Router#route_docs # YARD::Server::Router#route_index # YARD::Server::Router#route_list # YARD::Server::Router#route_search #: ../lib/yard/server/router.rb:77 ../lib/yard/server/router.rb:100 #: ../lib/yard/server/router.rb:122 ../lib/yard/server/router.rb:140 #: ../lib/yard/server/router.rb:151 ../lib/yard/server/router.rb:159 msgid "Routing Methods" msgstr "メソッドをé€ã‚‹" # @return [Array(LibraryVersion, Array)] #: ../lib/yard/server/router.rb:77 msgid "" "the library followed\n" "by the rest of the path components in the request path. LibraryVersion\n" "will be nil if no matching library was found." msgstr "" "ライブラリã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒ‘スã®ä¸­ã§\n" "ãã®ãƒ‘ã‚¹ã®æ§‹æˆã®æ®‹ã‚Šã«ã‚ˆã£ã¦ãƒ•ォローã•れる。\n" "見ã¤ã‹ã£ãŸãƒ©ã‚¤ãƒ–ラリãŒä¸€è‡´ã—ãªã‹ã£ãŸå ´åˆã€\n" "LibraryVersionã¯ã€nilã«ãªã‚‹ã ã‚ã†ã€‚" # YARD::Server::Router#route #: ../lib/yard/server/router.rb:96 msgid "" "Performs routing algorithm to find which prefix is called, first\n" "parsing out library name/version information." msgstr "" "プレフィックスを検索ã™ã‚‹ç‚ºã®routerアルゴリズムを実行ã™ã‚‹ã€‚\n" "ライブラリã®name/version情報ã®å‡ºåŠ›ã‚’æœ€åˆã«è§£æžã™ã‚‹ã€‚" # @return [nil] #: ../lib/yard/server/router.rb:100 msgid "if no route is matched" msgstr "route処ç†ãŒãƒžãƒƒãƒã—ãªã„å ´åˆ" # YARD::Server::Router#route_docs #: ../lib/yard/server/router.rb:119 msgid "Routes requests from {#docs_prefix} and calls the appropriate command" msgstr "{#docs_prefix}ã‹ã‚‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ã‚Šã€é©å½“ãªã‚³ãƒžãƒ³ãƒ‰ã‚’呼ã³å‡ºã™ã€‚" # @param [Array] paths #: ../lib/yard/server/router.rb:122 msgid "path components (split by '/')" msgstr "ãƒ‘ã‚¹ã®æ§‹æˆ('/'区切り)" # @param [LibraryVersion] library #: ../lib/yard/server/router.rb:122 msgid "the library to route for" msgstr "routeã™ã‚‹ç‚ºã®ãƒ©ã‚¤ãƒ–ラリ" # YARD::Server::Router#route_index #: ../lib/yard/server/router.rb:139 msgid "Routes for the index of a library / multiple libraries" msgstr "å˜ä¸€ã®ãƒ©ã‚¤ãƒ–ラリ/複数ã®ãƒ©ã‚¤ãƒ–ラリã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç”¨ã«é€ã‚‹" # YARD::Server::Router#route_list #: ../lib/yard/server/router.rb:149 msgid "Routes requests from {#list_prefix} and calls the appropriate command" msgstr "{#list_prefix}メソッドã‹ã‚‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ã‚Šã€é©åˆ‡ãªã‚³ãƒžãƒ³ãƒ‰ã‚’呼ã³å‡ºã™" # YARD::Server::Router#route_search #: ../lib/yard/server/router.rb:157 msgid "Routes requests from {#search_prefix} and calls the appropriate command" msgstr "{#search_prefix}メソッドã‹ã‚‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ã‚Šã€é©åˆ‡ãªã‚³ãƒžãƒ³ãƒ‰ã‚’呼ã³å‡ºã™" # YARD::Server::Router#final_options #: ../lib/yard/server/router.rb:167 msgid "" "Adds extra :library/:path option keys to the adapter options.\n" "Use this method when passing options to a command." msgstr "" "アダプタオプションã«è¿½åŠ ã®:library/:pathオプションã®ã‚­ãƒ¼ã‚’追加ã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãŒã‚ªãƒ—ションを解æžã™ã‚‹æ™‚ã«åˆ©ç”¨ã™ã‚‹ã€‚" # YARD::Server::Router#final_options #: ../lib/yard/server/router.rb:171 msgid "Utility Methods" msgstr "ユーティリティメソッド" # @return [Hash] #: ../lib/yard/server/router.rb:171 msgid "finalized options" msgstr "終ã‚らã›ã‚‹ã‚ªãƒ—ション" # YARD::Server::StaticCaching #: ../lib/yard/server/static_caching.rb:4 msgid "Implements static caching for requests." msgstr "リクエスト用ã®é™çš„ãªã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’実装ã™ã‚‹" # @see Router #: ../lib/yard/server/static_caching.rb:6 msgid "Router documentation for \"Caching\"" msgstr "" # @see #: ../lib/yard/server/static_caching.rb:6 msgid "tag|see|Router" msgstr "" # YARD::Server::StaticCaching#check_static_cache #: ../lib/yard/server/static_caching.rb:8 msgid "" "Called by a router to return the cached object. By default, this\n" "method performs disk-based caching. To perform other forms of caching,\n" "implement your own +#check_static_cache+ method and mix the module into\n" "the Router class." msgstr "" "キャッシュã•れãŸã‚ªãƒ–ジェクトを返ã™ç‚ºã«routerã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れる。\n" "デフォルトã§ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ãƒ™ãƒ¼ã‚¹ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’実行ã™ã‚‹ã€‚\n" "キャッシュã®ä»–ã®å½¢å¼ã‚’実行ã™ã‚‹ã«ã¯ã€\n" "ã‚ãªãŸè‡ªèº«ãŒ +#check_static_cache+ メソッドを実装ã—ã€\n" "Routerクラスã¸ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’mixinã™ã‚‹ã€‚" # YARD::Server::StaticCaching#check_static_cache #: ../lib/yard/server/static_caching.rb:13 msgid "" "Note that caching does not occur here. This method simply checks for\n" "the existence of cached data. To actually cache a response, see\n" "{Commands::Base#cache}." msgstr "" "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚キャッシュã¯ã€ã“ã“ã§ã¯ç™ºç”Ÿã—ãªã„。\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€å˜ç´”ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ‡ãƒ¼ã‚¿ã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã€‚\n" "実際ã«ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’キャッシュã™ã‚‹ã«ã¯ã€{Commands::Base#cache}ã‚’å‚ç…§ã™ã‚‹ã€‚" # @return [nil] #: ../lib/yard/server/static_caching.rb:33 msgid "if no cache is available and routing should continue" msgstr "" "キャッシュãŒåˆ©ç”¨ã§ããªã„å ´åˆã€nilã‚’è¿”ã™ã€‚\n" "routerã¯ç¶™ç¶šã™ã¹ãã§ã‚る。" # @example Implementing In-Memory Cache Checking #: ../lib/yard/server/static_caching.rb:33 msgid "" "module MemoryCaching\n" " def check_static_cache\n" " # $memory_cache is filled by {Commands::Base#cache}\n" " cached_data = $memory_cache[request.path]\n" " if cached_data\n" " [200, {'Content-Type' => 'text/html'}, [cached_data]]\n" " else\n" " nil\n" " end\n" " end\n" "end\n" "\n" "class YARD::Server::Router; include MemoryCaching; end" msgstr "" # @example #: ../lib/yard/server/static_caching.rb:33 msgid "tag|example|Implementing In-Memory Cache Checking" msgstr "メモリ内ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ãƒã‚§ãƒƒã‚¯ã‚’実装ã™ã‚‹" # @see #: ../lib/yard/server/static_caching.rb:33 msgid "tag|see|Commands::Base#cache" msgstr "" # YARD::Server::WebrickAdapter #: ../lib/yard/server/webrick_adapter.rb:6 msgid "The main adapter to initialize a WEBrick server." msgstr "WEBrickサーãƒãƒ¼ã‚’イニシャライズã™ã‚‹ç‚ºã®ä¸»ãªã‚¢ãƒ€ãƒ—ã‚¿" # YARD::Server::WebrickAdapter#start #: ../lib/yard/server/webrick_adapter.rb:8 msgid "" "Initializes a WEBrick server. If {Adapter#server_options} contains a\n" "+:daemonize+ key set to true, the server will be daemonized." msgstr "" "WEBrickサーãƒãƒ¼ã‚’イニシャライズã™ã‚‹ã€‚\n" "{Adapter#server_options}ã®å†…容ã®\n" "+:daemonize+ キーã«trueãŒè¨­å®šã•れãŸå ´åˆã€\n" "サーãƒãƒ¼ã¯ã€ãƒ‡ãƒ¼ãƒ¢ãƒ³ã§èµ·å‹•ã•れる。" # YARD::Server::WebrickServlet #: ../lib/yard/server/webrick_adapter.rb:19 msgid "The main WEBrick servlet implementation, accepting only GET requests." msgstr "" "主ã«WEBrickサーブレットã®å®Ÿè£…ã€å–å¾—ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã ã‘å—入れる。\n" "(servlet:サーãƒãƒ¼å´ã§å‹•ãプログラムã®äº‹)" # @return [WebrickServlet] #: ../lib/yard/server/webrick_adapter.rb:22 msgid "a new instance of WebrickServlet" msgstr "WebrickServletã®æ–°ã—ã„インスタンス" # YARD::Tags::DefaultFactory#parse_tag #: ../lib/yard/tags/default_factory.rb:8 msgid "Parses tag text and creates a new tag with descriptive text" msgstr "タグテキストを解æžã—ã€èª¬æ˜Žæ–‡ã¨å…±ã«æ–°ã—ã„タグを作æˆã™ã‚‹ã€‚" # @return [Tag] #: ../lib/yard/tags/default_factory.rb:12 msgid "a tag object with the tag_name and text values filled" msgstr "ã‚¿ã‚°åやテキストã®å…¥ã£ãŸã‚¿ã‚°ã‚ªãƒ–ジェクト" # @param tag_name #: ../lib/yard/tags/default_factory.rb:12 #: ../lib/yard/tags/default_factory.rb:21 #: ../lib/yard/tags/default_factory.rb:32 #: ../lib/yard/tags/default_factory.rb:44 #: ../lib/yard/tags/default_factory.rb:56 msgid "the name of the tag to parse" msgstr "è§£æžã®ç‚ºã®ã‚¿ã‚°ã®åå‰" # @param [String] text #: ../lib/yard/tags/default_factory.rb:12 #: ../lib/yard/tags/default_factory.rb:21 #: ../lib/yard/tags/default_factory.rb:32 #: ../lib/yard/tags/default_factory.rb:44 #: ../lib/yard/tags/default_factory.rb:56 #: ../lib/yard/tags/default_factory.rb:98 msgid "the raw tag text" msgstr "å…ƒã®ã‚¿ã‚°ãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Tags::DefaultFactory#parse_tag_with_name #: ../lib/yard/tags/default_factory.rb:17 msgid "" "Parses tag text and creates a new tag with a key name and descriptive text" msgstr "タグテキストを解æžã—ã€ã‚­ãƒ¼åã¨èª¬æ˜Žæ–‡ã¨å…±ã«æ–°ã—ã„タグを作æˆã™ã‚‹ã€‚" # @return [Tag] #: ../lib/yard/tags/default_factory.rb:21 msgid "a tag object with the tag_name, name and text values filled" msgstr "ã‚¿ã‚°å,キーå,テキストã®å…¥ã£ãŸã‚¿ã‚°ã‚ªãƒ–ジェクト" # YARD::Tags::DefaultFactory#parse_tag_with_types #: ../lib/yard/tags/default_factory.rb:27 msgid "" "Parses tag text and creates a new tag with formally declared types and\n" "descriptive text" msgstr "" "タグテキストを解æžã—ã€å½¢å¼çš„ã«å®£è¨€ã•れる型ã¨èª¬æ˜Žæ–‡ã¨å…±ã«æ–°ã—ã„タグを作æˆã™" "る。" # @return [Tag] #: ../lib/yard/tags/default_factory.rb:32 msgid "a tag object with the tag_name, types and text values filled" msgstr "ã‚¿ã‚°å,åž‹,テキストをå«ã‚“ã ã‚¿ã‚°ã‚ªãƒ–ジェクト" # YARD::Tags::DefaultFactory#parse_tag_with_types_and_name #: ../lib/yard/tags/default_factory.rb:39 msgid "" "Parses tag text and creates a new tag with formally declared types, a key\n" "name and descriptive text" msgstr "" "タグタキストを解æžã—,å½¢å¼çš„ã«å®£è¨€ã•れãŸåž‹ã¨å…±ã«æ–°ã—ã„タグを作æˆã™ã‚‹,\n" "キーåã¨èª¬æ˜Žæ–‡ã€‚" # @return [Tag] #: ../lib/yard/tags/default_factory.rb:44 #: ../lib/yard/tags/default_factory.rb:56 msgid "a tag object with the tag_name, name, types and text values filled" msgstr "ã‚¿ã‚°å,キーå,åž‹,テキストã®å…¥ã£ãŸã‚¿ã‚°ã‚ªãƒ–ジェクト" # YARD::Tags::DefaultFactory#parse_tag_with_types_and_name #: ../lib/yard/tags/default_factory.rb:51 msgid "" "Parses tag text and creates a new tag with formally declared types, a title\n" "on the first line and descriptive text" msgstr "" "タグテキストを解æžã—ã€æ–°ã—ã„タグを作æˆã™ã‚‹ã€‚\n" "å½¢å¼çš„ã«å®£è¨€ã•れãŸåž‹ã€æœ€åˆã®è¡Œã®ã‚¿ã‚¤ãƒˆãƒ«ã€èª¬æ˜Žæ–‡ã‚’用ã„る。" # YARD::Tags::DefaultFactory#extract_name_from_text #: ../lib/yard/tags/default_factory.rb:94 msgid "" "Extracts the name from raw tag text returning the name and remaining value" msgstr "å…ƒã®ã‚¿ã‚°ãƒ†ã‚­ã‚¹ãƒˆã®è¿”ã™åå‰ã‹ã‚‰åå‰ã‚’抽出ã™ã‚‹ã€‚åˆã€æ®‹ã‚Šã®å€¤ã¯æ®‹ã™ã€‚" # @return [Array] #: ../lib/yard/tags/default_factory.rb:98 msgid "" "an array holding the name as the first element and the\n" "value as the second element" msgstr "最åˆã®è¦ç´ ã¯åå‰ã‚’å«ã¿ã€æ¬¡ã®è¦ç´ ã¯æ®‹ã‚Šã®å€¤ã‚’å«ã‚“ã é…列" # YARD::Tags::DefaultFactory#extract_types_and_name_from_text #: ../lib/yard/tags/default_factory.rb:116 msgid "" "Parses a [], <>, {} or () block at the beginning of a line of text\n" "into a list of comma delimited values." msgstr "" "テキスト行ã®å…ˆé ­ã§[],<>,{},()ブロックã®ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸå€¤ã®é…列ã®ä¸­ã‚’è§£æžã™" "ã‚‹\n" # @example #: ../lib/yard/tags/default_factory.rb:125 msgid "" "obj.parse_types('[String, Array, nil]') # => [nil, ['String', " "'Array', 'nil'], \"\"]\n" "obj.parse_types('b A string') # => ['b', ['String'], 'A string']" msgstr "" # @return [Array(String, Array, String)] #: ../lib/yard/tags/default_factory.rb:125 msgid "" "the text before the type\n" "list (or nil), followed by the type list parsed into an array of\n" "strings, followed by the text following the type list." msgstr "" "åž‹ã®é…列ã®å‰ã®ãƒ†ã‚­ã‚¹ãƒˆ(åˆã¯nil)ã€\n" "ç¶šã„ã¦ã€æ–‡å­—列ã®é…列ã®ä¸­ã‚’è§£æžã•れるã“ã¨ã«ã‚ˆã£ã¦å‡¦ç†ã•れる,åž‹ã®ãƒªã‚¹ãƒˆ,\n" "ç¶šã„ã¦ã€åž‹ã®ãƒªã‚¹ãƒˆã‚’フォローã™ã‚‹äº‹ã«ã‚ˆã£ã¦å‡¦ç†ã•れる,テキストをå«ã‚“ã é…列" # YARD::Tags::DefaultTag#defaults #: ../lib/yard/tags/default_tag.rb:5 msgid "Returns the value of attribute defaults" msgstr "デフォルトã®å±žæ€§ã®å€¤ã‚’è¿”ã™" # @return [DefaultTag] #: ../lib/yard/tags/default_tag.rb:6 msgid "a new instance of DefaultTag" msgstr "DefaultTagã‚¯ãƒ©ã‚¹ã®æ–°ã—ã„インスタンス" # YARD::Tags::Directive #: ../lib/yard/tags/directives.rb:6 msgid "" "The base directive class. Subclass this class to create a custom\n" "directive, registering it with {Library.define_directive}. Directive\n" "classes are executed via the {#call} method, which perform all directive\n" "processing on the object." msgstr "" # YARD::Tags::Directive #: ../lib/yard/tags/directives.rb:11 msgid "" "If processing occurs within a handler, the {#handler} attribute is\n" "available to access more information about parsing context and state.\n" "Handlers are only available when parsing from {Parser::SourceParser},\n" "not when parsing directly from {DocstringParser}. If the docstring is\n" "attached to an object declaration, {#object} will be set and available\n" "to modify the generated code object directly. Note that both of these\n" "attributes may be nil, and directives should test their existence\n" "before attempting to use them." msgstr "" # @abstract #: ../lib/yard/tags/directives.rb:22 msgid "Subclasses should implement {#call}." msgstr "" # @see #: ../lib/yard/tags/directives.rb:22 msgid "tag|see|Library.define_directive" msgstr "" # @return [Tag] #: ../lib/yard/tags/directives.rb:24 msgid "the meta-data tag containing data input to the directive" msgstr "" # YARD::Tags::Directive#expanded_text # YARD::Tags::Directive#expanded_text= #: ../lib/yard/tags/directives.rb:27 msgid "" "Set this field to replace the directive definition inside of a docstring\n" "with arbitrary text. For instance, the {MacroDirective} uses this field\n" "to expand its macro data in place of the call to a +@!macro+." msgstr "" # @return [nil] #: ../lib/yard/tags/directives.rb:33 msgid "if no expansion should take place for this directive" msgstr "" # @return [String] #: ../lib/yard/tags/directives.rb:33 msgid "" "the text to expand in the original docstring in place\n" "of this directive definition." msgstr "" # @return [DocstringParser] #: ../lib/yard/tags/directives.rb:37 msgid "" "the parser that is parsing all tag\n" "information out of the docstring" msgstr "" # @return [CodeObjects::Base] #: ../lib/yard/tags/directives.rb:42 msgid "" "the object the parent docstring is\n" "attached to. May be nil." msgstr "" "オブジェクトを返ã™ã€è¦ªã®docstringãŒã‚ªãƒ–ジェクトã«è¿½åŠ ã•れる。\n" "nilã«ãªã‚‹ã‹ã‚‚ã—れãªã„。" # @return [Handlers::Base, nil] #: ../lib/yard/tags/directives.rb:48 msgid "" "the handler object the docstring parser\n" "might be attached to. May be nil. Only available when parsing\n" "through {Parser::SourceParser}." msgstr "" # @return [Section] #: ../lib/yard/tags/directives.rb:54 msgid "a new instance of Directive" msgstr "ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã®æ–°ã—ã„インスタンス" # @param [Symbol] # @param [#to_s] #: ../lib/yard/tags/directives.rb:54 ../lib/yard/tags/library.rb:100 #: ../lib/yard/tags/library.rb:158 msgid "tag|param|tag" msgstr "" # @param [OptionParser] opts #: ../lib/yard/tags/directives.rb:54 msgid "the docstring parser object" msgstr "docstringã®ãƒ‘ーサーオブジェクト" # @return [Adapter Dependent] #: ../lib/yard/tags/directives.rb:54 msgid "the meta-data tag containing all input to the docstring" msgstr "メタデータタグã€docstringã«å…¨ã¦å…¥åŠ›ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚“ã§ã„ã‚‹" # YARD::Tags::Directive#call #: ../lib/yard/tags/directives.rb:63 msgid "" "Called when processing the directive. Subclasses should implement\n" "this method to perform all functionality of the directive." msgstr "" # YARD::Parser::SourceParser.before_parse_list # YARD::Parser::SourceParser.after_parse_list # YARD::Parser::SourceParser.before_parse_file # YARD::Parser::SourceParser.after_parse_file # YARD::Parser::SourceParser.before_parse_list_callbacks # YARD::Parser::SourceParser.after_parse_list_callbacks # YARD::Parser::SourceParser.before_parse_file_callbacks # YARD::Parser::SourceParser.after_parse_file_callbacks #: ../lib/yard/tags/directives.rb:68 ../lib/yard/tags/directives.rb:73 #: ../lib/yard/tags/directives.rb:97 ../lib/yard/tags/directives.rb:98 #: ../lib/yard/tags/directives.rb:120 ../lib/yard/tags/directives.rb:121 #: ../lib/yard/tags/directives.rb:250 ../lib/yard/tags/directives.rb:251 #: ../lib/yard/tags/directives.rb:263 ../lib/yard/tags/directives.rb:268 #: ../lib/yard/tags/directives.rb:273 ../lib/yard/tags/directives.rb:278 #: ../lib/yard/tags/directives.rb:282 ../lib/yard/tags/directives.rb:298 #: ../lib/yard/tags/directives.rb:318 ../lib/yard/tags/directives.rb:350 #: ../lib/yard/tags/directives.rb:351 ../lib/yard/tags/directives.rb:353 #: ../lib/yard/tags/directives.rb:355 ../lib/yard/tags/directives.rb:363 #: ../lib/yard/tags/directives.rb:372 ../lib/yard/tags/directives.rb:376 #: ../lib/yard/tags/directives.rb:385 ../lib/yard/tags/directives.rb:393 #: ../lib/yard/tags/directives.rb:433 ../lib/yard/tags/directives.rb:434 #: ../lib/yard/tags/directives.rb:442 ../lib/yard/tags/directives.rb:448 #: ../lib/yard/tags/directives.rb:458 ../lib/yard/tags/directives.rb:485 #: ../lib/yard/tags/directives.rb:489 ../lib/yard/tags/directives.rb:518 #: ../lib/yard/tags/directives.rb:519 ../lib/yard/tags/directives.rb:552 #: ../lib/yard/tags/directives.rb:553 ../lib/yard/tags/directives.rb:582 #: ../lib/yard/tags/directives.rb:583 msgid "Parser callbacks" msgstr "パーサーã®ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯" # YARD::Server::Adapter#start #: ../lib/yard/tags/directives.rb:68 msgid "" "implement this method to perform all data processing for\n" "the directive." msgstr "ディレクディブ用ã«å…¨ã¦ã®ãƒ‡ãƒ¼ã‚¿å‡¦ç†ã‚’実行ã™ã‚‹ç‚ºã«ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実装ã™ã‚‹" # YARD::Tags::Directive#after_parse #: ../lib/yard/tags/directives.rb:71 msgid "" "Called after parsing all directives and tags in the docstring. Used\n" "to perform any cleanup after all directives perform their main task." msgstr "" # YARD::Tags::EndGroupDirective #: ../lib/yard/tags/directives.rb:79 msgid "" "Ends a group listing definition. Group definition automatically end\n" "when class or module blocks are closed, and defining a new group overrides\n" "the last group definition, but occasionally you need to end the current\n" "group to return to the default listing. Use {tag:!group} to begin a\n" "group listing." msgstr "" # @example #: ../lib/yard/tags/directives.rb:97 msgid "" "class Controller\n" " # @!group Callbacks\n" "\n" " def before_filter; end\n" " def after_filter; end\n" "\n" " # @!endgroup\n" "\n" " def index; end\n" "end" msgstr "" # @see #: ../lib/yard/tags/directives.rb:97 msgid "tag|see|tag:!group" msgstr "" # YARD::Tags::GroupDirective #: ../lib/yard/tags/directives.rb:105 msgid "" "Defines a group listing. All methods (and attributes) seen after this\n" "directive are placed into a group with the given description as the\n" "group name. The group listing is used by templates to organize methods\n" "and attributes into respective logical groups. To end a group listing\n" "use {tag:!endgroup}." msgstr "" # @example #: ../lib/yard/tags/directives.rb:120 msgid "" "# @!group Callbacks\n" "\n" "def before_filter; end\n" "def after_filter; end" msgstr "" # @note #: ../lib/yard/tags/directives.rb:120 msgid "" "A group definition only applies to the scope it is defined in.\n" "If a new class or module is opened after the directive, this directive\n" "will not apply to methods in that class or module." msgstr "" # @see #: ../lib/yard/tags/directives.rb:120 msgid "tag|see|tag:!endgroup" msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:128 msgid "" "Defines a block of text to be expanded whenever the macro is called by name\n" "in subsequent docstrings. The macro data can be any arbitrary text data, be\n" "it regular documentation, meta-data tags or directives." msgstr "" #: ../lib/yard/tags/directives.rb:132 msgid "== Defining a Macro" msgstr "== マクロを定義ã™ã‚‹" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:134 msgid "" "A macro must first be defined in order to be used. Note that a macro is " "also\n" "expanded upon definition if it defined on an object (the docstring of a\n" "method, class, module or constant object as opposed to a free standing\n" "comment). To define a macro, use the \"new\" or \"attach\" identifier in " "the\n" "types specifier list. A macro will also automatically be created if an\n" "indented macro data block is given, so the keywords are not strictly needed." msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:141 msgid "=== Anonymous Macros" msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:143 msgid "" "In addition to standard named macros, macros can be defined anonymously if\n" "no name is given. In this case, they can not be re-used in future " "docstrings,\n" "but they will expand in the first definition. This is useful when needing\n" "to take advantage of the macro expansion variables (described below)." msgstr "" #: ../lib/yard/tags/directives.rb:148 msgid "== Using a Macro" msgstr "== マクロを使ã†" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:150 msgid "" "To re-use a macro in another docstring after it is defined, simply use\n" "@!macro the_name with no indented block of macro data. The " "resulting\n" "data will be expanded in place." msgstr "" #: ../lib/yard/tags/directives.rb:154 msgid "== Attaching a Macro to a DSL Method" msgstr "== DSL(Class)メソッドã«ãƒžã‚¯ãƒ­ã‚’追加ã™ã‚‹" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:156 msgid "" "Macros can be defined to auto-expand on DSL-style class method calls. To\n" "define a macro to be auto expanded in this way, use the \"attach\" keyword\n" "in the type specifier list (\"new\" is implied)." msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:160 msgid "" "Attached macros can also be attached directly on the class method " "declaration\n" "that provides the DSL method to its subclasses. The syntax in either case\n" "is the same." msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:164 msgid "== Macro Expansion Variables" msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:166 msgid "" "In the case of using macros on DSL-style method calls, a number of " "expansion\n" "variables can be used for interpolation inside of the macro data. The " "variables,\n" "similar in syntax to Ruby's global variables, are as follows:" msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:170 msgid "" "* $0 - the method name being called\n" "* $1, $2, $3, ... - the Nth argument in the method call\n" "* $& - the full source line" msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:174 msgid "" "The following example shows what the expansion variables might hold for a " "given\n" "DSL method call:" msgstr "" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:177 msgid "" " property :foo, :a, :b, :c, String\n" " # $0 => \"property\"\n" " # $1 => \"foo\"\n" " # $2 => \"a\"\n" " # $& => \"property :foo, :a, :b, :c, String\"" msgstr "" #: ../lib/yard/tags/directives.rb:183 msgid "=== Ranges" msgstr "=== 範囲" #: ../lib/yard/tags/directives.rb:185 msgid "" "Ranges are also acceptable with the syntax ${N-M}. Negative values\n" "on either N or M are valid, and refer to indexes from the end of the list.\n" "Consider a DSL method that creates a method using the first argument with\n" "argument names following, ending with the return type of the method. This\n" "could be documented as:" msgstr "" "範囲㯠${N-M} ã®æ§‹æ–‡ã§æŒ‡å®šã§ãる。\n" "Nã‚„Mã«ã¯è² ã®å€¤ã‚’指定å¯èƒ½ã§ã€\n" "ãã®å ´åˆãƒªã‚¹ãƒˆã®æœ€å¾Œã‹ã‚‰ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’å‚ç…§ã™ã‚‹ã€‚\n" "最åˆã®å¼•æ•°ã§ãれã«ç¶šã引数åã¨ã¨ã‚‚ã«ä½¿ã‚れã¦ã€\n" "メソッドã®ãƒªã‚¿ãƒ¼ãƒ³ã‚¿ã‚¤ãƒ—ã¨ã¨ã‚‚ã«çµ‚了ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’作るDSLメソッドを考ãˆã‚ˆã†ã€‚\n" "ã“ã‚Œã¯æ¬¡ã®ã‚ˆã†ã«è¨˜è¿°ã§ãる。" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:191 msgid "" " # @!macro dsl_method\n" " # @!method $1(${2--2})\n" " # @return [${-1}] the return value of $0\n" " create_method_with_args :foo, :a, :b, :c, String" msgstr "" #: ../lib/yard/tags/directives.rb:196 msgid "" "As described, the method is using the signature foo(a, b, c) and " "the return\n" "type from the last argument, +String+. When using ranges, tokens are joined\n" "with commas. Note that this includes using $0:" msgstr "" "上記ã®é€šã‚Šã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯ foo(a, b, c) ã®ç”¨æ³•ã¨æœ€å¾Œã®å¼•æ•°ã€\n" "`String`ã‹ã‚‰ã®ãƒªã‚¿ãƒ¼ãƒ³ã‚¿ã‚¤ãƒ—を使ã£ã¦ã„る。\n" "範囲を使ã†ã¨ãã¯ã€ãƒˆãƒ¼ã‚¯ãƒ³ã¯ã‚³ãƒ³ãƒžã§ã¤ãªãŒã‚Œã¦ã„る。\n" "$0を使ã£ãŸå ´åˆã‚’記述ã™ã‚‹ã€‚" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:200 msgid "" " !!!plain\n" " $0-1 # => Interpolates to \"create_method_with_args, foo\"" msgstr "" #: ../lib/yard/tags/directives.rb:203 msgid "" "If you want to separate them with spaces, use $1 $2 $3 $4 .... Note " "that\n" "if the token cannot be expanded, it will return the empty string (not an " "error),\n" "so it would be safe to list $1 $2 ... $10, for example." msgstr "" "ãれらをスペースを用ã„区切りãŸã„å ´åˆã¯ã€$1 $2 $3 $4 ... を使ã†\n" "ç•™æ„ã™ã‚‹äº‹ã¨ã—ã¦ãƒˆãƒ¼ã‚¯ãƒ³ãŒæ‹¡å¼µã§ããªã„å ´åˆã¯\n" "ç©ºã®æ–‡å­—列を返ã™ã ã‚ã†ã€‚(エラーã§ã¯ãªã„)\n" "ãªã®ã§ä¾‹ãˆã°\n" "$1 $2 ... $10 ã®ã‚ˆã†ã«è¨˜è¿°ã™ã‚‹ã¨å®‰å…¨ã ã‚ã†ã€‚" #: ../lib/yard/tags/directives.rb:207 msgid "=== Escaping Interpolation" msgstr "=== 補間をエスケープã™ã‚‹" #: ../lib/yard/tags/directives.rb:209 msgid "Interpolation can be escaped by prefixing the +$+ with +\\+, like so:" msgstr "補間文字をエスケープã™ã‚‹ã«ã¯ã€ä¸‹ã®æ§˜ã« +$+ ã®å‰ã« +\\+ ç½®ã事ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™ã‚‹ã€‚" # YARD::Tags::MacroDirective #: ../lib/yard/tags/directives.rb:211 msgid "" " # @!macro foo\n" " # I have \\$2.00 USD." msgstr "" # @example Defining a simple macro #: ../lib/yard/tags/directives.rb:250 msgid "" "# @!macro [new] returnself\n" "# @return [self] returns itself" msgstr "" # @example Using a simple macro in multiple docstrings #: ../lib/yard/tags/directives.rb:250 msgid "" "# Documentation for map\n" "# ...\n" "# @macro returnself\n" "def map; end\n" "\n" "# Documentation for filter\n" "# ...\n" "# @macro returnself\n" "def filter; end" msgstr "" # @example Attaching a macro directly to a DSL method #: ../lib/yard/tags/directives.rb:250 msgid "" "class Post < Resource\n" " # @!macro [attach] property\n" " # @return [$2] the $1 property\n" " property :title, String\n" "\n" " # Macro will expand on this definition too\n" " property :view_count, Integer\n" "end" msgstr "" # @example Attaching a macro to a class method (for DSL usage) #: ../lib/yard/tags/directives.rb:250 msgid "" "class Resource\n" " # Defines a new property\n" " # @param [String] name the property name\n" " # @param [Class] type the property's type\n" " # @!macro [attach] property\n" " # @return [$2] the $1 property\n" " def self.property(name, type) end\n" "end\n" "\n" "class Post < Resource\n" " property :title, String\n" " property :view_count, Integer\n" "end" msgstr "" # @example #: ../lib/yard/tags/directives.rb:250 msgid "tag|example|Attaching a macro directly to a DSL method" msgstr "tag|example|DSLメソッドã«ç›´æŽ¥ãƒžã‚¯ãƒ­ã‚’追加ã™ã‚‹" # @example #: ../lib/yard/tags/directives.rb:250 msgid "tag|example|Attaching a macro to a class method (for DSL usage)" msgstr "tag|example|クラスメソッドã«ãƒžã‚¯ãƒ­ã‚’追加ã™ã‚‹(DSL使用)" # @example #: ../lib/yard/tags/directives.rb:250 msgid "tag|example|Defining a simple macro" msgstr "tag|example|ç°¡å˜ãªãƒžã‚¯ãƒ­å®šç¾©" # @example #: ../lib/yard/tags/directives.rb:250 msgid "tag|example|Using a simple macro in multiple docstrings" msgstr "tag|example|複数ã®docstringã®ä¸­ã®å˜ç´”åマクロを使ã†" # YARD::Tags::MethodDirective #: ../lib/yard/tags/directives.rb:327 msgid "" "Defines a method object with a given method signature, using indented\n" "block data as the method's docstring. The signature is similar to the\n" "{tag:overload} tag. The comment containing this directive does not need\n" "to be attached to any source, but if it is, that source code will be\n" "used as the method's source." msgstr "" # YARD::Tags::MethodDirective #: ../lib/yard/tags/directives.rb:333 msgid "To define an attribute method, see {tag:!attribute}" msgstr "" # @example Attaching multiple methods to the same source #: ../lib/yard/tags/directives.rb:350 msgid "" "# @!method method1\n" "# @!method method2\n" "create_methods :method1, :method2" msgstr "" # @example Defining a simple method #: ../lib/yard/tags/directives.rb:350 msgid "" "# @!method quit(username, message = \"Quit\")\n" "# Sends a quit message to the server for a +username+.\n" "# @param [String] username the username to quit\n" "# @param [String] message the quit message\n" "quit_message_method" msgstr "" # @note #: ../lib/yard/tags/directives.rb:350 msgid "" "For backwards compatibility support, you do not need to indent\n" "the method's docstring text. If a +@!method+ directive is seen with\n" "no indented block, the entire docstring is used as the new method's\n" "docstring text." msgstr "" # @example #: ../lib/yard/tags/directives.rb:350 msgid "tag|example|Attaching multiple methods to the same source" msgstr "tag|example|åŒã˜ã‚½ãƒ¼ã‚¹ã«è¤‡æ•°ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’追加ã™ã‚‹" # @example #: ../lib/yard/tags/directives.rb:350 msgid "tag|example|Defining a simple method" msgstr "tag|example|ç°¡å˜ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã™ã‚‹" # @see #: ../lib/yard/tags/directives.rb:350 msgid "tag|see|tag:!attribute" msgstr "" # YARD::Tags::AttributeDirective #: ../lib/yard/tags/directives.rb:413 msgid "" "Defines an attribute with a given name, using indented block data as the\n" "attribute's docstring. If the type specifier is supplied with \"r\", \"w\", " "or\n" "\"rw\", the attribute is made readonly, writeonly or readwrite " "respectively.\n" "A readwrite attribute is the default, if no type is specified. The comment\n" "containing this directive does not need to be attached to any source, but\n" "if it is, that source code will be used as the method's source." msgstr "" # YARD::Tags::AttributeDirective #: ../lib/yard/tags/directives.rb:420 msgid "To define an regular method, see {tag:!method}" msgstr "" # @example Defining a simple readonly attribute #: ../lib/yard/tags/directives.rb:433 msgid "" "# @!attribute [r] count\n" "# @return [Fixnum] the size of the list" msgstr "" # @example Defining a simple readwrite attribute #: ../lib/yard/tags/directives.rb:433 msgid "" "# @!attribute name\n" "# @return [String] the name of the user" msgstr "" # @note #: ../lib/yard/tags/directives.rb:433 msgid "" "For backwards compatibility support, you do not need to indent\n" "the attribute's docstring text. If an +@!attribute+ directive is seen with\n" "no indented block, the entire docstring is used as the new attribute's\n" "docstring text." msgstr "" # @example #: ../lib/yard/tags/directives.rb:433 msgid "tag|example|Defining a simple readonly attribute" msgstr "tag|example|readonly属性を簡å˜ã«å®šç¾©ã™ã‚‹" # @example #: ../lib/yard/tags/directives.rb:433 msgid "tag|example|Defining a simple readwrite attribute" msgstr "tag|example|readwrite属性を簡å˜ã«å®šç¾©ã™ã‚‹" # @see #: ../lib/yard/tags/directives.rb:433 msgid "tag|see|tag:!method" msgstr "" # YARD::Tags::ParseDirective #: ../lib/yard/tags/directives.rb:495 msgid "" "Parses a block of code as if it were present in the source file at that\n" "location. This directive is useful if a class has dynamic meta-programmed\n" "behaviour that cannot be recognized by YARD." msgstr "" # YARD::Tags::ParseDirective #: ../lib/yard/tags/directives.rb:499 msgid "" "You can specify the language of the code block using the types\n" "specification list. By default, the code language is \"ruby\"." msgstr "" # @example Parsing C code #: ../lib/yard/tags/directives.rb:518 msgid "" "# @!parse [c]\n" "# void Init_Foo() {\n" "# rb_define_method(rb_cFoo, \"method\", method, 0);\n" "# }" msgstr "" # @example Declaring a method as an attribute #: ../lib/yard/tags/directives.rb:518 msgid "" "# This should really be an attribute\n" "# @!parse attr_reader :foo\n" "def object; @parent.object end" msgstr "" # @example Documenting dynamic module inclusion #: ../lib/yard/tags/directives.rb:518 msgid "" "class User\n" " # includes \"UserMixin\" and extends \"UserMixin::ClassMethods\"\n" " # using the UserMixin.included callback.\n" " # @!parse include UserMixin\n" " # @!parse extend UserMixin::ClassMethods\n" "end" msgstr "" # @example #: ../lib/yard/tags/directives.rb:518 msgid "tag|example|Declaring a method as an attribute" msgstr "tag|example|属性ã¨ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã‚’宣言ã™ã‚‹" # @example #: ../lib/yard/tags/directives.rb:518 msgid "tag|example|Documenting dynamic module inclusion" msgstr "tag|example|å‹•çš„ã«ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«å«æœ‰ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’作æˆã™ã‚‹" # @example #: ../lib/yard/tags/directives.rb:518 msgid "tag|example|Parsing C code" msgstr "tag|example|Cã®ã‚³ãƒ¼ãƒ‰ã‚’è§£æžã™ã‚‹" # YARD::Tags::ScopeDirective #: ../lib/yard/tags/directives.rb:536 msgid "" "Modifies the current parsing scope (class or instance). If this\n" "directive is defined on a docstring attached to an object definition,\n" "it is applied only to that object. Otherwise, it applies the scope\n" "to all future objects in the namespace." msgstr "" # @example Modifying the scope of a set of methods #: ../lib/yard/tags/directives.rb:552 msgid "" "# @!scope class\n" "\n" "# Documentation for method1\n" "def method1; end\n" "\n" "# Documentation for method2\n" "def method2; end" msgstr "" # @example Modifying the scope of a DSL method #: ../lib/yard/tags/directives.rb:552 msgid "" "# @!scope class\n" "cattr_accessor :subclasses" msgstr "" # @example #: ../lib/yard/tags/directives.rb:552 msgid "tag|example|Modifying the scope of a DSL method" msgstr "tag|example|DSLメソッドã®ã‚¹ã‚³ãƒ¼ãƒ—を変更ã™ã‚‹" # @example #: ../lib/yard/tags/directives.rb:552 msgid "tag|example|Modifying the scope of a set of methods" msgstr "tag|example|メソッドã®ã‚°ãƒ«ãƒ¼ãƒ—ã®ã‚¹ã‚³ãƒ¼ãƒ—を変更ã™ã‚‹" # YARD::Tags::VisibilityDirective #: ../lib/yard/tags/directives.rb:565 msgid "" "Modifies the current parsing visibility (public, protected, or private).\n" "If this directive is defined on a docstring attached to an object\n" "definition, it is applied only to that object. Otherwise, it applies\n" "the visibility to all future objects in the namespace." msgstr "" # @example Modifying the visibility of a DSL method #: ../lib/yard/tags/directives.rb:582 msgid "" "# @!visibility private\n" "cattr_accessor :subclasses" msgstr "" # @example Modifying the visibility of a set of methods #: ../lib/yard/tags/directives.rb:582 msgid "" "# Note that Ruby's \"protected\" is recommended over this directive\n" "# @!visibility protected\n" "\n" "# Documentation for method1\n" "def method1; end\n" "\n" "# Documentation for method2\n" "def method2; end" msgstr "" # @example #: ../lib/yard/tags/directives.rb:582 msgid "tag|example|Modifying the visibility of a DSL method" msgstr "tag|example|DSLメソッドã®å¯è¦–性を変更ã™ã‚‹" # @example #: ../lib/yard/tags/directives.rb:582 msgid "tag|example|Modifying the visibility of a set of methods" msgstr "tag|example|メソッドã®ã‚°ãƒ«ãƒ¼ãƒ—ã®å¯è¦–性を変更ã™ã‚‹" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:4 msgid "" "Keeps track of all the registered meta-data tags and directives.\n" "Also allows for defining of custom tags and customizing the tag parsing\n" "syntax." msgstr "" # YARD::CLI::Yardoc #: ../lib/yard/tags/library.rb:8 msgid "== Defining Custom Meta-Data Tags" msgstr "== カスタムメタデータタグを定義ã™ã‚‹" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:10 msgid "" "To define a custom tag, use {define_tag}. You should pass the tag\n" "name and the factory method to use when creating the tag. If you do not\n" "provide a factory method to use, it will default to " "{DefaultFactory#parse_tag}" msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:14 msgid "" "You can also define tag objects manually by simply implementing a " "\"tagname_tag\"\n" "method that returns a {Tag} object, but they will not take advantage of tag " "factory\n" "parsing:" msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:18 msgid "" " def mytag_tag(text)\n" " Tag.new(:mytag, text)\n" " end" msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:22 msgid "== Defining Custom Directives" msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:24 msgid "" "Directives can be defined by calling the {define_directive} method, taking\n" "the directive name, an optional tag factory parser method (to parse the\n" "data in the directive into a temporary {Tag} object) and a {Directive} " "subclass\n" "that performs the directive processing. For more information on creating a\n" "Directive subclass, see the {Directive} class documentation." msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:30 msgid "" "Similar to tags, Directives can also be defined manually, in this case " "using\n" "the method name \"mydirective_directive\" and returning a new {Directive} " "object:" msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:33 msgid "" " def mydirective_directive(tag, parser)\n" " MyDirective.new(tag, parser)\n" " end" msgstr "" # YARD::Tags #: ../lib/yard/tags/library.rb:37 msgid "== Namespaced Tags" msgstr "== Namespaceã‚¿ã‚°" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:39 msgid "" "In YARD 0.8.0+, tags can be namespaced using the '.' character. It is " "recommended\n" "to namespace project specific tags, like +@yard.tag_name+, so that tags do " "not\n" "collide with other plugins or new built-in tags." msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:43 msgid "== Adding/Changing the Tag Syntax" msgstr "" # YARD::Tags::Library #: ../lib/yard/tags/library.rb:45 msgid "" "If you have specialized tag parsing needs you can substitute the {#factory}\n" "object with your own by setting {Library.default_factory= Library." "default_factory}\n" "to a new class with its own parsing methods before running YARD. This is " "useful\n" "if you want to change the syntax of existing tags (@see, @since, etc.)" msgstr "" "== 追加や変更ã®ã‚¿ã‚°æ§‹æ–‡\n" "ã‚ãªãŸãŒã€å°‚用ã®ã‚¿ã‚°è§£æžãŒå¿…è¦ãªå ´åˆã€\n" "自分ã§{Library.default_factory= Library.default_factory}ã‚’\n" "YARDãŒèµ·å‹•ã™ã‚‹å‰ã«è‡ªèº«ã‚’è§£æžã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„\n" "æ–°ã—ã„クラスã«è¨­å®šã™ã‚‹äº‹ã«ã‚ˆã£ã¦\n" "{#factory} オブジェクトを代替ã§ãã‚‹\n" "ã“れã¯ã€æ—¢ã«å­˜åœ¨ã™ã‚‹ã‚¿ã‚°(@see,@sinceç­‰)構文を変更ã—ãŸã„å ´åˆã€ä¾¿åˆ©ã§ã‚る。" # @example Defining a custom directive #: ../lib/yard/tags/library.rb:58 msgid "define_directive :method, :with_title_and_text, MethodDirective" msgstr "" # @example Defining a custom tag #: ../lib/yard/tags/library.rb:58 msgid "" "define_tag \"Parameter\", :param, :with_types_and_name\n" "define_tag \"Author\", :author" msgstr "" # @example #: ../lib/yard/tags/library.rb:58 msgid "tag|example|Defining a custom directive" msgstr "tag|example|カスタムディレクティブを定義ã™ã‚‹" # @example #: ../lib/yard/tags/library.rb:58 msgid "tag|example|Defining a custom tag" msgstr "tag|example|カスタムタグを定義ã™ã‚‹" # @see #: ../lib/yard/tags/library.rb:58 ../lib/yard/tags/library.rb:84 msgid "tag|see|DefaultFactory" msgstr "" # @see #: ../lib/yard/tags/library.rb:58 msgid "tag|see|Directive" msgstr "" # @see #: ../lib/yard/tags/library.rb:58 msgid "tag|see|define_directive" msgstr "" # @see #: ../lib/yard/tags/library.rb:58 msgid "tag|see|define_tag" msgstr "" # @return [SymbolHash{Symbol=>String}] #: ../lib/yard/tags/library.rb:62 msgid "" "the map of tag names and their\n" "respective display labels." msgstr "" # @return [NamespaceObject] #: ../lib/yard/tags/library.rb:66 msgid "the main Library instance object." msgstr "メインライブライリã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚ªãƒ–ジェクト" # YARD::Tags::Library.default_factory= #: ../lib/yard/tags/library.rb:71 msgid "" "Replace the factory object responsible for parsing tags by setting\n" "this to an object (or class) that responds to +parse_TAGNAME+ methods\n" "where +TAGNAME+ is the name of the tag." msgstr "" "+TAGNAME+ ãŒã‚¿ã‚°ã®åå‰ã¨ãªã‚‹å‡¦ç†ã®æ‰€ã§ã€\n" "+parse_TAGNAME+ メソッドã«é–¢é€£ã™ã‚‹ã‚ªãƒ–ジェクト(åˆã¯,クラス)ã®ç‚ºã«ã€\n" "ã“れを設定ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã‚¿ã‚°ã‚’è§£æžã™ã‚‹ãƒ™ãƒ¼ã‚¹ã§ã‚ã‚‹factoryオブジェクトを変更ã™" "る。" # YARD::Tags::Library.default_factory= #: ../lib/yard/tags/library.rb:75 msgid "" "You should set this value before performing any source parsing with\n" "YARD, otherwise your factory class will not be used." msgstr "" "ã‚ãªãŸã¯YARDã«ã‚ˆã£ã¦ä½•らã‹ã®ã‚½ãƒ¼ã‚¹ã®è§£æžã‚’実行ã™ã‚‹å‰ã«ã€ã“ã®å€¤ã‚’設定ã—ãªã‘れ" "ã°ãªã‚‰ãªã„。\n" "設定ã—ãªã„å ´åˆã€ã‚ãªãŸã®factoryクラスã¯åˆ©ç”¨ã§ããªã„。" # @example #: ../lib/yard/tags/library.rb:84 msgid "YARD::Tags::Library.default_factory = MyFactory" msgstr "" # @param [Class, Object] #: ../lib/yard/tags/library.rb:84 msgid "tag|param|factory" msgstr "" # @param [Class, Object] factory #: ../lib/yard/tags/library.rb:84 msgid "the factory that parses all tags" msgstr "å…¨ã¦ã®ã‚¿ã‚°ã‚’è§£æžã™ã‚‹ãƒ•ァクトリー" # YARD::Tags::Library.factory_method_for #: ../lib/yard/tags/library.rb:93 msgid "" "Returns the factory method used to parse the tag text for a specific tag" msgstr "" "特定ã®ã‚¿ã‚°ç”¨ã®ã‚¿ã‚°ãƒ†ã‚­ã‚¹ãƒˆã‚’è§£æžã™ã‚‹ã®ã«ã€åˆ©ç”¨ã•れるファクトリーメソッドを返" "ã™ã€‚" # @return [nil] #: ../lib/yard/tags/library.rb:100 ../lib/yard/tags/library.rb:113 msgid "if the tag is freeform text" msgstr "ã‚¿ã‚°ãŒãƒ•リーフォームテキストã®å ´åˆ" # @return [Class] #: ../lib/yard/tags/library.rb:100 msgid "" "the Tag class to use to parse the tag\n" "or the method to call on the factory class" msgstr "ファクトリークラスã§å‘¼ã³å‡ºã™ã‚¿ã‚°ã‚„メソッドを解æžã—利用ã™ã‚‹ç‚ºã®ã‚¿ã‚°ã‚¯ãƒ©ã‚¹" # @return [Symbol] #: ../lib/yard/tags/library.rb:100 ../lib/yard/tags/library.rb:113 msgid "the factory method name for the tag" msgstr "ã‚¿ã‚°ã®ç‚ºã®factoryメソッドå" # YARD::Tags::Library.factory_method_for #: ../lib/yard/tags/library.rb:105 msgid "" "Returns the factory method used to parse the tag text for a specific\n" "directive" msgstr "" "特定ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–用ã«\n" "タグテキストを解æžã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れãŸãƒ•ァクトリーメソッドを返ã™" # @param [Boolean] #: ../lib/yard/tags/library.rb:113 msgid "tag|param|directive" msgstr "" # @return [Class] #: ../lib/yard/tags/library.rb:113 msgid "" "the Tag class to use to parse the tag or\n" "the methods to call on the factory class" msgstr "" "ファクトリークラスã§å‘¼ã³å‡ºã™ç‚ºã«\n" "タグやメソッドを解æžã—利用ã™ã‚‹ç‚ºã®ã‚¿ã‚°ã‚¯ãƒ©ã‚¹" # @param [String, Symbol] section #: ../lib/yard/tags/library.rb:113 msgid "the directive name" msgstr "ディレクティブå" # YARD::Tags::Library.visible_tags # YARD::Tags::Library.visible_tags= #: ../lib/yard/tags/library.rb:118 msgid "" "Sets the list of tags to display when rendering templates. The order of\n" "tags in the list is also significant, as it represents the order that\n" "tags are displayed in templates." msgstr "" "テンプレートをレンダリングã™ã‚‹æ™‚ã€\n" "表示ã™ã‚‹ç‚ºã«ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã‚’セットã™ã‚‹ã€‚\n" "リストã®ä¸­ã®ã‚¿ã‚°ã®é †ç•ªã¯é‡è¦ã§ã‚る。\n" "ã“れã¯ã€ã‚¿ã‚°ãŒãƒ†ãƒ³ãƒ—レートã®ä¸­ã§è¡¨ç¤ºã•れる順番を表ã™ã€‚" # YARD::Tags::Library.visible_tags # YARD::Tags::Library.visible_tags= #: ../lib/yard/tags/library.rb:122 msgid "" "You can use the {Array#place} to insert new tags to be displayed in\n" "the templates at specific positions:" msgstr "" "特定ã®å ´æ‰€ã§ãƒ†ãƒ³ãƒ—レートã®ä¸­ã§ã€\n" "表示ã•れる新ã—ã„タグを挿入ã™ã‚‹ç‚ºã«{Array#place}メソッドを利用ã§ãる。" # YARD::Tags::Library.visible_tags # YARD::Tags::Library.visible_tags= #: ../lib/yard/tags/library.rb:125 msgid " Library.visible_tags.place(:mytag).before(:return)" msgstr "" # @return [Array] #: ../lib/yard/tags/library.rb:128 msgid "a list of ordered tags" msgstr "命令ã•れるタグã®ãƒªã‚¹ãƒˆ" # YARD::Tags::Library.transitive_tags # YARD::Tags::Library.transitive_tags= #: ../lib/yard/tags/library.rb:131 msgid "" "Sets the list of tags that should apply to any children inside the\n" "namespace they are defined in. For instance, a \"@since\" tag should\n" "apply to all methods inside a module it is defined in. Transitive\n" "tags can be overridden by directly defining a tag on the child object." msgstr "" "定義ã•れるnamespaceã®å†…部ã§ä»»æ„ã®å­ã‚’é©ç”¨ã—ã‚¿ã‚°ã®ãƒªã‚¹ãƒˆã‚’グループ化ã™ã¹ãã§ã‚" "る。\n" "例ãˆã°ã€\"@since\"ã‚¿ã‚°ã¯ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®å†…部ã§å®šç¾©ã•れる全ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒé©ç”¨ã•" "れる。\n" "éŽæ¸¡çš„ãªã‚¿ã‚°ã¯ã€å­ã®ã‚ªãƒ–ジェクトã®ä¸Š(親)ã®ã‚¿ã‚°ã‚’直接定義ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ä¸Šæ›¸ã" "ã§ãる。" # @return [Array] #: ../lib/yard/tags/library.rb:137 msgid "a list of transitive tags" msgstr "éŽæ¸¡çš„ãªã‚¿ã‚°ã®ãƒªã‚¹ãƒˆ" # YARD::Tags::Library.sorted_labels #: ../lib/yard/tags/library.rb:140 msgid "" "Sorts the labels lexically by their label name, often used when displaying\n" "the tags." msgstr "" "ラベルをãã®ãƒ©ãƒ™ãƒ«åã«ã‚ˆã£ã¦ã‚½ãƒ¼ãƒˆã™ã‚‹ã€‚\n" "タグを表示ã™ã‚‹æ™‚ã«ã€ã‚ˆã利用ã•れる。" # @return [Array, String] #: ../lib/yard/tags/library.rb:143 msgid "the sorted labels as an array of the tag name and label" msgstr "ソートã•れるタグåやラベルã®é…列" # YARD::Tags::Library.define_tag #: ../lib/yard/tags/library.rb:148 msgid "" "Convenience method to define a new tag using one of {Tag}'s factory methods, " "or the\n" "regular {DefaultFactory#parse_tag} factory method if none is supplied." msgstr "" "{Tag}factoryメソッドã®ä¸€ã¤ã«ã‚ˆã£ã¦æ–°ã—ã„タグを定義ã™ã‚‹ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰ã€\n" "åˆã€æä¾›ã•れãªã„å ´åˆã€æ­£è¦ã®{DefaultFactory#parse_tag}メソッド" # @param [Fixnum] #: ../lib/yard/tags/library.rb:158 msgid "tag|param|label" msgstr "" # @param [#to_s, Class] # @param [CodeObjects::MethodObject] #: ../lib/yard/tags/library.rb:158 #: ../lib/yard/templates/helpers/html_helper.rb:430 #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "tag|param|meth" msgstr "" # @param [#to_s] label #: ../lib/yard/tags/library.rb:158 msgid "the label used when displaying the tag in templates" msgstr "" # @param [#to_s] tag #: ../lib/yard/tags/library.rb:158 msgid "the tag name to create" msgstr "作æˆã™ã‚‹ã‚¿ã‚°å" # @param [#to_s, Class] meth #: ../lib/yard/tags/library.rb:158 msgid "" "the {Tag} factory method to call when\n" "creating the tag or the name of the class to directly create a tag for" msgstr "" "タグや直接タグを作æˆã™ã‚‹ã‚¯ãƒ©ã‚¹ã®åå‰ã‚’作æˆã™ã‚‹æ™‚ã€å‘¼ã³å‡ºã™factoryメソッドã®" "{Tag}" # @overload #: ../lib/yard/tags/library.rb:196 msgid "tag|overload|define_directive" msgstr "" # YARD::Tags::Library#factory # YARD::Tags::Library#factory= #: ../lib/yard/tags/library.rb:258 msgid "" "A factory class to handle parsing of tags, defaults to {default_factory}" msgstr "" "ã‚¿ã‚°ã®è§£æžã‚’æ“作ã™ã‚‹factoryクラスã€ãƒ‡ãƒ•ォルトã¯{default_factory}ã¨ãªã‚‹ã€‚" # @return [Library] #: ../lib/yard/tags/library.rb:260 msgid "a new instance of Library" msgstr "ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æ–°ã—ã„インスタンス" # @param tag_name #: ../lib/yard/tags/library.rb:267 ../lib/yard/tags/library.rb:280 msgid "the name of the tag to look for" msgstr "検索ã™ã‚‹ç‚ºã®ã‚¿ã‚°ã®åå‰" # @return [Boolean] #: ../lib/yard/tags/library.rb:267 msgid "" "whether a tag by the given name is registered in\n" "the library." msgstr "" # YARD::CodeObjects::CodeObjectList#initialize #: ../lib/yard/tags/library.rb:272 msgid "Creates a new {Tag} object with a given tag name and data" msgstr "与ãˆã‚‰ã‚ŒãŸã‚¿ã‚°åã¨ãƒ‡ãƒ¼ã‚¿ã‚’ç”¨ã„æ–°ã—ã„ {Tag} オブジェクトを作æˆã™ã‚‹ã€‚" # @return [Base] # @return [MacroObject] #: ../lib/yard/tags/library.rb:273 msgid "the newly created tag object" msgstr "æ–°ãŸã«ä½œæˆã•れãŸã‚ªãƒ–ジェクト" # @return [Boolean] #: ../lib/yard/tags/library.rb:280 msgid "" "whether a directive by the given name is registered in\n" "the library." msgstr "" # YARD::Docstring#initialize #: ../lib/yard/tags/library.rb:285 msgid "" "Creates a new directive with tag information and a docstring parser\n" "object." msgstr "タグ情報ã¨docstringãƒ‘ãƒ¼ã‚µãƒ¼ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’ç”¨ã„æ–°ã—ã„ディレクティブを作æˆã™ã‚‹" # @return [String] #: ../lib/yard/tags/library.rb:290 ../lib/yard/tags/tag.rb:14 msgid "the name of the tag" msgstr "ã‚¿ã‚°ã®åå‰" # @return [Base] # @return [MacroObject] #: ../lib/yard/tags/library.rb:290 msgid "the newly created directive" msgstr "æ–°ãŸã«ä½œæˆã•れãŸãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–" # @return [CodeObjects::Base] #: ../lib/yard/tags/library.rb:290 msgid "the parser object parsing the docstring" msgstr "パーサーオブジェクトã€docstringã‚’è§£æžã™ã‚‹" # @param [Symbol] tag # @param [String] tag_name # @param [String] name #: ../lib/yard/tags/library.rb:290 msgid "the tag data" msgstr "タグデータ" #: ../lib/yard/tags/library.rb:312 msgid "" "# @abstract Subclass and override {#run} to implement\n" "# a custom Threadable class.\n" "class Runnable\n" " def run; raise NotImplementedError end\n" "end" msgstr "" # @yard.tag abstract #: ../lib/yard/tags/library.rb:312 msgid "[] Abstract" msgstr "" # @param [Boolean] #: ../lib/yard/tags/library.rb:312 msgid "tag|yard.tag|abstract" msgstr "" #: ../lib/yard/tags/library.rb:313 msgid "" "Marks a class/module/method as abstract with optional\n" "implementor information." msgstr "ä»»æ„ã®å®Ÿè£…情報をã¨ä¸€ç·’ã«ç”¨ã„概è¦ã¨ã—ã¦class/module/methodをマークã™ã‚‹" #: ../lib/yard/tags/library.rb:327 msgid "" "The special name +@api private+ does display a notice in\n" "documentation if it is listed, letting users know that the\n" "method is not to be used by external components." msgstr "" "特別ãªåå‰ã® +@api private+ ã¯\n" "ãれãŒè¨˜è¿°ã•れãŸå ´åˆãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¸­ã§é€šçŸ¥ã‚’表示ã™ã‚‹ã‚ˆã†ã«ãªã‚Š\n" "ユーザーã«ãƒ¡ã‚½ãƒƒãƒ‰ãŒå¤–éƒ¨ã®æ§‹æˆè¦ç´ ã«ã‚ˆã£ã¦ä½¿ãˆãªã„ã“ã¨ã‚’知らã›ã‚‹ã€‚" # @note #: ../lib/yard/tags/library.rb:327 ../lib/yard/tags/library.rb:473 #: ../lib/yard/tags/library.rb:518 msgid "" "This tag is *transitive*. If it is applied on a\n" "namespace (module or class), it will automatically be\n" "applied to all children objects of that namespace unless\n" "it is redefined on the child object." msgstr "" # @yard.tag api #: ../lib/yard/tags/library.rb:327 msgid "[] API Visibility" msgstr "" # @example #: ../lib/yard/tags/library.rb:327 msgid "" "class Post\n" " # @api private\n" " def reset_table!; table.flush end\n" "end" msgstr "" # @param [Boolean] #: ../lib/yard/tags/library.rb:327 msgid "tag|yard.tag|api" msgstr "" #: ../lib/yard/tags/library.rb:328 msgid "" "Declares the API that the object belongs to. Does not display in\n" "output, but useful for performing queries (+yardoc --query+). Any text is\n" "allowable in this tag, and there are no predefined values." msgstr "" "オブジェクトãŒå±žã™ã‚‹APIを宣言ã™ã‚‹ã€‚\n" "出力を表示ã§ããªã„ãŒã€ã‚¯ã‚¨ãƒªãƒ¼ã®å®Ÿè¡Œç”¨ã«ä¾¿åˆ©ã§ã‚ã‚‹(+yardoc --query+)。\n" "ä»»æ„ã®ãƒ†ã‚­ã‚¹ãƒˆã¯\n" "ã“ã®ã‚¿ã‚°ã‚’å—å…¥å¯èƒ½ã§ã‚りã€äº‹å‰å®šç¾©ã•れãŸå€¤ã¯ãªã„。" # @example #: ../lib/yard/tags/library.rb:337 msgid "" "# @attr [String] name the name of the structure\n" "# @attr [Fixnum] size the size of the structure\n" "class MyStruct < Struct; end" msgstr "" # YARD::Handlers::Base #: ../lib/yard/tags/library.rb:337 msgid "Attribute" msgstr "属性" # @note #: ../lib/yard/tags/library.rb:337 ../lib/yard/tags/library.rb:347 #: ../lib/yard/tags/library.rb:357 msgid "This attribute is only applicable on class docstrings" msgstr "" # @deprecated #: ../lib/yard/tags/library.rb:337 ../lib/yard/tags/library.rb:347 #: ../lib/yard/tags/library.rb:357 msgid "Use the more powerful {tag:!attribute} directive instead." msgstr "" # @param [String] # @param [Array] # @param [String, :root] #: ../lib/yard/tags/library.rb:337 msgid "tag|yard.tag|attr" msgstr "" # YARD::Tags::Library#attr_tag #: ../lib/yard/tags/library.rb:338 msgid "Declares a readwrite attribute on a Struct or class." msgstr "" # @example #: ../lib/yard/tags/library.rb:347 ../lib/yard/tags/library.rb:357 msgid "" "# @attr_reader [String] name the name of the structure\n" "# @attr_reader [Fixnum] size the size of the structure\n" "class MyStruct < Struct; end" msgstr "" # YARD::Server::Commands::Base#request # YARD::Server::Commands::Base#request= # YARD::Server::Commands::Base#path # YARD::Server::Commands::Base#path= # YARD::Server::Commands::Base#headers # YARD::Server::Commands::Base#headers= # YARD::Server::Commands::Base#status # YARD::Server::Commands::Base#status= # YARD::Server::Commands::Base#body # YARD::Server::Commands::Base#body= #: ../lib/yard/tags/library.rb:347 msgid "Attribute Getter" msgstr "Getter属性" # @param [Boolean] #: ../lib/yard/tags/library.rb:347 msgid "tag|yard.tag|attr_reader" msgstr "" # YARD::Tags::Library#attr_reader_tag #: ../lib/yard/tags/library.rb:348 msgid "Declares a readonly attribute on a Struct or class." msgstr "" # YARD::Server::Commands::Base#request # YARD::Server::Commands::Base#request= # YARD::Server::Commands::Base#path # YARD::Server::Commands::Base#path= # YARD::Server::Commands::Base#headers # YARD::Server::Commands::Base#headers= # YARD::Server::Commands::Base#status # YARD::Server::Commands::Base#status= # YARD::Server::Commands::Base#body # YARD::Server::Commands::Base#body= #: ../lib/yard/tags/library.rb:357 msgid "Attribute Setter" msgstr "Setter属性" # @param [String] #: ../lib/yard/tags/library.rb:357 msgid "tag|yard.tag|attr_writer" msgstr "" # YARD::Tags::Library#attr_writer_tag #: ../lib/yard/tags/library.rb:358 msgid "Declares a writeonly attribute on a Struct or class." msgstr "" # @example #: ../lib/yard/tags/library.rb:364 msgid "" "# @author Foo Bar \n" "class MyClass; end" msgstr "" # @yard.tag author #: ../lib/yard/tags/library.rb:364 msgid "[] Author" msgstr "" # @param [String] #: ../lib/yard/tags/library.rb:364 msgid "tag|yard.tag|author" msgstr "" #: ../lib/yard/tags/library.rb:365 msgid "List the author or authors of a class, module, or method." msgstr "著者やクラス,モジュール,メソッドã®è‘—者を記述ã™ã‚‹" # @example Deprecate a method with a replacement API #: ../lib/yard/tags/library.rb:380 msgid "" "# @deprecated Use {#bar} instead.\n" "def foo; end" msgstr "" # @yard.tag deprecated #: ../lib/yard/tags/library.rb:380 msgid "[] Deprecated" msgstr "" # @example Deprecate a method with no replacement #: ../lib/yard/tags/library.rb:380 msgid "" "class Thread\n" " # @deprecated Exiting a thread in this way is not reliable and\n" " # can cause a program crash.\n" " def kill; end\n" "end" msgstr "" # @example #: ../lib/yard/tags/library.rb:380 msgid "tag|example|Deprecate a method with a replacement API" msgstr "tag|example|ç½®æ›APIを用ã„メソッドをメソッドを廃止ã™ã‚‹" # @example #: ../lib/yard/tags/library.rb:380 msgid "tag|example|Deprecate a method with no replacement" msgstr "tag|example|ç½®æ›APIを用ã„ãªã„ã§ãƒ¡ã‚½ãƒƒãƒ‰ã‚’廃止ã™ã‚‹" # @param [Boolean] #: ../lib/yard/tags/library.rb:380 msgid "tag|yard.tag|deprecated" msgstr "" # YARD::Tags::Library#deprecated_tag #: ../lib/yard/tags/library.rb:381 msgid "" "Marks a method/class as deprecated with an optional description.\n" "The description should be used to inform users of the recommended\n" "migration path, and/or any useful information about why the object\n" "was marked as deprecated." msgstr "" # @example #: ../lib/yard/tags/library.rb:391 msgid "" "# @example Reverse a String\n" "# \"mystring\".reverse #=> \"gnirtsym\"\n" "def reverse; end" msgstr "" # @yard.tag [with_title_and_text] example #: ../lib/yard/tags/library.rb:391 msgid "Example" msgstr "" # @yard.signature #: ../lib/yard/tags/library.rb:391 msgid "" "Optional title\n" "Code block" msgstr "" # @param [String, CodeObjects::ExtraFileObject] # @param [String] # @param [String, Regexp] #: ../lib/yard/tags/library.rb:391 msgid "tag|yard.tag|example" msgstr "" #: ../lib/yard/tags/library.rb:392 msgid "" "Show an example snippet of code for an object. The first line\n" "is an optional title." msgstr "オブジェクト用ã«ã‚³ãƒ¼ãƒ‰ç‰‡ã®ä¾‹ã‚’表示ã™ã‚‹ã€‚最åˆã®è¡Œã¯ä»»æ„ã®ã‚¿ã‚¤ãƒˆãƒ«ã€‚" #: ../lib/yard/tags/library.rb:399 msgid "" "# @note This method should only be used in outer space.\n" "def eject; end" msgstr "" # @yard.tag note #: ../lib/yard/tags/library.rb:399 msgid "[] Note" msgstr "" # @see #: ../lib/yard/tags/library.rb:399 msgid "tag|see|tag:todo" msgstr "" # @param [Parser::Ruby::AstNode] #: ../lib/yard/tags/library.rb:399 msgid "tag|yard.tag|note" msgstr "" # YARD::Tags::Library#note_tag #: ../lib/yard/tags/library.rb:400 msgid "Adds an emphasized note at the top of the docstring for the object" msgstr "" # @example #: ../lib/yard/tags/library.rb:418 msgid "" "# @param [Hash] opts the options to create a message with.\n" "# @option opts [String] :subject The subject\n" "# @option opts [String] :from ('nobody') From address\n" "# @option opts [String] :to Recipient email\n" "# @option opts [String] :body ('') The email's body\n" "def send_email(opts = {}) end" msgstr "" # @param [Hash] options #: ../lib/yard/tags/library.rb:418 msgid "Options Hash" msgstr "ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ション" # @yard.signature #: ../lib/yard/tags/library.rb:418 msgid "name [Types] option_key (default_value) description" msgstr "" # @param [String, Symbol] # @param [Symbol, String] #: ../lib/yard/tags/library.rb:418 msgid "tag|yard.tag|option" msgstr "" #: ../lib/yard/tags/library.rb:419 msgid "" "Describe an options hash in a method. The tag takes the\n" "name of the options parameter first, followed by optional types,\n" "the option key name, a default value for the key and a\n" "description of the option. The default value should be placed within\n" "parentheses and is optional (can be omitted)." msgstr "" "メソッドã®ä¸­ã®ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションを説明ã™ã‚‹ã€‚\n" "ã‚¿ã‚°ã¯æœ€åˆã«optionsã®ãƒ‘ラメータã®åå‰(name)ã‚’å–å¾—ã—ã€\n" "ç¶šã„ã¦ä»»æ„ã§åž‹(types)ã€ã‚ªãƒ—ションã®ã‚­ãƒ¼åã€\n" "キー用ã®ãƒ‡ãƒ•ォルトã®å€¤ã€ã‚ªãƒ—ションã®èª¬æ˜Žã¨ãªã‚‹ã€‚\n" "デフォルト値ã¯ä»»æ„ã§(入れãªãã¦ã‚‚よã„)\n" "括弧ã®ä¸­ã«ç½®ãªã‘れã°ãªã‚‰ãªã„。" # YARD::Tags::Library#option_tag #: ../lib/yard/tags/library.rb:425 msgid "" "Note that a +@param+ tag need not be defined for the options\n" "hash itself, though it is useful to do so for completeness." msgstr "" # @example #: ../lib/yard/tags/library.rb:437 msgid "" "# @overload set(key, value)\n" "# Sets a value on key\n" "# @param [Symbol] key describe key param\n" "# @param [Object] value describe value param\n" "# @overload set(value)\n" "# Sets a value on the default key +:foo+\n" "# @param [Object] value describe value param\n" "def set(*args) end" msgstr "" # @yard.tag [OverloadTag] overload #: ../lib/yard/tags/library.rb:437 msgid "Overloads" msgstr "" # @yard.signature #: ../lib/yard/tags/library.rb:437 msgid "" "method_signature(parameters)\n" "Indented docstring for overload method" msgstr "" # @param [Fixnum] #: ../lib/yard/tags/library.rb:437 msgid "tag|yard.tag|overload" msgstr "" #: ../lib/yard/tags/library.rb:438 msgid "" "Describe that your method can be used in various\n" "contexts with various parameters or return types. The first\n" "line should declare the new method signature, and the following\n" "indented tag data will be a new documentation string with its\n" "own tags adding metadata for such an overload." msgstr "" "ã‚ãªãŸã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒæ§˜ã€…ãªãƒ‘ラメータや戻りã®åž‹ã¨ä¸€ç·’ã«\n" "様々ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§åˆ©ç”¨ã•れる説明をã™ã‚‹ã€‚\n" "最åˆã«è¡Œã¯æ–°ã—ã„メソッドã®ã‚·ã‚°ãƒãƒãƒ£ã§å®£è¨€ã—ãªã‘れã°ãªã‚‰ãªã„ã€\n" "ãã—ã¦ç¶šãインデントã•れãŸã‚¿ã‚°ãƒ‡ãƒ¼ã‚¿ã¯\n" "オーãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ã®æ§˜ã«è‡ªèº«ã®è¿½åŠ ã™ã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã‚’用ã„\n" "æ–°ã—ã„ドキュメント文字列ã«ãªã‚‹ã€‚" # @example #: ../lib/yard/tags/library.rb:445 msgid "" "# @param [String] the URL of the page to download\n" "def load_page(url) end" msgstr "" # @yard.tag [with_types_and_name] param #: ../lib/yard/tags/library.rb:445 msgid "Parameters" msgstr "" # @param [Array] # @param [Hash] #: ../lib/yard/tags/library.rb:445 msgid "tag|yard.tag|param" msgstr "" # YARD::Tags::Library#param_tag #: ../lib/yard/tags/library.rb:446 msgid "" "Documents a single method parameter with a given name, type\n" "and optional description." msgstr "" # @example #: ../lib/yard/tags/library.rb:473 msgid "" "# @private\n" "class InteralImplementation; end" msgstr "" # @note #: ../lib/yard/tags/library.rb:473 msgid "" "This method is not recommended for hiding undocumented or\n" "\"unimportant\" methods. This tag should only be used to mark objects\n" "private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you\n" "can use +private_constant+ to declare constants (like classes or\n" "modules) as private, and should be used instead of +@private+." msgstr "" # @yard.tag private #: ../lib/yard/tags/library.rb:473 msgid "[] Private" msgstr "" # @see #: ../lib/yard/tags/library.rb:473 msgid "tag|see|tag:api" msgstr "" # @param [String] # @param [Array] # @param [String, :root] #: ../lib/yard/tags/library.rb:473 msgid "tag|yard.tag|private" msgstr "" # YARD::Tags::Library#private_tag #: ../lib/yard/tags/library.rb:474 msgid "" "Declares that the _logical_ visibility of an object is private.\n" "In other words, it specifies that this method should be marked\n" "private but cannot due to Ruby's visibility restrictions. This\n" "exists for classes, modules and constants that do not obey Ruby's\n" "visibility rules. For instance, an inner class might be considered\n" "\"private\", though Ruby would make no such distinction." msgstr "" # YARD::Tags::Library#private_tag #: ../lib/yard/tags/library.rb:481 msgid "" "This tag is meant to be used in conjunction with the +--no-private+\n" "command-line option, and is required to actually remove these objects\n" "from documentation output. See {file:README.md} for more information on\n" "switches." msgstr "" # @example #: ../lib/yard/tags/library.rb:482 msgid "" "# @raise [AccountBalanceError] if the account does not have\n" "# sufficient funds to perform the transaction\n" "def withdraw(amount) end" msgstr "" # @yard.tag [with_types] raise #: ../lib/yard/tags/library.rb:482 msgid "Raises" msgstr "" # @param [Boolean] #: ../lib/yard/tags/library.rb:482 msgid "tag|yard.tag|raise" msgstr "" # YARD::Tags::Library#raise_tag #: ../lib/yard/tags/library.rb:483 msgid "" "Describes that a method may raise a given exception, with\n" "an optional description of what it may mean." msgstr "" # YARD::Tags::Library#private_tag #: ../lib/yard/tags/library.rb:486 msgid "" "If you simply want to set the API visibility of a method, you should\n" "look at the {tag:api} tag instead." msgstr "" # @example A regular return value #: ../lib/yard/tags/library.rb:498 msgid "" "# @return [Fixnum] the size of the file\n" "def size; @file.size end" msgstr "" # @example A method returns an Array or a single object #: ../lib/yard/tags/library.rb:498 msgid "" "# @return [String] if a single object was returned\n" "# from the database.\n" "# @return [Array] if multiple objects were\n" "# returned.\n" "def find(query) end" msgstr "" # @yard.tag [with_types] return #: ../lib/yard/tags/library.rb:498 msgid "Returns" msgstr "" # @example #: ../lib/yard/tags/library.rb:498 msgid "tag|example|A method returns an Array or a single object" msgstr "tag|example|メソッドã¯é…列やå˜ä¸€ã®ã‚ªãƒ–ジェクトを返ã™" # @example #: ../lib/yard/tags/library.rb:498 msgid "tag|example|A regular return value" msgstr "tag|example|æ…£ç¿’çš„ãªæˆ»ã‚Šå€¤ã®ä¾‹" # @param [Boolean] #: ../lib/yard/tags/library.rb:498 msgid "tag|yard.tag|return" msgstr "" # YARD::Tags::Library#return_tag #: ../lib/yard/tags/library.rb:499 msgid "" "Describes the return value (and type or types) of a method.\n" "You can list multiple return tags for a method in the case\n" "where a method has distinct return cases. In this case, each\n" "case should begin with \"if ...\"." msgstr "" # @example #: ../lib/yard/tags/library.rb:510 msgid "" "# Synchronizes system time using NTP.\n" "# @see http://ntp.org/documentation.html NTP Documentation\n" "# @see NTPHelperMethods\n" "class NTPUpdater; end" msgstr "" # @yard.tag [with_name] see #: ../lib/yard/tags/library.rb:510 msgid "See Also" msgstr "" # @param [Tags::Tag, Tags::RefTag] #: ../lib/yard/tags/library.rb:510 msgid "tag|yard.tag|see" msgstr "" #: ../lib/yard/tags/library.rb:511 msgid "" "\"See Also\" references for an object. Accepts URLs or\n" "other code objects with an optional description at the end.\n" "Note that the URL or object will be automatically linked by\n" "YARD and does not need to be formatted with markup." msgstr "" "\"See Also(å‚ç…§)\"ã¯ã‚ªãƒ–ジェクトã«å‚ç…§ã•れる。\n" "URLや最後ã§ä»»æ„ã®èª¬æ˜Žã‚’用ã„ãŸä»–ã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトをå—入れる。\n" "ç•™æ„ã™ã‚‹äº‹ã¨ã—ã¦URLやオブジェクトã¯\n" "YARDã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ãƒªãƒ³ã‚¯ã•れã€\n" "マークアップを用ã„フォーマットã•れる必è¦ã¯ãªã„。" # @example #: ../lib/yard/tags/library.rb:518 msgid "" "# @since 1.2.4\n" "def clear_routes; end" msgstr "" # @yard.tag since #: ../lib/yard/tags/library.rb:518 msgid "[] Since" msgstr "" # @param [Fixnum, nil] #: ../lib/yard/tags/library.rb:518 msgid "tag|yard.tag|since" msgstr "" #: ../lib/yard/tags/library.rb:519 msgid "Lists the version that the object was first added." msgstr "ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæœ€åˆã«è¿½åŠ ã•れãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’記述ã™ã‚‹" #: ../lib/yard/tags/library.rb:544 msgid "" "# @todo Add support for Jabberwocky service.\n" "# There is an open source Jabberwocky library available\n" "# at http://jbrwcky.org that can be easily integrated.\n" "class Wonderlander; end" msgstr "" # @yard.tag todo #: ../lib/yard/tags/library.rb:544 msgid "[] Todo Item" msgstr "" # @see #: ../lib/yard/tags/library.rb:544 msgid "tag|see|tag:note" msgstr "" # @param [String] #: ../lib/yard/tags/library.rb:544 msgid "tag|yard.tag|todo" msgstr "" # YARD::Tags::Library#todo_tag #: ../lib/yard/tags/library.rb:545 msgid "" "Marks a TODO note in the object being documented.\n" "For reference, objects with TODO items can be enumerated\n" "from the command line with a simple command:" msgstr "" # YARD::Tags::Library#todo_tag #: ../lib/yard/tags/library.rb:549 msgid "" " !!!sh\n" " mocker$ yard list --query '@todo'\n" " lib/mocker/mocker.rb:15: Mocker\n" " lib/mocker/report/html.rb:5: Mocker::Report::Html" msgstr "" # YARD::Tags::Library#todo_tag #: ../lib/yard/tags/library.rb:554 msgid "" "YARD can also be used to enumerate the TODO items from\n" "a short script:" msgstr "" # YARD::Tags::Library#todo_tag #: ../lib/yard/tags/library.rb:557 msgid "" " !!!ruby\n" " require 'yard'\n" " YARD::Registry.load!.all.each do |o|\n" " puts o.tag(:todo).text if o.tag(:todo)\n" " end" msgstr "" # @example #: ../lib/yard/tags/library.rb:557 msgid "" "# The public REST API for http://jbrwcky.org\n" "# @version 2.0\n" "class JabberwockyAPI; end" msgstr "" # @yard.tag version #: ../lib/yard/tags/library.rb:557 msgid "[] Version" msgstr "" # @param [Array] #: ../lib/yard/tags/library.rb:557 msgid "tag|yard.tag|version" msgstr "" # YARD::Tags::Library#version_tag #: ../lib/yard/tags/library.rb:558 msgid "" "Lists the version of a class, module or method. This is\n" "similar to a library version, but at finer granularity.\n" "In some cases, version of specific modules, classes, methods\n" "or generalized components might change independently between\n" "releases. A version tag is used to infer the API compatibility\n" "of a specific object." msgstr "" # @example #: ../lib/yard/tags/library.rb:573 msgid "" "# For a block {|a,b,c| ... }\n" "# @yield [a, b, c] Gives 3 random numbers to the block\n" "def provide3values(&block) yield(42, 42, 42) end" msgstr "" # @yard.tag [with_types] yield #: ../lib/yard/tags/library.rb:573 msgid "Yields" msgstr "" #: ../lib/yard/tags/library.rb:573 msgid "[parameters] description" msgstr "" # @yieldparam [Tags::Tag] #: ../lib/yard/tags/library.rb:573 msgid "tag|see|tag:yieldparam" msgstr "" # @see #: ../lib/yard/tags/library.rb:573 msgid "tag|see|tag:yieldreturn" msgstr "" # @param [Fixnum] #: ../lib/yard/tags/library.rb:573 msgid "tag|yard.tag|yield" msgstr "" # YARD::Tags::Library#yield_tag #: ../lib/yard/tags/library.rb:574 msgid "" "Describes what a method might yield to a given block.\n" "The types specifier list should not list types, but names\n" "of the parameters yielded to the block. If you define\n" "parameters with +@yieldparam+, you do not need to define\n" "the parameters in the type specification of +@yield+ as\n" "well." msgstr "" # @example #: ../lib/yard/tags/library.rb:582 msgid "" "# @yieldparam [String] name the name that is yielded\n" "def with_name(name) yield(name) end" msgstr "" # @yard.tag [with_types_and_name] yieldparam #: ../lib/yard/tags/library.rb:582 msgid "Yield Parameters" msgstr "" # @yieldparam [Tags::Tag] #: ../lib/yard/tags/library.rb:582 msgid "tag|yard.tag|yieldparam" msgstr "" # YARD::Tags::Library#yieldparam_tag #: ../lib/yard/tags/library.rb:583 msgid "" "Defines a parameter yielded by a block. If you define the\n" "parameters with +@yieldparam+, you do not need to define\n" "them via +@yield+ as well." msgstr "" # @example #: ../lib/yard/tags/library.rb:591 msgid "" "# @yieldreturn [Fixnum] the number to add 5 to.\n" "def add5_block(&block) 5 + yield end" msgstr "" # @yard.tag [with_types] yieldreturn #: ../lib/yard/tags/library.rb:591 msgid "Yield Returns" msgstr "" # @see #: ../lib/yard/tags/library.rb:591 msgid "tag|see|tag:return" msgstr "" # @yard.tag [with_types] #: ../lib/yard/tags/library.rb:591 msgid "tag|yard.tag|yieldreturn" msgstr "" # YARD::Tags::Library#yieldreturn_tag #: ../lib/yard/tags/library.rb:592 msgid "" "Documents the value and type that the block is expected\n" "to return to the method." msgstr "" # @yard.directive [with_types_and_title] attribute #: ../lib/yard/tags/library.rb:595 msgid "AttributeDirective" msgstr "" # @yard.signature #: ../lib/yard/tags/library.rb:595 msgid "" "[r | w | rw] attribute_name\n" "Indented attribute docstring" msgstr "" # @param [Boolean] #: ../lib/yard/tags/library.rb:595 msgid "tag|yard.directive|attribute" msgstr "" # @yard.directive [EndGroupDirective] endgroup #: ../lib/yard/tags/library.rb:598 msgid "EndGroupDirective" msgstr "" # @yard.directive [EndGroupDirective] #: ../lib/yard/tags/library.rb:598 msgid "tag|yard.directive|endgroup" msgstr "" # @yard.directive [GroupDirective] group #: ../lib/yard/tags/library.rb:600 msgid "GroupDirective" msgstr "" # @yard.directive [GroupDirective] #: ../lib/yard/tags/library.rb:600 msgid "tag|yard.directive|group" msgstr "" # @yard.directive [with_types_and_title] macro #: ../lib/yard/tags/library.rb:604 msgid "MacroDirective" msgstr "" # @yard.signature #: ../lib/yard/tags/library.rb:604 msgid "" "[attach | new] optional_name\n" "Optional macro expansion data" msgstr "" # @param [MacroObject] # @param [CodeObjects::MacroObject] #: ../lib/yard/tags/library.rb:604 msgid "tag|yard.directive|macro" msgstr "" # @yard.directive [with_title_and_text] method #: ../lib/yard/tags/library.rb:608 msgid "MethodDirective" msgstr "" # @yard.signature #: ../lib/yard/tags/library.rb:608 msgid "" "method_signature(parameters)\n" "Indented method docstring" msgstr "" # @yard.directive [with_title_and_text] #: ../lib/yard/tags/library.rb:608 msgid "tag|yard.directive|method" msgstr "" # title #: ../lib/yard/tags/library.rb:611 msgid "ParseDirective" msgstr "パーサーディレクティブ" # @return [Symbol] #: ../lib/yard/tags/library.rb:611 msgid "[language] code" msgstr "" # @yard.directive [with_types] #: ../lib/yard/tags/library.rb:611 msgid "tag|yard.directive|parse" msgstr "" # @yard.directive [ScopeDirective] scope #: ../lib/yard/tags/library.rb:616 msgid "ScopeDirective" msgstr "" #: ../lib/yard/tags/library.rb:616 msgid "class | instance" msgstr "" # @param [Symbol] #: ../lib/yard/tags/library.rb:616 msgid "tag|yard.directive|scope" msgstr "" #: ../lib/yard/tags/library.rb:617 msgid "" "Sets the scope of a DSL method. Only applicable to DSL method\n" "calls. Acceptable values are 'class' or 'instance'" msgstr "" "DSLメソッドã®ã‚¹ã‚³ãƒ¼ãƒ—ã«è¨­å®šã™ã‚‹ã€‚DSLメソッド呼ã³å‡ºã—ã«ã ã‘é©ç”¨ã§ãる。\n" "å—ã‘入れる値ã¯'class'ã¾ãŸã¯'instance'ã§ã‚る。" # @yard.directive [VisibilityDirective] visibility #: ../lib/yard/tags/library.rb:621 msgid "VisibilityDirective" msgstr "" # @yard.signature #: ../lib/yard/tags/library.rb:621 msgid "public | protected | private" msgstr "" # @yard.directive [VisibilityDirective] #: ../lib/yard/tags/library.rb:621 msgid "tag|yard.directive|visibility" msgstr "" #: ../lib/yard/tags/library.rb:622 msgid "" "Sets the visibility of a DSL method. Only applicable to\n" "DSL method calls. Acceptable values are public, protected, or private." msgstr "" "DSLメソッドã®å¯è¦–性を設定ã™ã‚‹ã€‚\n" "DSLメソッド呼ã³å‡ºã—ã«é©ç”¨ã§ãる。\n" "å—ã‘入れる値ã¯public,protected,privateã¨ãªã‚‹" # @param value #: ../lib/yard/tags/option_tag.rb:4 msgid "the value to set the attribute pair to." msgstr "pair属性ã«è¨­å®šã™ã‚‹å€¤" # YARD::Tags::OptionTag#pair #: ../lib/yard/tags/option_tag.rb:5 msgid "Returns the value of attribute pair" msgstr "pair属性ã®å€¤ã‚’è¿”ã™" # YARD::Tags::OptionTag#pair= #: ../lib/yard/tags/option_tag.rb:5 msgid "Sets the attribute pair" msgstr "pair属性を設定ã™ã‚‹" # @return [OptionTag] #: ../lib/yard/tags/option_tag.rb:6 msgid "a new instance of OptionTag" msgstr "ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚¿ã‚°ã®æ–°ã—ã„インスタンス" # YARD::Tags::OverloadTag#parameters #: ../lib/yard/tags/overload_tag.rb:5 msgid "Returns the value of attribute parameters" msgstr "parameters属性ã®å€¤ã‚’è¿”ã™" # YARD::Tags::OverloadTag#signature #: ../lib/yard/tags/overload_tag.rb:5 msgid "Returns the value of attribute signature" msgstr "signature属性ã®å€¤ã‚’è¿”ã™" # @return [OverloadTag] #: ../lib/yard/tags/overload_tag.rb:6 msgid "a new instance of OverloadTag" msgstr "OverloadTagã®æ–°ã—ã„インスタンス" # @param value #: ../lib/yard/tags/ref_tag_list.rb:4 msgid "the value to set the attribute tag_name to." msgstr "tag_name属性を設定ã™ã‚‹å€¤" # YARD::Tags::RefTagList#tag_name #: ../lib/yard/tags/ref_tag_list.rb:5 msgid "Returns the value of attribute tag_name" msgstr "tag_name属性ã®å€¤ã‚’è¿”ã™" # YARD::Tags::RefTagList#tag_name= #: ../lib/yard/tags/ref_tag_list.rb:5 msgid "Sets the attribute tag_name" msgstr "tag_name属性を設定ã™ã‚‹" # @return [RefTagList] #: ../lib/yard/tags/ref_tag_list.rb:6 msgid "a new instance of RefTagList" msgstr "RefTagListã®æ–°ã—ã„インスタンス" # YARD::Tags::Tag #: ../lib/yard/tags/tag.rb:4 msgid "" "Represents a metadata tag value (+@tag+). Tags can have any combination of\n" "{#types}, {#name} and {#text}, or none of the above." msgstr "" "ã‚¿ã‚°ã¯ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚°ã®å€¤(+@tag+)を表ã—\n" "ä»»æ„ã®{#types},{#name},{#text},åˆã¯,\n" "å‰è¿°ã®ã©ã‚Œã§ã‚‚ãªã„メソッドã®çµ„ã¿åˆã‚ã›ã‚’æŒã¤äº‹ãŒå‡ºæ¥ã‚‹ã€‚" # @example Programmatic tag creation #: ../lib/yard/tags/tag.rb:12 msgid "" "# The following docstring syntax:\n" "# @param [String, nil] arg an argument\n" "#\n" "# is equivalent to:\n" "Tag.new(:param, 'an argument', ['String', 'nil'], 'arg')" msgstr "" "# 次ã®docstringæ§‹æ–‡ã¯:\n" "# @param [String, nil] arg an argument\n" "#\n" "# 以下ã¨åŒæ§˜ã«ãªã‚‹ã€‚\n" "Tag.new(:param, 'an argument', ['String', 'nil'], 'arg')" # @example #: ../lib/yard/tags/tag.rb:12 msgid "tag|example|Programmatic tag creation" msgstr "タグを作æˆã™ã‚‹ãƒ—ログラム例" # @return [nil] #: ../lib/yard/tags/tag.rb:18 msgid "if no tag text is supplied" msgstr "ã‚¿ã‚°ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ‡å®šã•れãªã„å ´åˆ" # @return [String] #: ../lib/yard/tags/tag.rb:18 msgid "the tag text associated with the tag" msgstr "ã‚¿ã‚°ã¨ä¸€ç·’ã«é–¢é€£ä»˜ã‘られるタグテキスト" # @return [Array] #: ../lib/yard/tags/tag.rb:22 msgid "a list of types associated with the tag" msgstr "ã‚¿ã‚°ã¨ä¸€ç·’ã«é–¢é€£ä»˜ã‘られる型ã®ãƒªã‚¹ãƒˆ" # @return [nil] #: ../lib/yard/tags/tag.rb:22 msgid "if no types are associated with the tag" msgstr "åž‹ãŒã‚¿ã‚°ã¨ä¸€ç·’ã«é–¢é€£ä»˜ã‘られãªã„å ´åˆ" # @return [String] #: ../lib/yard/tags/tag.rb:25 msgid "a name associated with the tag" msgstr "ã‚¿ã‚°ã¨å…±ã«é–¢é€£ã¥ã‘られる,åå‰" # @return [CodeObjects::Base] #: ../lib/yard/tags/tag.rb:28 msgid "the associated object" msgstr "関連ã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Tags::Tag#initialize #: ../lib/yard/tags/tag.rb:31 msgid "" "Creates a new tag object with a tag name and text. Optionally, formally " "declared types\n" "and a key name can be specified." msgstr "" "ã‚¿ã‚°åã¨ãƒ†ã‚­ã‚¹ãƒˆã¨å…±ã«æ–°ã—ã„タグオブジェクトを作æˆã™ã‚‹ã€‚\n" "ä»»æ„ã§ã€å½¢å¼çš„ã«å®£è¨€ã•れる型やキーåを指定ã™ã‚‹äº‹ãŒå‡ºæ¥ã‚‹ã€‚" # YARD::Tags::Tag#initialize #: ../lib/yard/tags/tag.rb:34 msgid "" "Types are mainly for meta tags that rely on type information, such as +param" "+, +return+, etc." msgstr "åž‹ã¯ä¸»ã«ã€+param+, +return+ç­‰ã®æ§˜ãªåž‹æƒ…報を頼るメタタグ用ã§ã‚る。" # YARD::Tags::Tag#initialize #: ../lib/yard/tags/tag.rb:36 msgid "" "Key names are for tags that declare meta data for a specific key or name, " "such as +param+,\n" "+raise+, etc." msgstr "" "キーå(name)㯠+param+ , +raise+ ç­‰ã®ã‚ˆã†ãª\n" "特定ã®ã‚­ãƒ¼ã‚„åå‰ç”¨ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’宣言ã™ã‚‹ã‚¿ã‚°ã®ç‚ºã«ã‚る。" # @return [Tag] #: ../lib/yard/tags/tag.rb:43 msgid "a new instance of Tag" msgstr "ã‚¿ã‚°ã®æ–°ã—ã„インスタンス" # @param [String] name #: ../lib/yard/tags/tag.rb:43 msgid "optional key name which the tag refers to" msgstr "ã‚¿ã‚°ãŒå‚ç…§ã™ã‚‹,ä»»æ„ã®ã‚­ãƒ¼å" # @param [Array] types #: ../lib/yard/tags/tag.rb:43 msgid "" "optional type list of formally declared types\n" "for the tag" msgstr "タグ用ã«å½¢å¼çš„ã«å®£è¨€ã•れãŸåž‹ã®å…¥ã£ãŸ,ä»»æ„ã®åž‹é…列" # @param [String] text #: ../lib/yard/tags/tag.rb:43 msgid "the descriptive text for this tag" msgstr "ã“ã®ã‚¿ã‚°ã®ç‚ºã®èª¬æ˜Žæ–‡" # @param [#to_s] tag_name #: ../lib/yard/tags/tag.rb:43 msgid "the tag name to create the tag for" msgstr "タグを作æˆã™ã‚‹ç‚ºã®ã‚¿ã‚°å" # YARD::Tags::Tag#type #: ../lib/yard/tags/tag.rb:48 msgid "" "Convenience method to access the first type specified. This should mainly\n" "be used for tags that only specify one type." msgstr "" "最åˆã®æŒ‡å®šã•れる型ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ç‚ºã®ä¾¿åˆ©ãªãƒ¡ã‚½ãƒƒãƒ‰,\n" "ã“れã¯ã€ä¸»ã«åž‹ãŒä¸€ã¤ã ã‘ã®ã‚¿ã‚°ã‚’指定ã™ã‚‹æ™‚ã«åˆ©ç”¨ã•れるã¹ãã§ã‚る。" # @see #: ../lib/yard/tags/tag.rb:52 msgid "tag|see|#types" msgstr "" # @return [String] #: ../lib/yard/tags/tag.rb:52 msgid "the first of the list of specified types" msgstr "指定ã•れる型ã®ãƒªã‚¹ãƒˆã®æœ€åˆã®éƒ¨åˆ†" # YARD::Templates::Engine #: ../lib/yard/templates/engine.rb:6 msgid "" "This module manages all creation, handling and rendering of {Template}\n" "objects." msgstr "" "ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ã€å…¨ã¦ã®ä½œæˆã‚’管ç†ã—,æ“作ã™ã‚‹ã€‚ãã—ã¦ã€{Template}オブジェクト" "ã‹ã‚‰è¡¨ç¤ºã™ã‚‹ã€‚" # YARD::Templates::Engine #: ../lib/yard/templates/engine.rb:9 msgid "" "* To create a template object at a path, use {template}.\n" "* To render a template, call {render}.\n" "* To register a template path in the lookup paths, call " "{register_template_path}." msgstr "" "* パスã§ãƒ†ãƒ³ãƒ—レートオブジェクトを作æˆã™ã‚‹ã«ã¯ã€{template}を使ã†\n" "* テンプレートを表示ã™ã‚‹ã«ã¯ã€{render}を呼ã³å‡ºã™\n" "* 検索ã™ã‚‹ãƒ‘スã§ãƒ†ãƒ³ãƒ—レートパスを記録ã™ã‚‹ã«ã¯ã€{register_template_path}を呼" "ã³å‡ºã™ã€‚" # @return [Array] #: ../lib/yard/templates/engine.rb:14 msgid "the list of registered template paths" msgstr "渡ã•れãŸãƒ†ãƒ³ãƒ—レートパスã®ãƒªã‚¹ãƒˆ" # YARD::Templates::Engine.register_template_path #: ../lib/yard/templates/engine.rb:17 msgid "Registers a new template path in {template_paths}" msgstr "{template_paths}ã®ä¸­ã§ã€æ–°ã—ã„テンプレートパスを記録ã™ã‚‹" # @param [String] path #: ../lib/yard/templates/engine.rb:20 msgid "a new template path" msgstr "æ–°ã—ã„テンプレートパス" # YARD::Templates::Engine.template #: ../lib/yard/templates/engine.rb:25 msgid "" "Creates a template module representing the path. Searches on disk\n" "for the first directory named +path+ (joined by '/') within the\n" "template paths and builds a template module for. All other matching\n" "directories in other template paths will be included in the\n" "generated module as mixins (for overriding)." msgstr "" "パスを表ã™ãƒ†ãƒ³ãƒ—レートモジュールを作æˆã™ã‚‹ã€‚\n" "テンプレートパスã®å†…部ã§ã€\n" "+path+ ã¨å付ã‘ã‚‰ã‚ŒãŸæœ€åˆã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª('/'区切り)用ã«ã€\n" "ディスク上をサーãƒã™ã‚‹ã€‚\n" "ãã—ã¦ã€ãƒ†ãƒ³ãƒ—レートモジュール用ã«ãƒ“ルドã™ã‚‹ã€‚\n" "ä»–ã«ãƒžãƒƒãƒã™ã‚‹ãƒ†ãƒ³ãƒ—レートパスã®ä¸­ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå…¨ã¦ã¯ã€mixinã¨ã—ã¦(オーãƒãƒ¼" "ライド用ã«)ã€\n" "生æˆã•れãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãŒå«ã¾ã‚Œã‚‹ã€‚" # @param [Array] path #: ../lib/yard/templates/engine.rb:34 msgid "a list of path components" msgstr "æ§‹æˆè¦ç´ ã®ãƒ‘スã®ãƒªã‚¹ãƒˆ" # @raise [ArgumentError] #: ../lib/yard/templates/engine.rb:34 msgid "" "if the path does not exist within one of the\n" "{template_paths} on disk." msgstr "ディスク上ã«{template_paths}ãŒä¸€ã¤ã‚‚存在ã—ãªã„å ´åˆã€ä¾‹å¤–を上ã’る。" # @return [Template] #: ../lib/yard/templates/engine.rb:34 msgid "the module representing the template" msgstr "モジュールã®è¡¨ã—ã¦ã„るテンプレート" # YARD::Templates::Engine.template! #: ../lib/yard/templates/engine.rb:48 msgid "Forces creation of a template at +path+ within a +full_path+." msgstr "" "+fullpath+ 内部ã®\n" "+path+ ã§ã€ãƒ†ãƒ³ãƒ—レートã®ä½œæˆã‚’強制ã™ã‚‹ã€‚" # @param [Array] #: ../lib/yard/templates/engine.rb:52 msgid "tag|param|full_paths" msgstr "" # @param [Array] full_paths #: ../lib/yard/templates/engine.rb:52 msgid "the full path on disk of the template" msgstr "テンプレートã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ•ルパス" # @param [String] path #: ../lib/yard/templates/engine.rb:52 msgid "the path name of the template" msgstr "テンプレートã®ãƒ‘スå" # @return [Template] #: ../lib/yard/templates/engine.rb:52 msgid "the template module representing the +path+" msgstr "テンプレートモジュールã¯ã€+path+ を表ã—ã¦ã„る。" # YARD::Templates::Engine.render #: ../lib/yard/templates/engine.rb:65 msgid "" "Renders a template on a {CodeObjects::Base code object} using\n" "a set of default (overridable) options. Either the +:object+\n" "or +:type+ keys must be provided." msgstr "" "デフォルトã®ã‚ªãƒ—ション(上書ãå¯èƒ½)ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«ã‚ˆã£ã¦ã€\n" "{Codeobject::base code object}ã®ãƒ†ãƒ³ãƒ—レートを表示ã™ã‚‹ã€‚\n" "+:object+ ã‹ +:type+ ã‚­ãƒ¼ãŒæä¾›ã•れã‘れã°ãªã‚‰ãªã„。" # YARD::Templates::Engine.render #: ../lib/yard/templates/engine.rb:69 msgid "" "If a +:serializer+ key is provided and +:serialize+ is not set to\n" "false, the rendered contents will be serialized through the {Serializers::" "Base}\n" "object. See {with_serializer}." msgstr "" "+:serializer+ ã‚­ãƒ¼ãŒæä¾›ã•れるã‹ã€ +:serialize+ ã«falseを設定ã—ãªã„å ´åˆã€\n" "表示ã•れる内容ã¯ã€{Serializers::Base}オブジェクトを通ã—ã¦ã€ã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れる" "ã ã‚ã†ã€‚\n" "{with_serializer}å‚照。" # @example Renders an object with html formatting #: ../lib/yard/templates/engine.rb:81 msgid "Engine.render(:format => :html, :object => obj)" msgstr "" # @example Renders without an object #: ../lib/yard/templates/engine.rb:81 msgid "Engine.render(:type => :fulldoc, :otheropts => somevalue)" msgstr "" # @example #: ../lib/yard/templates/engine.rb:81 msgid "tag|example|Renders an object with html formatting" msgstr "htmlフォーマットã¨å…±ã«ã‚ªãƒ–ジェクトを表示ã™ã‚‹" # @example #: ../lib/yard/templates/engine.rb:81 msgid "tag|example|Renders without an object" msgstr "オブジェクト無ã—ã®è¡¨ç¤º" # @param [Hash] options #: ../lib/yard/templates/engine.rb:81 ../lib/yard/templates/engine.rb:140 msgid "the options hash" msgstr "ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ション" # YARD::Templates::Engine.generate #: ../lib/yard/templates/engine.rb:93 msgid "" "Passes a set of objects to the +:fulldoc+ template for full documentation " "generation.\n" "This is called by {CLI::Yardoc} to most commonly perform HTML\n" "documentation generation." msgstr "" "完璧ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆç”Ÿæˆç”¨ã«ã€+:fulldoc+ テンプレートã«\n" "オブジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒæ¸¡ã•れる。\n" "ã“れã¯ã€{CLI::Yardoc}ã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れる\n" "一般的ã«htmlドキュメント生æˆã‚’実行ã—ãªã‘れã°ãªã‚‰ãªã„。" # @param [Hash] options #: ../lib/yard/templates/engine.rb:100 msgid "(see {render})" msgstr "" # @param [Array] objects #: ../lib/yard/templates/engine.rb:100 msgid "" "a list of {CodeObjects::Base}\n" "objects to pass to the template" msgstr "" "ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã«æ¸¡ã™ç‚ºã®\n" "{CodeObjects::Base} オブジェクトã®ãƒªã‚¹ãƒˆ" # YARD::Templates::Engine.with_serializer #: ../lib/yard/templates/engine.rb:108 msgid "Serializes the results of a block with a +serializer+ object." msgstr "+serializer+ オブジェクトを用ã„ブロックã®çµæžœã‚’シリアライズã™ã‚‹ã€‚" # @yield #: ../lib/yard/templates/engine.rb:114 msgid "a block whose result will be serialize" msgstr "çµæžœãŒã‚·ãƒªã‚¢ãƒ©ã‚¤ã‚ºã•れるブロック" # @param [Serializers::Base] #: ../lib/yard/templates/engine.rb:114 msgid "tag|param|serializer" msgstr "serializer" # @see #: ../lib/yard/templates/engine.rb:114 msgid "tag|see|Serializers::Base" msgstr "" # @param [CodeObjects::Base] object #: ../lib/yard/templates/engine.rb:114 msgid "the code object to serialize" msgstr "シリアライズã™ã‚‹ç‚ºã®ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクト" # @yieldreturn [String] #: ../lib/yard/templates/engine.rb:114 msgid "the contents to serialize" msgstr "シリアライズã™ã‚‹ç‚ºã®å†…容" # @param [Serializers::Base] serializer #: ../lib/yard/templates/engine.rb:114 msgid "the serializer object" msgstr "シリアライザーオブジェクト" # YARD::Templates::Engine.set_default_options #: ../lib/yard/templates/engine.rb:134 msgid "Sets default options on the options hash" msgstr "ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã®ãƒ‡ãƒ•ォルトã®ã‚ªãƒ—ションを設定ã™ã‚‹ã€‚" # YARD::Templates::Engine.find_template_paths #: ../lib/yard/templates/engine.rb:152 msgid "" "Searches through the registered {template_paths} and returns\n" "all full directories that have the +path+ within them on disk." msgstr "" "記録ã•れる{template_paths}を通ã—ã¦ã€æ¤œç´¢ã•れã€\n" "ディスク上㫠+path+ ã‚’æŒã¤å…¨ã¦ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’è¿”ã™ã€‚\n" # @return [Array] #: ../lib/yard/templates/engine.rb:160 msgid "" "a list of full paths that are existing\n" "candidates for a template module" msgstr "テンプレートモジュール用ã®å€™è£œãŒå­˜åœ¨ã™ã‚‹ãƒ•ルパスã®ãƒªã‚¹ãƒˆ" # @param [Template] from_template #: ../lib/yard/templates/engine.rb:160 msgid "" "if provided, allows a relative\n" "path to be specified from this template's full path." msgstr "" "æä¾›ã•れãŸå ´åˆã€\n" "ã“ã®ãƒ†ãƒ³ãƒ—レートã®ãƒ•ルパスã‹ã‚‰æŒ‡å®šã•れる相対パスをå—入れる。" # @param [Template] #: ../lib/yard/templates/engine.rb:160 msgid "tag|param|from_template" msgstr "from_template" # @param [String] path #: ../lib/yard/templates/engine.rb:160 msgid "" "the path component to search for in the\n" "{template_paths}" msgstr "{template_paths}ç”¨ã«æ¤œç´¢ã™ã‚‹ç‚ºã®ãƒ‘ã‚¹ã®æ§‹æˆ" # YARD::Templates::Engine.template_module_name #: ../lib/yard/templates/engine.rb:172 msgid "The name of the module that represents a +path+" msgstr "+path+ を表ã™ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«å" # @return [String] #: ../lib/yard/templates/engine.rb:175 msgid "the module name" msgstr "モジュールå" # @param [String] the #: ../lib/yard/templates/engine.rb:175 msgid "the path to generate a module name for" msgstr "パス用ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«åを生æˆã™ã‚‹ç‚ºã®ãƒ‘ス" # YARD::Templates::Helpers::BaseHelper #: ../lib/yard/templates/helpers/base_helper.rb:3 msgid "The base helper module included in all templates." msgstr "ベースã¸ãƒ«ãƒ‘ーモジュールã¯ã€å…¨ã¦ã®ãƒ†ãƒ³ãƒ—レートをå«ã‚“ã§ã„る。" # @param value #: ../lib/yard/templates/helpers/base_helper.rb:4 msgid "the value to set the attribute object to." msgstr "オブジェクトã®å±žæ€§ã‚’設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/templates/helpers/base_helper.rb:4 msgid "the value to set the attribute serializer to." msgstr "シリアライザーã®å±žæ€§ã‚’設定ã™ã‚‹å€¤" # YARD::Templates::Helpers::BaseHelper#object #: ../lib/yard/templates/helpers/base_helper.rb:5 msgid "Returns the value of attribute object" msgstr "オブジェクトã®å±žæ€§ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Helpers::BaseHelper#serializer #: ../lib/yard/templates/helpers/base_helper.rb:5 msgid "Returns the value of attribute serializer" msgstr "シリアライザーã®å±žæ€§ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Helpers::BaseHelper#object= #: ../lib/yard/templates/helpers/base_helper.rb:5 msgid "Sets the attribute object" msgstr "オブジェクトã®å±žæ€§ã‚’設定ã™ã‚‹ã€‚" # YARD::Templates::Helpers::BaseHelper#serializer= #: ../lib/yard/templates/helpers/base_helper.rb:5 msgid "Sets the attribute serializer" msgstr "シリアライザーã®å±žæ€§ã‚’設定ã™ã‚‹ã€‚" # @return [CodeObjects::Base] #: ../lib/yard/templates/helpers/base_helper.rb:8 #: ../lib/yard/templates/helpers/base_helper.rb:10 msgid "" "the object representing the current generated\n" "page. Might not be the current {#object} when inside sub-templates." msgstr "" # YARD::Templates::Helpers::BaseHelper#globals #: ../lib/yard/templates/helpers/base_helper.rb:15 msgid "" "An object that keeps track of global state throughout the entire template\n" "rendering process (including any sub-templates)." msgstr "" "全体ã®ãƒ†ãƒ³ãƒ—レートã®è¡¨ç¤ºå‡¦ç†ã‚’通ã˜ã¦ã€globalã®çŠ¶æ…‹ã®è»Œè·¡ã‚’ä¿æŒã™ã‚‹ã‚ªãƒ–ジェク" "ト。\n" "(ä»»æ„ã®ã‚µãƒ–テンプレートをå«ã‚“ã§ã„ã‚‹)" # YARD::Templates::Helpers::BaseHelper#globals #: ../lib/yard/templates/helpers/base_helper.rb:19 msgid "Managing Global Template State" msgstr "グローãƒãƒ«ãªãƒ†ãƒ³ãƒ—レートã®çŠ¶æ…‹ã‚’ç®¡ç†ã™ã‚‹ã€‚" # @return [OpenStruct] #: ../lib/yard/templates/helpers/base_helper.rb:19 msgid "a struct object that stores state" msgstr "状態を記憶ã™ã‚‹æ§‹é€ ä½“オブジェクト" # YARD::Templates::Helpers::BaseHelper#run_verifier #: ../lib/yard/templates/helpers/base_helper.rb:29 msgid "Running the Verifier" msgstr "Verifierã‚’èµ·å‹•ã™ã‚‹ã€‚" # @param [Array] list #: ../lib/yard/templates/helpers/base_helper.rb:29 ../lib/yard/verifier.rb:90 msgid "a list of code objects" msgstr "コードオブジェクトã®ãƒªã‚¹ãƒˆ" # @return [Array] #: ../lib/yard/templates/helpers/base_helper.rb:29 msgid "" "a list of code objects that match\n" "the verifier. If no verifier is supplied, all objects are returned." msgstr "" "verifierã«ãƒžãƒƒãƒã™ã‚‹ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ\n" "verifierãŒæä¾›ã•れãªã„å ´åˆã€å…¨ã¦ã®ã‚ªãƒ–ジェクトãŒã€è¿”ã•れる。" # YARD::Templates::Helpers::BaseHelper#h #: ../lib/yard/templates/helpers/base_helper.rb:36 msgid "" "Escapes text. This is used a lot by the HtmlHelper and there should\n" "be some helper to \"clean up\" text for whatever, this is it." msgstr "" "テキストをエスケープã™ã‚‹ã€‚ã“れã¯ã€HtmlHelperã«å¤šã利用ã•れã€\n" "ã©ã‚“ãªãƒ†ã‚­ã‚¹ãƒˆã§ã‚‚仕上ã’る為ã«ã„ãã¤ã‹ã®helperメソッドã«ãªã‚‹ã€‚" # YARD::Templates::Helpers::BaseHelper#h #: ../lib/yard/templates/helpers/base_helper.rb:37 msgid "Escaping Text" msgstr "テキストをエスケープã™ã‚‹ã€‚" # YARD::Templates::Helpers::BaseHelper#linkify #: ../lib/yard/templates/helpers/base_helper.rb:44 msgid "" "Links objects or URLs. This method will delegate to the correct +link_+\n" "method depending on the arguments passed in." msgstr "" "オブジェクトやURLをリンクã™ã‚‹ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€\n" "渡ã•れãŸå¼•æ•°ã«å¿œã˜ã¦ã€å¦¥å½“㪠+link_+ メソッドã«å§”è­²ã™ã‚‹ã ã‚ã†ã€‚" # YARD::Templates::Helpers::BaseHelper#linkify # YARD::Templates::Helpers::BaseHelper#link_include_object # YARD::Templates::Helpers::BaseHelper#link_include_file # YARD::Templates::Helpers::BaseHelper#link_object # YARD::Templates::Helpers::BaseHelper#link_url # YARD::Templates::Helpers::BaseHelper#link_file # YARD::Templates::Helpers::HtmlHelper#resolve_links # YARD::Templates::Helpers::HtmlHelper#link_file # YARD::Templates::Helpers::HtmlHelper#link_include_file # YARD::Templates::Helpers::HtmlHelper#link_include_object # YARD::Templates::Helpers::HtmlHelper#link_object # YARD::Templates::Helpers::HtmlHelper#link_url #: ../lib/yard/templates/helpers/base_helper.rb:54 #: ../lib/yard/templates/helpers/base_helper.rb:102 #: ../lib/yard/templates/helpers/base_helper.rb:110 #: ../lib/yard/templates/helpers/base_helper.rb:119 #: ../lib/yard/templates/helpers/base_helper.rb:138 #: ../lib/yard/templates/helpers/base_helper.rb:149 #: ../lib/yard/templates/helpers/html_helper.rb:180 #: ../lib/yard/templates/helpers/html_helper.rb:219 #: ../lib/yard/templates/helpers/html_helper.rb:231 #: ../lib/yard/templates/helpers/html_helper.rb:240 #: ../lib/yard/templates/helpers/html_helper.rb:245 #: ../lib/yard/templates/helpers/html_helper.rb:273 msgid "Linking Objects and URLs" msgstr "オブジェクトã¨URLã«ãƒªãƒ³ã‚¯ã™ã‚‹ã€‚" # @example Linking an object by path #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "linkify('YARD::Docstring')" msgstr "" # @example Linking to an extra file #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "linkify('file:README')" msgstr "" # @example Linking a URL #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "linkify('http://example.com')" msgstr "" # @example Including docstring contents of an object #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "linkify('include:YARD::Docstring')" msgstr "" # @example #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "tag|example|Including docstring contents of an object" msgstr "インクルードã—ã¦ã„ã‚‹docstringã¯ã€ã‚ªãƒ–ジェクトã®å†…容ã¨ãªã‚‹ã€‚" # @example #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "tag|example|Linking a URL" msgstr "URLã«ãƒªãƒ³ã‚¯ã™ã‚‹ã€‚" # @example #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "tag|example|Linking an object by path" msgstr "パスã«ã‚ˆã£ã¦ã‚ªãƒ–ジェクトã«ãƒªãƒ³ã‚¯ã™ã‚‹" # @example #: ../lib/yard/templates/helpers/base_helper.rb:54 msgid "tag|example|Linking to an extra file" msgstr "extraファイル(追加ã®ãƒ•ァイル)ã«ãƒªãƒ³ã‚¯ã™ã‚‹ã€‚" # YARD::Templates::Helpers::BaseHelper#link_include_object # YARD::Templates::Helpers::HtmlHelper#link_include_object #: ../lib/yard/templates/helpers/base_helper.rb:99 #: ../lib/yard/templates/helpers/html_helper.rb:241 msgid "Includes an object's docstring into output." msgstr "出力ã¸ã€ã‚ªãƒ–ジェクトã®docstringã‚’å«ã‚ã‚‹" # @param [CodeObjects::Base] object #: ../lib/yard/templates/helpers/base_helper.rb:102 msgid "the object to include" msgstr "å«ã‚るオブジェクト" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:102 msgid "the object's docstring (no tags)" msgstr "docstringオブジェクト(ã‚¿ã‚°ç„¡ã—)" # YARD::Templates::Helpers::BaseHelper#link_include_file # YARD::Templates::Helpers::HtmlHelper#link_include_file #: ../lib/yard/templates/helpers/base_helper.rb:107 #: ../lib/yard/templates/helpers/html_helper.rb:232 msgid "Include a file as a docstring in output" msgstr "出力ã§docstringã¨ã—ã¦ã€ãƒ•ァイルをå«ã‚ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:110 msgid "the file's contents" msgstr "ファイルã®å†…容" # @param [String] file #: ../lib/yard/templates/helpers/base_helper.rb:110 msgid "the filename to include" msgstr "å«ã‚るファイルå" # YARD::Templates::Helpers::BaseHelper#link_object # YARD::Templates::Helpers::HtmlHelper#link_object #: ../lib/yard/templates/helpers/base_helper.rb:115 #: ../lib/yard/templates/helpers/html_helper.rb:246 msgid "Links to an object with an optional title" msgstr "ä»»æ„ã®ã‚¿ã‚¤ãƒˆãƒ«ã¨å…±ã«ã‚ªãƒ–ジェクトã«ãƒªãƒ³ã‚¯ã™ã‚‹" # @param [String] #: ../lib/yard/templates/helpers/base_helper.rb:119 #: ../lib/yard/templates/helpers/base_helper.rb:138 #: ../lib/yard/templates/helpers/base_helper.rb:149 msgid "tag|param|title" msgstr "title" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:119 msgid "the linked object" msgstr "リンクã—ãŸã‚ªãƒ–ジェクト" # @param [CodeObjects::Base] object #: ../lib/yard/templates/helpers/base_helper.rb:119 msgid "the object to link to" msgstr "リンクã™ã‚‹ã‚ªãƒ–ジェクト" # @param [String] title #: ../lib/yard/templates/helpers/base_helper.rb:119 msgid "the title to use for the link" msgstr "リンク用ã«åˆ©ç”¨ã™ã‚‹ã‚¿ã‚¤ãƒˆãƒ«" # YARD::Templates::Helpers::BaseHelper#link_url # YARD::Templates::Helpers::HtmlHelper#link_url #: ../lib/yard/templates/helpers/base_helper.rb:133 #: ../lib/yard/templates/helpers/html_helper.rb:274 msgid "Links to a URL" msgstr "URLã«ãƒªãƒ³ã‚¯ã™ã‚‹" # @param [Hash] params #: ../lib/yard/templates/helpers/base_helper.rb:138 msgid "optional parameters for the link" msgstr "リンク用ã®ä»»æ„ã®ãƒ‘ラメーター" # @param [String] url #: ../lib/yard/templates/helpers/base_helper.rb:138 msgid "the URL to link to" msgstr "リンクã™ã‚‹URL" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:138 msgid "the linked URL" msgstr "リンクã—ãŸURL" # @param [String] title #: ../lib/yard/templates/helpers/base_helper.rb:138 msgid "the optional title to display the link as" msgstr "ä»»æ„ã®ã‚¿ã‚¤ãƒˆãƒ«ã¨ã—ã¦ã€ãƒªãƒ³ã‚¯ã«è¡¨ç¤ºã™ã‚‹" # YARD::Templates::Helpers::BaseHelper#link_file # YARD::Templates::Helpers::HtmlHelper#link_file #: ../lib/yard/templates/helpers/base_helper.rb:143 #: ../lib/yard/templates/helpers/html_helper.rb:220 msgid "Links to an extra file" msgstr "extarファイルã«ãƒªãƒ³ã‚¯ã™ã‚‹" # @param [String] anchor #: ../lib/yard/templates/helpers/base_helper.rb:149 #: ../lib/yard/templates/helpers/html_helper.rb:342 msgid "optional anchor" msgstr "ä»»æ„ã®ã‚¢ãƒ³ã‚«ãƒ¼" # @param [String] #: ../lib/yard/templates/helpers/base_helper.rb:149 #: ../lib/yard/templates/helpers/html_helper.rb:309 #: ../lib/yard/templates/helpers/html_helper.rb:342 msgid "tag|param|anchor" msgstr "anchor" # @param [String, CodeObjects::ExtraFileObject] filename # @param [String] filename #: ../lib/yard/templates/helpers/base_helper.rb:149 #: ../lib/yard/templates/helpers/html_helper.rb:342 msgid "the filename to link to" msgstr "リンクã™ã‚‹ãƒ•ァイルå" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:149 msgid "the link to the file" msgstr "ファイルã¸ã®ãƒªãƒ³ã‚¯" # @param [String] title #: ../lib/yard/templates/helpers/base_helper.rb:149 msgid "the title of the link" msgstr "リンクã®ã‚¿ã‚¤ãƒˆãƒ«" # YARD::Templates::Helpers::BaseHelper#format_types #: ../lib/yard/templates/helpers/base_helper.rb:157 msgid "Formats a list of return types for output and links each type." msgstr "å‡ºåŠ›ç”¨ã«æˆ»ã‚Šã®åž‹ã®ãƒªã‚¹ãƒˆã‚’フォーマットã—ã€ãれãžã‚Œã®åž‹ã«ãƒªãƒ³ã‚¯ã™ã‚‹ã€‚" # YARD::Templates::Helpers::BaseHelper#format_types # YARD::Templates::Helpers::BaseHelper#format_object_type # YARD::Templates::Helpers::BaseHelper#format_object_title # YARD::Templates::Helpers::BaseHelper#format_source #: ../lib/yard/templates/helpers/base_helper.rb:165 #: ../lib/yard/templates/helpers/base_helper.rb:179 #: ../lib/yard/templates/helpers/base_helper.rb:193 #: ../lib/yard/templates/helpers/base_helper.rb:206 msgid "Formatting Object Attributes" msgstr "オブジェクトã®å±žæ€§ã‚’フォーマットã™ã‚‹" # @param [Array] list #: ../lib/yard/templates/helpers/base_helper.rb:165 msgid "a list of types" msgstr "åž‹ã®ãƒªã‚¹ãƒˆ" # @example Formatting types #: ../lib/yard/templates/helpers/base_helper.rb:165 msgid "format_types(['String', 'Array']) #=> \"(String, Array)\"" msgstr "" # @example Formatting types without surrounding brackets #: ../lib/yard/templates/helpers/base_helper.rb:165 msgid "format_types(['String', 'Array'], false) #=> \"String, Array\"" msgstr "" # @example #: ../lib/yard/templates/helpers/base_helper.rb:165 msgid "tag|example|Formatting types" msgstr "型をフォーマットã™ã‚‹" # @example #: ../lib/yard/templates/helpers/base_helper.rb:165 msgid "tag|example|Formatting types without surrounding brackets" msgstr "周りをブラケット(括弧)ç„¡ã—ã®åž‹ã¸ãƒ•ォーマットã™ã‚‹" # @param [Boolean] #: ../lib/yard/templates/helpers/base_helper.rb:165 #: ../lib/yard/templates/helpers/html_helper.rb:414 msgid "tag|param|brackets" msgstr "brackets" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:165 msgid "the formatted list of Ruby types" msgstr "フォーマットã•れãŸRubyã®åž‹ã®ãƒªã‚¹ãƒˆ" # @param [Boolean] brackets #: ../lib/yard/templates/helpers/base_helper.rb:165 msgid "whether to surround the types in brackets" msgstr "ブラケット(括弧)ã®åž‹ã§å›²ã‚€ã‹ã©ã†ã‹" # @example Formatted type of an exception class #: ../lib/yard/templates/helpers/base_helper.rb:179 msgid "" "o = ClassObject.new(:root, :MyError)\n" "o.superclass = P('RuntimeError')\n" "format_object_type(o) # => \"Exception\"" msgstr "" # @example Formatted type of a method #: ../lib/yard/templates/helpers/base_helper.rb:179 msgid "" "o = MethodObject.new(:root, :to_s)\n" "format_object_type(o) # => \"Method\"" msgstr "" # @example #: ../lib/yard/templates/helpers/base_helper.rb:179 msgid "tag|example|Formatted type of a method" msgstr "メソッドã®å…¥ã£ãŸãƒ•ォーマットã•れãŸåž‹" # @example #: ../lib/yard/templates/helpers/base_helper.rb:179 msgid "tag|example|Formatted type of an exception class" msgstr "exceptionクラスã®ãƒ•ォーマットã•れãŸåž‹" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:179 msgid "" "the human-readable formatted {CodeObjects::Base#type #type}\n" "for the object" msgstr "" "人ãŒèª­ã¿ã‚„ã™ãフォーマットã•れãŸã‚ªãƒ–ジェクト用ã®{CodeObjects::Base#type " "#type}メソッド" # @param [CodeObjects::Base] object #: ../lib/yard/templates/helpers/base_helper.rb:179 msgid "the object to retrieve the type for" msgstr "型を回åŽã™ã‚‹ã‚ªãƒ–ジェクト" # @example #: ../lib/yard/templates/helpers/base_helper.rb:193 msgid "" "s = format_object_title ModuleObject.new(:root, :MyModuleName)\n" "s # => \"Module: MyModuleName\"" msgstr "" # @param [CodeObjects::Base] object #: ../lib/yard/templates/helpers/base_helper.rb:193 msgid "the object to retrieve a title for" msgstr "タイトルを回åŽã™ã‚‹ã‚ªãƒ–ジェクト" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:193 msgid "the page title name for a given object" msgstr "与ãˆã‚‰ã‚ŒãŸã‚ªãƒ–ジェクト用ã®ãƒšãƒ¼ã‚¸ã®ã‚¿ã‚¤ãƒˆãƒ«å" # YARD::Templates::Helpers::BaseHelper#format_source #: ../lib/yard/templates/helpers/base_helper.rb:203 msgid "Indents and formats source code" msgstr "インデントã—ã€ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’フォーマットã™ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/base_helper.rb:206 msgid "formatted source code" msgstr "フォーマットã•れãŸã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰" # @param [String] value #: ../lib/yard/templates/helpers/base_helper.rb:206 msgid "the input source code" msgstr "入力ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰" # YARD::Templates::Helpers::FilterHelper #: ../lib/yard/templates/helpers/filter_helper.rb:4 msgid "Helpers for various object types" msgstr "様々ãªã‚ªãƒ–ジェクト型用ã®Helperメソッド" # @return [Boolean] #: ../lib/yard/templates/helpers/filter_helper.rb:6 msgid "whether an object is a method" msgstr "オブジェクトãŒãƒ¡ã‚½ãƒƒãƒ‰ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/templates/helpers/filter_helper.rb:11 msgid "whether an object is a namespace" msgstr "オブジェクトãŒnamespaceã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/templates/helpers/filter_helper.rb:16 msgid "whether an object is a class" msgstr "オブジェクトãŒã‚¯ãƒ©ã‚¹ã‹ã©ã†ã‹" # @return [Boolean] #: ../lib/yard/templates/helpers/filter_helper.rb:21 msgid "whether an object is a module" msgstr "オブジェクトãŒãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‹ã©ã†ã‹" # YARD::Templates::Helpers::HtmlHelper #: ../lib/yard/templates/helpers/html_helper.rb:6 msgid "The helper module for HTML templates." msgstr "HTMLテンプレート用ã®helperモジュール。" # YARD::Templates::Helpers::HtmlHelper#h #: ../lib/yard/templates/helpers/html_helper.rb:13 msgid "Escapes HTML entities" msgstr "HTMLã®æ§‹æˆè¦ç´ ã‚’エスケープã™ã‚‹ã€‚" # YARD::Templates::Helpers::HtmlHelper#h # YARD::Templates::Helpers::HtmlHelper#urlencode #: ../lib/yard/templates/helpers/html_helper.rb:16 #: ../lib/yard/templates/helpers/html_helper.rb:24 msgid "Escaping Template Data" msgstr "テンプレートã®ãƒ‡ãƒ¼ã‚¿ã‚’エスケープã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:16 msgid "the HTML with escaped entities" msgstr "エスケープã•れãŸã‚‚ã®ã¨ä¸€ç·’ã®HTML" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:16 msgid "the text to escape" msgstr "エスケープã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Templates::Helpers::HtmlHelper#urlencode #: ../lib/yard/templates/helpers/html_helper.rb:21 msgid "Escapes a URL" msgstr "URLをエスケープã™ã‚‹" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:24 msgid "the URL" msgstr "URL" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:24 msgid "the escaped URL" msgstr "エスケープã•れãŸURL" # YARD::Templates::Helpers::HtmlHelper#htmlify #: ../lib/yard/templates/helpers/html_helper.rb:31 msgid "Turns text into HTML using +markup+ style formatting." msgstr "" "+markup+ スタイルフォーマットã«ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã€HTMLã¸ãƒ†ã‚­ã‚¹ãƒˆã‚’切り替ãˆã‚‹ã€‚" # YARD::Templates::Helpers::HtmlHelper#htmlify # YARD::Templates::Helpers::HtmlHelper#html_markup_markdown # YARD::Templates::Helpers::HtmlHelper#html_markup_textile # YARD::Templates::Helpers::HtmlHelper#html_markup_rdoc # YARD::Templates::Helpers::HtmlHelper#html_markup_text # YARD::Templates::Helpers::HtmlHelper#html_markup_none # YARD::Templates::Helpers::HtmlHelper#html_markup_html # YARD::Templates::Helpers::HtmlHelper#html_markup_ruby # YARD::Templates::Helpers::HtmlHelper#htmlify_line #: ../lib/yard/templates/helpers/html_helper.rb:36 #: ../lib/yard/templates/helpers/html_helper.rb:57 #: ../lib/yard/templates/helpers/html_helper.rb:73 #: ../lib/yard/templates/helpers/html_helper.rb:83 #: ../lib/yard/templates/helpers/html_helper.rb:91 #: ../lib/yard/templates/helpers/html_helper.rb:101 #: ../lib/yard/templates/helpers/html_helper.rb:109 #: ../lib/yard/templates/helpers/html_helper.rb:115 #: ../lib/yard/templates/helpers/html_helper.rb:123 #: ../lib/yard/templates/helpers/html_helper.rb:134 #: ../lib/yard/templates/helpers/html_helper.rb:139 msgid "Converting Markup to HTML" msgstr "HTMLã¸Markupを変æ›ã™ã‚‹ã€‚" # @param [Symbol] markup #: ../lib/yard/templates/helpers/html_helper.rb:36 msgid "" "examples are +:markdown+, +:textile+, +:rdoc+.\n" "To add a custom markup type, see {MarkupHelper}" msgstr "" "例ãˆã°ã€ +:markdown+ , +:textile+ , +:rdoc+ ãŒã‚る。\n" "カスタムマークアップã®åž‹ã‚’追加ã™ã‚‹ã«ã¯ã€ {MarkupHelper}å‚照。" # @param [Symbol] #: ../lib/yard/templates/helpers/html_helper.rb:36 msgid "tag|param|markup" msgstr "markup" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:36 msgid "the HTML" msgstr "HTML" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:36 msgid "the text to format" msgstr "フォーマットã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Templates::Helpers::HtmlHelper#html_markup_markdown #: ../lib/yard/templates/helpers/html_helper.rb:54 msgid "Converts Markdown to HTML" msgstr "HTMLã¸Markdownを変æ›ã™ã‚‹ã€‚" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:57 msgid "input Markdown text" msgstr "Markdownテキストを入力ã™ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:57 #: ../lib/yard/templates/helpers/html_helper.rb:73 #: ../lib/yard/templates/helpers/html_helper.rb:91 #: ../lib/yard/templates/helpers/html_helper.rb:123 msgid "output HTML" msgstr "HTMLを出力ã™ã‚‹" # YARD::Templates::Helpers::HtmlHelper#html_markup_textile #: ../lib/yard/templates/helpers/html_helper.rb:70 msgid "Converts Textile to HTML" msgstr "HTMLã¸Textileを変æ›ã™ã‚‹ã€‚" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:73 msgid "the input Textile text" msgstr "入力ã™ã‚‹Textileテキスト" # YARD::Templates::Helpers::HtmlHelper#html_markup_text #: ../lib/yard/templates/helpers/html_helper.rb:80 msgid "Converts plaintext to strict Textile (hard breaks)" msgstr "厳格ãªTextileã«ãƒ—レーンテキストを変æ›ã™ã‚‹ã€‚(hard breaks)" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:83 msgid "the input textile data" msgstr "入力ã™ã‚‹Textileã®ãƒ‡ãƒ¼ã‚¿" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:83 #: ../lib/yard/templates/helpers/html_helper.rb:101 #: ../lib/yard/templates/helpers/html_helper.rb:109 msgid "the output HTML" msgstr "出力HTML" # YARD::Templates::Helpers::HtmlHelper#html_markup_rdoc #: ../lib/yard/templates/helpers/html_helper.rb:88 msgid "Converts RDoc formatting (SimpleMarkup) to HTML" msgstr "RDocフォーマット(SimpleMarkup)ã‚’HTMLã¸å¤‰æ›ã™ã‚‹ã€‚" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:91 msgid "the input RDoc formatted text" msgstr "RDocã§ãƒ•ォーマットã•れãŸãƒ†ã‚­ã‚¹ãƒˆã®å…¥åŠ›" # YARD::Templates::Helpers::HtmlHelper#html_markup_text #: ../lib/yard/templates/helpers/html_helper.rb:98 msgid "Converts plaintext to pre-formatted HTML" msgstr "事å‰ã«ãƒ•ォーマットã•れãŸHTMLã«ãƒ—レーンテキストを変æ›ã™ã‚‹ã€‚" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:101 #: ../lib/yard/templates/helpers/html_helper.rb:109 msgid "the input text" msgstr "入力テキスト" # YARD::Templates::Helpers::HtmlHelper#html_markup_text #: ../lib/yard/templates/helpers/html_helper.rb:106 msgid "Converts plaintext to regular HTML" msgstr "通常ã®HTMLã«ãƒ—レーンテキストを変æ›ã™ã‚‹ã€‚" # @since #: ../lib/yard/templates/helpers/html_helper.rb:115 msgid "0.6.6" msgstr "" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:115 msgid "the same text with no markup" msgstr "markupã®ç„¡ã„ã€åŒã˜ãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Templates::Helpers::HtmlHelper#html_markup_html #: ../lib/yard/templates/helpers/html_helper.rb:120 msgid "Converts HTML to HTML" msgstr "HTMLã‹ã‚‰HTMLã¸å¤‰æ›ã™ã‚‹" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:123 msgid "input html" msgstr "htmlを入力ã™ã‚‹" # YARD::Templates::Helpers::HtmlHelper#html_markup_ruby #: ../lib/yard/templates/helpers/html_helper.rb:128 msgid "" "Highlights Ruby source. Similar to {#html_syntax_highlight}, but\n" "this method is meant to be called from {#htmlify} when markup is\n" "set to \"ruby\"." msgstr "" "Rubyã®ã‚½ãƒ¼ã‚¹ã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹ã€‚\n" "{#html_syntax_highlight}メソッドã¨åŒæ§˜ã§ã‚る。\n" "ã—ã‹ã—ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯markupãŒ\"ruby\"を設定ã™ã‚‹æ™‚ã«ã€\n" "{#htmlify}メソッドã‹ã‚‰å‘¼ã³å‡ºã•れる事をæ„味ã—ã¦ã„る。" # @param [String] source #: ../lib/yard/templates/helpers/html_helper.rb:134 msgid "the Ruby source" msgstr "Rubyã®ã‚½ãƒ¼ã‚¹" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:134 msgid "the highlighted HTML" msgstr "ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れãŸHTML" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:139 msgid "HTMLified text as a single line (paragraphs removed)" msgstr "å˜ä¸€ã®è¡Œã¨ã—ã¦ã€HTML化ã•れãŸ(パラグラフãŒå‰Šé™¤ã•れãŸ)テキスト" # YARD::Templates::Helpers::HtmlHelper#html_syntax_highlight #: ../lib/yard/templates/helpers/html_helper.rb:146 msgid "Syntax highlights +source+ in language +type+." msgstr "æ§‹æ–‡ã¯ã€+type+ ã®è¨€èªžã§ +source+ ã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹ã€‚" # YARD::Templates::Helpers::HtmlHelper#html_syntax_highlight # YARD::Templates::Helpers::HtmlHelper#html_syntax_highlight_plain #: ../lib/yard/templates/helpers/html_helper.rb:154 #: ../lib/yard/templates/helpers/html_helper.rb:165 msgid "Syntax Highlighting Source Code" msgstr "ソースコードをãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹æ§‹æ–‡" # @note #: ../lib/yard/templates/helpers/html_helper.rb:154 msgid "" "To support a specific language +type+, implement the method\n" "+html_syntax_highlight_TYPE+ in this class." msgstr "" "特定㮠+type+ ã®è¨€èªžã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã«ã¯ã€\n" "ã“ã®ã‚¯ãƒ©ã‚¹ã®ä¸­ã®ã€+html_syntax_highlight_TYPE+メソッドを実装ã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:154 msgid "the highlighted source" msgstr "ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れãŸã‚½ãƒ¼ã‚¹" # @param [Symbol] type #: ../lib/yard/templates/helpers/html_helper.rb:154 msgid "" "the language type (:ruby, :plain, etc). Use\n" ":plain for no syntax highlighting." msgstr "" "言語ã®åž‹(:ruby, :plain, etc.)。\n" "ãƒã‚¤ãƒ©ã‚¤ãƒˆç„¡ã—ã®æ§‹æ–‡ã«ã¯ã€ :plain を使ã†" # @param [String] source #: ../lib/yard/templates/helpers/html_helper.rb:154 msgid "the source code to highlight" msgstr "ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:165 msgid "unhighlighted source" msgstr "ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’戻ã•れãŸã‚½ãƒ¼ã‚¹" # YARD::Templates::Helpers::HtmlHelper#resolve_links #: ../lib/yard/templates/helpers/html_helper.rb:172 msgid "" "Resolves any text in the form of +{Name}+ to the object specified by\n" "Name. Also supports link titles in the form +{Name title}+." msgstr "" "Nameã«ã‚ˆã£ã¦æŒ‡å®šã•れãŸã‚ªãƒ–ジェクト㫠+{Name}+ ã®å½¢å¼ã§\n" "ä»»æ„ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’解決ã™ã‚‹ã€‚\n" "ã•らã«ã€ +{Name title}+ å½¢å¼ã®ã‚¿ã‚¤ãƒˆãƒ«ã®ãƒªãƒ³ã‚¯ã‚‚サãƒãƒ¼ãƒˆã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:180 msgid "HTML with linkified references" msgstr "リンクã•れãŸå‚照を用ã„ãŸHTML" # @example Linking to a class with a title #: ../lib/yard/templates/helpers/html_helper.rb:180 msgid "" "resolve_links(\"{A::B::C the C class}\") # => \"the c class" "\"" msgstr "" # @example Linking to an instance method #: ../lib/yard/templates/helpers/html_helper.rb:180 msgid "" "resolve_links(\"{MyClass#method}\") # => \"MyClass#method\"" msgstr "" # @example #: ../lib/yard/templates/helpers/html_helper.rb:180 msgid "tag|example|Linking to a class with a title" msgstr "タイトルã¨å…±ã«ã‚¯ãƒ©ã‚¹ã«ãƒªãƒ³ã‚¯ã™ã‚‹" # @example #: ../lib/yard/templates/helpers/html_helper.rb:180 msgid "tag|example|Linking to an instance method" msgstr "インスタンスメソッドã«ãƒªãƒ³ã‚¯ã™ã‚‹" # @param [String] text #: ../lib/yard/templates/helpers/html_helper.rb:180 msgid "the text to resolve links in" msgstr "リンクを解決ã™ã‚‹ç‚ºã®ãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Templates::Helpers::HtmlHelper#anchor_for # YARD::Templates::Helpers::HtmlHelper#url_for # YARD::Templates::Helpers::HtmlHelper#url_for_file #: ../lib/yard/templates/helpers/html_helper.rb:288 #: ../lib/yard/templates/helpers/html_helper.rb:309 #: ../lib/yard/templates/helpers/html_helper.rb:342 #: ../lib/yard/templates/helpers/html_helper.rb:364 #: ../lib/yard/templates/helpers/html_helper.rb:372 #: ../lib/yard/templates/helpers/html_helper.rb:380 #: ../lib/yard/templates/helpers/html_helper.rb:388 msgid "URL Helpers" msgstr "" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:288 msgid "the anchor for a specific object" msgstr "固有ã®ã‚ªãƒ–ジェクト用ã®ã‚¢ãƒ³ã‚«ãƒ¼" # @param [CodeObjects::Base] object #: ../lib/yard/templates/helpers/html_helper.rb:288 msgid "the object to get an anchor for" msgstr "アンカーをå–å¾—ã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Templates::Helpers::HtmlHelper#url_for #: ../lib/yard/templates/helpers/html_helper.rb:304 msgid "Returns the URL for an object." msgstr "オブジェクト用ã«URLã‚’è¿”ã™" # @param [Boolean] #: ../lib/yard/templates/helpers/html_helper.rb:309 msgid "tag|param|relative" msgstr "relative" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:309 msgid "the URL location of the object" msgstr "オブジェクトã®URLã®å ´æ‰€" # @param [String] anchor #: ../lib/yard/templates/helpers/html_helper.rb:309 msgid "the anchor to link to" msgstr "リンクã™ã‚‹ã‚¢ãƒ³ã‚«ãƒ¼" # @param [String, CodeObjects::Base] obj #: ../lib/yard/templates/helpers/html_helper.rb:309 msgid "the object (or object path) to link to" msgstr "リンクã™ã‚‹ã‚ªãƒ–ジェクト(åˆã¯ã€ã‚ªãƒ–ジェクトパス)" # @param [Boolean] relative #: ../lib/yard/templates/helpers/html_helper.rb:309 msgid "use a relative or absolute link" msgstr "相対or絶対リンクを使ã†ã‹ã©ã†ã‹(trueã§ç›¸å¯¾ãƒªãƒ³ã‚¯)" # YARD::Templates::Helpers::HtmlHelper#url_for_file #: ../lib/yard/templates/helpers/html_helper.rb:338 msgid "Returns the URL for a specific file" msgstr "固有ã®ãƒ•ァイル用ã®URLã‚’è¿”ã™" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:342 msgid "the URL pointing to the file" msgstr "ファイルã®å ´æ‰€ã‚’指ã—示ã™ã€URL" # YARD::Templates::Helpers::HtmlHelper#url_for_file #: ../lib/yard/templates/helpers/html_helper.rb:360 msgid "Returns the URL for a list type" msgstr "リストã®ã‚¿ã‚¤ãƒ—用ã«URLã‚’è¿”ã™" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:364 msgid "the URL pointing to the list" msgstr "リストã®ç‚ºã®å ´æ‰€ã‚’示ã™URL" # @param [ClassObject] klass #: ../lib/yard/templates/helpers/html_helper.rb:364 msgid "the list type to generate a URL for" msgstr "リストã®åž‹ç”¨ã®URLを生æˆã™ã‚‹ãŸã‚ã®ãƒªã‚¹ãƒˆã®åž‹" # YARD::Templates::Helpers::HtmlHelper#url_for_file #: ../lib/yard/templates/helpers/html_helper.rb:369 msgid "Returns the URL for the frameset page" msgstr "フレームセットページ用ã®URLã‚’è¿”ã™" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:372 msgid "the URL pointing to the frames page" msgstr "フレームページã®URLã®ãƒã‚¤ãƒ³ãƒˆ" # YARD::Templates::Helpers::HtmlHelper#url_for_main #: ../lib/yard/templates/helpers/html_helper.rb:377 msgid "Returns the URL for the main page (README or alphabetic index)" msgstr "" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:380 #: ../lib/yard/templates/helpers/html_helper.rb:388 msgid "" "the URL pointing to the first main page the\n" "user should see." msgstr "ユーザーãŒèª¿ã¹ã‚‹æœ€åˆã®ãƒ¡ã‚¤ãƒ³ãƒšãƒ¼ã‚¸ã®ç‚ºã®URLã®ãƒã‚¤ãƒ³ãƒˆ" # YARD::Templates::Helpers::HtmlHelper#format_object_name_list #: ../lib/yard/templates/helpers/html_helper.rb:395 msgid "Formats a list of objects and links them" msgstr "オブジェクトã®ãƒªã‚¹ãƒˆã‚’フォーマットã—ã€ãれをリンクã™ã‚‹ã€‚" # YARD::Templates::Helpers::HtmlHelper#format_object_name_list # YARD::Templates::Helpers::HtmlHelper#format_types # YARD::Templates::Helpers::HtmlHelper#signature_types # YARD::Templates::Helpers::HtmlHelper#signature #: ../lib/yard/templates/helpers/html_helper.rb:396 #: ../lib/yard/templates/helpers/html_helper.rb:414 #: ../lib/yard/templates/helpers/html_helper.rb:430 #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "Formatting Objects and Attributes" msgstr "オブジェクトã¨å±žæ€§ã‚’フォーマットã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:396 msgid "a formatted list of objects" msgstr "フォーマットã•れãŸã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # YARD::Templates::Helpers::HtmlHelper#format_types #: ../lib/yard/templates/helpers/html_helper.rb:403 msgid "Formats a list of types from a tag." msgstr "ã‚¿ã‚°ã‹ã‚‰åž‹ã®ãƒªã‚¹ãƒˆã‚’フォーマットã™ã‚‹ã€‚" # @param [Boolean] brackets #: ../lib/yard/templates/helpers/html_helper.rb:414 msgid "" "omits the surrounding\n" "brackets if +brackets+ is set to +false+." msgstr "" "+brackets+ ã« +false+ ãŒè¨­å®šã•れãŸå ´åˆã€\n" "周りã®ãƒ–ラケット(括弧)を除外ã™ã‚‹ã€‚" # @param [Array, FalseClass] #: ../lib/yard/templates/helpers/html_helper.rb:414 msgid "tag|param|typelist" msgstr "typelist" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:414 msgid "" "the list of types formatted\n" "as [Type1, Type2, ...] with the types linked\n" "to their respective descriptions." msgstr "" "ãれらã®é–¢é€£ã™ã‚‹èª¬æ˜Žã«ãƒªãƒ³ã‚¯ã—ãŸåž‹ã¨å…±ã«ã€\n" "[Type1, Type2, ...]ã¨ã—ã¦ãƒ•ォーマットã•れãŸåž‹ã®ãƒªã‚¹ãƒˆ" # @param [Array, FalseClass] typelist #: ../lib/yard/templates/helpers/html_helper.rb:414 msgid "the list of types to be formatted." msgstr "フォーマットã•れる型ã®ãƒªã‚¹ãƒˆ" # YARD::Templates::Helpers::HtmlHelper#signature_types #: ../lib/yard/templates/helpers/html_helper.rb:425 msgid "Get the return types for a method signature." msgstr "メソッドã®ã‚·ã‚°ãƒãƒãƒ£ç”¨ã«ã€è¿”ã™åž‹ã‚’å–å¾—ã™ã‚‹ã€‚" # @param [Boolean] #: ../lib/yard/templates/helpers/html_helper.rb:430 #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "tag|param|link" msgstr "link" # @param [CodeObjects::MethodObject] meth #: ../lib/yard/templates/helpers/html_helper.rb:430 msgid "the method object" msgstr "メソッドã®ã‚ªãƒ–ジェクト" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:430 msgid "the signature types" msgstr "ã‚·ã‚°ãƒãƒãƒ£ã®åž‹" # @param [Boolean] link #: ../lib/yard/templates/helpers/html_helper.rb:430 msgid "whether to link the types" msgstr "型をリンクã™ã‚‹ã‹ã©ã†ã‹" # YARD::Templates::Helpers::HtmlHelper#signature #: ../lib/yard/templates/helpers/html_helper.rb:459 msgid "Formats the signature of method +meth+." msgstr "+meth+ メソッドã®ã‚·ã‚°ãƒãƒãƒ£ã‚’フォーマットã™ã‚‹" # @param [Boolean] #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "tag|param|full_attr_name" msgstr "full_attr_name" # @param [Boolean] #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "tag|param|show_extras" msgstr "show_extras" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "the formatted method signature" msgstr "フォーマットã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚·ã‚°ãƒãƒãƒ£" # @param [CodeObjects::MethodObject] meth #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "" "the method object to list\n" "the signature of" msgstr "ã‚·ã‚°ãƒãƒãƒ£ã‚’記述ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚ªãƒ–ジェクト" # @param [Boolean] link #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "whether to link the method signature to the details view" msgstr "詳細ã®ä¸€è¦§ã«ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚·ã‚°ãƒãƒãƒ£ã‚’リンクã™ã‚‹ã‹ã©ã†ã‹" # @param [Boolean] show_extras #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "whether to show extra meta-data (visibility, attribute info)" msgstr "追加ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’見ã›ã‚‹ã‹ã©ã†ã‹(å¯è¦–性ã€infoã®å±žæ€§)" # @param [Boolean] full_attr_name #: ../lib/yard/templates/helpers/html_helper.rb:467 msgid "" "whether to show the full attribute name\n" "(\"name=\" instead of \"name\")" msgstr "完全ãªnameã®å±žæ€§ã‚’見ã›ã‚‹ã‹ã©ã†ã‹(\"name=\" instead of \"name\")" # YARD::Templates::Helpers::HtmlHelper#charset #: ../lib/yard/templates/helpers/html_helper.rb:504 msgid "" "Returns the current character set. The default value can be overridden\n" "by setting the +LANG+ environment variable or by overriding this\n" "method. In Ruby 1.9 you can also modify this value by setting\n" "+Encoding.default_external+." msgstr "" "ç¾åœ¨ã®æ–‡å­—集åˆã‚’è¿”ã™ã€‚\n" "デフォルトã®å€¤ã¯ã€ +LANG+ 環境変数を設定ã—ãŸã‚Šã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’上書ãã™ã‚‹äº‹ã«" "よã£ã¦\n" "上書ãã§ãる。\n" "åˆã€Ruby1.9ã§ã¯ +Encoding.default_external+ を設定ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã€\n" "ã“ã®å€¤ã‚’変更ã§ãる。" # YARD::Templates::Helpers::HtmlHelper#charset #: ../lib/yard/templates/helpers/html_helper.rb:510 #: ../lib/yard/templates/helpers/html_helper.rb:536 #: ../lib/yard/templates/helpers/html_helper.rb:542 #: ../lib/yard/templates/helpers/html_helper.rb:557 #: ../lib/yard/templates/helpers/html_helper.rb:572 msgid "Getting the Character Encoding" msgstr "Character Encodingã‚’å–å¾—ã™ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:510 msgid "the current character set" msgstr "ç¾åœ¨ã®æ–‡å­—集åˆ" # YARD::Templates::Helpers::HtmlHelper#tag_attrs #: ../lib/yard/templates/helpers/html_helper.rb:533 msgid "Converts a set of hash options into HTML attributes for a tag" msgstr "タグ用ã«HTML属性ã¸ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã®ã‚°ãƒ«ãƒ¼ãƒ—を変æ›ã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:536 msgid "the tag attributes of an HTML tag" msgstr "HTMLã‚¿ã‚°ã®ã‚¿ã‚°å±žæ€§" # @param [Hash{String => String}] opts #: ../lib/yard/templates/helpers/html_helper.rb:536 msgid "the tag options" msgstr "ãã®ã‚¿ã‚°ã®ã‚ªãƒ—ション" # YARD::Templates::Helpers::HtmlHelper#convert_method_to_overload #: ../lib/yard/templates/helpers/html_helper.rb:541 msgid "Converts a {CodeObjects::MethodObject} into an overload object" msgstr "上書ãã™ã‚‹ã‚ªãƒ–ジェクトã¸{CodeObjects::MethodObject}を変æ›ã™ã‚‹" # YARD::Templates::Helpers::HtmlHelper#parse_lang_for_codeblock #: ../lib/yard/templates/helpers/html_helper.rb:551 msgid "" "Parses !!!lang out of codeblock, returning the codeblock language\n" "followed by the source code." msgstr "" # @since #: ../lib/yard/templates/helpers/html_helper.rb:557 msgid "0.7.5" msgstr "" # @return [Array(String, String)] #: ../lib/yard/templates/helpers/html_helper.rb:557 msgid "" "the language, if any, and the\n" "remaining source" msgstr "" # @param [String] source #: ../lib/yard/templates/helpers/html_helper.rb:557 msgid "the source code whose language to determine" msgstr "ã©ã®è¨€èªžã‹æ±ºã‚る為ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰" # YARD::Templates::Helpers::HtmlHelper#parse_codeblocks #: ../lib/yard/templates/helpers/html_helper.rb:567 msgid "" "Parses code blocks out of html and performs syntax highlighting\n" "on code inside of the blocks." msgstr "" # @return [String] #: ../lib/yard/templates/helpers/html_helper.rb:572 msgid "highlighted html" msgstr "ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れãŸHTML" # @param [String] #: ../lib/yard/templates/helpers/html_helper.rb:572 msgid "tag|param|html" msgstr "" # @see #: ../lib/yard/templates/helpers/html_helper.rb:572 msgid "tag|see|#html_syntax_highlight" msgstr "" # @param [String] name #: ../lib/yard/templates/helpers/html_helper.rb:572 msgid "the html to search for code in" msgstr "HTMLã®ä¸­ã®ã‚³ãƒ¼ãƒ‰ç”¨ã«æ¤œç´¢ã™ã‚‹ãŸã‚ã®HTML" # YARD::Templates::Helpers::HtmlSyntaxHighlightHelper #: ../lib/yard/templates/helpers/html_syntax_highlight_helper.rb:5 msgid "Helper methods for syntax highlighting." msgstr "æ§‹æ–‡ãƒã‚¤ãƒ©ã‚¤ãƒˆç”¨ã®Helperメソッド" # YARD::Templates::Helpers::HtmlSyntaxHighlightHelper#html_syntax_highlight_ruby #: ../lib/yard/templates/helpers/html_syntax_highlight_helper.rb:7 msgid "Highlights Ruby source" msgstr "Rubyã®ã‚½ãƒ¼ã‚¹ã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹" # @param [String] source #: ../lib/yard/templates/helpers/html_syntax_highlight_helper.rb:9 msgid "the Ruby source code" msgstr "Rubyã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰" # @return [String] #: ../lib/yard/templates/helpers/html_syntax_highlight_helper.rb:9 msgid "the highlighted Ruby source" msgstr "ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れãŸRubyã®ã‚½ãƒ¼ã‚¹" # @param value #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:23 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:68 msgid "the value to set the attribute from_path to." msgstr "from_path属性を設定ã™ã‚‹å€¤" # YARD::Templates::Helpers::Markup::RDocMarkup#from_path # YARD::Templates::Helpers::Markup::RDocMarkupToHtml#from_path #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:24 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:69 msgid "Returns the value of attribute from_path" msgstr "from_path属性ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Helpers::Markup::RDocMarkup#from_path= # YARD::Templates::Helpers::Markup::RDocMarkupToHtml#from_path= #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:24 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:69 msgid "Sets the attribute from_path" msgstr "from_path属性を設定ã™ã‚‹" # @return [RDocMarkup] #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:25 msgid "a new instance of RDocMarkup" msgstr "RDocMarkupã®æ–°ã—ã„インスタンス" # YARD::Templates::Helpers::Markup::RDocMarkup#fix_typewriter #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:42 msgid "Fixes RDoc behaviour with ++ only supporting alphanumeric text." msgstr "" "RDocã®æŒ¯èˆžã„を修正ã™ã‚‹(ã‚¢ãƒ«ãƒ•ã‚¡ãƒ™ãƒƒãƒˆã¨æ•°å­—を組ã¿åˆã‚ã›ãŸãƒ†ã‚­ã‚¹ãƒˆã®ã‚µãƒãƒ¼ãƒˆã " "ã‘追加)" # @todo #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:44 #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:62 msgid "Refactor into own SimpleMarkup subclass" msgstr "自身をSimpleMarkupサブクラスã¸ãƒªãƒ•ァクタリング予定" # YARD::Templates::Helpers::Markup::RDocMarkup#fix_dash_dash #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:59 msgid "" "Don't allow -- to turn into — element. The chances of this being\n" "some --option is far more likely than the typographical meaning." msgstr "" "--ã‚’—ã¸å¤‰æ›ã™ã‚‹äº‹ã¯è¨±å¯ã—ã¦ã„ãªã„。\n" "表示ã—ã¦ã„ã‚‹æ„味よりもã€ã„ãã¤ã‹ã®--optionã«ãªã‚‹å¯èƒ½æ€§ãŒé«˜ã„。" # YARD::Templates::Helpers::Markup::RDocMarkupToHtml#handle_special_HYPERLINK #: ../lib/yard/templates/helpers/markup/rdoc_markup.rb:71 msgid "Disable auto-link of URLs" msgstr "URLã®è‡ªå‹•リンクを無効ã«ã™ã‚‹" # YARD::Templates::Helpers::MarkupHelper #: ../lib/yard/templates/helpers/markup_helper.rb:6 msgid "Helper methods for loading and managing markup types." msgstr "読ã¿è¾¼ã¿ã¨,åž‹ã®markupã®ç®¡ç†ç”¨ã®Helperメソッド" # YARD::Templates::Helpers::MarkupHelper.clear_markup_cache #: ../lib/yard/templates/helpers/markup_helper.rb:9 msgid "Clears the markup provider cache information. Mainly used for testing." msgstr "" "マークアッププロãƒã‚¤ãƒ€ãƒ¼ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥æƒ…å ±ã‚’åˆæœŸåŒ–ã™ã‚‹ã€‚\n" "主ã«test用ã«åˆ©ç”¨ã•れる。" # @since #: ../lib/yard/templates/helpers/markup_helper.rb:17 msgid "0.6.4" msgstr "" # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] #: ../lib/yard/templates/helpers/markup_helper.rb:17 msgid "the cached markup providers" msgstr "キャッシュã•れãŸãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—プロãƒã‚¤ãƒ€ãƒ¼" # YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS #: ../lib/yard/templates/helpers/markup_helper.rb:23 msgid "The default list of markup providers for each markup type" msgstr "" "ãれãžã‚Œã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®åž‹ç”¨ã®\n" "マークアッププロãƒã‚¤ãƒ€ãƒ¼ã®ãƒ‡ãƒ•ォルトã®ãƒªã‚¹ãƒˆã€‚" # YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS #: ../lib/yard/templates/helpers/markup_helper.rb:49 msgid "" "Returns a list of extensions for various markup types. To register\n" "extensions for a type, add them to the array of extensions for the\n" "type." msgstr "" "様々ãªmarkupã®åž‹ã®ç‚ºã«æ‹¡å¼µã®ãƒªã‚¹ãƒˆã‚’è¿”ã™ã€‚\n" "åž‹ç”¨ã«æ‹¡å¼µã‚’記録ã™ã‚‹ã«ã¯ã€åž‹ç”¨ã®æ‹¡å¼µã®é…åˆ—ã«æ‹¡å¼µã‚’追加ã™ã‚‹ã€‚" # YARD::Templates::Helpers::MarkupHelper::MARKUP_FILE_SHEBANG #: ../lib/yard/templates/helpers/markup_helper.rb:62 msgid "" "Contains the Regexp object that matches the shebang line of extra\n" "files to detect the markup type." msgstr "" "markup型をèªè­˜ã™ã‚‹ç‚ºã«ã€\n" "追加ã®ãƒ•ァイルã®shebang行ã«ãƒžãƒƒãƒã™ã‚‹\n" "Regexpオブジェクトをå«ã‚“ã§ã„る。" # YARD::Templates::Helpers::MarkupHelper#load_markup_provider #: ../lib/yard/templates/helpers/markup_helper.rb:66 msgid "" "Attempts to load the first valid markup provider in {MARKUP_PROVIDERS}.\n" "If a provider is specified, immediately try to load it." msgstr "" "{MARKUP_PROVIDERS}ã§æœ€åˆã®æœ‰åйãªãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã‚’読ã¿è¾¼ã‚€ã€‚\n" "プロãƒã‚¤ãƒ€ãƒ¼ãŒæŒ‡å®šã•れる場åˆã€ç›´ãã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã‹è©¦ã™ã€‚" # YARD::Templates::Helpers::MarkupHelper#load_markup_provider #: ../lib/yard/templates/helpers/markup_helper.rb:69 msgid "" "On success this sets `@markup_provider` and `@markup_class` to\n" "the provider name and library constant class/module respectively for\n" "the loaded provider." msgstr "" "ã“ã‚Œã¯æˆåŠŸã—ãŸå ´åˆã€ãƒ—ロãƒã‚¤ãƒ€ãƒ¼åã«\n" "`@markup_provider`ã¨`@markup_class`を設定ã—ã€\n" "ロードã•れãŸãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã®ç‚ºã«ã€\n" "ãれãžã‚Œãƒ©ã‚¤ãƒ–ラリ,定数,クラス/モジュールã¨ãªã‚‹ã€‚" # YARD::Templates::Helpers::MarkupHelper#load_markup_provider #: ../lib/yard/templates/helpers/markup_helper.rb:73 msgid "" "On failure this method will inform the user that no provider could be\n" "found and exit the program." msgstr "" "失敗ã—ãŸå ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€\n" "プロãƒã‚¤ãƒ€ãƒ¼ãŒè¦‹ã¤ã‘る事ãŒã§ããªã„ユーザーを知らã›ã¦ã€ãƒ—ラグラムを脱出ã™ã‚‹ã " "ã‚ã†ã€‚" # @return [Boolean] #: ../lib/yard/templates/helpers/markup_helper.rb:76 msgid "whether the markup provider was successfully loaded." msgstr "マークアップã®ãƒ—ロãƒã‚¤ãƒ€ãƒ¼ãŒæ­£å¸¸ã«èª­ã¿è¾¼ã¾ã‚ŒãŸã‹ã©ã†ã‹" # YARD::Templates::Helpers::MarkupHelper#markup_for_file #: ../lib/yard/templates/helpers/markup_helper.rb:108 msgid "" "Checks for a shebang or looks at the file extension to determine\n" "the markup type for the file contents. File extensions are registered\n" "for a markup type in {MARKUP_EXTENSIONS}." msgstr "" "shebangã‚’ãƒã‚§ãƒƒã‚¯ã—ã€\n" "ファイルã®å†…容ã®ç‚ºã«ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®åž‹ã‚’決ã‚るファイル拡張å­ã‚’探ã™ã€‚\n" "ファイル拡張å­ã¯ã€{MARKUP_EXTENSIONS}ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã®åž‹ãŒè¨˜éŒ²ã•れる。" # YARD::Templates::Helpers::MarkupHelper#markup_for_file #: ../lib/yard/templates/helpers/markup_helper.rb:112 msgid "A shebang should be on the first line of a file and be in the form:" msgstr "shebangã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€åˆã®è¡Œã«ãªã‚Šã€æ¬¡ã®ã‚ˆã†ãªå½¢å¼ã¨ãªã‚‹ã€‚" # YARD::Templates::Helpers::MarkupHelper#markup_for_file #: ../lib/yard/templates/helpers/markup_helper.rb:114 msgid " #!markup_type" msgstr "" # YARD::Templates::Helpers::MarkupHelper#markup_for_file #: ../lib/yard/templates/helpers/markup_helper.rb:116 msgid "Standard markup types are text, html, rdoc, markdown, textile" msgstr "標準ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—ã¯ã€text,htmlcrdoc,markdown,textileã¨ãªã‚‹ã€‚" # @param [String] contents #: ../lib/yard/templates/helpers/markup_helper.rb:122 msgid "" "Unused. Was necessary prior to 0.7.0.\n" "Newer versions of YARD use {CodeObjects::ExtraFileObject#contents}" msgstr "" "利用ã•れãªã„。0.7.0.よりå‰ã§ã¯ã€å¿…é ˆã ã£ãŸã€‚\n" "YARDã®æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ã¯ã€{CodeObjects::ExtraFileObject#contents}を用ã„る。" # @see #: ../lib/yard/templates/helpers/markup_helper.rb:122 msgid "tag|see|MARKUP_EXTENSIONS" msgstr "" # @return [Symbol] #: ../lib/yard/templates/helpers/markup_helper.rb:122 msgid "the markup type recognized for the file" msgstr "ファイルã«èªè­˜ã•れãŸãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—タイプ" # YARD::Templates::Helpers::MarkupHelper#markup_file_contents #: ../lib/yard/templates/helpers/markup_helper.rb:135 msgid "" "Strips any shebang lines on the file contents that pertain to\n" "markup or preprocessing data." msgstr "" "マークアップや処ç†ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã«é–¢ä¿‚ãŒã‚るファイルã®å†…容ã®\n" "ä»»æ„ã®shebang行をStripã™ã‚‹ã€‚" # @deprecated #: ../lib/yard/templates/helpers/markup_helper.rb:140 msgid "Use {CodeObjects::ExtraFileObject#contents} instead" msgstr "替ã‚りã«{CodeObjects::ExtraFileObject#contents}を使ã†" # @return [String] #: ../lib/yard/templates/helpers/markup_helper.rb:140 msgid "the file contents minus any preprocessing tags" msgstr "" "ファイルã®å†…容ãŒä»»æ„ã®tagを表ã™\n" "\n" # YARD::Templates::Helpers::MarkupHelper#markup_class #: ../lib/yard/templates/helpers/markup_helper.rb:145 msgid "" "Gets the markup provider class/module constant for a markup type\n" "Call {#load_markup_provider} before using this method." msgstr "" "マークアップ型ãŒã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使ã†å‰ã«{#load_markup_provider}を呼ã³å‡ºã™ãƒžãƒ¼ã‚¯" "アッププロãƒã‚¤ãƒ€ãƒ¼ã®ã‚¯ãƒ©ã‚¹/モジュールã®å®šæ•°ã‚’å–å¾—ã™ã‚‹ã€‚" # @return [Class] #: ../lib/yard/templates/helpers/markup_helper.rb:149 msgid "the markup class" msgstr "マークアップã®ã‚¯ãƒ©ã‚¹" # @param [Symbol] the #: ../lib/yard/templates/helpers/markup_helper.rb:149 #: ../lib/yard/templates/helpers/markup_helper.rb:159 msgid "the markup type (:rdoc, :markdown, etc.)" msgstr "マークアップã®åž‹(:rdoc, :markdown, etc.)" # YARD::Templates::Helpers::MarkupHelper#markup_provider #: ../lib/yard/templates/helpers/markup_helper.rb:155 msgid "" "Gets the markup provider name for a markup type\n" "Call {#load_markup_provider} before using this method." msgstr "" "マークアップ型ãŒã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ä½¿ã†å‰ã«{#load_markup_provider}を呼ã³å‡ºã™ãƒžãƒ¼ã‚¯" "アッププロãƒã‚¤ãƒ€ãƒ¼åã‚’å–å¾—ã™ã‚‹ã€‚" # @return [Symbol] #: ../lib/yard/templates/helpers/markup_helper.rb:159 msgid "the markup provider name (usually the gem name of the library)" msgstr "マークアッププロãƒã‚¤ãƒ€ãƒ¼å(慣習ã§ã¯ã€ãƒ©ã‚¤ãƒ–ラリã®gemå)" # YARD::Templates::Helpers::MethodHelper #: ../lib/yard/templates/helpers/method_helper.rb:4 msgid "Helper methods for method objects." msgstr "メソッドオブジェクト用ã®Helperメソッド" # @return [String] #: ../lib/yard/templates/helpers/method_helper.rb:6 msgid "formatted arguments for a method" msgstr "メソッド用ã«ãƒ•ォーマットã•れãŸå¼•æ•°" # @return [String] #: ../lib/yard/templates/helpers/method_helper.rb:25 msgid "formatted and linked return types for a method" msgstr "メソッド用ã«ãƒ•ォーマットã¨ãƒªãƒ³ã‚¯ã•れãŸåž‹ã‚’è¿”ã™" # @return [String] #: ../lib/yard/templates/helpers/method_helper.rb:32 msgid "formatted block if one exists" msgstr "ä½•ã‹æ¸¡ã•れãŸå ´åˆã€ãƒ•ォーマットã•れãŸãƒ–ロックを返ã™" # @return [String] #: ../lib/yard/templates/helpers/method_helper.rb:47 msgid "formats line numbers for source code of an object" msgstr "オブジェクトã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ç”¨ã«è¡Œæ•°ã‚’フォーマットã™ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/method_helper.rb:54 msgid "formats source of an object" msgstr "オブジェクトã®ã‚½ãƒ¼ã‚¹ã‚’フォーマットã™ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/method_helper.rb:65 msgid "formats source code of a constant value" msgstr "定数ã®å€¤ã®å…¥ã£ãŸã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’フォーマットã™ã‚‹" # YARD::Templates::Helpers::ModuleHelper #: ../lib/yard/templates/helpers/module_helper.rb:5 msgid "Helper methods for managing module objects." msgstr "モジュールオブジェクトを管ç†ç”¨ã®Helperメソッド" # YARD::Templates::Helpers::ModuleHelper#prune_method_listing #: ../lib/yard/templates/helpers/module_helper.rb:7 msgid "" "Prunes the method listing by running the verifier and removing attributes/" "aliases" msgstr "" "verifierã‚’èµ·å‹•ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒªã‚¹ãƒˆã‚’切り詰ã‚ã€å±žæ€§/エイリアスを削" "除ã™ã‚‹ã€‚" # @return [Array] #: ../lib/yard/templates/helpers/module_helper.rb:10 msgid "a pruned list of methods" msgstr "切り詰ã‚られãŸãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒªã‚¹ãƒˆ" # @param [Boolean] #: ../lib/yard/templates/helpers/module_helper.rb:10 msgid "tag|param|hide_attributes" msgstr "hide_attributes" # @param [Boolean] hide_attributes #: ../lib/yard/templates/helpers/module_helper.rb:10 msgid "whether to prune attribute methods from the list" msgstr "リストã‹ã‚‰ãƒ¡ã‚½ãƒƒãƒ‰ã®å±žæ€§ã‚’切り詰ã‚ã‚‹ã‹ã©ã†ã‹" # YARD::Templates::Helpers::TextHelper #: ../lib/yard/templates/helpers/text_helper.rb:5 msgid "Helper methods for text template formats." msgstr "テキストテンプレートフォーマット用ã®Helperメソッド" # @return [String] #: ../lib/yard/templates/helpers/text_helper.rb:7 msgid "escapes text" msgstr "テキストをエスケープã™ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/text_helper.rb:22 msgid "wraps text at +col+ columns." msgstr "+col+ 列ã§ãƒ†ã‚­ã‚¹ãƒˆã‚’ラップã™ã‚‹ã€‚" # @return [String] #: ../lib/yard/templates/helpers/text_helper.rb:27 msgid "indents +text+ by +len+ characters." msgstr "+len+ 文字㧠+text+ をインデントã™ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/text_helper.rb:32 msgid "aligns a title to the right" msgstr "å³ã«ã‚¿ã‚¤ãƒˆãƒ«ã‚’並ã¹ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/text_helper.rb:37 msgid "aligns text to the right" msgstr "å³ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’並ã¹ã‚‹" # @return [String] #: ../lib/yard/templates/helpers/text_helper.rb:43 msgid "returns a horizontal rule for output" msgstr "å‡ºåŠ›ç”¨ã«æ¨ªæ–¹å‘ã®ç½«ç·šã‚’è¿”ã™" # @return [String] #: ../lib/yard/templates/helpers/text_helper.rb:48 msgid "the formatted signature for a method" msgstr "メソッド用ã«ãƒ•ォーマットã•れãŸã‚·ã‚°ãƒãƒãƒ£" # YARD::Templates::Helpers::UMLHelper #: ../lib/yard/templates/helpers/uml_helper.rb:4 msgid "Helpers for UML template format" msgstr "UMLテンプレートフォーマット用ã®Helperメソッド" # YARD::Templates::Helpers::UMLHelper#uml_visibility #: ../lib/yard/templates/helpers/uml_helper.rb:6 msgid "" "Official UML visibility prefix syntax for an object given its visibility" msgstr "オブジェクト用ã«ä¸Žãˆã‚‰ã‚ŒãŸå¯è¦–性ã®ç‚ºã®å…¬å¼ã®UMLプレフィックス構文" # @return [String] #: ../lib/yard/templates/helpers/uml_helper.rb:8 msgid "the UML visibility prefix" msgstr "UMLå¯è¦–性ã®ãƒ—レフィックス" # @param [CodeObjects::Base] object #: ../lib/yard/templates/helpers/uml_helper.rb:8 msgid "the object to retrieve visibility for" msgstr "å¯è¦–性を回åŽã™ã‚‹ã‚ªãƒ–ジェクト" # YARD::Templates::Helpers::UMLHelper#format_path #: ../lib/yard/templates/helpers/uml_helper.rb:17 msgid "Formats the path of an object for Graphviz syntax" msgstr "Graphviz構文用ã«ã‚ªãƒ–ジェクトã®ãƒ‘スをフォーマットã™ã‚‹ã€‚" # @param [CodeObjects::Base] object #: ../lib/yard/templates/helpers/uml_helper.rb:19 msgid "an object to format the path of" msgstr "パスをフォーマットã™ã‚‹ã‚ªãƒ–ジェクト" # @return [String] #: ../lib/yard/templates/helpers/uml_helper.rb:19 msgid "the encoded path" msgstr "エンコードã•れãŸãƒ‘ス" # YARD::Templates::Helpers::UMLHelper#h #: ../lib/yard/templates/helpers/uml_helper.rb:24 msgid "Encodes text in escaped Graphviz syntax" msgstr "Graphviz構文用ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’エンコードã™ã‚‹" # @param [String] text #: ../lib/yard/templates/helpers/uml_helper.rb:26 msgid "text to encode" msgstr "エンコードã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ" # @return [String] #: ../lib/yard/templates/helpers/uml_helper.rb:26 msgid "the encoded text" msgstr "エンコードã•れãŸãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Templates::Helpers::UMLHelper#tidy #: ../lib/yard/templates/helpers/uml_helper.rb:31 msgid "Tidies data by formatting and indenting text" msgstr "フォーマットã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’æ•´ãˆã‚‹ã€ãƒ†ã‚­ã‚¹ãƒˆã‚’インデントã™ã‚‹ã€‚" # @param [String] data #: ../lib/yard/templates/helpers/uml_helper.rb:33 msgid "pre-formatted text" msgstr "フォーマットã•れるå‰ã®ãƒ†ã‚­ã‚¹ãƒˆ" # @return [String] #: ../lib/yard/templates/helpers/uml_helper.rb:33 msgid "tidied text." msgstr "æ•´ãˆã‚‰ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆ" # YARD::Templates::Section #: ../lib/yard/templates/section.rb:4 msgid "" "Abstracts the structure for a section and its subsections into an ordered\n" "list of sections and subsections." msgstr "" "ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã«æ§‹é€ ä½“を抽象化ã—ã€ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¨ã‚µãƒ–セクションã®ã‚ªãƒ¼ãƒ€ãƒ¼ã•れãŸãƒªã‚¹" "トをサブサクションã«ã™ã‚‹ã€‚" # @return [Section] #: ../lib/yard/templates/section.rb:9 msgid "a new instance of Section" msgstr "ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„インスタンス" # @param value #: ../lib/yard/templates/template.rb:6 msgid "the value to set the attribute class to." msgstr "class属性を設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/templates/template.rb:6 msgid "the value to set the attribute section to." msgstr "section属性を設定ã™ã‚‹å€¤" # YARD::Templates::Template#class #: ../lib/yard/templates/template.rb:7 msgid "Returns the value of attribute class" msgstr "class属性ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Template#section #: ../lib/yard/templates/template.rb:7 msgid "Returns the value of attribute section" msgstr "section属性ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Template#class= #: ../lib/yard/templates/template.rb:7 msgid "Sets the attribute class" msgstr "classã®å±žæ€§ã‚’設定ã™ã‚‹" # YARD::Templates::Template#section= #: ../lib/yard/templates/template.rb:7 msgid "Sets the attribute section" msgstr "section属性を設定ã™ã‚‹" # YARD::Server::Commands::LibraryIndexCommand#options # YARD::Templates::Template#options #: ../lib/yard/templates/template.rb:8 msgid "Returns the value of attribute options" msgstr "options属性ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Template.extra_includes # YARD::Templates::Template.extra_includes= #: ../lib/yard/templates/template.rb:11 msgid "" "Extra includes are mixins that are included after a template is created. " "These\n" "mixins can be registered by plugins to operate on templates and override " "behaviour." msgstr "" # YARD::Templates::Template.extra_includes # YARD::Templates::Template.extra_includes= #: ../lib/yard/templates/template.rb:14 msgid "" "Note that this array can be filled with modules or proc objects. If a proc " "object\n" "is given, the proc will be called with the {Template#options} hash " "containing\n" "relevant template information like the object, format, and more. The proc " "should\n" "return a module or nil if there is none." msgstr "" # @example Adding in extra mixins to include on a template #: ../lib/yard/templates/template.rb:24 msgid "Template.extra_includes << MyHelper" msgstr "" # @example Conditionally including a mixin if the format is html #: ../lib/yard/templates/template.rb:24 msgid "" "Template.extra_includes << proc {|opts| MyHelper if opts.format == :html }" msgstr "" # @return [Array] #: ../lib/yard/templates/template.rb:24 msgid "" "a list of modules to be automatically included\n" "into any new template module" msgstr "" "ä»»æ„ã®æ–°ã—ã„テンプレートモジュールã¸è‡ªå‹•ã§ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã•れるモジュールã®ãƒªã‚¹" "ト" # @example #: ../lib/yard/templates/template.rb:24 msgid "tag|example|Adding in extra mixins to include on a template" msgstr "tag|example|テンプレート上ã§includeã™ã‚‹ãŸã‚ã«è¿½åŠ ã®mixinを追加ã™ã‚‹" # @example #: ../lib/yard/templates/template.rb:24 msgid "tag|example|Conditionally including a mixin if the format is html" msgstr "" # YARD::Templates::Template.include_extra #: ../lib/yard/templates/template.rb:33 msgid "Includes the {extra_includes} modules into the template object." msgstr "" # @param [Template] #: ../lib/yard/templates/template.rb:37 msgid "tag|param|template" msgstr "tag|param|template" # @return [LibraryVersion] #: ../lib/yard/templates/template.rb:37 msgid "the options hash containing all template information" msgstr "ãƒãƒƒã‚·ãƒ¥ã®ã‚ªãƒ—ションã¯å…¨ã¦ã®ãƒ†ãƒ³ãƒ—レート情報をå«ã‚“ã§ã„ã‚‹" # @param [CodeObjects::Base] object #: ../lib/yard/templates/template.rb:37 msgid "the template object to mixin the extra includes." msgstr "追加ã®includeã‚’mixinã™ã‚‹ç‚ºã®ãƒ†ãƒ³ãƒ—レートオブジェクト" # @param value #: ../lib/yard/templates/template.rb:59 msgid "the value to set the attribute full_path to." msgstr "full_path属性を設定ã™ã‚‹å€¤" # @param value #: ../lib/yard/templates/template.rb:59 msgid "the value to set the attribute path to." msgstr "path属性を設定ã™ã‚‹å€¤" # YARD::Templates::Template::ClassMethods#full_path #: ../lib/yard/templates/template.rb:60 msgid "Returns the value of attribute full_path" msgstr "full_path属性ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Template::ClassMethods#path #: ../lib/yard/templates/template.rb:60 msgid "Returns the value of attribute path" msgstr "path属性ã®å€¤ã‚’è¿”ã™" # YARD::Templates::Template::ClassMethods#full_path= #: ../lib/yard/templates/template.rb:60 msgid "Sets the attribute full_path" msgstr "full_path属性を設定ã™ã‚‹" # YARD::Templates::Template::ClassMethods#path= #: ../lib/yard/templates/template.rb:60 msgid "Sets the attribute path" msgstr "path属性を設定ã™ã‚‹" # @return [ClassMethods] #: ../lib/yard/templates/template.rb:68 msgid "a new instance of ClassMethods" msgstr "ClassMethodsã®æ–°ã—ã„インスタンス" # YARD::Templates::Template::ClassMethods#find_file #: ../lib/yard/templates/template.rb:78 msgid "" "Searches for a file identified by +basename+ in the template's\n" "path as well as any mixed in template paths. Equivalent to calling\n" "{ClassMethods#find_nth_file} with index of 1." msgstr "" "テンプレートパスも\n" "ä»»æ„ã®æ··ãœã‚‰ã‚ŒãŸãƒ†ãƒ³ãƒ—レートパスも +basename+ ã§ãƒ•ァイルãŒä¸€è‡´ã™ã‚‹ç‚ºã«æ¤œç´¢ã™" "る。\n" "{ClassMethods#find_nth_file}メソッドを index 1 ã§å‘¼ã³å‡ºã™ã®ã¨åŒæ§˜ã§ã‚る。" # @param [String] #: ../lib/yard/templates/template.rb:85 ../lib/yard/templates/template.rb:96 #: ../lib/yard/templates/template.rb:290 msgid "tag|param|basename" msgstr "basename" # @see #: ../lib/yard/templates/template.rb:85 msgid "tag|see|find_nth_file" msgstr "find_nth_file" # @param [String] basename #: ../lib/yard/templates/template.rb:85 ../lib/yard/templates/template.rb:96 msgid "the filename to search for" msgstr "検索ã™ã‚‹ãƒ•ァイルå" # @return [String] #: ../lib/yard/templates/template.rb:85 msgid "" "the full path of a file on disk with filename\n" "+basename+ in one of the template's paths." msgstr "" "テンプレートパスã®ä¸€ã¤ã§ã‚ã‚‹ +basename+ ã®å…¥ã£ãŸãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ•ァイルã®ãƒ•ルパ" "スを返ã™" # YARD::Templates::Template::ClassMethods#find_nth_file #: ../lib/yard/templates/template.rb:90 msgid "" "Searches for the nth file (where n = +index+) identified\n" "by basename in the template's path and any mixed in template paths." msgstr "" "n番目ã®ãƒ•ァイルãŒãƒ†ãƒ³ãƒ—レートパスã‹ä»»æ„ã®æ··ãœã‚‰ã‚ŒãŸãƒ†ãƒ³ãƒ—レートパスã®basename" "ã«ã‚ˆã£ã¦\n" "一致ã™ã‚‹ã‹ã‚µãƒ¼ãƒã™ã‚‹ã€‚" # @param [Fixnum] #: ../lib/yard/templates/template.rb:96 msgid "tag|param|index" msgstr "index" # @return [String] #: ../lib/yard/templates/template.rb:96 msgid "" "the full path of the nth file on disk with\n" "filename +basename+ in one of the template paths" msgstr "" "テンプレートパスã®ä¸€ã¤ã® +basename+ を用ã„ãŸãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®n番目ã®ãƒ•ァイルフルパ" "ス" # @param [Fixnum] index #: ../lib/yard/templates/template.rb:96 msgid "the nth existing file to return" msgstr "n番目ã«å­˜åœ¨ã™ã‚‹ãƒ•ァイルを戻ã™index" # YARD::Templates::Template::ClassMethods#new #: ../lib/yard/templates/template.rb:115 msgid "Creates a new template object to be rendered with {Template#run}" msgstr "{Template#run}ã¨å…±ã«è¡¨ç¤ºã•れる新ã—ã„テンプレートオブジェクトを作æˆã™ã‚‹" # YARD::Templates::Template::ClassMethods#S #: ../lib/yard/templates/template.rb:131 msgid "Alias for creating a {Section} with arguments" msgstr "引数ã¨å…±ã«{Section}ã®ä½œæˆç”¨ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹" # @see #: ../lib/yard/templates/template.rb:133 msgid "tag|see|Section#initialize" msgstr "Section#initialize" # @return [Template] #: ../lib/yard/templates/template.rb:166 msgid "a new instance of Template" msgstr "ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã®æ–°ã—ã„インスタンス" # YARD::Templates::Template#T #: ../lib/yard/templates/template.rb:177 msgid "" "Loads a template specified by path. If +:template+ or +:format+ is\n" "specified in the {#options} hash, they are prepended and appended\n" "to the path respectively." msgstr "" "pathã«ã‚ˆã£ã¦æŒ‡å®šã•れãŸãƒ†ãƒ³ãƒ—レートをロードã™ã‚‹ã€‚\n" "+:template+ ã‚„ +:format+ ãŒ{#options}ãƒãƒƒã‚·ãƒ¥ãƒ¡ã‚½ãƒƒãƒ‰ã§æŒ‡å®šã•れる場åˆã€\n" "#optionsメソッドã«é–¢ä¿‚ã™ã‚‹ãƒ‘スãŒå‰å¾Œã«åŠ ãˆã‚‰ã‚Œã‚‹ã€‚" # @return [Template] #: ../lib/yard/templates/template.rb:182 msgid "the loaded template module" msgstr "ロードã•れãŸãƒ†ãƒ³ãƒ—レートモジュール" # @param [Array] path #: ../lib/yard/templates/template.rb:182 msgid "the path of the template" msgstr "テンプレートã®ãƒ‘ス" # YARD::Templates::Template#sections #: ../lib/yard/templates/template.rb:189 msgid "Sets the sections (and subsections) to be rendered for the template" msgstr "テンプレート用ã«è¡¨ç¤ºã•れるセクション(ã¨ã‚µãƒ–サクション)を設定ã™ã‚‹ã€‚" # @example Sets a set of method and erb sections #: ../lib/yard/templates/template.rb:204 msgid "sections :a, :b, :c # a is a method, the rest are erb files" msgstr "" # @example Sets a set of erb sections #: ../lib/yard/templates/template.rb:204 msgid "sections :a, :b, :c # searches for a.erb, b.erb, c.erb" msgstr "" # @example Sections with subsections #: ../lib/yard/templates/template.rb:204 msgid "" "sections :header, [:name, :children]\n" "# the above will call header.erb and only renders the subsections\n" "# if they are yielded by the template (see #yieldall)" msgstr "" "sections :header, [:name, :children]\n" "# 上ã¯ã€header.erbãŒå‘¼ã³å‡ºã•れã€subsectionã‚’ãŒè¡¨ç¤ºã™ã‚‹ã€‚\n" "# テンプレートã§yieldã—ãŸã„å ´åˆã¯ (see #yieldall) å‚ç…§" # @example #: ../lib/yard/templates/template.rb:204 msgid "tag|example|Sections with subsections" msgstr "subsectionsを用ã„ãŸsection" # @example #: ../lib/yard/templates/template.rb:204 msgid "tag|example|Sets a set of erb sections" msgstr "erb sectionã®ã‚°ãƒ«ãƒ¼ãƒ—を設置ã™ã‚‹" # @example #: ../lib/yard/templates/template.rb:204 msgid "tag|example|Sets a set of method and erb sections" msgstr "メソッドã®ã‚°ãƒ«ãƒ¼ãƒ—ã¨ercセクションを設定ã™ã‚‹" # @param [Array] args #: ../lib/yard/templates/template.rb:204 msgid "" "the sections\n" "to use to render the template. For symbols and strings, the\n" "section will be executed as a method (if one exists), or rendered\n" "from the file \"name.erb\" where name is the section name. For\n" "templates, they will have {Template::ClassMethods#run} called on them.\n" "Any subsections can be yielded to using yield or {#yieldall}" msgstr "" "テンプレートを表示ã™ã‚‹ç‚ºã«åˆ©ç”¨ã™ã‚‹ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€‚\n" "symbolã¨stringã§ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦å®Ÿè¡Œã•れる。(存在ã™ã‚‹å ´åˆ)\n" "åˆã€nameãŒsectionåã®æ‰€ã§\"name.erb\"ファイルã‹ã‚‰è¡¨ç¤ºã•れる\n" "テンプレート用ã«ã€å‘¼ã³å‡ºã•れãŸ{Template::ClassMethods#run}ã‚’æŒã¤ã ã‚ã†ã€‚\n" "ä»»æ„ã®subsectionã¯ã€yieldã‚„{#yieldall}メソッドã«ã‚ˆã£ã¦yieldã•れる。" # YARD::Templates::Template#init #: ../lib/yard/templates/template.rb:210 msgid "" "Initialization called on the template. Override this in a 'setup.rb'\n" "file in the template's path to implement a template" msgstr "" "テンプレート上ã§å‘¼ã³å‡ºã•ã‚Œã‚‹åˆæœŸåŒ–処ç†ã€‚\n" "テンプレートを実装ã™ã‚‹ãƒ†ãƒ³ãƒ—レートã®ãƒ‘スã§'setup.rb'ファイルを上書ãã™ã‚‹ã€‚" # @example A default set of sections #: ../lib/yard/templates/template.rb:217 msgid "" "def init\n" " sections :section1, :section2, [:subsection1, :etc]\n" "end" msgstr "" # @example #: ../lib/yard/templates/template.rb:217 msgid "tag|example|A default set of sections" msgstr "セクションã®ãƒ‡ãƒ•ォルトã®ã‚°ãƒ«ãƒ¼ãƒ—" # @see #: ../lib/yard/templates/template.rb:217 msgid "tag|see|#sections" msgstr "" # YARD::Templates::Template#run #: ../lib/yard/templates/template.rb:221 msgid "" "Runs a template on +sects+ using extra options. This method should\n" "not be called directly. Instead, call the class method {ClassMethods#run}" msgstr "" "追加ã®ã‚ªãƒ—ションã«ã‚ˆã£ã¦ã€+sects+上ã§ãƒ†ãƒ³ãƒ—レートを起動ã™ã‚‹ã€‚\n" "ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ç›´æŽ¥å‘¼ã³å‡ºã•れãªã„ã ã‚ã†ã€‚\n" "代ã‚りã«ã€{ClassMethods#run}クラスメソッドを呼ã³å‡ºã™ã€‚" # @param [Section, Array] sects #: ../lib/yard/templates/template.rb:230 msgid "a section list of sections to render" msgstr "表示ã™ã‚‹ç‚ºã®sectionã®ãƒªã‚¹ãƒˆ" # @param [Hash, nil] opts #: ../lib/yard/templates/template.rb:230 msgid "any extra options to apply to sections" msgstr "sectionsã«é©ç”¨ã™ã‚‹ä»»æ„ã®è¿½åŠ ã®ã‚ªãƒ—ション" # @yieldparam [Hash] opts #: ../lib/yard/templates/template.rb:230 msgid "any extra options to yield" msgstr "yieldã™ã‚‹ä»»æ„ã®è¿½åŠ ã®ã‚ªãƒ—ション" # @yield [opts] #: ../lib/yard/templates/template.rb:230 msgid "calls for the subsections to be rendered" msgstr "表示ã•れるサブセクション用ã«å‘¼ã³å‡ºã•れる" # @param [Boolean] break_first #: ../lib/yard/templates/template.rb:230 msgid "if true, renders only the first section" msgstr "trueãªã‚‰ã€æœ€åˆã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã ã‘表示ã•れる" # @param [Boolean] #: ../lib/yard/templates/template.rb:230 msgid "tag|param|break_first" msgstr " break_first" # @param [Section, Array] #: ../lib/yard/templates/template.rb:230 msgid "tag|param|sects" msgstr "sects" # @param [Fixnum] #: ../lib/yard/templates/template.rb:230 msgid "tag|param|start_at" msgstr "start_at" # @yieldparam [Hash] #: ../lib/yard/templates/template.rb:230 msgid "tag|yieldparam|opts" msgstr "" # @param [Fixnum] start_at #: ../lib/yard/templates/template.rb:230 msgid "the index in the section list to start from" msgstr "セクションã®ãƒªã‚¹ãƒˆã®æœ€åˆã®index" # @return [String] #: ../lib/yard/templates/template.rb:230 msgid "the rendered sections joined together" msgstr "一緒ã«åŠ ãˆã‚‰ã‚ŒãŸ,表示ã•れãŸsection" # YARD::Templates::Template#yieldall #: ../lib/yard/templates/template.rb:254 msgid "Yields all subsections with any extra options" msgstr "ä»»æ„ã®è¿½åŠ ã®ã‚ªãƒ—ションã¨å…±ã«å…¨ã¦ã®ã‚µãƒ–セクションをyieldã™ã‚‹ã€‚" # @param [Hash] opts #: ../lib/yard/templates/template.rb:256 msgid "extra options to be applied to subsections" msgstr "サブセクションã«é©ç”¨ã•れる追加ã®ã‚ªãƒ—ション" # @yield #: ../lib/yard/templates/template.rb:263 msgid "calls subsections to be rendered" msgstr "表示ã•れるサブセクションを呼ã³å‡ºã™" # @param [String, Symbol] # @param [Symbol, String] #: ../lib/yard/templates/template.rb:263 ../lib/yard/templates/template.rb:308 msgid "tag|param|section" msgstr "section" # @return [String] #: ../lib/yard/templates/template.rb:263 msgid "the contents of the ERB rendered section" msgstr "セクションã«è¡¨ç¤ºã•れるERBã®å†…容" # @param [String, Symbol] section #: ../lib/yard/templates/template.rb:263 msgid "the section name" msgstr "セクションå" # YARD::Templates::Template#file #: ../lib/yard/templates/template.rb:271 msgid "" "Returns the contents of a file. If +allow_inherited+ is set to +true+,\n" "use +{{{__super__}}}+ inside the file contents to insert the contents\n" "of the file from an inherited template. For instance, if +templates/b+\n" "inherits from +templates/a+ and file \"test.css\" exists in both " "directories,\n" "both file contents can be retrieved by having +templates/b/test.css+ look\n" "like:" msgstr "" "ファイルã®å†…容を返ã™ã€‚\n" "+allow_inherited+ ㌠+true+ ã«è¨­å®šã•れる場åˆã€\n" "継承ã•れãŸãƒ†ãƒ³ãƒ—レートã‹ã‚‰\n" "ファイルã®å…¥ã£ãŸå†…容を挿入ã™ã‚‹ç‚ºã€\n" "ファイルã®å†…容ã®å†…部ã§\n" "+{{{__super__}}}+ を使ã†ã€‚\n" "例ãˆã°ã€ +templates/b+ ㌠+templates/a+ ã‹ã‚‰ç¶™æ‰¿ã•れ〠\"test.css\"ファイルãŒ" "存在ã™ã‚‹\n" "ディレクトリã®ä¸­ã§ä¸¡æ–¹ã¨ã‚‚存在ã—ã¦ã„ã‚‹å ´åˆã€\n" "両方ファイルã®å†…容ã¯ã€ä»¥ä¸‹ã®ç”¨ã«\n" "+templates/b/test.css+ ã‚’æŒã¤äº‹ã«ã‚ˆã£ã¦å›žåŽã§ãる。" # YARD::Templates::Template#file #: ../lib/yard/templates/template.rb:278 msgid "" " {{{__super__}}}\n" " ...\n" " body { css styles here }\n" " p.class { other styles }" msgstr "" # @param [Boolean] #: ../lib/yard/templates/template.rb:290 msgid "tag|param|allow_inherited" msgstr "allow_inherited" # @see #: ../lib/yard/templates/template.rb:290 msgid "tag|see|ClassMethods#find_file" msgstr "" # @see #: ../lib/yard/templates/template.rb:290 msgid "tag|see|ClassMethods#find_nth_file" msgstr "" # @return [String] #: ../lib/yard/templates/template.rb:290 msgid "" "the contents of a file identified by +basename+. All\n" "template paths (including any mixed in templates) are searched for\n" "the file" msgstr "" "+basename+ ã«ã‚ˆã£ã¦æŒ‡å®šã•れãŸãƒ•ァイルã®å†…容。\n" "å…¨ã¦ã®ãƒ†ãƒ³ãƒ—レートパスã¯(ä»»æ„ã®æ··ãœã‚‰ã‚ŒãŸãƒ†ãƒ³ãƒ—レートをå«ã‚“ã§ã„ã‚‹)ã€\n" "ãƒ•ã‚¡ã‚¤ãƒ«ç”¨ã«æ¤œç´¢ã•れる。" # @param [String] basename #: ../lib/yard/templates/template.rb:290 msgid "the name of the file" msgstr "ファイルã®åå‰" # @param [Boolean] allow_inherited #: ../lib/yard/templates/template.rb:290 msgid "" "whether inherited templates can\n" "be inserted with +{{{__super__}}}+" msgstr "継承ã•れãŸãƒ†ãƒ³ãƒ—レート㌠+{{{__super__}}}+ を用ã„ã¦ç¶™æ‰¿ã•れるã‹ã©ã†ã‹" # YARD::Templates::Template#superb #: ../lib/yard/templates/template.rb:304 msgid "Calls the ERB file from the last inherited template with {#section}.erb" msgstr "" "{#section}.erbã¨å…±ã«ç¶™æ‰¿ã•れãŸãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã®æœ€å¾Œã‹ã‚‰ERBファイルを呼ã³å‡ºã™ã€‚" # @param [Symbol, String] section #: ../lib/yard/templates/template.rb:308 msgid "if provided, uses a specific section name" msgstr "æä¾›ã•れãŸå ´åˆã€å›ºæœ‰ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³åを使ã†" # @return [String] #: ../lib/yard/templates/template.rb:308 msgid "" "the rendered ERB file in any of the inherited template\n" "paths." msgstr "継承ã•れãŸãƒ†ãƒ³ãƒ—レートパスã®ä»»æ„ã§è¡¨ç¤ºã•れるERBファイル" # YARD::Templates::TemplateOptions #: ../lib/yard/templates/template_options.rb:6 msgid "" "An Options class containing default options for base template rendering. " "For\n" "options specific to generation of HTML output, see {CLI::YardocOptions}." msgstr "" # @see #: ../lib/yard/templates/template_options.rb:9 msgid "tag|see|CLI::YardocOptions" msgstr "" # @param [String] text #: ../lib/yard/templates/template_options.rb:11 msgid "the template output format" msgstr "テンプレート出力ã®ãƒ•ォーマット" # @param [String] path #: ../lib/yard/templates/template_options.rb:14 msgid "the template name used to render output" msgstr "出力を表示ã™ã‚‹ãŸã‚利用ã•れãŸãƒ†ãƒ³ãƒ—レートå" # @param value #: ../lib/yard/templates/template_options.rb:17 msgid "the markup format to use when parsing docstrings" msgstr "docstringã‚’è§£æžã™ã‚‹æ™‚ã«ä½¿ã†ãŸã‚ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—フォーマット" # YARD::Templates::Helpers::HtmlHelper#signature_types #: ../lib/yard/templates/template_options.rb:20 msgid "the default return type for a method with no return tags" msgstr "returnタグを用ã„ãªã„メソッド用ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æˆ»ã‚Šã®åž‹" # @return [Boolean] #: ../lib/yard/templates/template_options.rb:23 msgid "whether void methods should show \"void\" in their signature" msgstr "" # @param [String] source #: ../lib/yard/templates/template_options.rb:26 msgid "whether code blocks should be syntax highlighted" msgstr "ã‚³ãƒ¼ãƒ‰ãƒ–ãƒ­ãƒƒã‚¯ãŒæ§‹æ–‡ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れるã‹ã©ã†ã‹" # YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS #: ../lib/yard/templates/template_options.rb:29 msgid "the markup provider class for the markup format" msgstr "マークアップフォーマット用ã®ãƒžãƒ¼ã‚¯ã‚¢ãƒƒãƒ—プロãƒã‚¤ãƒ€ãƒ¼ã‚¯ãƒ©ã‚¹" # @return [OpenStruct] #: ../lib/yard/templates/template_options.rb:33 msgid "" "an open struct containing any global state across all\n" "generated objects in a template." msgstr "" "テンプレートã®ä¸­ã§ç”Ÿæˆã•れãŸå…¨ã¦ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ¸¡ã£ã¦\n" "å…¨ã¦ã®globalã®çŠ¶æ…‹ã‚’å«ã‚“ã§ã„ã‚‹open struct" # @return [Template] #: ../lib/yard/templates/template_options.rb:37 msgid "the main object being generated in the template" msgstr "テンプレートã®ä¸­ã§ç”Ÿæˆã•れるメインオブジェクト" # YARD::CodeObjects::Base#name # YARD::CodeObjects::Proxy#name #: ../lib/yard/templates/template_options.rb:40 msgid "the owner of the generated object" msgstr "生æˆã•れãŸã‚ªãƒ–ジェクトã®ã‚ªãƒ¼ãƒŠãƒ¼" # @return [Boolean] #: ../lib/yard/templates/template_options.rb:43 msgid "the template type used to generate output" msgstr "出力を生æˆã™ã‚‹ãŸã‚ã«ä½¿ã£ãŸãƒ†ãƒ³ãƒ—レートタイプ" # @return [Boolean] #: ../lib/yard/templates/template_options.rb:46 msgid "whether serialization should be performed" msgstr "シリアライズãŒå®Ÿè¡Œã•れるã‹ã©ã†ã‹" # @return [Serializers::Base] #: ../lib/yard/templates/template_options.rb:50 msgid "" "the serializer used to generate links and serialize\n" "output. Serialization output only occurs if {#serialize} is +true+." msgstr "" # @deprecated #: ../lib/yard/templates/template_options.rb:54 #: ../lib/yard/templates/template_options.rb:56 msgid "use {#highlight} instead." msgstr "" # @return [String] #: ../lib/yard/templates/template_options.rb:54 #: ../lib/yard/templates/template_options.rb:56 msgid "whether highlighting should be ignored" msgstr "ãƒã‚¤ãƒ©ã‚¤ãƒˆãŒç„¡è¦–ã•れるã‹ã©ã†ã‹" # @param [String] title #: ../lib/yard/templates/template_options.rb:60 msgid "the title of a given page" msgstr "与ãˆã‚‰ã‚ŒãŸãƒšãƒ¼ã‚¸ã®ã‚¿ã‚¤ãƒˆãƒ«" # @return [Array] #: ../lib/yard/templates/template_options.rb:68 msgid "" "an array of module name wildcards to embed into\n" "class documentation as if their methods were defined directly in the class.\n" "Useful for modules like ClassMethods. If the name contains '::', the module\n" "is matched against the full mixin path, otherwise only the module name is " "used." msgstr "" # @example A list of mixin path names (including wildcards) #: ../lib/yard/templates/template_options.rb:68 msgid "opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*']" msgstr "" # @example #: ../lib/yard/templates/template_options.rb:68 msgid "tag|example|A list of mixin path names (including wildcards)" msgstr "" # @param [CodeObjects::Base] mixin #: ../lib/yard/templates/template_options.rb:74 msgid "" "accepts any code object, but returns\n" "nil unless the object is a module." msgstr "" # @return [nil] #: ../lib/yard/templates/template_options.rb:74 msgid "if the mixin is not a module object" msgstr "mixinãŒãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚ªãƒ–ジェクトã§ãªã„å ´åˆ" # @param [Fixnum, nil] #: ../lib/yard/templates/template_options.rb:74 msgid "tag|param|mixin" msgstr "tag|param|mixin" # @return [Boolean] #: ../lib/yard/templates/template_options.rb:74 msgid "whether a mixin matches the embed_mixins list" msgstr "mixinãŒembed_mixinsã®ãƒªã‚¹ãƒˆã«ãƒžãƒƒãƒã™ã‚‹ã‹ã©ã†ã‹" # @param [Serializers::Base] serializer #: ../lib/yard/templates/template_options.rb:85 msgid "the verifier object" msgstr "verifier(èªè¨¼)オブジェクト" # YARD::Verifier #: ../lib/yard/verifier.rb:3 msgid "" "Similar to a Proc, but runs a set of Ruby expressions using a small\n" "DSL to make tag lookups easier." msgstr "" "Procã¨åŒæ§˜ã§ã‚ã‚‹ãŒã€æ¤œç´¢ã—ã‚„ã™ã„タグを作る為ã«ã€\n" "ã¡ã‚‡ã£ã¨ã—ãŸDSLã«ã‚ˆã£ã¦ã€Rubyã®å¼ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’èµ·å‹•ã™ã‚‹ã€‚" # YARD::Verifier #: ../lib/yard/verifier.rb:6 msgid "" "The syntax is as follows:\n" "* All syntax is Ruby compatible\n" "* +object+ (+o+ for short) exist to access the object being verified\n" "* +@TAGNAME+ is translated into +object.tag('TAGNAME')+\n" "* +@@TAGNAME+ is translated into +object.tags('TAGNAME')+\n" "* +object+ can be omitted as target for method calls (it is implied)" msgstr "" "æ¬¡ã®æ§˜ãªæ§‹æ–‡ã¨ãªã‚‹:\n" "* å…¨ã¦ã®æ§‹æ–‡ã¯ã€Rubyã¨äº’æ›æ€§ãŒã‚る。\n" "* +object+ (略字㯠+o+)ã¯æ¤œè¨¼ã•れるオブジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ç‚ºã«å­˜åœ¨ã™ã‚‹ã€‚\n" "* +@TAGNAME+ 㯠+object.tag('TAGNAME')+ ã®ä¸­ã§å¤‰æ›ã•れる\n" "* +@@TAGNAME+ 㯠+object.tags('TAGNAME')+ ã®ä¸­ã§å¤‰æ›ã•れる\n" "* +object+ ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—用ã®å¯¾è±¡ã¨ã—ã¦çœç•¥ã§ãる。(ã»ã®ã‚ã‹ã™)" # @example Check if there are any @param tags #: ../lib/yard/verifier.rb:33 msgid "" "Verifier.new('@@param.empty?')\n" "# Equivalent to:\n" "Verifier.new('object.tags(:param).empty?')" msgstr "" "Verifier.new('@@param.empty?')\n" "# 下ã¯ä¸Šã¨åŒæ§˜\n" "Verifier.new('object.tags(:param).empty?')" # @example Specifying multiple expressions #: ../lib/yard/verifier.rb:33 msgid "" "Verifier.new('@return', '@param', '@yield')\n" "# Equivalent to:\n" "Verifier.new('@return && @param && @yield')" msgstr "" "Verifier.new('@return', '@param', '@yield')\n" "# 以下ã¯ä¸Šã¨åŒæ§˜\n" "Verifier.new('@return && @param && @yield')" # @example Create a verifier to find any return tag with an empty description #: ../lib/yard/verifier.rb:33 msgid "" "Verifier.new('@return.text.empty?')\n" "# Equivalent to:\n" "Verifier.new('object.tag(:return).text.empty?')" msgstr "" "Verifier.new('@return.text.empty?')\n" "# 下ã¯ä¸Šã¨åŒæ§˜\n" "Verifier.new('object.tag(:return).text.empty?')" # @example Using +object+ or +o+ to look up object attributes directly #: ../lib/yard/verifier.rb:33 msgid "" "Verifier.new('object.docstring == \"hello world\"')\n" "# Equivalent to:\n" "Verifier.new('o.docstring == \"hello world\"')" msgstr "" "Verifier.new('object.docstring == \"hello world\"')\n" "# 下ã¯ä¸Šã¨åŒæ§˜\n" "Verifier.new('o.docstring == \"hello world\"')" # @example Without using +object+ or +o+ #: ../lib/yard/verifier.rb:33 msgid "Verifier.new('tag(:return).size == 1 || has_tag?(:author)')" msgstr "" # @example #: ../lib/yard/verifier.rb:33 msgid "tag|example|Check if there are any @param tags" msgstr "@paramã‚¿ã‚°ãŒã‚ã‚‹ã‹ãƒã‚§ãƒƒã‚¯ã™ã‚‹" # @example #: ../lib/yard/verifier.rb:33 msgid "" "tag|example|Create a verifier to check for objects that don't have @private " "tags" msgstr "@privateã‚¿ã‚°ã‚’æŒãŸãªã„オブジェクト用ã«ãƒã‚§ãƒƒã‚¯ã™ã‚‹æ¤œè¨¼å™¨ã‚’作æˆã™ã‚‹ã€‚" # @example #: ../lib/yard/verifier.rb:33 msgid "" "tag|example|Create a verifier to find any return tag with an empty " "description" msgstr "空ã®èª¬æ˜Žã¨å…±ã«ã€ä»»æ„ã®returnタグを見ã¤ã‘る検証器を作æˆã™ã‚‹ã€‚" # @example #: ../lib/yard/verifier.rb:33 msgid "tag|example|Specifying multiple expressions" msgstr "複数ã®è¡¨ç¾ã‚’指定ã™ã‚‹" # @example #: ../lib/yard/verifier.rb:33 msgid "tag|example|Using +object+ or +o+ to look up object attributes directly" msgstr "直接オブジェクト属性を検索ã™ã‚‹ã«ã¯ã€+object+ ã‚„ +o+を使ã†" # @example #: ../lib/yard/verifier.rb:33 msgid "tag|example|Without using +object+ or +o+" msgstr "+object+ 㨠+o+ を使ã‚ãªã„例" # @example Create a verifier to check for objects that don't have @private tags #: ../lib/yard/verifier.rb:33 msgid "" "verifier = Verifier.new('!@private')\n" "verifier.call(object) # => true (no @private tag)" msgstr "" # @return [Array] #: ../lib/yard/verifier.rb:36 msgid "a list of all expressions the verifier checks for" msgstr "ãƒã‚§ãƒƒã‚¯ã™ã‚‹æ¤œè¨¼å™¨ç”¨ã®å…¨ã¦ã®å¼ã®ãƒªã‚¹ãƒˆ" # YARD::Verifier#initialize #: ../lib/yard/verifier.rb:44 msgid "Creates a verifier from a set of expressions" msgstr "å¼ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‹ã‚‰æ¤œè¨¼å™¨ã‚’作æˆã™ã‚‹ã€‚" # @param [Array] expressions #: ../lib/yard/verifier.rb:47 msgid "" "a list of Ruby expressions to\n" "parse." msgstr "è§£æžã™ã‚‹Rubyã®å¼ã®ãƒªã‚¹ãƒˆ" # @return [Verifier] #: ../lib/yard/verifier.rb:47 msgid "a new instance of Verifier" msgstr "æ¤œè¨¼å™¨ã®æ–°ã—ã„インスタンス" # @param [Array] #: ../lib/yard/verifier.rb:47 ../lib/yard/verifier.rb:57 msgid "tag|param|expressions" msgstr "å¼" # YARD::Verifier#add_expressions #: ../lib/yard/verifier.rb:53 msgid "Adds a set of expressions and recompiles the verifier" msgstr "å¼ã®ã‚°ãƒ«ãƒ¼ãƒ—を追加ã—ã€æ¤œè¨¼å™¨ã‚’å†ç·¨é›†ã™ã‚‹ã€‚" # @param [Array] expressions #: ../lib/yard/verifier.rb:57 msgid "a list of expressions" msgstr "å¼ã®ãƒªã‚¹ãƒˆ" # YARD::Verifier#method_missing #: ../lib/yard/verifier.rb:62 msgid "Passes any method calls to the object from the {#call}" msgstr "{#call}メソッドã‹ã‚‰ã‚ªãƒ–ジェクトã«ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã‚’è§£æžã™ã‚‹" # YARD::Verifier#call #: ../lib/yard/verifier.rb:71 msgid "Tests the expressions on the object." msgstr "オブジェクト上ã®å¼ã‚’テストã™ã‚‹" # @note #: ../lib/yard/verifier.rb:75 msgid "If the object is a {CodeObjects::Proxy} the result will always be true." msgstr "オブジェクトãŒ{CodeObjects::Proxy}ãªã‚‰ã€è©•ä¾¡çµæžœã¯,常ã«trueã«ãªã‚‹ã€‚" # @param [CodeObjects::Base] object #: ../lib/yard/verifier.rb:75 msgid "the object to verify" msgstr "検証ã™ã‚‹ã‚ªãƒ–ジェクト" # @return [Boolean] #: ../lib/yard/verifier.rb:75 msgid "the result of the expressions" msgstr "å¼ã®çµæžœ" # YARD::Verifier#run #: ../lib/yard/verifier.rb:85 msgid "" "Runs a list of objects against the verifier and returns the subset\n" "of verified objects." msgstr "" "オブジェクトã«å¯¾ã™ã‚‹æ¤œè¨¼å™¨ã®ãƒªã‚¹ãƒˆã‚’èµ·å‹•ã—ã€æ¤œè¨¼ã•れるオブジェクトã®ä¸‹ä½é›†åˆ" "ã‚’è¿”ã™" # @return [Array] #: ../lib/yard/verifier.rb:90 msgid "" "a list of code objects that match\n" "the verifier." msgstr "検証器ã«ãƒžãƒƒãƒã™ã‚‹ã‚³ãƒ¼ãƒ‰ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ" # @return [CodeObjects::Base] #: ../lib/yard/verifier.rb:97 msgid "the current object being tested" msgstr "テストã•れるç¾åœ¨ã®ã‚ªãƒ–ジェクト" # YARD::Verifier#modify_nilclass #: ../lib/yard/verifier.rb:106 msgid "" "Modifies nil to not throw NoMethodErrors. This allows\n" "syntax like object.tag(:return).text to work if the #tag\n" "call returns nil, which means users don't need to perform\n" "stringent nil checking" msgstr "" "NoMethodErrorsã«throwã›ãšnil classã«å¤‰æ›´ã™ã‚‹ã€‚\n" "#tagメソッド呼ã³å‡ºã—ãŒnilã‚’è¿”ã™å ´åˆã€\n" "ã“れã¯object.tag(:return).textã®ã‚ˆã†ãªæ§‹æ–‡ã‚’å—ã‘入れる。\n" "ユーザーãŒå޳坆ãªnilã®ãƒã‚§ãƒƒã‚¯ã™ã‚‹ç‚ºã«å¿…è¦ã¨ã—ãªã„事をæ„味ã™ã‚‹ã€‚" # YARD::Verifier#unmodify_nilclass #: ../lib/yard/verifier.rb:118 msgid "Returns the state of NilClass back to normal" msgstr "NilClassã®çŠ¶æ…‹ã‚’å…ƒã«æˆ»ã™" # YARD::Verifier#create_method_from_expressions #: ../lib/yard/verifier.rb:126 msgid "" "Creates the +__execute+ method by evaluating the expressions\n" "as Ruby code" msgstr "" "Rubyã®ã‚³ãƒ¼ãƒ‰ã®ã‚ˆã†ãªå¼ã‚’評価ã™ã‚‹äº‹ã«ã‚ˆã£ã¦ +__execute+ メソッドを作æˆã™ã‚‹ã€‚" # YARD::Verifier#parse_expression #: ../lib/yard/verifier.rb:137 msgid "Parses a single expression, handling some of the DSL syntax." msgstr "å˜ç‹¬ã®å¼ã‚’è§£æžã—ã€ã„ãã¤ã‹ã®DSL構文をæ“作ã™ã‚‹ã€‚" # YARD::Verifier#parse_expression #: ../lib/yard/verifier.rb:139 msgid "" "The syntax \"@tag\" should be turned into object.tag(:tag),\n" "and \"@@tag\" should be turned into object.tags(:tag)" msgstr "" "\"@tag\"æ§‹æ–‡ã¯ã€object.tag(:tag)ã¸æ¸¡ã•れã€\n" "\"@tags\"æ§‹æ–‡ã¯ã€object.tags(:tag)ã¸æ¸¡ã•れる。" # @return [String] #: ../lib/yard/verifier.rb:142 msgid "the parsed expression" msgstr "è§£æžã•れãŸå¼" # YARD::Tags::Library #~ msgid "" #~ "This will allow you to use @mytag TEXT to add meta data to classes " #~ "through\n" #~ "the docstring. You can use the {Library#factory} object to help parse " #~ "standard\n" #~ "tag syntax." #~ msgstr "" #~ "ã“ã®ä¾‹ã¯ã€\n" #~ "ã‚ãªãŸãŒã€docstringを通ã˜ã¦ã‚¯ãƒ©ã‚¹åŒ–ã™ã‚‹ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ç‚ºã«\n" #~ "@mytag TEXTを使ã†äº‹ã‚’å—ã‘入れる。\n" #~ "ã‚ãªãŸã¯ã€æ¨™æº–ã®ã‚¿ã‚°æ§‹æ–‡ã‚’è§£æžã—補助ã™ã‚‹ç‚ºã«\n" #~ "{Library#factory}オブジェクトを利用ã§ãる。" # YARD::Tags::Library #~ msgid "" #~ "== Method #2\n" #~ "Write your own +tagname_tag+ method that takes the raw text as a " #~ "parameter.\n" #~ "Example:\n" #~ " def mytag_tag(text)\n" #~ " # parse your tag contents here\n" #~ " end" #~ msgstr "" #~ "== 方法 #2\n" #~ "自分ã§å¼•æ•°ã®æ§˜ã«ç”Ÿã®ãƒ†ã‚­ã‚¹ãƒˆã‚’å–å¾—ã—〠+tagname_tag+ メソッドを書ã。\n" #~ "\\nExample:\n" #~ " def mytag_tag(text)\n" #~ " # parse your tag contents here\n" #~ " end" # YARD::Tags::Library #~ msgid "" #~ "Note that +tag_factory+ is the factory object used to parse tags. This " #~ "value\n" #~ "defaults to the {DefaultFactory} class and can be set by changing " #~ "{Library.default_factory}." #~ msgstr "" #~ "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" #~ "+tag_facotory+ ã¯ã€ã‚¿ã‚°ã‚’è§£æžã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れるfactoryオブジェクトã¨ãª" #~ "る。\n" #~ "ã“ã®å€¤ã¯{DefaultFactory}クラスãŒãƒ‡ãƒ•ォルトã¨ãªã‚Šã€\n" #~ "{Library.default_factory}を変更ã™ã‚‹äº‹ã«ã‚ˆã£ã¦è¨­å®šã§ãる。" # YARD::Tags::Library #~ msgid "" #~ "The second line will expand to:\n" #~ " def author_tag(text) tag_factory.parse_tag(text) end" #~ msgstr "" #~ "例ã®2番目ã®è¡Œã¯æ¬¡ã®æ§˜ã«ãªã‚‹:\n" #~ " def author_tag(text) tag_factory.parse_tag(text) end" # YARD::Tags::Library #~ msgid "" #~ "The first line will expand to the code:\n" #~ " def param_tag(text) tag_factory.parse_tag_with_types_and_name(text) end" #~ msgstr "" #~ "ä¾‹ã®æœ€åˆã®è¡Œã¯ã€æ¬¡ã®æ§˜ã«ãªã‚‹:\n" #~ " def param_tag(text) tag_factory.parse_tag_with_types_and_name(text) end" # YARD::Tags::Library #~ msgid "" #~ "== Method #1\n" #~ "Use {Library.define_tag} to define a new tag by passing the tag name\n" #~ "and the factory method to use when creating the tag. These definitions " #~ "will\n" #~ "be auto expanded into ruby code similar to what is shown in method #2. If " #~ "you\n" #~ "do not provide a factory method to use, it will default to " #~ "{DefaultFactory#parse_tag}\n" #~ "Example:\n" #~ " define_tag \"Parameter\", :param, :with_types_and_name\n" #~ " define_tag \"Author\", :author" #~ msgstr "" #~ "== 方法 #1\n" #~ "{Library.define_tag}を使ã„,ã‚¿ã‚°åã‚’è§£æžã™ã‚‹äº‹ã«ã‚ˆã£ã¦æ–°ã—ã„タグを定義" #~ "ã—ã€\n" #~ "タグを作æˆã™ã‚‹æ™‚ã«factoryメソッドを使用ã™ã‚‹ã€‚\n" #~ "ã“れらã®å®šç¾©ã¯ 方法 #2ã®ä¸­ã®è¦‹ã‚‰ã‚Œã‚‹äº‹ã¨åŒæ§˜ã«\n" #~ "Rubyコードã®ä¸­ã§è‡ªå‹•æ‹¡å¼µã•れる。\n" #~ "ã‚ãªãŸãŒfactoryメソッドを利用ã—ãªã„å ´åˆã€\n" #~ "デフォルトã¯{DefaultFactory#parse_tag}ã«ãªã‚‹ã ã‚ã†ã€‚\n" #~ "\\nExample:\n" #~ " define_tag \"Parameter\", :param, :with_types_and_name\n" #~ " define_tag \"Author\", :author" # YARD::Tags::Library #~ msgid "" #~ "Holds all the registered meta tags. If you want to extend YARD and add\n" #~ "a new meta tag, you can do it in one of two ways." #~ msgstr "" #~ "å…¨ã¦ã®è¨˜éŒ²ã•れるメタタグを把æ¡ã™ã‚‹ã€‚ã‚ãªãŸãŒYARDã‚’æ‹¡å¼µã—ãŸã„å ´åˆã‚„\n" #~ "æ–°ã—ã„メタタグを追加ã—ãŸã„å ´åˆã¯ã€2ã¤ã®æ–¹æ³•ã®ã†ã¡ã©ã¡ã‚‰ã‹ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒ" #~ "ã§ãる。" # YARD::Server::WebrickServlet#adapter= #~ msgid "Sets the attribute adapter" #~ msgstr "アダプタã®å±žæ€§ã‚’設定ã™ã‚‹" # YARD::Server::WebrickServlet#adapter #~ msgid "Returns the value of attribute adapter" #~ msgstr "アダプタã®å±žæ€§ã®å€¤ã‚’è¿”ã™" # @param value #~ msgid "the value to set the attribute adapter to." #~ msgstr "アダプタã®å±žæ€§ã‚’設定ã™ã‚‹å€¤" # YARD::Server::Commands::SearchCommand#results= #~ msgid "Sets the attribute results" #~ msgstr "results属性を設定ã™ã‚‹" # YARD::Server::Commands::SearchCommand#query= #~ msgid "Sets the attribute query" #~ msgstr "query属性を設定ã™ã‚‹" # YARD::Server::Commands::SearchCommand#results #~ msgid "Returns the value of attribute results" #~ msgstr "results属性ã®å€¤ã‚’è¿”ã™" # YARD::Server::Commands::SearchCommand#query #~ msgid "Returns the value of attribute query" #~ msgstr "query属性ã®å€¤ã‚’è¿”ã™" # @param value #~ msgid "the value to set the attribute results to." #~ msgstr "results属性を設定ã™ã‚‹å€¤" # @param value #~ msgid "the value to set the attribute query to." #~ msgstr "query属性を設定ã™ã‚‹å€¤" # YARD::Server::Commands::ListFilesCommand #~ msgid "Returns the list of README/extra files in a library" #~ msgstr "ライブラリã®ä¸­ã®READMEã¨è¿½åŠ ã®ãƒ•ァイルã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # YARD::Server::Commands::ListMethodsCommand #~ msgid "Returns the list of methods in a library" #~ msgstr "ライブラリã®ä¸­ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # YARD::Server::Commands::ListClassesCommand #~ msgid "Returns the list of classes / modules in a library" #~ msgstr "ライブラリã®ä¸­ã®ã‚¯ãƒ©ã‚¹ã¨ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ãƒªã‚¹ãƒˆã‚’è¿”ã™" # YARD::Server::Commands::LibraryIndexCommand#options= #~ msgid "Sets the attribute options" #~ msgstr "options属性を設定ã™ã‚‹" # @param value #~ msgid "the value to set the attribute options to." #~ msgstr "options属性を設定ã™ã‚‹ç‚ºã®å€¤" # YARD::RegistryStore#proxy_types #~ msgid "Returns the value of attribute proxy_types" #~ msgstr "proxy_types属性ã®å€¤ã‚’è¿”ã™" # @example #~ msgid "tag|example|Performing a Search on a Registry" #~ msgstr "ãƒ¬ã‚¸ã‚¹ãƒˆãƒªãƒ¼ä¸Šã§æ¤œç´¢ã‚’実行ã™ã‚‹" # @param [Boolean] load_order_errors #~ msgid "whether or not to raise the {LoadOrderError}" #~ msgstr "{LoadOrderError}ã®ä¾‹å¤–を上ã’ã‚‹ã‹ã©ã†ã‹" # @param [Symbol] parser_type #~ msgid "the parser type to use" #~ msgstr "使用ã™ã‚‹ãƒ‘ーサータイプ。" # @param [Boolean] #~ msgid "tag|param|load_order_errors" #~ msgstr "load_order_errors" # @param [OpenStruct] globals #~ msgid "global state to be re-used across separate source files" #~ msgstr "ソースファイルをã¾ãŸã„ã§å†åˆ©ç”¨ã•れるã€globals" # YARD::Parser::SourceParser#initialize #~ msgid "" #~ "Creates a new parser object for code parsing with a specific parser type." #~ msgstr "" #~ "明確ãªãƒ‘ーサー型ã¨å…±ã«ã‚³ãƒ¼ãƒ‰è§£æžç”¨ã®\n" #~ "æ–°ã—ã„パーサーオブジェクトを作æˆã™ã‚‹ã€‚" # YARD::Parser::SourceParser.parse_in_order #~ msgid "" #~ "Parses a list of files in a queue. If a {LoadOrderError} is caught,\n" #~ "the file is moved to the back of the queue with a Continuation object\n" #~ "that can continue processing the file." #~ msgstr "" #~ "err節ã®èª¬æ˜ŽãŒå…¥ã£ã¦ãªã„\n" #~ "Errorã®æ™‚㯠Continuation オブジェクトã§ã¯ãªãã€\n" #~ "e.contextã¨å…±ã«ãƒ•ァイルã®å¾Œã‚ã«pushã•れる。)\n" #~ "\n" #~ "キューã®ä¸­ã®ãƒ•ァイルã®ãƒªã‚¹ãƒˆã‚’è§£æžã™ã‚‹ã€‚\n" #~ "{LoadOrderError}ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã€\n" #~ "ファイルã¯ã‚­ãƒ¥ãƒ¼ã®å¾Œã‚ã«ç§»å‹•ã•れã€Continuationオブジェクトを用ã„ã€\n" #~ "処ç†ã—ã¦ã„るファイルを継続ã§ãã‚‹" # @param [Continuation] #~ msgid "tag|param|context" #~ msgstr "context" # @return [LoadOrderError] #~ msgid "a new instance of LoadOrderError" #~ msgstr "LoadOrderErrorã®æ–°ã—ã„インスタンス。" # @return [Continuation] #~ msgid "" #~ "the context representing the\n" #~ "point at which the load order error occurred." #~ msgstr "" #~ "コンテキストã¯load order errorãŒèµ·ã“ã•れる所ã®\n" #~ "ãƒã‚¤ãƒ³ãƒˆã‚’指摘ã™ã‚‹ã€‚" # YARD::Parser::LoadOrderError #~ msgid "" #~ "A LoadOrderError occurs when a handler needs to modify a\n" #~ "{CodeObjects::NamespaceObject} (usually by adding a child to it)\n" #~ "that has not yet been resolved." #~ msgstr "" #~ "LoadOrderErrorã¯ã€ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒè§£æ±ºã•れãªã„{CodeObjects::NamespaceObject}" #~ "ã‚’\n" #~ "修正ã™ã‚‹å¿…è¦ãŒã‚る時ã«èµ·ã“る。(通常ã¯ã€NamespaceObjectã«å­ã‚’追加ã™ã‚‹)" # @return [Object] #~ msgid "the current value of shebang_line" #~ msgstr "shebang_lineã®ç¾åœ¨ã®å€¤" # @return [Object] #~ msgid "the current value of enumerator" #~ msgstr "enumeratorã®ç¾åœ¨ã®å€¤" # @return [Object] #~ msgid "the current value of encoding_line" #~ msgstr "encoding_lineã®ç¾åœ¨ã®å€¤" # YARD::Parser::Ruby::Legacy::Statement#group= # YARD::Parser::Ruby::AstNode#group= #~ msgid "Sets the attribute group" #~ msgstr "グループ属性を設定ã™ã‚‹ã€‚" # YARD::Parser::Ruby::Legacy::Statement#group # YARD::Parser::Ruby::AstNode#group #~ msgid "Returns the value of attribute group" #~ msgstr "グループ属性ã®å…¥ã£ãŸå€¤ã‚’è¿”ã™ã€‚" # @param value #~ msgid "the value to set the attribute group to." #~ msgstr "グループ属性を設定ã™ã‚‹,値" # @return [LocaleInfoCollector] #~ msgid "a new instance of LocaleInfoCollector" #~ msgstr "LocaleInfoCollectorã®æ–°ã—ã„インスタンス" # @param [String] member #~ msgid "the name of the struct member whose return type we need" #~ msgstr "å¿…è¦ã¨ã™ã‚‹åž‹ã‚’è¿”ã™æ§‹é€ ä½“memberã®åå‰" # @param [Boolean] load_order_error #~ msgid "" #~ "whether or not to raise {Parser::LoadOrderError}\n" #~ "when a file has unresolved references that need to be parsed first.\n" #~ "If these errors are raised, the processor will attempt to load all\n" #~ "other files before continuing to parse the file." #~ msgstr "" #~ "ãƒ•ã‚¡ã‚¤ãƒ«ãŒæœ€åˆã«è§£æžã•れる必è¦ãŒã‚ã‚‹å‚ç…§ã‚’æœªè§£æ±ºã®æ™‚ã€\n" #~ "{Parser::LoadOrderError}ã®ä¾‹å¤–を上ã’ã‚‹ã‹ã©ã†ã‹\n" #~ "ã‚‚ã—ã“れらã®ã‚¨ãƒ©ãƒ¼ãŒä¸Šã’られる場åˆã€\n" #~ "プロセッサーã¯ã€ãƒ•ァイルã®è§£æžã‚’継続ã™ã‚‹å‰ã«\n" #~ "å…¨ã¦ã®ä»–ã®ãƒ•ァイルをロードをã™ã‚‹ã€‚" # @param [Symbol] parser_type #~ msgid "" #~ "the parser type (:ruby, :ruby18, :c) from\n" #~ "the parser. Used to select the handler (since handlers are specific\n" #~ "to a parser type)." #~ msgstr "" #~ "ãƒ‘ãƒ¼ã‚µãƒ¼ãŒæä¾›ã™ã‚‹,パーサータイプ(:ruby, :ruby18, :c)\n" #~ "利用ã™ã‚‹ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã‚’é¸æŠžã™ã‚‹ã«ã¯ã€(ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ãŒãƒ‘ーサータイプを指定ã™" #~ "る。)\n" #~ "the parser. Used to select the handler (since handlers are specific to a " #~ "parser type)." # @param [OpenStruct] globals #~ msgid "" #~ "the object holding all state during the\n" #~ "post processing stage" #~ msgstr "å¾Œå‡¦ç†æ®µéšŽã®é–“ã«å…¨ã¦ã®çŠ¶æ…‹ã‚’ä¿æŒã™ã‚‹ã‚ªãƒ–ジェクト" # @param [String] file #~ msgid "" #~ "the name of the file that is being processed.\n" #~ "uses '(stdin)' if file is nil." #~ msgstr "" #~ "処ç†ã•れるファイルã®åå‰ã€\n" #~ "ファイルãŒnilã®å ´åˆã€'(stdin)'を使ã†ã€‚" # @param [Symbol] #~ msgid "tag|param|parser_type" #~ msgstr "parser_type" # @return [Boolean] #~ msgid "whether or not {Parser::LoadOrderError} is raised" #~ msgstr "{Parser::LoadOrderError}ã®ä¾‹å¤–を上ã’ã‚‹ã‹ã©ã†ã‹" # @param [CodeObjects::Base] object #~ msgid "the object to expand the macro on" #~ msgstr "æ‹¡å¼µã™ã‚‹ã‚ªãƒ–ジェクトã®ãƒžã‚¯ãƒ­" # @param [CodeObjects::MacroObject] macro #~ msgid "the macro object to expand" #~ msgstr "マクロã«ã‚ˆã£ã¦æ‹¡å¼µã™ã‚‹ç‚ºã®ã‚ªãƒ–ジェクト" # @return [CodeObjects::MacroObject] #~ msgid "the newly created macro" #~ msgstr "æ–°ãŸã«ä½œæˆã•れãŸãƒžã‚¯ãƒ­" # @param [Docstring, CodeObjects::Base] object_or_docstring #~ msgid "" #~ "the docstring\n" #~ "or it's object with which to check for a macro" #~ msgstr "マクロã®ãƒã‚§ãƒƒã‚¯ã®ç‚ºã®docstringやオブジェクト" # @return [nil] #~ msgid "if the docstring does not create or reference a macro" #~ msgstr "docstringãŒä½œã‚‰ã‚Œã¦ã„ãªã„å ´åˆã‚„マクロã®å‚ç…§ãŒãªã„å ´åˆ" # YARD::Handlers::Base#find_or_create_macro #~ msgid "" #~ "Attempts to find or create a macro if a +@macro+ tag is found in the\n" #~ "docstring (or the object's docstring)." #~ msgstr "" #~ "+@macro+ ã‚¿ã‚°ãŒdocstring(やオブジェクトã®docstring)ã®ä¸­ã§è¦‹ã¤ã‹ã£ãŸå ´" #~ "åˆã€\n" #~ "マクロタグãŒã‚ã‚‹ã‹æŽ¢ã—ã€ãƒžã‚¯ãƒ­ä½œæˆã‚’試ã¿ã‚‹ã€‚" # @return [String] #~ msgid "the localized docstring." #~ msgstr "docstringを局所化ã™ã‚‹" # YARD::Docstring#document #~ msgid "" #~ "Gets a localized docstring. Use String#to_s to get non\n" #~ "localized docstring." #~ msgstr "" #~ "局所化ã•れるdocstringã‚’å–å¾—ã™ã‚‹ã€‚\n" #~ "局所化ã•れãªã„docstringã‚’å–å¾—ã™ã‚‹ã«ã¯ã€\n" #~ "String#to_sメソッドを使ã†ã€‚" # @param [Array] call_params #~ msgid "" #~ "the method name and parameters\n" #~ "to the method call. These arguments will fill $0-N" #~ msgstr "" #~ "メソッドåやメソッド呼ã³å‡ºã—ã®ç‚ºã®ãƒ‘ラメータ。\n" #~ "ã“れらã®å¼•æ•°ã«ã¯ã€$0-Nを入れる。" # @param [String] full_source #~ msgid "" #~ "the full source line (excluding block) \n" #~ "interpolated as $*" #~ msgstr "$*ã®ã‚ˆã†ã«ã€è£œå®Œã•れる完全ãªã‚½ãƒ¼ã‚¹ã®è¡Œ(blockを除外ã™ã‚‹)" # @return [String] #~ msgid "the expanded macro data" #~ msgstr "æ‹¡å¼µã•れãŸãƒžã‚¯ãƒ­ãƒ‡ãƒ¼ã‚¿" # @param [String] block_source #~ msgid "" #~ "Currently unused. Will support \n" #~ "interpolating the block data as a variable." #~ msgstr "" #~ "実際ã«ã¯ã€ä½¿ã‚れãªã„。\n" #~ "変数ã®ã‚ˆã†ã«è£œå®Œã™ã‚‹ãƒ–ロックデータをサãƒãƒ¼ãƒˆã™ã‚‹ã€‚" # @return [Boolean] #~ msgid "whether to report missing translations." #~ msgstr "見ã¤ã‹ã‚‰ãªã„変æ›ã‚’レãƒãƒ¼ãƒˆã™ã‚‹ã‹ã©ã†ã‹" # @return [String] #~ msgid "a language for output document." #~ msgstr "ドキュメント出力用ã®è¨€èªž" # @return [Array] #~ msgid "the default list of locale path." #~ msgstr "デフォルトã®ãƒ­ã‚±ãƒ¼ãƒ«ãƒ‘スã®ãƒªã‚¹ãƒˆ" # @return [Array] #~ msgid "a list of locale path." #~ msgstr "ロケールパスã®ãƒªã‚¹ãƒˆ" #~ msgid "" #~ " 3. Define custom javascript to load the search fields and the keyboard " #~ "shortcuts." #~ msgstr "" #~ " 3. 検索フィールドã¨ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’ロードã™ã‚‹ã‚«ã‚¹ã‚¿ãƒ " #~ "javascriptを定義ã™ã‚‹ã€‚" #~ msgid "" #~ "The interpolation syntax is similar to Ruby's regular expression variable " #~ "syntax.\n" #~ "It uses $1, $2, $3, ..., referring to the Nth argument in the method " #~ "call. Using\n" #~ "the above property example, $1 would be 'title', and $2 would be " #~ "'String'.\n" #~ "$0 is a special variable that refers to the method call itself, in this " #~ "case\n" #~ "'property'. Finally, there is a $& variable which refers to the full " #~ "line,\n" #~ "or 'property :title, String'." #~ msgstr "" #~ "è£œé–“ã®æ§‹æ–‡æ³•ã¯ã€Rubyã®æ­£è¦è¡¨ç¾ã®å¤‰æ•°ã®æ§‹æ–‡ã®è¡¨ç¾ã«ä¼¼ã¦ã„る。\n" #~ "メソッドコールã§ã®N番目ã®å¼•æ•°ã‹ã‚’å‚ç…§ã—ã¦ã€\n" #~ "$1,$2,$3・・・を使ã†ã€‚\n" #~ "上記ã®ä¾‹ã§è¨€ã†ã¨ã€$1ã¯'title'ã€$2ã¯'String'ã¨ãªã‚‹ã€‚\n" #~ "$0ã¯ã€ã“ã®ã‚±ãƒ¼ã‚¹ã®ãƒ—ロパティã§ã¯ã€\n" #~ "メソッドコール自体をå‚ç…§ã™ã‚‹ç‰¹åˆ¥ãªå¤‰æ•°ã§ã‚る。\n" #~ "最後ã«ã€$&変数ã¨ã„ã†ã®ãŒã‚る。\n" #~ "ã“れã¯å…¨ã¦ã®è¡Œã‚ã‚‹ã„ã¯'property :title, String'.ã‚’å‚ç…§ã™ã‚‹ã€‚" #~ msgid "### Macro Variable Interpolation Syntax" #~ msgstr "### マクロã®å¤‰æ•°è£œé–“æ§‹æ–‡" #~ msgid "" #~ "If you cannot declare the macro on the actual method declaration, you " #~ "can\n" #~ "arbitrarily attach the macro to any method call. Suppose we only had the\n" #~ "Post class in our codebase, we could add the macro to the first usage of\n" #~ "the `property` call:" #~ msgstr "" #~ "ã‚‚ã—ã€å…ƒã€…ã®ã‚¯ãƒ©ã‚¹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ãƒžã‚¯ãƒ­ã‚’宣言ã—ã¦ãªãã¦ã‚‚ã€\n" #~ "ä»–ã®ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã§ãƒžã‚¯ãƒ­ã‚’付ã‘ã‚‹ã“ã¨ãŒã§ãる。\n" #~ "自身ã®ã‚³ãƒ¼ãƒ‰ãƒ™ãƒ¼ã‚¹ã®ä¸­ã§ã—ã‹PostクラスをæŒã£ã¦ã„ãªã„ã¨ã™ã‚Œã°ã€\n" #~ "`property`呼ã³å‡ºã—ã§åˆã‚ã¦ä½¿ã†æ™‚ã«ãƒžã‚¯ãƒ­ã‚’ã¤ã‘ã‚‹ã“ã¨ãŒã§ãる。" #~ msgid "" #~ "Macros can be created on class level methods (or class level method " #~ "calls) in \n" #~ "order to implicitly expand a macro whenever that method is subsequently " #~ "called \n" #~ "in a class, or any class that mixes in or inherits the method. These " #~ "macros\n" #~ "are called \"attached\" and are declared with the `[attach]` flag. For " #~ "instance, \n" #~ "a library that uses a class level method call `property` in its codebase " #~ "can \n" #~ "document these declarations in any future call like so:" #~ msgstr "" #~ "マクロã¯ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚¯ãƒ©ã‚¹ã®ä¸­ã§å‘¼ã³å‡ºã•れãŸå¾Œã§ã€\n" #~ "何らã‹ã®ãƒžã‚¯ãƒ­ã®æ‹¡å¼µã‚’実装ã™ã‚‹æ™‚ã«ã‚³ãƒ¼ãƒ‰ã®ä¸­ã®\n" #~ "クラスレベルメソッド上ã«ä½œæˆã•れる。(ã¾ãŸã¯ã€ã‚¯ãƒ©ã‚¹ãƒ¬ãƒ™ãƒ«ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡º" #~ "ã—)\n" #~ "ã“れらã®ãƒžã‚¯ãƒ­ã¯`[attach]`フラグを用ã„る。\n" #~ "ã“れãŒå®£è¨€ã•れる事ã«ã‚ˆã£ã¦ãƒžã‚¯ãƒ­ãŒè¿½åŠ ã•れる。\n" #~ "例ãˆã°ã€ãƒ©ã‚¤ãƒ–ラリーãŒ`property`クラスレベルメソッド呼ã³å‡ºã—を利用ã™ã‚‹ã«" #~ "ã¯ã€\n" #~ "ä»¥ä¸‹ã®æ§˜ã«ã€å°†æ¥å‘¼ã³å‡ºã›ã‚‹ã‚ˆã†ã«å®£è¨€ã‚’記述ã§ãる。" #~ msgid "" #~ "In the above case, the macro 'macro_name' will always show both lines of " #~ "text\n" #~ "when expanded on other objects." #~ msgstr "" #~ "上記ã®ã‚±ãƒ¼ã‚¹ã ã¨ã€ 'macro_name' ã¨ã„ã†ãƒžã‚¯ãƒ­ã¯ä»–ã®ã‚ªãƒ–ジェクトã§\n" #~ "展開ã™ã‚‹ã¨ã€ãƒ†ã‚­ã‚¹ãƒˆã®ä¸¡æ–¹ã®è¡Œã‚’表示ã™ã‚‹ã€‚" #~ msgid "" #~ "If there is no indented macro data, the entire docstring is saved as the\n" #~ "macro data. For instance," #~ msgstr "" #~ "インデントã•れãŸãƒžã‚¯ãƒ­ã®ãƒ‡ãƒ¼ã‚¿ãŒãªã„ãªã‚‰ã°ã€\n" #~ "docstring全体ã¯ãƒžã‚¯ãƒ­ã®ãƒ‡ãƒ¼ã‚¿ã¨ã—ã¦ä¿å­˜ã•れる。\n" #~ "例ãˆã°ã€" #~ msgid "" #~ "You can therefore keep portions of docstrings local to objects even when\n" #~ "creating a macro, by indenting the portion of the data that should be " #~ "re-\n" #~ "expanded, and listing the local docstring data above or below." #~ msgstr "" #~ "マクロを作ã£ãŸæ™‚ã§ã‚‚ã€docstringã®ä¸€éƒ¨ã‚’マクロã¨ã¯åˆ¥ã«ã—ã¦ãŠãã“ã¨ãŒã§ã" #~ "る。\n" #~ "ãれã«ã¯ã€å†åº¦å±•é–‹ã•れるã¹ãマクロデータã®ä¸€éƒ¨ã‚’インデントã—ã¦ã€ãªãŠã‹" #~ "ã¤ã€\n" #~ "上ã‹ä¸‹ã«ãƒ­ãƒ¼ã‚«ãƒ«ã®docstringã®ãƒ‡ãƒ¼ã‚¿ã‚’列挙ã™ã‚‹ã€‚" #~ msgid "" #~ "In the above case, \"The macro data is here.\" is the only portion that " #~ "will be\n" #~ "re-used if the macro is called again on another object. However, for the " #~ "case\n" #~ "of the above method, both the macro data and the local docstring will be\n" #~ "applied to the method, creating the docstring:" #~ msgstr "" #~ "上記ã®ã‚±ãƒ¼ã‚¹ã§ã€\"The macro data is here.\"ã¯ãƒžã‚¯ãƒ­ãŒã€\n" #~ "別ã®ã‚ªãƒ–ジェクトã§å‘¼ã°ã‚ŒãŸã‚‰å†åˆ©ç”¨ã•れるもã®ã®ä¸€éƒ¨ã§ã‚る。\n" #~ "ã ãŒã€ã“ã“ã§ä½¿ã‚れãªã„ã¨ã„ã†ã‚ã‘ã§ã¯ãªãã€\n" #~ "上記ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ãƒžã‚¯ãƒ­ãƒ‡ãƒ¼ã‚¿ã¨ä»–ã®docstring(This data is~)ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã«é©" #~ "用ã•れ\n" #~ "docstringを生æˆã™ã‚‹ã€‚" #~ msgid "" #~ "If a macro tag has an indented body of macro data (shown below), it will " #~ "be\n" #~ "the only portion of the docstring saved for re-use." #~ msgstr "" #~ "マクロã®ã‚¿ã‚°ãŒä»¥ä¸‹ã®ã‚ˆã†ãªã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れãŸãƒžã‚¯ãƒ­ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€ ã‚’有ã—ã¦ã„ã‚‹ãª" #~ "らã°ã€\n" #~ "ãれã¯å†åˆ©ç”¨ã®ãŸã‚ã«ä¿å­˜ã•れãŸdocstringã®ä¸€éƒ¨åˆ†ã«ã™ãŽãªã„。\n" #~ msgid "### Indenting the Macro Data" #~ msgstr "### マクロã®ãƒ‡ãƒ¼ã‚¿ã‚’インデントã™ã‚‹ã€‚" #~ msgid "" #~ "Note that the name is never optional. Even if the macro is never re-" #~ "used,\n" #~ "it must be named." #~ msgstr "" #~ "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" #~ "åå‰ã¯å¿…ãšã¤ã‘る。\n" #~ "(マクロãŒå†åˆ©ç”¨ã•れã¦ã„ãªã„時ã§ã‚‚ã€å¿…ãšå‘½åã•れãªã‘れã°ãªã‚‰ãªã„。)" #~ msgid "" #~ "Any time 'foo' is called in the class scope of an inheriting class, the " #~ "macro\n" #~ "will automatically expand on that method call (potentially creating a " #~ "new\n" #~ "method object). Attaching macros is discussed below." #~ msgstr "" #~ "上ã®fooã¯å¸¸æ™‚ã€ç¶™æ‰¿ã‚¯ãƒ©ã‚¹ã®ã‚¯ãƒ©ã‚¹ã‚¹ã‚³ãƒ¼ãƒ—ã®ä¸­ã«å‘¼ã³å‡ºã•れる。\n" #~ "ãã—ã¦ãƒžã‚¯ãƒ­ã¯ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ã§è‡ªå‹•çš„ã«å±•é–‹ã™ã‚‹ã€‚\n" #~ "(æš—é»™ã®å†…ã«æ–°ã—ã„メソッドオブジェクトを生æˆã™ã‚‹ã€‚)\n" #~ "マクロを追加ã™ã‚‹æ–¹æ³•ã¯ã€ä»¥é™ã§èª¬æ˜Žã•れる。" #~ msgid "" #~ "You can also \"attach\" a macro to a method if it is in the class scope. " #~ "In\n" #~ "this case, you do not need to also provide the 'new' flag, using " #~ "'attach'\n" #~ "is sufficient:" #~ msgstr "" #~ "クラスã®ã‚¹ã‚³ãƒ¼ãƒ—ã®ä¸­ã«ã‚れã°ã€\n" #~ "メソッドã«ãƒžã‚¯ãƒ­ã‚’\"attach\"ã§ãる。\n" #~ "ã“ã®å ´åˆã€\"new\"フラグをæä¾›ã™ã‚‹å¿…è¦ã¯ãªãã€\n" #~ "ä»¥ä¸‹ã®æ§˜ã«\"attach\"ã§å分ã§ã‚る。\n" #~ msgid "Or:" #~ msgstr "ã¾ãŸã¯:" #~ msgid "" #~ "For instance, creating a new macro might look like (see the section on\n" #~ "interpolation below for a description of the `$2` syntax):" #~ msgstr "" #~ "例ãˆã°ã€æ–°ã—ã„マクロを作るã“ã¨ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚‹ã€‚\n" #~ "(`$2`æ§‹æ–‡ã®èª¬æ˜Žã¯è£œé–“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³å‚ç…§)" #~ msgid "" #~ " 1. there are interpolation variables (`$1`, `$2`, `${3-5}`, etc.) in " #~ "the\n" #~ " docstring, or,\n" #~ " 2. the macro is specified with the `[new]` or `[attached]` flag." #~ msgstr "" #~ " 1. docstringã«ã¯è£œé–“変数(`$1`,`$2`,`$3-5`,etc.)ãŒã‚る。\n" #~ " (ã“ã“ã§ã„ã†è£œé–“変数ã¨ã¯ã€ãれを使用ã—ãŸå ´æ‰€ã¨è£œé–“å…ƒã¨ã‚’ç½®æ›ã™ã‚‹ã¨ã„" #~ "ã†æ„味)\n" #~ " 2. ã‚ã‚‹ã„ã¯ã€ãƒžã‚¯ãƒ­ã¯[new]ã‹[attached]ã®ãƒ•ãƒ©ã‚°ã§æŒ‡å®šã•れã¦ã„る。\n" #~ msgid "If the macro does not already exist, it will be created if:" #~ msgstr "マクロãŒã¾ã å­˜åœ¨ã—ãªã„å ´åˆã§ã€æ¬¡ã®æ¡ä»¶ã®æ™‚ã¯ãƒžã‚¯ãƒ­ãŒç”Ÿæˆã•れる。" #~ msgid "" #~ "In the above example, both attributes `foo` and `bar` will get the " #~ "docstring\n" #~ "that includes a return tag \"the attribute as a String\". It would be " #~ "equivalent\n" #~ "to writing the following:" #~ msgstr "" #~ "上記ã®ä¾‹ã§ã¯ã€fooã¨barã®ï¼’ã¤ã®å±žæ€§ã¨ã‚‚リターンタグã®\n" #~ "\"the attribute as a String\"ã‚’å«ã‚“ã docstringã‚’å–å¾—ã—ã¦ã„る。\n" #~ "次ã®ã‚ˆã†ã«æ›¸ã„ãŸå ´åˆã¨åŒã˜ã§ã‚る。" #~ msgid "" #~ "Macros enable the documenter to write repetitive documentation once and " #~ "then\n" #~ "re-apply it to other objects. Macros are defined on docstrings using the\n" #~ "`@macro` tag. The same `@macro` tag is used to expand them. The " #~ "following\n" #~ "is an example of a simple macro declaration and expansion:" #~ msgstr "" #~ "マクロを使ã†ã¨ä¸€åº¦æ›¸ã„ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ã€\n" #~ "ä»–ã®ã‚ªãƒ–ジェクトã§å†åˆ©ç”¨ã§ãる。\n" #~ "マクロã¯docstringsã§@macroタグを使ã£ã¦å®šç¾©ã•れる。\n" #~ "åŒã˜åå‰ã®@macroã‚¿ã‚°ã¯å±•é–‹ã™ã‚‹ãŸã‚ã«ä½¿ã‚れる。\n" #~ "以下ã¯ã€å˜ç´”ãªãƒžã‚¯ãƒ­ã®å®£è¨€ã¨å±•é–‹ã®ä¾‹ã§ã‚る。" #~ msgid "## Macros" #~ msgstr "## マクロ" #~ msgid "" #~ "Reference tags are represented by the {YARD::Tags::RefTag} class and are " #~ "created\n" #~ "directly during parsing by {YARD::Docstring}." #~ msgstr "" #~ "リファレンスタグã¯ã€{YARD::Tags::RefTag}クラスã«ã‚ˆã£ã¦è¡¨ã‚ã•れã€\n" #~ "{YARD::Docstring}ã‚’è§£æžã™ã‚‹é–“ã«ä½œã‚‰ã‚Œã‚‹ã€‚\n" #~ msgid "" #~ "Because the UserHelper module methods delegate directly to `User.new`, " #~ "copying\n" #~ "the documentation details would be unmaintainable. In this case, the (see " #~ "METHODNAME)\n" #~ "syntax is used to reference the tags from the User constructor to the " #~ "helper methods.\n" #~ "For the first method, all `@param` tags are referenced in one shot, but " #~ "the second\n" #~ "method only references one of the tags by adding `username` before the " #~ "reference." #~ msgstr "" #~ "何故ãªã‚‰ã€ä¸Šã®UserHelperモジュールã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ç›´æŽ¥`User.new`ã¸å§”è­²ã™ã‚‹ã®" #~ "ã§ã€\n" #~ "ドキュメントã®è©³ç´°ã‚’コピーã™ã‚‹ã“ã¨ã¯ã§ããªã„。\n" #~ "ã“ã®ã‚ˆã†ãªå ´åˆã€ (see METHODNAME) æ§‹æ–‡ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‹ã‚‰\n" #~ "ヘルパーメソッドã¾ã§ã®ã‚¿ã‚°ã‚’å‚ç…§ã™ã‚‹ãŸã‚ã«åˆ©ç”¨ã•れる。\n" #~ "最åˆã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã™ã¹ã¦ã®@paramタグを一発ã§å‚ç…§ã™ã‚‹ã€‚\n" #~ "ã—ã‹ã—ã€æ¬¡ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒªãƒ•ァレンスã®å‰ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒãƒ¼ãƒ ãŒ\n" #~ "加ãˆã‚‰ã‚ŒãŸã‚¿ã‚°ã®ã¿ã‚’å‚ç…§ã™ã‚‹ã€‚" #~ msgid "" #~ "Although attempt is made in YARD to leave as many of the syntax details " #~ "as\n" #~ "possible to the factory provider, there is a special tag syntax for " #~ "referencing\n" #~ "tags created in other objects so that they can be reused again. This is " #~ "common\n" #~ "when an object describes a return type or parameters that are passed " #~ "through to\n" #~ "other methods. In such a case, it is more manageable to use the reference " #~ "tag\n" #~ "syntax. Consider the following example:" #~ msgstr "" #~ "ãƒ•ã‚¡ã‚¯ãƒˆãƒªãƒ¼ã®æä¾›è€…ã«ã‚ˆã£ã¦YARDã®ä¸­ã§ã¯æ²¢å±±ã®æ§‹æ–‡ã®è©³ç´°ã‚’残ã™ã‚ˆã†ã«è©¦ã¿ã‚‰" #~ "れãŸã‘れã©ã‚‚ã€\n" #~ "å†åˆ©ç”¨ã§ãるよã†ã«ã€ä»–ã®ã‚ªãƒ–ジェクトã®ä¸­ã«ä½œæˆã•れãŸã‚¿ã‚°ã‚’å‚ç…§ã™ã‚‹ç‰¹åˆ¥ãªã‚¿" #~ "ã‚°æ§‹æ–‡ãŒã‚る。\n" #~ "ã“れã¯ã€ã‚ªãƒ–ジェクトãŒè¿”ã™åž‹ã‚„ä»–ã®ã‚ªãƒ–ジェクトã®ç‚ºã«è§£æžã•れるパラメータ" #~ "ã‚’\n" #~ "説明ã™ã‚‹æ™‚ã«ä¸€èˆ¬çš„ã«ç”¨ã„られる。\n" #~ "ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯å‚照タグ構文を使ã†ã¨ã‚ˆã‚Šæ‰±ã„ã‚„ã™ã„ã€\n" #~ "以下ã®ä¾‹ã‚’考ãˆã¦ã¿ã‚‹ã€‚\n" #~ msgid "## Reference Tags" #~ msgstr "## å‚ç…§ã‚¿ã‚°" #~ msgid " @yieldreturn [optional, types, ...] description" #~ msgstr "" #~ " !!!plain\n" #~ " @yieldreturn [åž‹(çœç•¥å¯èƒ½)...] 説明" #~ msgid " * `@yieldreturn`: Defines return type of a block" #~ msgstr " * `@yieldreturn`: ブロックã®ãƒªã‚¿ãƒ¼ãƒ³ã‚¿ã‚¤ãƒ—を定義ã™ã‚‹ã€‚" #~ msgid " @yieldparam [optional, types, ...] argname description" #~ msgstr "" #~ " !!!plain\n" #~ " @yieldparam [åž‹(çœç•¥å¯èƒ½)...] 引数å 説明" #~ msgid " * `@yieldparam`: Defines parameters yielded by a block" #~ msgstr " * `@yieldparam`: ブロックã§yieldã•れãŸãƒ‘ラメータを定義ã™ã‚‹ã€‚" #~ msgid "" #~ " # for block {|a, b, c| ... }\n" #~ " @yield [a, b, c] Description of block" #~ msgstr "" #~ " !!!plain\n" #~ " # for block {|a, b, c| ... }\n" #~ " @yield [a, b, c] ブロックã®èª¬æ˜Ž" #~ msgid "" #~ " * `@yield`: Describes the block. Use types to list the parameter\n" #~ " names the block yields." #~ msgstr " * `@yield`: パラメータを列挙ã—ã¦ãƒ–ロックを説明ã™ã‚‹ã€‚" #~ msgid " * `@todo`: Marks a TODO note in the object being documented" #~ msgstr "" #~ " * `@todo`: ドキュメントを作æˆã—ã¦ã„るオブジェクトã®ä¸­ã«ã€\n" #~ " TODOをマークã™ã‚‹ã€‚" #~ msgid " @return [optional, types, ...] description" #~ msgstr "" #~ " !!!plain\n" #~ " @return [åž‹(çœç•¥å¯èƒ½)...] 説明" #~ msgid " * `@return`: Describes return value of method" #~ msgstr " * `@return`: ãƒ¡ã‚½ãƒƒãƒ‰ã®æˆ»ã‚Šå€¤ã‚’説明ã™ã‚‹ã€‚" #~ msgid " @raise [ExceptionClass] description" #~ msgstr "" #~ " !!!plain\n" #~ " @raise [ExceptionClass] 説明" #~ msgid " * `@raise`: Describes an Exception that a method may throw" #~ msgstr " * `@raise`: ãƒ¡ã‚½ãƒƒãƒ‰ãŒæŠ•ã’る例外を記述ã™ã‚‹ã€‚" #~ msgid "" #~ " * `@private`: Defines an object as private. This exists for classes,\n" #~ " modules and constants that do not obey Ruby's visibility rules. For\n" #~ " instance, an inner class might be considered \"private\", though " #~ "Ruby\n" #~ " would make no such distinction. By declaring the @private tag, the\n" #~ " class can be hidden from documentation by using the `--no-private`\n" #~ " command-line switch to yardoc (see {file:README.md})." #~ msgstr "" #~ " * `@private`: privateã¨ã—ã¦ã‚ªãƒ–ジェクトを定義ã™ã‚‹ã€‚\n" #~ "ã“れã¯Rubyã®å¯è¦–性ã«å¾“ã‚ãªã„クラスã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã€å®šæ•°ã®ãŸã‚ã«å­˜åœ¨ã™ã‚‹ã€‚\n" #~ "ãŸã¨ãˆã°ã€Rubyã¯ãã®ã‚ˆã†ãªåŒºåˆ†ã¯ã—ãªã„ã ã‚ã†ãŒ,内部クラスã¯\"private\"ã ã¨" #~ "考ãˆã‚‹å ´åˆã€\n" #~ "yardoc用ã®ã‚³ãƒžãƒ³ãƒ‰`--no-private`({file:README.md} å‚ç…§)を使ã†ã“ã¨ã«ã‚ˆã£" #~ "ã¦\n" #~ "@privateタグを宣言ã™ã‚‹ã¨ã€ã‚¯ãƒ©ã‚¹ã‚’ドキュメンテーションã‹ã‚‰éš ã™ã“ã¨ãŒã§ã" #~ "る。" #~ msgid " @param [optional, types, ...] argname description" #~ msgstr "" #~ " !!!plain\n" #~ " @param [åž‹(çœç•¥å¯èƒ½)...] 引数å 説明" #~ msgid " * `@param`: Defines method parameters" #~ msgstr " * `@param`: メソッドã®ãƒ‘ラメータを定義ã™ã‚‹ã€‚" #~ msgid "" #~ " * `@note`: Creates an emphasized note for the users to read about the\n" #~ " object." #~ msgstr "" #~ " * `@note`: ユーザãŒã‚ªãƒ–ジェクトã®ã“ã¨ã‚’読んã§çŸ¥ã‚‹ãŸã‚ã«ã€\n" #~ " 強調ã•ã‚ŒãŸæ³¨æ„書ãを作る。\n" #~ msgid "" #~ " * `@method`: Recognizes a DSL class method as a method with the given " #~ "name\n" #~ " and optional signature. Only used with DSL methods." #~ msgstr "" #~ " * `@method`: DSLクラスメソッドをåå‰ã¨çœç•¥å¯èƒ½ãªç”¨æ³•ãŒã¤ã„ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—" #~ "ã¦èªè­˜ã™ã‚‹ã€‚DSLメソッドã¨ä¸€ç·’ã®æ™‚ã ã‘使ã‚れる。" #~ msgid "" #~ " @macro [new|attached] macro_name\n" #~ " The macro contents to expand" #~ msgstr "" #~ " !!!plain\n" #~ " @macro [new,åˆã¯,attached] マクロå\n" #~ " 展開ã™ã‚‹å†…容をã“ã“以é™ã«æ›¸ã" #~ msgid "" #~ " * `@macro`: Registers or expands a new macro. See the [Macros]" #~ "(#macros)\n" #~ " section for more details. Note that the name parameter is never " #~ "optional." #~ msgstr "" #~ " * `@macro`: æ–°ã—ã„マクロを登録ã¾ãŸã¯æ‹¡å¼µã™ã‚‹ã€‚\n" #~ " 詳細㯠[Macros](#macros) å‚照。\n" #~ " NAMEã¨ã„ã†ãƒ‘ラメータã¯çœç•¥ã§ããªã„ã“ã¨ã«æ³¨æ„ã™ã‚‹ã€‚" #~ msgid "" #~ " @deprecated Describe the reason or provide alt. references here" #~ msgstr "" #~ " !!!plain\n" #~ " @deprecated 廃止ã•れるç†ç”±ã‚„ä»£æ›¿ã®æä¾›ã«ã¤ã„ã¦ã®å‚ç…§ã‚’ã“ã“ã«æ›¸ã。" #~ msgid "" #~ " * `@deprecated`: Marks a method/class as deprecated with an optional\n" #~ " reason." #~ msgstr "" #~ " * `@deprecated`: 廃止予定ã®ãƒ¡ã‚½ãƒƒãƒ‰,クラスをマークã™ã‚‹ã€‚ä»»æ„ã§ç†ç”±ã‚’書ã" #~ msgid " @author Full Name" #~ msgstr "" #~ " !!!plain\n" #~ " @author フルãƒãƒ¼ãƒ " #~ msgid " * `@author`: List the author(s) of a class/method" #~ msgstr " * `@author`: クラス,メソッドã®ä½œè€…リスト" #~ msgid " @attribute [rw|r|w] NAME" #~ msgstr "" #~ " !!!plain\n" #~ " @attribute [rw|r|w] åå‰" #~ msgid "" #~ " * `@attribute`: Recognizes a DSL class method as an attribute with the " #~ "given\n" #~ " name. Also accepts the r, w, or rw flag to signify that the attribute " #~ "is \n" #~ " readonly, writeonly, or readwrite (default). Only used with DSL " #~ "methods." #~ msgstr "" #~ " * `@attribute`: DSLクラスメソッドを指定ã•れãŸåå‰ã‚’æŒã¤å±žæ€§ã¨ã—ã¦èªè­˜ã™" #~ "る。\n" #~ " åˆ,r,w,rwフラグã¯èª­ã¿è¾¼ã¿å°‚用,書込ã¿å°‚用,読書ã両用(デフォルト)ã¨ãª" #~ "る。\n" #~ " DSLã®ãƒ¡ã‚½ãƒƒãƒ‰ã ã‘ã§ä½¿ç”¨ã•れる。\n" #~ msgid " @attr_writer [Types] name description of writeonly attribute" #~ msgstr "" #~ " !!!plain\n" #~ " @attr_writer [åž‹...] åå‰ æ›¸è¾¼ã¿å°‚用属性ã®èª¬æ˜Ž" #~ msgid "" #~ " * `@attr_writer`: Declares a writeonly attribute from the docstring of " #~ "class.\n" #~ " Meant to be used on Struct classes only (classes that inherit " #~ "Struct). See `@attr`." #~ msgstr "" #~ " * `@attr_writer`: クラスã®docstringã‹ã‚‰æ›¸ãè¾¼ã¿å°‚用属性ã¨å®£è¨€ã™ã‚‹\n" #~ " Structクラスã ã‘ã§ä½¿ç”¨ã§ãる。(Structクラスを継承ã™ã‚‹ã‚¯ãƒ©ã‚¹)`@attr`å‚" #~ "照。" #~ msgid "" #~ " @attr_reader [Types] name description of a readonly attribute" #~ msgstr "" #~ " !!!plain\n" #~ " @attr_reader [åž‹...] åå‰ èª­å–り専用属性ã®èª¬æ˜Ž" #~ msgid "" #~ " * `@attr_reader`: Declares a readonly attribute from the docstring of a " #~ "class.\n" #~ " Meant to be used on Struct classes only (classes that inherit " #~ "Struct). See `@attr`." #~ msgstr "" #~ " * `@attr_reader`: クラスã®docstringã‹ã‚‰èª­ã¿è¾¼ã¿å°‚用属性ã¨å®£è¨€ã™ã‚‹ã€‚\n" #~ " Structクラスã ã‘ã§ä½¿ç”¨ã§ãる。(Structクラスを継承ã™ã‚‹ã‚¯ãƒ©ã‚¹)`@attr`å‚" #~ "照。" #~ msgid "" #~ " @attr [Types] attribute_name a full description of the attribute" #~ msgstr "" #~ " !!!plain\n" #~ " @attr [åž‹...] 属性å 属性ã®å…¨ã¦ã®èª¬æ˜Ž" #~ msgid "" #~ " * `@attr`: Declares an attribute from the docstring of a class. Meant " #~ "to be\n" #~ " used on Struct classes only (classes that inherit Struct)." #~ msgstr "" #~ " * `@attr`: クラスã®docstringã‹ã‚‰å±žæ€§ã‚’宣言ã™ã‚‹ã€‚\n" #~ " Structクラスã ã‘ã§ä½¿ç”¨ã§ãる。(Structクラスを継承ã™ã‚‹ã‚¯ãƒ©ã‚¹)" #~ msgid " @api freeform text" #~ msgstr "" #~ " !!!plain\n" #~ " @api フリーフォームテキスト" #~ msgid "YARD supplies the following built-in tags:" #~ msgstr "YARDã¯ã€ä»¥ä¸‹ã®ãƒ“ルトインタグを用æ„ã—ã¦ã„る。" #~ msgid "## List of Available Tags" #~ msgstr "## 利用å¯èƒ½ãªã‚¿ã‚°ã®ãƒªã‚¹ãƒˆ" #~ msgid "As mentioned, types are optional, so the following is also valid:" #~ msgstr "åž‹ã¯çœç•¥å¯èƒ½ã§, 以下ã¯åŒæ§˜ã«æœ‰åйã§ã‚ã‚‹" #~ msgid "" #~ "Note that \"url\" in the above example is the key name. The syntax is of " #~ "the form:" #~ msgstr "" #~ "次ã®äº‹ã«ç•™æ„ã™ã‚‹ã€‚\n" #~ "上ã®ä¾‹ã®ä¸­ã®\"url\"ã¯ã€ã‚­ãƒ¼åã§ã‚る。\n" #~ "ã“ã®æ§‹æ–‡ã¯æ¬¡ã®å½¢å¼ã«ãªã‚‹ã€‚" #~ msgid "" #~ "A special case of the above data with optional type information is the " #~ "case\n" #~ "of tags like `@param`, where the data is further associated with a key. " #~ "In\n" #~ "the case of `@param` the key is an argument name in the method. The " #~ "following\n" #~ "shows how this can be used:" #~ msgstr "" #~ "çœç•¥å¯èƒ½ãªåž‹æƒ…報を用ã„ãŸä¸Šã®ãƒ‡ãƒ¼ã‚¿ã®æ§˜ãªç‰¹æ®Šãªã‚±ãƒ¼ã‚¹ã¯ã€\n" #~ "データãŒã‚­ãƒ¼ã‚’ç”¨ã„æ›´ã«é–¢é€£ä»˜ã‘られる場åˆã€\n" #~ "@paramã®ã‚ˆã†ãªã‚¿ã‚°ã®ã‚±ãƒ¼ã‚¹ã¨ãªã‚‹ã€‚\n" #~ "`@param`キーã®ã‚±ãƒ¼ã‚¹ã®å ´åˆã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸­ã®åå‰ã¯å¼•æ•°ã¨ãªã‚‹ã€‚\n" #~ "次ã®ã‚ˆã†ãªç”¨æ³•ã§ä½¿ã‚れる。" #~ msgid "### Data With Name and Optional Type Information" #~ msgstr "### åå‰ã¨ä»»æ„ã®åž‹æƒ…å ±ã®ã¤ã„ãŸãƒ‡ãƒ¼ã‚¿" #~ msgid "" #~ "This syntax optionally contains type information to be associated with " #~ "the\n" #~ "tag. Type information is specified as a freeform list of Ruby types, " #~ "duck\n" #~ "types or literal values. The following is a valid tag with type " #~ "information:" #~ msgstr "" #~ "ã“ã®æ§‹æ–‡ã¯ã€çœç•¥ã§ãã‚‹ã‚¿ã‚°ã«é–¢é€£ä»˜ã‘られる型情報ãŒå«ã¾ã‚Œã‚‹ã€‚\n" #~ "型情報ã¯ã€Rubyã®åž‹ã‹ãƒ€ãƒƒã‚¯ã‚¿ã‚¤ãƒ—やリテラル値ã®\n" #~ "フリーフォームã®ãƒªã‚¹ãƒˆã¨ã—ã¦æŒ‡å®šã•れる。\n" #~ "以下ã¯ã€åž‹æƒ…報をæŒã¤æœ‰åйãªã‚¿ã‚°ã¨ãªã‚‹ã€‚" #~ msgid "### Data With Optional Type Information" #~ msgstr "### ä»»æ„ã®åž‹æƒ…å ±ãŒã¤ã„ãŸãƒ‡ãƒ¼ã‚¿" #~ msgid "" #~ "Occasionally a freeform tag may reserve the first line for a title (or " #~ "some\n" #~ "other associative identifier) and treat only the subsequent indented " #~ "lines as\n" #~ "the tag data. Two examples are the `@example` and `@overload` tags. In " #~ "the case\n" #~ "of `@example` the first line is a title, and in the case of `@overload` " #~ "the\n" #~ "first line is the method signature for the overload. Here is an example " #~ "of both:" #~ msgstr "" #~ "ã„ãã¤ã‹ã®ãƒ•ãƒªãƒ¼ãƒ•ã‚©ãƒ¼ãƒ ã‚¿ã‚°ã¯æœ€åˆã®è¡Œã‚’タイトル(åˆã¯,ä»–ã®é–¢é€£ã™ã‚‹è­˜åˆ¥å­)" #~ "ã«ã™ã‚‹ã€‚\n" #~ "ãã—ã¦ã€ãれã«ç¶šãインデントã•れãŸè¡Œã‚’タグデータã¨ã—ã¦å‡¦ç†ã™ã‚‹ã€‚\n" #~ "ï¼’ã¤ã®ä¾‹ã¯@exampleã¨@overloadã‚¿ã‚°ã®ã‚±ãƒ¼ã‚¹ã§ã€\n" #~ "@exampleã®å ´åˆã¯æœ€åˆã®è¡Œã¯ã‚¿ã‚¤ãƒˆãƒ«ã¨ãªã‚‹ã€‚\n" #~ "@overloadã®å ´åˆã¯æœ€åˆã®è¡Œã¯ãƒ¡ã‚½ãƒƒãƒ‰ã®ç”¨æ³•ã¨ãªã‚‹ã€‚\n" #~ "ã“ã“ã§ä¸¡æ–¹ã®ä¾‹ã‚’次ã«ç¤ºã™ã€‚" #~ msgid "### Freeform Data With Title" #~ msgstr "### タイトルを用ã„ãŸãƒ•リーフォームデータ" #~ msgid "" #~ "This syntax has no special syntax, it is simply a tagname followed by " #~ "any\n" #~ "data." #~ msgstr "" #~ "ã“ã®æ§‹æ–‡ã¯ç‰¹åˆ¥ãªæ§‹æ–‡ã§ã¯ãªã,\n" #~ "何らã‹ã®ãƒ‡ãƒ¼ã‚¿ã«ç¶šã„ãŸã‚¿ã‚°åãŒã‚ã‚‹ã ã‘ã¨ãªã‚‹ã€‚" #~ msgid "### Freeform Data" #~ msgstr "### フリーフォームデータ" #~ msgid "" #~ "If a tag's data begins with `(see NAME)` it is considered a \"reference " #~ "tag\".\n" #~ "The syntax and semantics of a reference tag are discussed in the section " #~ "below\n" #~ "titled \"[Reference Tags](#reftags)\"" #~ msgstr "" #~ "ã‚¿ã‚°ã®ãƒ‡ãƒ¼ã‚¿ãŒã€`(see NAME)`ã§å§‹ã¾ã‚‹å ´åˆã€`ãれã¯ã€`å‚ç…§ã‚¿ã‚°`ã¨ã¿ãªã•れ" #~ "る。\n" #~ "`å‚ç…§ã‚¿ã‚°`ã®æ§‹æ–‡ã¨æ–‡æ³•ã¯ã€\"[Reference Tags](#reftags)\"以下ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§" #~ "説明ã•れã¦ã„る。" #~ msgid "" #~ "In the above example, \"@tagname\" will have the text *\"This is tag data" #~ "\"*." #~ msgstr "" #~ "上記ã®ä¾‹ã§ã€\"@tagname\"å†…ã®æƒ…å ±ã¯\"this is tag data\"ã¨ãªã‚‹ã€‚\n" #~ "(but this is not ã¯å«ã¾ãªã„)" #~ msgid "" #~ "Tags begin with \"@tagname\" at the start of a comment line. Tags can " #~ "span multiple\n" #~ "lines if the subsequent lines are indented by more than one space. The " #~ "following\n" #~ "syntax is valid:" #~ msgstr "" #~ "ã‚¿ã‚°ã¯ã€ã‚³ãƒ¡ãƒ³ãƒˆè¡Œã®å†’é ­ã«ã‚ã‚‹\"@tagname\"ã‹ã‚‰å§‹ã¾ã‚‹ã€‚\n" #~ "後続ã®è¡ŒãŒã‚¹ãƒšãƒ¼ã‚¹ã§ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã•れã¦ã„ã‚‹å ´åˆã¯ã€\n" #~ "複数行ã«ã¾ãŸãŒã‚‹ã“ã¨ãŒã§ãる。\n" #~ "æ¬¡ã®æ§‹æ–‡ã¯æœ‰åйã¨ãªã‚‹ã€‚" #~ msgid "" #~ "Tags are the best way to add arbitrary metadata when documenting an " #~ "object in a\n" #~ "way to access it later without having to parse the entire comment string. " #~ "The\n" #~ "rest of the document will describe the tag syntax, how to access the " #~ "tag \n" #~ "metadata and how to extend YARD to support custom tags or override " #~ "existing tags." #~ msgstr "" #~ "ã‚¿ã‚°ã¯ã‚ªãƒ–ジェクトをドキュメント化ã™ã‚‹éš›ã€\n" #~ "コメント文字列全ã¦ã‚’è§£æžã›ãšã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã€\n" #~ "メタデータを追加ã™ã‚‹æœ€å–„ã®æ–¹æ³•ã¨ãªã‚‹ã€‚\n" #~ "ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æ®‹ã‚Šã®éƒ¨åˆ†ã¯ã€\n" #~ "ã‚¿ã‚°ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•\n" #~ "カスタムタグをサãƒãƒ¼ãƒˆã—ãŸã‚Šã€æ—¢å­˜ã®ã‚¿ã‚°ã‚’上書ãã—ãŸã‚Šã™ã‚‹ãŸã‚ã«\n" #~ "YARDã‚’æ‹¡å¼µã™ã‚‹æ–¹æ³•ã¨ã„ã£ãŸã€ã‚¿ã‚°ã®æ§‹æ–‡ã®èª¬æ˜Žã«ãªã‚‹ã€‚" #~ msgid "" #~ "The above example adds metadata under the name `tagname` to the Foo class " #~ "object." #~ msgstr "" #~ "上記ã®ä¾‹ã§ã¯ã€\n" #~ "Fooクラスオブジェクトã®ç‚ºã«`@tagname`以é™ã«ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’追加ã™ã‚‹ã€‚" #~ msgid "" #~ "Tags represent the metadata that can be added to documentation through " #~ "the `@tag`\n" #~ "style syntax:" #~ msgstr "" #~ "ã‚¿ã‚°ã¨ã¯ä»¥ä¸‹ã®æ§˜ã«@tagå½¢å¼ã®æ§‹æ–‡ã‚’介ã—ã¦ã€\n" #~ "ドキュメントã«è¿½åŠ ã§ãるメタデータを表ã™ã€‚" #~ msgid "" #~ "* **Docstring (Documentation String)**: Comments associated with a code " #~ "object\n" #~ " used for documentation purposes." #~ msgstr "" #~ "* **Docstring (Documentation String)**: コードオブジェクトã«é–¢é€£ã™ã‚‹ã‚³ãƒ¡ãƒ³" #~ "ト,\n" #~ "用途を記述ã™ã‚‹ç‚ºã«åˆ©ç”¨ã•れる。" #~ msgid "" #~ "* **Domain Specific Language (DSL)**: In the context of Ruby, a DSL is a " #~ "languge\n" #~ " optimized for a specific domain (problem) but represented using Ruby " #~ "syntax." #~ msgstr "" #~ "* **Domain Specific Language (DSL)**: Ruby関連ã®ç”¨èªžã§ã€\n" #~ "DSLã¨ã¯ã€ç‰¹å®šã®ãƒ‰ãƒ¡ã‚¤ãƒ³(å•題)ç”¨ã«æœ€é©åŒ–ã•れãŸè¨€èªžã§ã‚る。\n" #~ "ã—ã‹ã—ã€å†…容自体ã¯Rubyæ§‹æ–‡ã«ã‚ˆã£ã¦è¡¨ã•れる。" #~ msgid "" #~ "* **Code Object**: Any explicitly defined Ruby source that describes a " #~ "feature\n" #~ " of the code. By default, this refers to classes, modules, methods, " #~ "constants\n" #~ " and class variables, though it can be extended to refer to custom " #~ "functionality\n" #~ " defined by a DSL (like a spec, for instance)." #~ msgstr "" #~ "* **Code Object**: ã‚³ãƒ¼ãƒ‰ã®æ©Ÿèƒ½ã‚’説明ã™ã‚‹Rubyソースを明確ã«å®šç¾©ã•れる。\n" #~ "デフォルトã§ã“れã¯ã‚¯ãƒ©ã‚¹,モジュール,メソッド,定数,クラス変数をå‚ç…§ã™ã‚‹ã€‚\n" #~ "ãれã¯ã€DSLã«ã‚ˆã£ã¦å®šç¾©ã•れるカスタム機能をå‚ç…§ã™ã‚‹ç‚ºã«æ‹¡å¼µã§ãã‚‹ã¨è€ƒãˆ" #~ "る。\n" #~ "(例ãˆã°ã€rspecã®ã‚ˆã†ã«)" #~ msgid "# Glossary" #~ msgstr "# 用語集" #~ msgid "" #~ "Usage\n" #~ "-----" #~ msgstr "" #~ "使用法\n" #~ "-----" #~ msgid "" #~ "Installing\n" #~ "----------" #~ msgstr "" #~ "インストール\n" #~ "----------" yard-master/samus.json000066400000000000000000000024011265676644000153460ustar00rootroot00000000000000{ "actions": [ { "action": "rake-task" }, { "action": "fs-sedfiles", "files": ["lib/*/version.rb"], "arguments": { "search": "VERSION = ['\"](.+?)['\"]", "replace": "VERSION = '$version'" } }, { "action": "git-commit", "files": ["lib/*/version.rb"] }, { "action": "git-merge", "arguments": { "branch": "master" } }, { "action": "archive-git-full", "files": ["git.tgz"], "publish": [{ "action": "git-push", "arguments": { "remotes": "origin", "refs": "master v$version" } }] }, { "action": "gem-build", "files": ["*.gemspec"], "publish": [ { "action": "gem-push", "files": ["*.gem"], "credentials": "lsegal.rubygems" } ] }, { "action": "changelog-parse", "files": ["CHANGELOG.md"], "publish": [ { "action": "github-release", "credentials": "lsegal.github", "files": [], "arguments": { "repository": "lsegal/yard", "tag": "v$version", "changelog": "CHANGELOG.md" } } ] } ] } yard-master/spec/000077500000000000000000000000001265676644000142605ustar00rootroot00000000000000yard-master/spec/cli/000077500000000000000000000000001265676644000150275ustar00rootroot00000000000000yard-master/spec/cli/command_parser_spec.rb000066400000000000000000000023741265676644000213660ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::CommandParser do describe "#run" do before do @cmd = CLI::CommandParser.new end it "shows help if --help is provided" do command = double(:command) expect(command).to receive(:run).with('--help') CLI::CommandParser.commands[:foo] = command @cmd.class.default_command = :foo @cmd.run *%w( foo --help ) end it "uses default command if first argument is a switch" do command = double(:command) expect(command).to receive(:run).with('--a', 'b', 'c') CLI::CommandParser.commands[:foo] = command @cmd.class.default_command = :foo @cmd.run *%w( --a b c ) end it "uses default command if no arguments are provided" do command = double(:command) expect(command).to receive(:run) CLI::CommandParser.commands[:foo] = command @cmd.class.default_command = :foo @cmd.run end it "lists commands if command is not found" do expect(@cmd).to receive(:list_commands) @cmd.run *%w( unknown_command --args ) end it "lists commands if --help is provided as sole argument" do expect(@cmd).to receive(:list_commands) @cmd.run *%w( --help ) end end endyard-master/spec/cli/command_spec.rb000066400000000000000000000021141265676644000200020ustar00rootroot00000000000000require File.dirname(__FILE__) + "/../spec_helper" require 'optparse' describe YARD::CLI::Command do describe "#parse_options" do before do @options = OptionParser.new @saw_foo = false @options.on('--foo') { @saw_foo = true } end def parse(*args) CLI::Command.new.send(:parse_options, @options, args) args end it "skips unrecognized options but continue to next option" do expect(log).to receive(:warn).with(/Unrecognized.*--list/) expect(log).to receive(:warn).with(/Unrecognized.*--list2/) parse('--list', '--list2', '--foo') expect(@saw_foo).to be true end it "skips unrecognized options and any extra non-option arg that follows" do expect(log).to receive(:warn).with(/Unrecognized.*--list/) parse('--list', 'foo', '--foo') expect(@saw_foo).to be true end it "stops retrying to parse at non-switch argument" do expect(log).to receive(:warn).with(/Unrecognized.*--list/) args = parse('--list', 'foo', 'foo', 'foo') expect(args).to eq %w(foo foo) end end end yard-master/spec/cli/config_spec.rb000066400000000000000000000051211265676644000176320ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' require 'yaml' describe YARD::CLI::Config do before do @config = YARD::CLI::Config.new YARD::Config.options = YARD::Config::DEFAULT_CONFIG_OPTIONS.dup allow(YARD::Config).to receive(:save) end def run(*args) @config.run(*args) end describe "Listing configuration" do it "accepts --list" do opts = YARD::Config.options expect(YAML).to receive(:dump).twice.and_return("--- foo\nbar\nbaz") expect(log).to receive(:puts).twice.with("bar\nbaz") run run('--list') expect(YARD::Config.options).to eq opts end end describe "Viewing an item" do it "views item if no value is given" do YARD::Config.options[:foo] = 'bar' expect(log).to receive(:puts).with('"bar"') run 'foo' expect(YARD::Config.options[:foo]).to eq 'bar' end end describe "Modifying an item" do it "accepts --reset to set value" do YARD::Config.options[:load_plugins] = 'foo' run('--reset', 'load_plugins') expect(YARD::Config.options[:load_plugins]).to be false end it "accepts --as-list to force single item as list" do run('--as-list', 'foo', 'bar') expect(YARD::Config.options[:foo]).to eq ['bar'] end it "accepts --append to append values to existing key" do YARD::Config.options[:foo] = ['bar'] run('--append', 'foo', 'baz', 'quux') expect(YARD::Config.options[:foo]).to eq ['bar', 'baz', 'quux'] run('-a', 'foo', 'last') expect(YARD::Config.options[:foo]).to eq ['bar', 'baz', 'quux', 'last'] end it "turns key into list if --append is used on single item" do YARD::Config.options[:foo] = 'bar' run('-a', 'foo', 'baz') expect(YARD::Config.options[:foo]).to eq ['bar', 'baz'] end it "modifies item if value is given" do run('foo', 'xxx') expect(YARD::Config.options[:foo]).to eq 'xxx' end it "turns list of values into array of values" do run('foo', 'a', 'b', '1', 'true', 'false') expect(YARD::Config.options[:foo]).to eq ['a', 'b', 1, true, false] end it "turns number into numeric Ruby type" do run('foo', '1') expect(YARD::Config.options[:foo]).to eq 1 end it "turns true into TrueClass" do run('foo', 'true') expect(YARD::Config.options[:foo]).to be true end it "turns false into FalseClass" do run('foo', 'false') expect(YARD::Config.options[:foo]).to be false end it "saves on modification" do expect(YARD::Config).to receive(:save) run('foo', 'true') end end endyard-master/spec/cli/diff_spec.rb000066400000000000000000000174371265676644000173120ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' require 'stringio' require 'open-uri' describe YARD::CLI::Diff do before do allow(CLI::Yardoc).to receive(:run) allow(CLI::Gems).to receive(:run) @diff = CLI::Diff.new end describe "Argument handling" do it "exits if there is only one gem name" do expect(@diff).to receive(:exit) expect(log).to receive(:puts).with(/Usage/) @diff.run end end describe "Diffing" do before do @objects1 = nil @objects2 = nil end def run(*args) @all_call = -1 @data = StringIO.new @objects1 ||= %w( C#fooey C#baz D.bar ) @objects2 ||= %w( A A::B A::B::C A.foo A#foo B C.foo C.bar C#baz ) @objects = [@objects1, @objects2] expect(@diff).to receive(:load_gem_data).ordered.with('gem1') do Registry.clear YARD.parse_string <<-eof class C def fooey; end def baz; FOO end end class D def self.bar; end end eof end expect(@diff).to receive(:load_gem_data).ordered.with('gem2') do Registry.clear YARD.parse_string <<-eof module A module B class C; end end def self.foo; end def foo; end end class C def self.foo; end def self.bar; end def baz; BAR end end eof end allow(log).to receive(:print) {|data| @data << data } allow(log).to receive(:puts) {|*args| @data << args.join("\n"); @data << "\n" } @diff.run(*(args + ['gem1', 'gem2'])) end it "shows differences between objects" do run expect(@data.string).to eq <<-eof Added objects: A ((stdin):1) (...) A::B::C ((stdin):3) C.bar ((stdin):10) C.foo ((stdin):9) Modified objects: C#baz ((stdin):3) Removed objects: C#fooey ((stdin):2) D ((stdin):5) (...) eof end it "accepts --compact" do run('--compact') expect(@data.string).to eq <<-eof A A ((stdin):1) (...) A A::B::C ((stdin):3) A C.bar ((stdin):10) A C.foo ((stdin):9) M C#baz ((stdin):3) D C#fooey ((stdin):2) D D ((stdin):5) (...) eof end it "accepts -a/--all" do ['-a', '--all'].each do |opt| run(opt) expect(@data.string).to eq <<-eof Added objects: A ((stdin):1) A#foo ((stdin):6) A.foo ((stdin):5) A::B ((stdin):2) A::B::C ((stdin):3) C.bar ((stdin):10) C.foo ((stdin):9) Modified objects: C#baz ((stdin):3) Removed objects: C#fooey ((stdin):2) D ((stdin):5) D.bar ((stdin):6) eof end end it "accepts --compact and --all" do run('--compact', '--all') expect(@data.string).to eq <<-eof A A ((stdin):1) A A#foo ((stdin):6) A A.foo ((stdin):5) A A::B ((stdin):2) A A::B::C ((stdin):3) A C.bar ((stdin):10) A C.foo ((stdin):9) M C#baz ((stdin):3) D C#fooey ((stdin):2) D D ((stdin):5) D D.bar ((stdin):6) eof end it "accepts --no-modified" do run('--compact', '--no-modified') expect(@data.string).to eq <<-eof A A ((stdin):1) (...) A A::B::C ((stdin):3) A C.bar ((stdin):10) A C.foo ((stdin):9) D C#fooey ((stdin):2) D D ((stdin):5) (...) eof end it "accepts --query" do run('--compact', '--query', 'o.type == :method') expect(@data.string).to eq <<-eof A A#foo ((stdin):6) A A.foo ((stdin):5) A C.bar ((stdin):10) A C.foo ((stdin):9) M C#baz ((stdin):3) D C#fooey ((stdin):2) D D.bar ((stdin):6) eof end end describe "File searching" do before do allow(@diff).to receive(:generate_yardoc) end it "searches for gem/.yardoc" do expect(File).to receive(:directory?).with('gem1/.yardoc').and_return(true) expect(File).to receive(:directory?).with('gem2/.yardoc').and_return(true) expect(Registry).to receive(:load_yardoc).with('gem1/.yardoc') expect(Registry).to receive(:load_yardoc).with('gem2/.yardoc') @diff.run('gem1', 'gem2') end it "searches for argument as yardoc" do expect(File).to receive(:directory?).with('gem1/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem2/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem1').and_return(true) expect(File).to receive(:directory?).with('gem2').and_return(true) expect(Registry).to receive(:load_yardoc).with('gem1') expect(Registry).to receive(:load_yardoc).with('gem2') @diff.run('gem1', 'gem2') end it "searches for installed gem" do expect(File).to receive(:directory?).with('gem1-1.0.0.gem/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem2-1.0.0/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem1-1.0.0.gem').and_return(false) expect(File).to receive(:directory?).with('gem2-1.0.0').and_return(false) gemmock = double(:gemmock) spec1 = double(:spec) spec2 = double(:spec) expect(gemmock).to receive(:find_name).at_least(1).times.and_return([spec1, spec2]) expect(Gem).to receive(:source_index).at_least(1).times.and_return(gemmock) allow(spec1).to receive(:full_name).and_return('gem1-1.0.0') allow(spec1).to receive(:name).and_return('gem1') allow(spec1).to receive(:version).and_return('1.0.0') allow(spec2).to receive(:full_name).and_return('gem2-1.0.0') allow(spec2).to receive(:name).and_return('gem2') allow(spec2).to receive(:version).and_return('1.0.0') expect(Registry).to receive(:yardoc_file_for_gem).with('gem1', '= 1.0.0').and_return('/path/to/file') expect(Registry).to receive(:yardoc_file_for_gem).with('gem2', '= 1.0.0').and_return(nil) expect(Registry).to receive(:load_yardoc).with('/path/to/file') expect(CLI::Gems).to receive(:run).with('gem2', '1.0.0').and_return(nil) allow(Dir).to receive(:chdir) @diff.run('gem1-1.0.0.gem', 'gem2-1.0.0') end it "searches for .gem file" do expect(File).to receive(:directory?).with('gem1/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem2.gem/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem1').and_return(false) expect(File).to receive(:directory?).with('gem2.gem').and_return(false) expect(File).to receive(:exist?).with('gem1.gem').and_return(true) expect(File).to receive(:exist?).with('gem2.gem').and_return(true) expect(File).to receive(:open).with('gem1.gem', 'rb') expect(File).to receive(:open).with('gem2.gem', 'rb') allow(FileUtils).to receive(:mkdir_p) allow(Gem::Package).to receive(:open) allow(FileUtils).to receive(:rm_rf) @diff.run('gem1', 'gem2.gem') end it "searches for .gem file on rubygems.org" do expect(File).to receive(:directory?).with('gem1/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem2.gem/.yardoc').and_return(false) expect(File).to receive(:directory?).with('gem1').and_return(false) expect(File).to receive(:directory?).with('gem2.gem').and_return(false) expect(File).to receive(:exist?).with('gem1.gem').and_return(false) expect(File).to receive(:exist?).with('gem2.gem').and_return(false) expect(@diff).to receive(:open).with('http://rubygems.org/downloads/gem1.gem') expect(@diff).to receive(:open).with('http://rubygems.org/downloads/gem2.gem') allow(FileUtils).to receive(:mkdir_p) allow(Gem::Package).to receive(:open) allow(FileUtils).to receive(:rm_rf) @diff.run('gem1', 'gem2.gem') end it "raises an error if gem is not found" do expect(log).to receive(:error).with("Cannot find gem gem1") expect(log).to receive(:error).with("Cannot find gem gem2.gem") allow(@diff).to receive(:load_gem_data).and_return(false) @diff.run('gem1', 'gem2.gem') end end endyard-master/spec/cli/display_spec.rb000066400000000000000000000020151265676644000200310ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::Display do before do allow(Registry).to receive(:load) @object = CodeObjects::ClassObject.new(:root, :Foo) @object.docstring = 'Foo bar' end it "displays an object" do YARD::CLI::Display.run('-f', 'text', 'Foo') expect(log.io.string.strip).to eq(@object.format.strip) end it "wraps output with -l (defaulting to layout)" do YARD::CLI::Display.run('-l', '-f', 'html', 'Foo') formatted_output = @object.format(:format => :html).strip actual_output = log.io.string.strip expect(actual_output).not_to eq(formatted_output) expect(actual_output).to include(formatted_output) end it "wraps output with --layout onefile" do YARD::CLI::Display.run('--layout', 'onefile', '-f', 'html', 'Foo') formatted_output = @object.format(:format => :html).strip actual_output = log.io.string.strip expect(actual_output).not_to eq(formatted_output) expect(actual_output).to include(formatted_output) end end yard-master/spec/cli/gems_spec.rb000066400000000000000000000064041265676644000173250ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' require 'ostruct' require 'rubygems' describe YARD::CLI::Gems do before do @rebuild = false @gem1 = build_mock('gem1') @gem2 = build_mock('gem2') @gem3 = build_mock('gem3') end def build_mock(name, version = '1.0') OpenStruct.new :name => name, :version => version, :full_gem_path => "/path/to/gems/#{name}-#{version}", :yardoc_file => "/path/to/yardoc/#{name}-#{version}" end def build_specs(*specs) specs.each do |themock| expect(Registry).to receive(:yardoc_file_for_gem).with(themock.name, "= #{themock.version}").and_return(themock.yardoc_file) expect(File).to receive(:directory?).with(themock.yardoc_file).and_return(@rebuild) expect(File).to receive(:directory?).with(themock.full_gem_path).and_return(true) expect(Registry).to receive(:yardoc_file_for_gem).with(themock.name, "= #{themock.version}", true).and_return(themock.yardoc_file) expect(Dir).to receive(:chdir).with(themock.full_gem_path) end expect(Registry).to receive(:clear).exactly(specs.size).times expect(CLI::Yardoc).to receive(:run).exactly(specs.size).times end describe "#run" do it "builds all gem indexes if no gem is specified" do build_specs(@gem1, @gem2) expect(Gem.source_index).to receive(:find_name).with('').and_return([@gem1, @gem2]) CLI::Gems.run end it "allows gem to be specified" do build_specs(@gem1) expect(Gem.source_index).to receive(:find_name).with(@gem1.name, '>= 0').and_return([@gem1]) CLI::Gems.run(@gem1.name) end it "allows multiple gems to be specified for building" do build_specs(@gem1, @gem2) expect(Gem.source_index).to receive(:find_name).with(@gem1.name, @gem1.version).and_return([@gem1]) expect(Gem.source_index).to receive(:find_name).with(@gem2.name, '>= 0').and_return([@gem2]) CLI::Gems.run(@gem1.name, @gem1.version, @gem2.name) end it "allows version to be specified with gem" do build_specs(@gem1) expect(Gem.source_index).to receive(:find_name).with(@gem1.name, '>= 1.0').and_return([@gem1]) CLI::Gems.run(@gem1.name, '>= 1.0') end it "warns if one of the gems is not found, but it should process others" do build_specs(@gem2) expect(Gem.source_index).to receive(:find_name).with(@gem1.name, '>= 2.0').and_return([]) expect(Gem.source_index).to receive(:find_name).with(@gem2.name, '>= 0').and_return([@gem2]) expect(log).to receive(:warn).with(/#{@gem1.name} >= 2.0 could not be found/) CLI::Gems.run(@gem1.name, '>= 2.0', @gem2.name) end it "fails if specified gem(s) is/are not found" do expect(CLI::Yardoc).not_to receive(:run) expect(Gem.source_index).to receive(:find_name).with(@gem1.name, '>= 2.0').and_return([]) expect(log).to receive(:warn).with(/#{@gem1.name} >= 2.0 could not be found/) expect(log).to receive(:error).with(/No specified gems could be found/) CLI::Gems.run(@gem1.name, '>= 2.0') end it "accepts --rebuild" do @rebuild = true build_specs(@gem1) expect(Gem.source_index).to receive(:find_name).with('').and_return([@gem1]) CLI::Gems.run('--rebuild') end end end yard-master/spec/cli/graph_spec.rb000066400000000000000000000010571265676644000174720ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::Graph do it "serializes output" do expect(Registry).to receive(:load).at_least(1).times allow(subject).to receive(:yardopts) { [] } expect(subject.options.serializer).to receive(:serialize).once subject.run end it "reads yardoc file from .yardopts" do allow(subject).to receive(:yardopts) { %w(--db /path/to/db) } expect(subject.options.serializer).to receive(:serialize).once subject.run expect(Registry.yardoc_file).to eq '/path/to/db' end end yard-master/spec/cli/help_spec.rb000066400000000000000000000011571265676644000173220ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::Help do describe "#run" do it "accepts help command" do expect(CLI::Yardoc).to receive(:run).with('--help') CLI::Help.run('doc') end it "accepts no arguments (and lists all commands)" do expect(CLI::CommandParser).to receive(:run).with('--help') CLI::Help.run end it "shows all commands if command isn't found" do expect(CLI::CommandParser).to receive(:run).with('--help') help = CLI::Help.new expect(log).to receive(:puts).with(/not found/) help.run('unknown') end end endyard-master/spec/cli/i18n_spec.rb000066400000000000000000000064631265676644000171560ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::I18n do before do @i18n = YARD::CLI::I18n.new @i18n.use_document_file = false @i18n.use_yardopts_file = false output_path = File.expand_path(@i18n.options.serializer.basepath) allow(File).to receive(:open!).with(output_path, "wb") allow(YARD).to receive(:parse) end describe "Defaults" do before do @i18n = YARD::CLI::I18n.new allow(@i18n).to receive(:yardopts).and_return([]) allow(@i18n).to receive(:support_rdoc_document_file!).and_return([]) @i18n.parse_arguments end it "reads .yardopts by default" do expect(@i18n.use_yardopts_file).to be true end it "only shows public visibility by default" do expect(@i18n.visibilities).to eq [:public] end end describe "General options" do def self.should_accept(*args, &block) @counter ||= 0 @counter += 1 counter = @counter args.each do |arg| define_method("test_options_#{@counter}", &block) it("accepts #{arg}") { send("test_options_#{counter}", arg) } end end should_accept('--yardopts') do |arg| @i18n = YARD::CLI::I18n.new @i18n.use_document_file = false expect(@i18n).to receive(:yardopts).at_least(1).times.and_return([]) @i18n.parse_arguments(arg) expect(@i18n.use_yardopts_file).to be true @i18n.parse_arguments('--no-yardopts', arg) expect(@i18n.use_yardopts_file).to be true end should_accept('--yardopts with filename') do |arg| @i18n = YARD::CLI::I18n.new expect(File).to receive(:read_binary).with('.yardopts_i18n').and_return('') @i18n.use_document_file = false @i18n.parse_arguments('--yardopts', '.yardopts_i18n') expect(@i18n.use_yardopts_file).to be true expect(@i18n.options_file).to eq '.yardopts_i18n' end should_accept('--no-yardopts') do |arg| @i18n = YARD::CLI::I18n.new @i18n.use_document_file = false expect(@i18n).not_to receive(:yardopts) @i18n.parse_arguments(arg) expect(@i18n.use_yardopts_file).to be false @i18n.parse_arguments('--yardopts', arg) expect(@i18n.use_yardopts_file).to be false end should_accept('--exclude') do |arg| expect(YARD).to receive(:parse).with(['a'], ['nota', 'b']) @i18n.run(arg, 'nota', arg, 'b', 'a') end end describe ".yardopts handling" do before do @i18n.use_yardopts_file = true end it "searches for and uses yardopts file specified by #options_file" do expect(File).to receive(:read_binary).with("test").and_return("-o \n\nMYPATH\nFILE1 FILE2") @i18n.use_document_file = false @i18n.options_file = "test" expect(File).to receive(:open!).with(File.expand_path("MYPATH"), "wb") @i18n.run expect(@i18n.files).to eq ["FILE1", "FILE2"] end end describe "#run" do it "calls parse_arguments if run() is called" do expect(@i18n).to receive(:parse_arguments) @i18n.run end it "calls parse_arguments if run(arg1, arg2, ...) is called" do expect(@i18n).to receive(:parse_arguments) @i18n.run('--private', '-p', 'foo') end it "doesn't call parse_arguments if run(nil) is called" do expect(@i18n).not_to receive(:parse_arguments) @i18n.run(nil) end end end yard-master/spec/cli/list_spec.rb000066400000000000000000000003731265676644000173440ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::List do it "passes command off to Yardoc with --list" do expect(YARD::CLI::Yardoc).to receive(:run).with('-c', '--list', '--foo') YARD::CLI::List.run('--foo') end end yard-master/spec/cli/markup_types_spec.rb000066400000000000000000000012301265676644000211050ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::MarkupTypes do it "lists all available markup types" do YARD::CLI::MarkupTypes.run data = log.io.string exts = YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS.each do |name, providers| expect(data).to match(/\b#{name}\b/) # Match all extensions exts[name].each do |ext| expect(data).to include(".#{ext}") end if exts[name] # Match all provider libs providers.each do |provider| expect(data).to match(/\b#{provider[:lib]}\b/) end end end end yard-master/spec/cli/server_spec.rb000066400000000000000000000243461265676644000177050ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' class Server::WebrickAdapter; def start; end end describe YARD::CLI::Server do before do allow(CLI::Yardoc).to receive(:run) @no_verify_libraries = false @set_libraries = true @no_adapter_mock = false @libraries = {} @options = {:single_library => true, :caching => false} @server_options = {:Port => 8808} @adapter = double(:adapter, :setup => nil) new_cli end after(:all) do Server::Adapter.shutdown end def new_cli @cli = subject end def rack_required begin; require 'rack'; rescue LoadError; pending "rack required for this test" end end def bundler_required begin; require 'bundler'; rescue LoadError; pending "bundler required for this test" end end def unstub_adapter @no_adapter_mock = true end def run(*args) if @set_libraries && @libraries.empty? library = Server::LibraryVersion.new( File.basename(Dir.pwd), nil, File.expand_path('.yardoc')) @libraries = {library.name => [library]} end unless @no_verify_libraries @libraries.values.each do |libs| libs.each do |lib| yfile = File.expand_path(lib.yardoc_file) allow(File).to receive(:exist?).with(yfile).and_return(true) end end end unless @no_adapter_mock allow(@cli).to receive(:adapter).and_return(@adapter) expect(@adapter).to receive(:new). with(@libraries, @options, @server_options).and_return(@adapter) expect(@adapter).to receive(:start) end @cli.run(*args.flatten) assert_libraries @libraries, @cli.libraries end def assert_libraries(expected_libs, actual_libs) expect(actual_libs).to eq expected_libs expected_libs.each do |name, libs| libs.each_with_index do |expected,i| actual = actual_libs[name][i] [:source, :source_path, :yardoc_file].each do |m| expect(actual.send(m)).to eq expected.send(m) end end end end # Mocks the existence of a file. def mock_file(filename, content = nil) allow(File).to receive(:exist?).with(filename).and_return(true) allow(File).to receive(:read_binary).with(filename).and_return(content) if content filename_e = File.expand_path(filename) mock_file(filename_e) unless filename_e == filename end context 'when .yardopts file exists' do before :each do Registry.yardoc_file = Registry::DEFAULT_YARDOC_FILE allow(Dir).to receive(:pwd).and_return('/path/to/bar') @name = 'bar' end it "uses .yardoc as the yardoc db if .yardopts doesn't specify an alternate path" do mock_file '/path/to/bar/.yardopts', '--protected' @libraries[@name] = [Server::LibraryVersion.new(@name, nil, File.expand_path('/path/to/bar/.yardoc'))] @libraries.values[0][0].source_path = File.expand_path('/path/to/bar') run end it "uses the yardoc db location specified by .yardopts" do mock_file '/path/to/bar/.yardopts', '--db foo' @libraries[@name] = [Server::LibraryVersion.new(@name, nil, File.expand_path('/path/to/bar/foo'))] @libraries.values[0][0].source_path = File.expand_path('/path/to/bar') run end it "parses .yardopts when the library list is odd" do mock_file '/path/to/bar/.yardopts', '--db foo' @libraries['a'] = [Server::LibraryVersion.new('a', nil, File.expand_path('/path/to/bar/foo'))] @libraries.values[0][0].source_path = File.expand_path('/path/to/bar') run 'a' end end context "when .yardopts file doesn't exist" do before :each do allow(File).to receive(:exist?).with(/^(.*[\\\/])?\.yardopts$/).and_return(false) end it "defaults to .yardoc if no library is specified" do expect(Dir).to receive(:pwd).at_least(:once).and_return(File.expand_path('/path/to/foo')) @libraries['foo'] = [Server::LibraryVersion.new('foo', nil, File.expand_path('/path/to/foo/.yardoc'))] run end it "uses .yardoc as yardoc file if library list is odd" do @libraries['a'] = [Server::LibraryVersion.new('a', nil, File.expand_path('.yardoc'))] run 'a' end it "forces multi library if more than one library is listed" do allow(File).to receive(:exist?).with('b').and_return(true) @options[:single_library] = false @libraries['a'] = [Server::LibraryVersion.new('a', nil, File.expand_path('b'))] @libraries['c'] = [Server::LibraryVersion.new('c', nil, File.expand_path('.yardoc'))] run %w(a b c) end it "fails if specified directory does not exist" do @set_libraries = false allow(File).to receive(:exist?).with('b').and_return(false) expect(log).to receive(:warn).with(/Cannot find yardoc db for a: "b"/) run %w(a b) end end describe "General options" do before do allow(File).to receive(:exist?).with(/\.yardopts$/).and_return(false) end it "accepts -m, --multi-library" do @options[:single_library] = false run '-m' run '--multi-library' end it "accepts -c, --cache" do @options[:caching] = true run '-c' run '--cache' end it "accepts -r, --reload" do @options[:incremental] = true run '-r' run '--reload' end it "accepts -d, --daemon" do @server_options[:daemonize] = true run '-d' run '--daemon' end it "accepts -B, --bind" do @server_options[:Host] = 'example.com' run '-B', 'example.com' run '--bind', 'example.com' end it "binds address with WebRick adapter" do @server_options[:Host] = 'example.com' run '-B', 'example.com', '-a', 'webrick' run '--bind', 'example.com', '-a', 'webrick' end it "binds address with Rack adapter" do @server_options[:Host] = 'example.com' run '-B', 'example.com', '-a', 'rack' run '--bind', 'example.com', '-a', 'rack' end it "accepts -p, --port" do @server_options[:Port] = 10 run '-p', '10' run '--port', '10' end it "accepts --docroot" do @server_options[:DocumentRoot] = Dir.pwd + '/__foo/bar' run '--docroot', '__foo/bar' end it "accepts -a webrick to create WEBrick adapter" do expect(@cli).to receive(:adapter=).with(YARD::Server::WebrickAdapter) run '-a', 'webrick' end it "accepts -a rack to create Rack adapter" do rack_required expect(@cli).to receive(:adapter=).with(YARD::Server::RackAdapter) run '-a', 'rack' end it "defaults to Rack adapter if exists on system" do rack_required expect(@cli).to receive(:require).with('rubygems').and_return(false) expect(@cli).to receive(:require).with('rack').and_return(true) expect(@cli).to receive(:adapter=).with(YARD::Server::RackAdapter) @cli.send(:select_adapter) end it "falls back to WEBrick adapter if Rack is not on system" do expect(@cli).to receive(:require).with('rubygems').and_return(false) expect(@cli).to receive(:require).with('rack').and_raise(LoadError) expect(@cli).to receive(:adapter=).with(YARD::Server::WebrickAdapter) @cli.send(:select_adapter) end it "accepts -s, --server" do @server_options[:server] = 'thin' run '-s', 'thin' run '--server', 'thin' end it "accepts -g, --gems" do @no_verify_libraries = true @options[:single_library] = false @libraries['gem1'] = [Server::LibraryVersion.new('gem1', '1.0.0', nil, :gem)] @libraries['gem2'] = [Server::LibraryVersion.new('gem2', '1.0.0', nil, :gem)] gem1 = double(:gem1, :name => 'gem1', :version => '1.0.0', :full_gem_path => '/path/to/foo') gem2 = double(:gem2, :name => 'gem2', :version => '1.0.0', :full_gem_path => '/path/to/bar') specs = {'gem1' => gem1, 'gem2' => gem2} source = double(:source_index) allow(source).to receive(:find_name) do |k, ver| k == '' ? specs.values : specs.grep(k).map {|name| specs[name] } end allow(Gem).to receive(:source_index).and_return(source) run '-g' run '--gems' end it "accepts -G, --gemfile" do bundler_required @no_verify_libraries = true @options[:single_library] = false @libraries['gem1'] = [Server::LibraryVersion.new('gem1', '1.0.0', nil, :gem)] @libraries['gem2'] = [Server::LibraryVersion.new('gem2', '1.0.0', nil, :gem)] gem1 = double(:gem1, :name => 'gem1', :version => '1.0.0', :full_gem_path => '/path/to/foo') gem2 = double(:gem2, :name => 'gem2', :version => '1.0.0', :full_gem_path => '/path/to/bar') specs = {'gem1' => gem1, 'gem2' => gem2} lockfile_parser = double(:new, :specs => [gem1, gem2]) allow(Bundler::LockfileParser).to receive(:new).and_return(lockfile_parser) expect(File).to receive(:exist?).at_least(2).times.with("Gemfile.lock").and_return(true) allow(File).to receive(:read) run '-G' run '--gemfile' expect(File).to receive(:exist?).with("different_name.lock").and_return(true) run '--gemfile', 'different_name' end it "warns if lockfile is not found (with -G)" do bundler_required expect(File).to receive(:exist?).with(/\.yardopts$/).at_least(:once).and_return(false) expect(File).to receive(:exist?).with('somefile.lock').and_return(false) expect(log).to receive(:warn).with(/Cannot find somefile.lock/) run '-G', 'somefile' end it "displays an error if Bundler not available (with -G)" do expect(@cli).to receive(:require).with('bundler').and_raise(LoadError) expect(log).to receive(:error).with(/Bundler not available/) run '-G' end it "loads template paths after adapter template paths" do unstub_adapter @cli.adapter = Server::WebrickAdapter run '-t', 'foo' expect(Templates::Engine.template_paths.last).to eq 'foo' end it "loads ruby code (-e) after adapter" do unstub_adapter @cli.adapter = Server::WebrickAdapter path = File.dirname(__FILE__) + '/tmp.adapterscript.rb' begin File.open(path, 'w') do |f| f.puts "YARD::Templates::Engine.register_template_path 'foo'" f.flush run '-e', f.path expect(Templates::Engine.template_paths.last).to eq 'foo' end ensure File.unlink(path) end end end end yard-master/spec/cli/stats_spec.rb000066400000000000000000000050161265676644000175260ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' require 'stringio' describe YARD::CLI::Stats do before do Registry.clear YARD.parse_string <<-eof class A CONST = 1 def foo; end # Documented def bar; end end module B; end eof @main_stats = "Files: 1\n" + "Modules: 1 ( 1 undocumented)\n" + "Classes: 1 ( 1 undocumented)\n" + "Constants: 1 ( 1 undocumented)\n" + "Methods: 2 ( 1 undocumented)\n" + " 20.00% documented\n" @output = StringIO.new @stats = CLI::Stats.new(false) allow(@stats).to receive(:support_rdoc_document_file!).and_return([]) allow(@stats).to receive(:yardopts).and_return([]) allow(log).to receive(:puts) {|*args| @output << args.join("\n") << "\n" } end it "lists undocumented objects with --list-undoc when there are undocumented objects" do @stats.run('--list-undoc') expect(@output.string).to eq <<-eof #{@main_stats} Undocumented Objects: (in file: (stdin)) B A A::CONST A#foo eof end it "lists no undocumented objects with --list-undoc when there is nothing undocumented" do Registry.clear YARD.parse_string <<-eof # documentation def foo; end eof @stats.run('--list-undoc') expect(@output.string).to eq "Files: 1\n" + "Modules: 0 ( 0 undocumented)\n" + "Classes: 0 ( 0 undocumented)\n" + "Constants: 0 ( 0 undocumented)\n" + "Methods: 1 ( 0 undocumented)\n" + " 100.00% documented\n" end it "lists undocumented objects in compact mode with --list-undoc --compact" do @stats.run('--list-undoc', '--compact') expect(@output.string).to eq <<-eof #{@main_stats} Undocumented Objects: B ((stdin):9) A ((stdin):1) A::CONST ((stdin):2) A#foo ((stdin):4) eof end it "still lists stats with --quiet" do @stats.run('--quiet') expect(@output.string).to eq @main_stats end it "ignores everything with --no-public" do @stats.run('--no-public') expect(@output.string).to eq( "Files: 0\n" + "Modules: 0 ( 0 undocumented)\n" + "Classes: 0 ( 0 undocumented)\n" + "Constants: 0 ( 0 undocumented)\n" + "Methods: 0 ( 0 undocumented)\n" + " 100.00% documented\n") end endyard-master/spec/cli/yardoc_spec.rb000066400000000000000000000706751265676644000176660ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::CLI::Yardoc do before do @yardoc = YARD::CLI::Yardoc.new @yardoc.statistics = false @yardoc.use_document_file = false @yardoc.use_yardopts_file = false @yardoc.generate = false allow(Templates::Engine).to receive(:render) allow(Templates::Engine).to receive(:generate) allow(YARD).to receive(:parse) allow(Registry).to receive(:load) allow(Registry).to receive(:save) end describe "Defaults" do before do @yardoc = CLI::Yardoc.new allow(@yardoc).to receive(:yardopts).and_return([]) allow(@yardoc).to receive(:support_rdoc_document_file!).and_return([]) @yardoc.parse_arguments end it "does not use cache by default" do expect(@yardoc.use_cache).to be false end it "prints statistics by default" do expect(@yardoc.statistics).to be true end it "generates output by default" do expect(@yardoc.generate).to be true end it "reads .yardopts by default" do expect(@yardoc.use_yardopts_file).to be true end it "reads .document by default" do expect(@yardoc.use_document_file).to be true end it "uses lib, app, and ext as default file glob paths" do expect(@yardoc.files).to eq Parser::SourceParser::DEFAULT_PATH_GLOB end it "uses rdoc as default markup type (but falls back on none)" do expect(@yardoc.options.markup).to eq :rdoc end it "uses default as default template" do expect(@yardoc.options.template).to eq :default end it "uses HTML as default format" do expect(@yardoc.options.format).to eq :html end it "uses 'Object' as default return type" do expect(@yardoc.options.default_return).to eq 'Object' end it "does not hide void return types by default" do expect(@yardoc.options.hide_void_return).to be false end it "only shows public visibility by default" do expect(@yardoc.visibilities).to eq [:public] end it "does not list objects by default" do expect(@yardoc.list).to be false end it "does not embed mixins by default" do expect(@yardoc.options.embed_mixins).to be_empty end it "does not set any locale by default" do expect(@yardoc.options.locale).to be nil end end describe "General options" do def self.should_accept(*args, &block) @counter ||= 0 @counter += 1 counter = @counter args.each do |arg| define_method("test_options_#{@counter}", &block) it("accepts #{arg}") { send("test_options_#{counter}", arg) } end end should_accept('--single-db') do |arg| @yardoc.parse_arguments(arg) expect(Registry.single_object_db).to be true Registry.single_object_db = nil end should_accept('--no-single-db') do |arg| @yardoc.parse_arguments(arg) expect(Registry.single_object_db).to be false Registry.single_object_db = nil end should_accept('-c', '--use-cache') do |arg| @yardoc.parse_arguments(arg) expect(@yardoc.use_cache).to be true end should_accept('--no-cache') do |arg| @yardoc.parse_arguments(arg) expect(@yardoc.use_cache).to be false end should_accept('--yardopts') do |arg| @yardoc = CLI::Yardoc.new @yardoc.use_document_file = false expect(@yardoc).to receive(:yardopts).at_least(1).times.and_return([]) @yardoc.parse_arguments(arg) expect(@yardoc.use_yardopts_file).to be true @yardoc.parse_arguments('--no-yardopts', arg) expect(@yardoc.use_yardopts_file).to be true end should_accept('--yardopts with filename') do |arg| @yardoc = CLI::Yardoc.new expect(File).to receive(:read_binary).with('.foobar').and_return('') @yardoc.use_document_file = false @yardoc.parse_arguments('--yardopts', '.foobar') expect(@yardoc.use_yardopts_file).to be true expect(@yardoc.options_file).to eq '.foobar' end should_accept('--no-yardopts') do |arg| @yardoc = CLI::Yardoc.new @yardoc.use_document_file = false expect(@yardoc).not_to receive(:yardopts) @yardoc.parse_arguments(arg) expect(@yardoc.use_yardopts_file).to be false @yardoc.parse_arguments('--yardopts', arg) expect(@yardoc.use_yardopts_file).to be false end should_accept('--document') do |arg| @yardoc = CLI::Yardoc.new @yardoc.use_yardopts_file = false expect(@yardoc).to receive(:support_rdoc_document_file!).and_return([]) @yardoc.parse_arguments('--no-document', arg) expect(@yardoc.use_document_file).to be true end should_accept('--no-document') do |arg| @yardoc = CLI::Yardoc.new @yardoc.use_yardopts_file = false expect(@yardoc).not_to receive(:support_rdoc_document_file!) @yardoc.parse_arguments('--document', arg) expect(@yardoc.use_document_file).to be false end should_accept('-b', '--db') do |arg| @yardoc.parse_arguments(arg, 'test') expect(Registry.yardoc_file).to eq 'test' Registry.yardoc_file = '.yardoc' end should_accept('-n', '--no-output') do |arg| expect(Templates::Engine).not_to receive(:generate) @yardoc.run(arg) end should_accept('--exclude') do |arg| expect(YARD).to receive(:parse).with(['a'], ['nota', 'b']) @yardoc.run(arg, 'nota', arg, 'b', 'a') end should_accept('--no-save') do |arg| expect(YARD).to receive(:parse) expect(Registry).not_to receive(:save) @yardoc.run(arg) end end describe "Output options" do it "accepts --title" do @yardoc.parse_arguments('--title', 'hello world') expect(@yardoc.options.title).to eq 'hello world' end it "allows --title to have multiple spaces in .yardopts" do expect(File).to receive(:read_binary).with("test").and_return("--title \"Foo Bar\"") @yardoc.options_file = "test" @yardoc.use_yardopts_file = true @yardoc.run expect(@yardoc.options.title).to eq "Foo Bar" end it "aliases --main to the --readme flag" do readme = File.join(File.dirname(__FILE__),'..','..','README.md') @yardoc.parse_arguments('--main', readme) expect(@yardoc.options.readme).to eq CodeObjects::ExtraFileObject.new(readme, '') end it "selects a markup provider when --markup-provider or -mp is set" do @yardoc.parse_arguments("-M", "test") expect(@yardoc.options.markup_provider).to eq :test @yardoc.parse_arguments("--markup-provider", "test2") expect(@yardoc.options.markup_provider).to eq :test2 end it "selects a markup format when -m is set" do expect(@yardoc).to receive(:verify_markup_options).and_return(true) @yardoc.generate = true @yardoc.parse_arguments('-m', 'markdown') expect(@yardoc.options.markup).to eq :markdown end it "accepts --default-return" do @yardoc.parse_arguments *%w( --default-return XYZ ) expect(@yardoc.options.default_return).to eq "XYZ" end it "allows --hide-void-return to be set" do @yardoc.parse_arguments *%w( --hide-void-return ) expect(@yardoc.options.hide_void_return).to be true end it "accepts --embed-mixins" do @yardoc.parse_arguments *%w( --embed-mixins ) expect(@yardoc.options.embed_mixins).to eq ['*'] end it "accepts --embed-mixin MODULE" do @yardoc.parse_arguments *%w( --embed-mixin MyModule ) expect(@yardoc.options.embed_mixins).to eq ['MyModule'] end it "generates all objects with --use-cache" do expect(YARD).to receive(:parse) expect(Registry).to receive(:load) expect(Registry).to receive(:load_all) allow(@yardoc).to receive(:generate).and_return(true) @yardoc.run *%w( --use-cache ) end it "does not print statistics with --no-stats" do allow(@yardoc).to receive(:statistics).and_return(false) expect(CLI::Stats).not_to receive(:new) @yardoc.run *%w( --no-stats ) end describe "--asset" do before do @yardoc.generate = true allow(@yardoc).to receive(:run_generate) end it "copies assets to output directory" do expect(FileUtils).to receive(:cp_r).with('a', 'doc/a') @yardoc.run *%w( --asset a ) expect(@yardoc.assets).to eq({'a' => 'a'}) end it "allows multiple --asset options" do expect(FileUtils).to receive(:cp_r).with('a', 'doc/a') expect(FileUtils).to receive(:cp_r).with('b', 'doc/b') @yardoc.run *%w( --asset a --asset b ) expect(@yardoc.assets).to eq({'a' => 'a', 'b' => 'b'}) end it "does not allow from or to to refer to a path above current path" do expect(log).to receive(:warn).exactly(4).times.with(/invalid/i) @yardoc.run *%w( --asset ../../../etc/passwd ) expect(@yardoc.assets).to be_empty @yardoc.run *%w( --asset a/b/c/d/../../../../../../etc/passwd ) expect(@yardoc.assets).to be_empty @yardoc.run *%w( --asset /etc/passwd ) expect(@yardoc.assets).to be_empty @yardoc.run *%w( --asset normal:/etc/passwd ) expect(@yardoc.assets).to be_empty end it "allows from:to syntax" do expect(FileUtils).to receive(:cp_r).with('foo', 'doc/bar') @yardoc.run *%w( --asset foo:bar ) expect(@yardoc.assets).to eq({'foo' => 'bar'}) end it "does not put from inside of to/ if from is a directory" do begin from = 'tmp_foo' to = 'tmp_bar' full_to = File.join(File.dirname(__FILE__), to) FileUtils.mkdir_p(from) @yardoc.options.serializer.basepath = File.dirname(__FILE__) @yardoc.run("--asset", "#{from}:#{to}") @yardoc.run("--asset", "#{from}:#{to}") expect(File.directory?(full_to)).to be true expect(File.directory?(File.join(full_to, 'tmp_foo'))).to be false ensure FileUtils.rm_rf(from) FileUtils.rm_rf(full_to) end end end describe "--locale" do it "applies specified locale to all extra file objects" do allow(File).to receive(:read).with('extra_file1').and_return('') allow(File).to receive(:read).with('extra_file2').and_return('') extra_file_object1 = CodeObjects::ExtraFileObject.new('extra_file1') extra_file_object2 = CodeObjects::ExtraFileObject.new('extra_file2') expect(extra_file_object1).to receive(:locale=).with('fr') expect(extra_file_object2).to receive(:locale=).with('fr') allow(CodeObjects::ExtraFileObject).to receive(:new).with('extra_file1').and_return(extra_file_object1) allow(CodeObjects::ExtraFileObject).to receive(:new).with('extra_file2').and_return(extra_file_object2) allow(Dir).to receive(:glob).with('README{,*[^~]}').and_return([]) allow(File).to receive(:file?).with('extra_file1').and_return(true) allow(File).to receive(:file?).with('extra_file2').and_return(true) @yardoc.run('--locale=fr', '-', 'extra_file1', 'extra_file2') end end describe "--po-dir" do it "sets Registry.po_dir" do expect(Registry).to receive(:po_dir=).with("locale") @yardoc.run('--po-dir=locale') end end end describe "--[no-]api" do before { Registry.clear } it "allows --api name" do YARD.parse_string <<-eof # @api private class Foo; end # @api public class Bar; end class Baz; end eof @yardoc.run('--api', 'private') expect(@yardoc.options.verifier.run(Registry.all)).to eq [P('Foo')] end it "allows multiple --api's to all be shown" do YARD.parse_string <<-eof # @api private class Foo; end # @api public class Bar; end class Baz; end eof @yardoc.run('--api', 'private', '--api', 'public') expect(@yardoc.options.verifier.run(Registry.all). sort_by {|o| o.path }).to eq [P('Bar'), P('Foo')] end it "allows --no-api to specify objects with no @api tag" do YARD.parse_string <<-eof # @api private class Foo; end # @api public class Bar; end class Baz; end eof @yardoc.run('--api', '') expect(@yardoc.options.verifier.run(Registry.all)).to eq [P('Baz')] @yardoc.options.verifier = Verifier.new @yardoc.run('--no-api') expect(@yardoc.options.verifier.run(Registry.all)).to eq [P('Baz')] end it "allows --no-api to work with other --api switches" do YARD.parse_string <<-eof # @api private class Foo; end # @api public class Bar; end class Baz; end eof @yardoc.run('--no-api', '--api', 'public') expect(@yardoc.options.verifier.run(Registry.all). sort_by {|o| o.path }).to eq [P('Bar'), P('Baz')] end it "ensures Ruby code cannot be used" do [':symbol', '42', '"; exit'].each do |ruby| @yardoc.options.verifier.expressions = [] @yardoc.run('--api', ruby) expect(@yardoc.options.verifier.expressions[1]).to include(ruby.inspect) end end end describe "--hide-api option" do it "allows --hide-api to hide objects with api tags" do YARD.parse_string <<-eof # @api private class Foo; end class Bar; end class Baz; end eof @yardoc.run('--hide-api', 'private') expect(@yardoc.options.verifier.run(Registry.all). sort_by {|o| o.path }).to eq [P('Bar'), P('Baz')] end it "allows --hide-api to work with --api" do YARD.parse_string <<-eof # @api private class Foo; end # @api public class Bar; end class Baz; end eof @yardoc.run('--api', 'public', '--hide-api', 'private') expect(@yardoc.options.verifier.run(Registry.all). sort_by {|o| o.path }).to eq [P('Bar')] end end describe "--no-private option" do it "accepts --no-private" do obj = double(:object) expect(obj).to receive(:tag).ordered.with(:private).and_return(true) @yardoc.parse_arguments *%w( --no-private ) expect(@yardoc.options.verifier.call(obj)).to be false end it "hides object if namespace is @private with --no-private" do ns = double(:namespace, :type => :module) expect(ns).to receive(:tag).with(:private).and_return(true) obj = double(:object, :namespace => ns) expect(obj).to receive(:tag).with(:private).and_return(false) @yardoc.parse_arguments *%w( --no-private ) expect(@yardoc.options.verifier.call(obj)).to be false end it "does not call #tag on namespace if namespace is proxy with --no-private" do ns = double(:namespace) expect(ns).to receive(:is_a?).with(CodeObjects::Proxy).and_return(true) expect(ns).not_to receive(:tag) obj = double(:object, :type => :class, :namespace => ns, :visibility => :public) expect(obj).to receive(:tag).ordered.with(:private).and_return(false) @yardoc.parse_arguments *%w( --no-private ) expect(@yardoc.options.verifier.call(obj)).to be true end # @bug gh-197 it "does not call #tag on namespace if namespace is proxy with --no-private" do Registry.clear YARD.parse_string "module Qux; class Foo::Bar; end; end" foobar = Registry.at('Foo::Bar') foobar.namespace.type = :module @yardoc.parse_arguments *%w( --no-private ) expect(@yardoc.options.verifier.call(foobar)).to be true end it "does not call #tag on proxy object" do # @bug gh-197 @yardoc.parse_arguments *%w( --no-private ) expect(@yardoc.options.verifier.call(P('ProxyClass'))).to be true end it "hides methods inside a 'private' class/module with --no-private" do Registry.clear YARD.parse_string <<-eof # @private class ABC def foo; end end eof @yardoc.parse_arguments *%w( --no-private ) expect(@yardoc.options.verifier.call(Registry.at('ABC'))).to be false expect(@yardoc.options.verifier.call(Registry.at('ABC#foo'))).to be false end end describe ".yardopts and .document handling" do before do @yardoc.use_yardopts_file = true end it "searches for and uses yardopts file specified by #options_file" do expect(File).to receive(:read_binary).with("test").and_return("-o \n\nMYPATH\nFILE1 FILE2") @yardoc.use_document_file = false @yardoc.options_file = "test" @yardoc.run expect(@yardoc.options.serializer.options[:basepath]).to eq "MYPATH" expect(@yardoc.files).to eq ["FILE1", "FILE2"] end it "uses String#shell_split to split .yardopts tokens" do optsdata = "foo bar" expect(optsdata).to receive(:shell_split) expect(File).to receive(:read_binary).with("test").and_return(optsdata) @yardoc.options_file = "test" @yardoc.run end it "allows opts specified in command line to override yardopts file" do expect(File).to receive(:read_binary).with(".yardopts").and_return("-o NOTMYPATH") @yardoc.run("-o", "MYPATH", "FILE") expect(@yardoc.options.serializer.options[:basepath]).to eq "MYPATH" expect(@yardoc.files).to eq ["FILE"] end it "loads the RDoc .document file if found" do expect(File).to receive(:read_binary).with(".yardopts").and_return("-o NOTMYPATH") @yardoc.use_document_file = true allow(@yardoc).to receive(:support_rdoc_document_file!).and_return(["FILE2", "FILE3"]) @yardoc.run("-o", "MYPATH", "FILE1") expect(@yardoc.options.serializer.options[:basepath]).to eq "MYPATH" expect(@yardoc.files).to eq ["FILE2", "FILE3", "FILE1"] end end describe "Query options" do after { Registry.clear } it "hides private constants in with default visibilities" do classobj = CodeObjects::ClassObject.new(:root, :Foo) {|o| o.visibility = :private } @yardoc.run expect(@yardoc.options.verifier.run([classobj])).to eq [] end it "sets up visibility rules as verifier" do methobj = CodeObjects::MethodObject.new(:root, :test) {|o| o.visibility = :private } expect(File).to receive(:read_binary).with("test").and_return("--private") @yardoc.use_yardopts_file = true @yardoc.options_file = "test" @yardoc.run expect(@yardoc.options.verifier.call(methobj)).to be true end it "accepts a --query" do @yardoc.parse_arguments *%w( --query @return ) expect(@yardoc.options.verifier).to be_a(Verifier) end it "accepts multiple --query arguments" do obj = double(:object) expect(obj).to receive(:tag).ordered.with('return').and_return(true) expect(obj).to receive(:tag).ordered.with('tag').and_return(false) @yardoc.parse_arguments *%w( --query @return --query @tag ) expect(@yardoc.options.verifier).to be_a(Verifier) expect(@yardoc.options.verifier.call(obj)).to be false end end describe "Extra file arguments" do it "accepts extra files if specified after '-' with source files" do expect(Dir).to receive(:glob).with('README{,*[^~]}').and_return([]) expect(File).to receive(:file?).with('extra_file1').and_return(true) expect(File).to receive(:file?).with('extra_file2').and_return(true) expect(File).to receive(:read).with('extra_file1').and_return('') expect(File).to receive(:read).with('extra_file2').and_return('') @yardoc.parse_arguments *%w( file1 file2 - extra_file1 extra_file2 ) expect(@yardoc.files).to eq %w( file1 file2 ) expect(@yardoc.options.files).to eq( [CodeObjects::ExtraFileObject.new('extra_file1', ''), CodeObjects::ExtraFileObject.new('extra_file2', '')]) end it "accepts files section only containing extra files" do expect(Dir).to receive(:glob).with('README{,*[^~]}').and_return([]) @yardoc.parse_arguments *%w( - LICENSE ) expect(@yardoc.files).to eq Parser::SourceParser::DEFAULT_PATH_GLOB expect(@yardoc.options.files).to eq [CodeObjects::ExtraFileObject.new('LICENSE', '')] end it "accepts globs as extra files" do expect(Dir).to receive(:glob).with('README{,*[^~]}').and_return [] expect(Dir).to receive(:glob).with('*.txt').and_return ['a.txt', 'b.txt'] expect(File).to receive(:read).with('a.txt').and_return('') expect(File).to receive(:read).with('b.txt').and_return('') expect(File).to receive(:file?).with('a.txt').and_return(true) expect(File).to receive(:file?).with('b.txt').and_return(true) @yardoc.parse_arguments *%w( file1 file2 - *.txt ) expect(@yardoc.files).to eq %w( file1 file2 ) expect(@yardoc.options.files).to eq( [CodeObjects::ExtraFileObject.new('a.txt', ''), CodeObjects::ExtraFileObject.new('b.txt', '')]) end it "warns if extra file is not found" do expect(log).to receive(:warn).with(/Could not find extra file: UNKNOWN/) @yardoc.parse_arguments *%w( - UNKNOWN ) end it "warns if readme file is not found" do expect(log).to receive(:warn).with(/Could not find readme file: UNKNOWN/) @yardoc.parse_arguments *%w( -r UNKNOWN ) end it "uses first file as readme if no readme is specified when using --one-file" do expect(Dir).to receive(:glob).with('README{,*[^~]}').and_return [] expect(Dir).to receive(:glob).with('lib/*.rb').and_return(['lib/foo.rb']) expect(File).to receive(:read).with('lib/foo.rb').and_return('') @yardoc.parse_arguments *%w( --one-file lib/*.rb ) expect(@yardoc.options.readme).to eq CodeObjects::ExtraFileObject.new('lib/foo.rb', '') end it "uses readme it exists when using --one-file" do expect(Dir).to receive(:glob).with('README{,*[^~]}').and_return ['README'] expect(File).to receive(:read).with('README').and_return('') @yardoc.parse_arguments *%w( --one-file lib/*.rb ) expect(@yardoc.options.readme).to eq CodeObjects::ExtraFileObject.new('README', '') end it "does not allow US-ASCII charset when using --one-file" do ienc = Encoding.default_internal eenc = Encoding.default_external expect(log).to receive(:warn).with(/not compatible with US-ASCII.*using ASCII-8BIT/) @yardoc.parse_arguments *%w( --one-file --charset us-ascii ) expect(Encoding.default_internal.name).to eq 'ASCII-8BIT' expect(Encoding.default_external.name).to eq 'ASCII-8BIT' Encoding.default_internal = ienc Encoding.default_external = eenc end if defined?(::Encoding) end describe "Source file arguments" do it "accepts no params and parse {lib,app}/**/*.rb ext/**/*.c" do @yardoc.parse_arguments expect(@yardoc.files).to eq Parser::SourceParser::DEFAULT_PATH_GLOB end end describe "Tags options" do def tag_created(switch, factory_method) visible_tags = double(:visible_tags) expect(visible_tags).to receive(:|).ordered.with([:foo]) expect(visible_tags).to receive(:-).ordered.with([]).and_return(visible_tags) expect(Tags::Library).to receive(:define_tag).with('Foo', :foo, factory_method) allow(Tags::Library).to receive(:visible_tags=) expect(Tags::Library).to receive(:visible_tags).at_least(1).times.and_return(visible_tags) @yardoc.parse_arguments("--#{switch}-tag", 'foo') end def tag_hidden(tag) visible_tags = double(:visible_tags) expect(visible_tags).to receive(:|).ordered.with([tag]) expect(visible_tags).to receive(:-).ordered.with([tag]).and_return([]) expect(Tags::Library).to receive(:define_tag).with(tag.to_s.capitalize, tag, nil) allow(Tags::Library).to receive(:visible_tags=) expect(Tags::Library).to receive(:visible_tags).at_least(1).times.and_return(visible_tags) end it "accepts --tag" do expect(Tags::Library).to receive(:define_tag).with('Title of Foo', :foo, nil) @yardoc.parse_arguments('--tag', 'foo:Title of Foo') end it "accepts --tag without title (and default to captialized tag name)" do expect(Tags::Library).to receive(:define_tag).with('Foo', :foo, nil) @yardoc.parse_arguments('--tag', 'foo') end it "only lists tag once if declared twice" do visible_tags = [] allow(Tags::Library).to receive(:define_tag) allow(Tags::Library).to receive(:visible_tags).and_return([:foo]) allow(Tags::Library).to receive(:visible_tags=) {|value| visible_tags = value } @yardoc.parse_arguments('--tag', 'foo', '--tag', 'foo') expect(visible_tags).to eq [:foo] end it "accepts --type-tag" do tag_created 'type', :with_types end it "accepts --type-name-tag" do tag_created 'type-name', :with_types_and_name end it "accepts --name-tag" do tag_created 'name', :with_name end it "accepts --title-tag" do tag_created 'title', :with_title_and_text end it "accepts --hide-tag before tag is listed" do tag_hidden(:anewfoo) @yardoc.parse_arguments('--hide-tag', 'anewfoo', '--tag', 'anewfoo') end it "accepts --hide-tag after tag is listed" do tag_hidden(:anewfoo2) @yardoc.parse_arguments('--tag', 'anewfoo2', '--hide-tag', 'anewfoo2') end it "accepts --transitive-tag" do @yardoc.parse_arguments('--transitive-tag', 'foo') expect(Tags::Library.transitive_tags).to include(:foo) end it "accepts --non-transitive-tag" do Tags::Library.transitive_tags |= [:foo] @yardoc.parse_arguments('--non-transitive-tag', 'foo') expect(Tags::Library.transitive_tags).not_to include(:foo) end end describe "Safe mode" do before do allow(YARD::Config).to receive(:options).and_return(:safe_mode => true) end it "does not allow --load or -e in safe mode" do expect(@yardoc).not_to receive(:require) @yardoc.run('--load', 'foo') @yardoc.run('-e', 'foo') end it "does not allow --query in safe mode" do @yardoc.run('--query', 'foo') expect(@yardoc.options.verifier.expressions).not_to include("foo") end it "does not allow modifying the template paths" do expect(YARD::Templates::Engine).not_to receive(:register_template_path) @yardoc.run('-p', 'foo') @yardoc.run('--template-path', 'foo') end end describe "Markup Loading" do it "loads rdoc markup if no markup is provided" do @yardoc.generate = true @yardoc.run expect(@yardoc.options.markup).to eq :rdoc end it "loads rdoc markup even when no output is specified" do @yardoc.parse_arguments('--no-output') expect(@yardoc.options.markup).to eq :rdoc end it "warns if rdoc cannot be loaded and fallback to :none" do mod = YARD::Templates::Helpers::MarkupHelper mod.clear_markup_cache expect(mod.const_get(:MARKUP_PROVIDERS)).to receive(:[]).with(:rdoc).and_return([{:lib => 'INVALID'}]) expect(log).to receive(:warn).with(/Could not load default RDoc formatter/) allow(@yardoc).to receive(:generate) { @yardoc.options.files = []; true } @yardoc.run expect(@yardoc.options.markup).to eq :none mod.clear_markup_cache end it "returns an error immediately if markup for any files are missing" do mod = YARD::Templates::Helpers::MarkupHelper mod.clear_markup_cache expect(mod.const_get(:MARKUP_PROVIDERS)).to receive(:[]).with(:markdown).and_return([{:lib => 'INVALID'}]) expect(log).to receive(:error).with(/Missing 'INVALID' gem for Markdown formatting/) files = [CodeObjects::ExtraFileObject.new('test.md', '')] allow(@yardoc).to receive(:generate) { @yardoc.options.files = files; true } @yardoc.run mod.clear_markup_cache end it "returns an error immediately if markup for any files are missing (file markup specified in attributes)" do mod = YARD::Templates::Helpers::MarkupHelper mod.clear_markup_cache expect(mod.const_get(:MARKUP_PROVIDERS)).to receive(:[]).with(:markdown).and_return([{:lib => 'INVALID'}]) expect(log).to receive(:error).with(/Missing 'INVALID' gem for Markdown formatting/) files = [CodeObjects::ExtraFileObject.new('test', '# @markup markdown')] allow(@yardoc).to receive(:generate) { @yardoc.options.files = files; true } @yardoc.run mod.clear_markup_cache end end describe "#run" do it "parses arguments if run() is called" do expect(@yardoc).to receive(:parse_arguments) @yardoc.run end it "parses arguments if run(arg1, arg2, ...) is called" do expect(@yardoc).to receive(:parse_arguments) @yardoc.run('--private', '-p', 'foo') end it "does not parse arguments if run(nil) is called" do expect(@yardoc).not_to receive(:parse_arguments) @yardoc.run(nil) end end end yard-master/spec/cli/yri_spec.rb000066400000000000000000000073141265676644000171760ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' class TestYRI < YARD::CLI::YRI public :optparse, :find_object, :cache_object def test_stub; end def print_object(*args) test_stub; super end end describe YARD::CLI::YRI do before do @yri = TestYRI.new allow(Registry).to receive(:load) end describe "#find_object" do it "uses cache if available" do allow(@yri).to receive(:cache_object) expect(File).to receive(:exist?).with('.yardoc').and_return(false) expect(File).to receive(:exist?).with('bar.yardoc').and_return(true) expect(Registry).to receive(:load).with('bar.yardoc') expect(Registry).to receive(:at).ordered.with('Foo').and_return(nil) expect(Registry).to receive(:at).ordered.with('Foo').and_return('OBJ') @yri.instance_variable_set("@cache", {'Foo' => 'bar.yardoc'}) expect(@yri.find_object('Foo')).to eq 'OBJ' end it "never uses cache ahead of current directory's .yardoc" do allow(@yri).to receive(:cache_object) expect(File).to receive(:exist?).with('.yardoc').and_return(true) expect(Registry).to receive(:load).with('.yardoc') expect(Registry).to receive(:at).ordered.with('Foo').and_return(nil) expect(Registry).to receive(:at).ordered.with('Foo').and_return('OBJ') @yri.instance_variable_set("@cache", {'Foo' => 'bar.yardoc'}) expect(@yri.find_object('Foo')).to eq 'OBJ' expect(@yri.instance_variable_get("@search_paths")[0]).to eq '.yardoc' end end describe "#cache_object" do it "skips caching for Registry.yardoc_file" do expect(File).not_to receive(:open).with(CLI::YRI::CACHE_FILE, 'w') @yri.cache_object('Foo', Registry.yardoc_file) end end describe "#initialize" do it "loads search paths" do path = %r{/\.yard/yri_search_paths$} expect(File).to receive(:file?).with(%r{/\.yard/yri_cache$}).and_return(false) expect(File).to receive(:file?).with(path).and_return(true) expect(File).to receive(:readlines).with(path).and_return(%w(line1 line2)) @yri = YARD::CLI::YRI.new spaths = @yri.instance_variable_get("@search_paths") expect(spaths).to include('line1') expect(spaths).to include('line2') end it "uses DEFAULT_SEARCH_PATHS prior to other paths" do YARD::CLI::YRI::DEFAULT_SEARCH_PATHS.push('foo', 'bar') path = %r{/\.yard/yri_search_paths$} expect(File).to receive(:file?).with(%r{/\.yard/yri_cache$}).and_return(false) expect(File).to receive(:file?).with(path).and_return(true) expect(File).to receive(:readlines).with(path).and_return(%w(line1 line2)) @yri = YARD::CLI::YRI.new spaths = @yri.instance_variable_get("@search_paths") expect(spaths[0,4]).to eq %w(foo bar line1 line2) YARD::CLI::YRI::DEFAULT_SEARCH_PATHS.replace([]) end end describe "#run" do it "searches for objects and print their documentation" do obj = YARD::CodeObjects::ClassObject.new(:root, 'Foo') expect(@yri).to receive(:print_object).with(obj) @yri.run('Foo') Registry.clear end it "prints usage if no object is provided" do expect(@yri).to receive(:print_usage) expect(@yri).to receive(:exit).with(1) @yri.run('') end it "prints 'no documentation exists for object' if object is not found" do expect(STDERR).to receive(:puts).with("No documentation for `Foo'") expect(@yri).to receive(:exit).with(1) @yri.run('Foo') end it "ensures output is serialized" do obj = YARD::CodeObjects::ClassObject.new(:root, 'Foo') allow(@yri).to receive(:test_stub) do expect(@yri.instance_variable_get(:@serializer)).to receive(:serialize).once end @yri.run('Foo') end end end yard-master/spec/code_objects/000077500000000000000000000000001265676644000167035ustar00rootroot00000000000000yard-master/spec/code_objects/base_spec.rb000066400000000000000000000353651265676644000211700ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::Base do before { Registry.clear } it "does not allow empty object name" do expect { Base.new(:root, '') }.to raise_error(ArgumentError) end it "returns a unique instance of any registered object" do obj = ClassObject.new(:root, :Me) obj2 = ClassObject.new(:root, :Me) expect(obj.object_id).to eq obj2.object_id obj3 = ModuleObject.new(obj, :Too) obj4 = CodeObjects::Base.new(obj3, :Hello) obj4.parent = obj obj5 = CodeObjects::Base.new(obj3, :hello) expect(obj4.object_id).not_to eq obj5.object_id end it "creates a new object if cached object is not of the same class" do expect(ConstantObject.new(:root, "MYMODULE")).to be_instance_of(ConstantObject) expect(ModuleObject.new(:root, "MYMODULE")).to be_instance_of(ModuleObject) expect(ClassObject.new(:root, "MYMODULE")).to be_instance_of(ClassObject) expect(YARD::Registry.at("MYMODULE")).to be_instance_of(ClassObject) end it "simplifies complex namespace paths" do obj = ClassObject.new(:root, "A::B::C::D") expect(obj.name).to eq :D expect(obj.path).to eq "A::B::C::D" expect(obj.namespace).to eq P("A::B::C") end # @bug gh-552 it "simplifies complex namespace paths when path starts with ::" do obj = ClassObject.new(:root, "::A::B::C::D") expect(obj.name).to eq :D expect(obj.path).to eq "A::B::C::D" expect(obj.namespace).to eq P("A::B::C") end it "calls the block again if #new is called on an existing object" do o1 = ClassObject.new(:root, :Me) do |o| o.docstring = "DOCSTRING" end o2 = ClassObject.new(:root, :Me) do |o| o.docstring = "NOT_DOCSTRING" end expect(o1.object_id).to eq o2.object_id expect(o1.docstring).to eq "NOT_DOCSTRING" expect(o2.docstring).to eq "NOT_DOCSTRING" end it "allows complex name and converts it to namespace" do obj = CodeObjects::Base.new(nil, "A::B") expect(obj.namespace.path).to eq "A" expect(obj.name).to eq :B end it "allows namespace to be nil and not register in the Registry" do obj = CodeObjects::Base.new(nil, :Me) expect(obj.namespace).to eq nil expect(Registry.at(:Me)).to eq nil end it "allows namespace to be a NamespaceObject" do ns = ModuleObject.new(:root, :Name) obj = CodeObjects::Base.new(ns, :Me) expect(obj.namespace).to eq ns end it "allows :root to be the shorthand namespace of `Registry.root`" do obj = CodeObjects::Base.new(:root, :Me) expect(obj.namespace).to eq Registry.root end it "does not allow any other types as namespace" do expect { CodeObjects::Base.new("ROOT!", :Me) }.to raise_error(ArgumentError) end it "registers itself in the registry if namespace is supplied" do obj = ModuleObject.new(:root, :Me) expect(Registry.at(:Me)).to eq obj obj2 = ModuleObject.new(obj, :Too) expect(Registry.at(:"Me::Too")).to eq obj2 end describe "#[]=" do it "sets any attribute" do obj = ModuleObject.new(:root, :YARD) obj[:some_attr] = "hello" expect(obj[:some_attr]).to eq "hello" end it "uses the accessor method if available" do obj = CodeObjects::Base.new(:root, :YARD) obj[:source] = "hello" expect(obj.source).to eq "hello" obj.source = "unhello" expect(obj[:source]).to eq "unhello" end end it "sets attributes via attr= through method_missing" do obj = CodeObjects::Base.new(:root, :YARD) obj.something = 2 expect(obj.something).to eq 2 expect(obj[:something]).to eq 2 end it "exists in the parent's #children after creation" do obj = ModuleObject.new(:root, :YARD) obj2 = MethodObject.new(obj, :testing) expect(obj.children).to include(obj2) end it "properly re-indents source starting from 0 indentation" do obj = CodeObjects::Base.new(nil, :test) obj.source = <<-eof def mymethod if x == 2 && 5 == 5 3 else 1 end end eof expect(obj.source).to eq "def mymethod\n if x == 2 &&\n 5 == 5\n 3\n else\n 1\n end\nend" Registry.clear Parser::SourceParser.parse_string <<-eof def key?(key) super(key) end eof expect(Registry.at('#key?').source).to eq "def key?(key)\n super(key)\nend" Registry.clear Parser::SourceParser.parse_string <<-eof def key?(key) if x == 2 puts key else exit end end eof expect(Registry.at('#key?').source).to eq "def key?(key)\n if x == 2\n puts key\n else\n exit\n end\nend" end it "does not add newlines to source when parsing sub blocks" do Parser::SourceParser.parse_string <<-eof module XYZ module ZYX class ABC def msg hello_world end end end end eof expect(Registry.at('XYZ::ZYX::ABC#msg').source).to eq "def msg\n hello_world\nend" end it "handles source for 'def x; end'" do Registry.clear Parser::SourceParser.parse_string "def x; 2 end" expect(Registry.at('#x').source).to eq "def x; 2 end" end it "sets file and line information" do Parser::SourceParser.parse_string <<-eof class X; end eof expect(Registry.at(:X).file).to eq '(stdin)' expect(Registry.at(:X).line).to eq 1 end it "maintains all file associations when objects are defined multiple times in one file" do Parser::SourceParser.parse_string <<-eof class X; end class X; end class X; end eof expect(Registry.at(:X).file).to eq '(stdin)' expect(Registry.at(:X).line).to eq 1 expect(Registry.at(:X).files).to eq [['(stdin)', 1], ['(stdin)', 2], ['(stdin)', 3]] end it "maintains all file associations when objects are defined multiple times in multiple files" do 3.times do |i| allow(File).to receive(:read_binary).and_return("class X; end") Parser::SourceParser.new.parse("file#{i+1}.rb") end expect(Registry.at(:X).file).to eq 'file1.rb' expect(Registry.at(:X).line).to eq 1 expect(Registry.at(:X).files).to eq [['file1.rb', 1], ['file2.rb', 1], ['file3.rb', 1]] end it "prioritizes the definition with a docstring when returning #file" do Parser::SourceParser.parse_string <<-eof class X; end class X; end # docstring class X; end eof expect(Registry.at(:X).file).to eq '(stdin)' expect(Registry.at(:X).line).to eq 4 expect(Registry.at(:X).files).to eq [['(stdin)', 4], ['(stdin)', 1], ['(stdin)', 2]] end describe "#format" do it "sends object to Templates.render" do object = MethodObject.new(:root, :method) expect(Templates::Engine).to receive(:render).with(:x => 1, :object => object) object.format :x => 1 end end describe "#source_type" do it "defaults to :ruby" do object = MethodObject.new(:root, :method) expect(object.source_type).to eq :ruby end end describe "#relative_path" do it "accepts a string" do YARD.parse_string "module A; class B; end; class C; end; end" expect(Registry.at('A::B').relative_path(Registry.at('A::C'))).to eq( Registry.at('A::B').relative_path('A::C')) end it "returns full class name when objects share a common class prefix" do YARD.parse_string "module User; end; module UserManager; end" expect(Registry.at('User').relative_path('UserManager')).to eq 'UserManager' expect(Registry.at('User').relative_path(Registry.at('UserManager'))).to eq 'UserManager' end it "returns the relative path when they share a common namespace" do YARD.parse_string "module A; class B; end; class C; end; end" expect(Registry.at('A::B').relative_path(Registry.at('A::C'))).to eq 'C' YARD.parse_string "module Foo; module A; end; module B; def foo; end end end" expect(Registry.at('Foo::A').relative_path(Registry.at('Foo::B#foo'))).to eq 'B#foo' end it "returns the full path if they don't have a common namespace" do YARD.parse_string "module A; class B; end; end; module D; class C; end; end" expect(Registry.at('A::B').relative_path('D::C')).to eq 'D::C' YARD.parse_string 'module C::B::C; module Apple; end; module Ant; end end' expect(Registry.at('C::B::C::Apple').relative_path('C::B::C::Ant')).to eq 'Ant' YARD.parse_string 'module OMG::ABC; end; class Object; end' expect(Registry.at('OMG::ABC').relative_path('Object')).to eq "Object" YARD.parse_string("class YARD::Config; MYCONST = 1; end") expect(Registry.at('YARD::Config').relative_path('YARD::Config::MYCONST')).to eq "MYCONST" end it "returns a relative path for class methods" do YARD.parse_string "module A; def self.b; end; def self.c; end; end" expect(Registry.at('A.b').relative_path('A.c')).to eq 'c' expect(Registry.at('A').relative_path('A.c')).to eq 'c' end it "returns a relative path for instance methods" do YARD.parse_string "module A; def b; end; def c; end; end" expect(Registry.at('A#b').relative_path('A#c')).to eq '#c' expect(Registry.at('A').relative_path('A#c')).to eq '#c' end it "returns full path if relative path is to parent namespace" do YARD.parse_string "module A; module B; end end" expect(Registry.at('A::B').relative_path('A')).to eq 'A' end it "only returns name for relative path to self" do YARD.parse_string("class A::B::C; def foo; end end") expect(Registry.at('A::B::C').relative_path('A::B::C')).to eq 'C' expect(Registry.at('A::B::C#foo').relative_path('A::B::C#foo')).to eq '#foo' end end describe "#docstring=" do it "converts string into Docstring when #docstring= is set" do o = ClassObject.new(:root, :Me) o.docstring = "DOCSTRING" expect(o.docstring).to be_instance_of(Docstring) end it "sets docstring to docstring of other object if docstring is '(see Path)'" do ClassObject.new(:root, :AnotherObject) {|x| x.docstring = "FOO" } o = ClassObject.new(:root, :Me) o.docstring = '(see AnotherObject)' expect(o.docstring).to eq "FOO" end it "does not copy docstring mid-docstring" do doc = "Hello.\n(see file.rb)\nmore documentation" o = ClassObject.new(:root, :Me) o.docstring = doc expect(o.docstring).to eq doc end it "allows extra docstring after (see Path)" do ClassObject.new(:root, :AnotherObject) {|x| x.docstring = "FOO" } o = ClassObject.new(:root, :Me) o.docstring = Docstring.new("(see AnotherObject)\n\nEXTRA\n@api private", o) expect(o.docstring).to eq "FOO\n\nEXTRA" expect(o.docstring).to have_tag(:api) end end describe "#docstring" do it "returns an empty string if docstring was '(see Path)' and Path is not resolved" do o = ClassObject.new(:root, :Me) o.docstring = '(see AnotherObject)' expect(o.docstring).to eq "" end it "returns docstring when object is resolved" do o = ClassObject.new(:root, :Me) o.docstring = '(see AnotherObject)' expect(o.docstring).to eq "" ClassObject.new(:root, :AnotherObject) {|x| x.docstring = "FOO" } expect(o.docstring).to eq "FOO" end describe "localization" do it "returns localized docstring" do fr_locale = YARD::I18n::Locale.new('fr') allow(fr_locale).to receive(:translate).with('Hello').and_return('Bonjour') o = ClassObject.new(:root, :Me) o.docstring = 'Hello' expect(o.docstring).to eq 'Hello' allow(Registry).to receive(:locale).with('fr').and_return(fr_locale) expect(o.docstring('fr')).to eq "Bonjour" end it "returns updated localized docstring" do fr_locale = YARD::I18n::Locale.new('fr') allow(Registry).to receive(:locale).with('fr').and_return(fr_locale) o = ClassObject.new(:root, :Me) o.docstring = 'Hello' expect(o.docstring).to eq 'Hello' allow(fr_locale).to receive(:translate).with('Hello').and_return('Bonjour') expect(o.docstring('fr')).to eq "Bonjour" o.docstring = 'World' allow(fr_locale).to receive(:translate).with('World').and_return('Monde') expect(o.docstring('fr')).to eq "Monde" expect(o.docstring).to eq 'World' end end end describe "#add_file" do it "only adds a file/line combination once" do o = ClassObject.new(:root, :Me) o.add_file('filename', 12) expect(o.files).to eq [['filename', 12]] o.add_file('filename', 12) expect(o.files).to eq [['filename', 12]] o.add_file('filename', 40) # different line expect(o.files).to eq [['filename', 12], ['filename', 40]] end end describe "#copy_to" do it "copies all data to new object" do YARD.parse_string <<-eof private # A docstring # @return [String] a tag def foo(a, b, c) source_code_here end eof foo_c = MethodObject.new(:root, :foo, :class) Registry.at('#foo').copy_to(foo_c) expect(foo_c.scope).to eq :class expect(foo_c.visibility).to eq :private expect(foo_c.type).to eq :method expect(foo_c.class).to eq MethodObject expect(foo_c.path).to eq '::foo' expect(foo_c.docstring).to eq "A docstring" expect(foo_c.tag(:return).types).to eq ['String'] expect(foo_c.file).to eq '(stdin)' expect(foo_c.line).to eq 4 expect(foo_c.source).to match /source_code_here/ expect(foo_c.signature).to eq 'def foo(a, b, c)' expect(foo_c.parameters).to eq [['a', nil], ['b', nil], ['c', nil]] end it "returns the copied object" do YARD.parse_string 'def foo; end' foo_c = MethodObject.new(:root, :foo, :class) expect(Registry.at('#foo').copy_to(foo_c)).to eq foo_c end it "copies docstring and rewrite tags to new object" do YARD.parse_string <<-eof # @return [String] a tag def foo; end eof foo_c = MethodObject.new(:root, :foo, :class) foo_i = Registry.at('#foo') foo_i.copy_to(foo_c) expect(foo_i.tags).not_to eq foo_c.tags expect(foo_c.tags.first.object).to eq foo_c end it "only copies #copyable_attributes" do foo = MethodObject.new(:root, :foo) expect(foo).to receive(:copyable_attributes).and_return %w(a b c) expect(foo).to receive(:instance_variable_get).with('@a').and_return(1) expect(foo).to receive(:instance_variable_get).with('@b').and_return(2) expect(foo).to receive(:instance_variable_get).with('@c').and_return(3) bar = MethodObject.new(:root, :bar) expect(bar).to receive(:instance_variable_set).with('@a', 1) expect(bar).to receive(:instance_variable_set).with('@b', 2) expect(bar).to receive(:instance_variable_set).with('@c', 3) foo.copy_to(bar) end end end yard-master/spec/code_objects/class_object_spec.rb000066400000000000000000000154021265676644000226770ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::ClassObject do describe "#inheritance_tree" do before(:all) do Registry.clear @mixin = ModuleObject.new(:root, :SomeMixin) @mixin2 = ModuleObject.new(:root, :SomeMixin2) @mixin2.instance_mixins << @mixin @mixin3 = ModuleObject.new(:root, :SomeMixin3) @mixin4 = ModuleObject.new(:root, :SomeMixin4) @mixin2.instance_mixins << @mixin3 @superyard = ClassObject.new(:root, :SuperYard) @superyard.superclass = P("String") @superyard.instance_mixins << @mixin2 @superyard.class_mixins << @mixin4 @yard = ClassObject.new(:root, :YARD) @yard.superclass = @superyard @yard.instance_mixins << @mixin end it "shows the proper inheritance tree" do expect(@yard.inheritance_tree).to eq [@yard, @superyard, P(:String)] end it "shows proper inheritance tree when mixins are included" do expect(@yard.inheritance_tree(true)).to eq [@yard, @mixin, @superyard, @mixin4, @mixin2, @mixin3, P(:String)] end it "does not modify the object's mixin list when mixins are included" do @class1 = ClassObject.new(:root, :A) @class2 = ClassObject.new(:root, :B) @class2.superclass = @class1 @class2.inheritance_tree(true) expect(@class2.mixins).to eq [] end it "lists class mixins in inheritance tree" do mod = ModuleObject.new(:root, :ClassMethods) klass = ClassObject.new(:root, :ReceivingClass) klass.class_mixins << mod expect(klass.inheritance_tree(true)).to eq [klass, mod] end end describe "#meths / #inherited_meths" do before(:all) do Registry.clear YARD.parse_string <<-eof class SuperYard < String def foo; end def foo2; end def bar; end def middle; end protected :foo2 private def self.bar; end end class MiddleYard < SuperYard def middle; end end class YARD < MiddleYard def mymethod; end def bar; end end module IncludedYard def foo; end end class FinalYard < SuperYard include IncludedYard end eof end it "shows inherited methods by default" do meths = P(:YARD).meths expect(meths).to include(P("YARD#mymethod")) expect(meths).to include(P("SuperYard#foo")) expect(meths).to include(P("SuperYard#foo2")) expect(meths).to include(P("SuperYard.bar")) end it "allows :inherited to be set to false" do meths = P(:YARD).meths(:inherited => false) expect(meths).to include(P("YARD#mymethod")) expect(meths).not_to include(P("SuperYard#foo")) expect(meths).not_to include(P("SuperYard#foo2")) expect(meths).not_to include(P("SuperYard.bar")) end it "does not show overridden methods" do meths = P(:YARD).meths expect(meths).to include(P("YARD#bar")) expect(meths).not_to include(P("SuperYard#bar")) meths = P(:YARD).inherited_meths expect(meths).not_to include(P("YARD#bar")) expect(meths).not_to include(P("YARD#mymethod")) expect(meths).to include(P("SuperYard#foo")) expect(meths).to include(P("SuperYard#foo2")) expect(meths).to include(P("SuperYard.bar")) end it "does not show inherited methods overridden by other subclasses" do meths = P(:YARD).inherited_meths expect(meths).to include(P('MiddleYard#middle')) expect(meths).not_to include(P('SuperYard#middle')) end it "shows mixed in methods before superclass method" do meths = P(:FinalYard).meths expect(meths).to include(P('IncludedYard#foo')) expect(meths).not_to include(P('SuperYard#foo')) end end describe "#constants / #inherited_constants" do before(:all) do Registry.clear Parser::SourceParser.parse_string <<-eof class YARD CONST1 = 1 CONST2 = "hello" CONST4 = 0 end class SUPERYARD < YARD CONST4 = 5 end class SubYard < SUPERYARD CONST2 = "hi" CONST3 = "foo" end eof end it "lists inherited constants by default" do consts = P(:SubYard).constants expect(consts).to include(P("YARD::CONST1")) expect(consts).to include(P("SubYard::CONST3")) consts = P(:SubYard).inherited_constants expect(consts).to include(P("YARD::CONST1")) expect(consts).not_to include(P("YARD::CONST2")) expect(consts).not_to include(P("SubYard::CONST2")) expect(consts).not_to include(P("SubYard::CONST3")) end it "does not list inherited constants if turned off" do consts = P(:SubYard).constants(:inherited => false) expect(consts).not_to include(P("YARD::CONST1")) expect(consts).to include(P("SubYard::CONST3")) end it "does not include an inherited constant if it is overridden by the object" do consts = P(:SubYard).constants expect(consts).to include(P("SubYard::CONST2")) expect(consts).not_to include(P("YARD::CONST2")) end it "does not include an inherited constant if it is overridden by another subclass" do consts = P(:SubYard).inherited_constants expect(consts).to include(P("SUPERYARD::CONST4")) expect(consts).not_to include(P("YARD::CONST4")) end it "does not set a superclass on BasicObject class" do o = ClassObject.new(:root, :Object) expect(o.superclass).to eq P(:BasicObject) end it "sets superclass of Object to BasicObject" do o = ClassObject.new(:root, :BasicObject) expect(o.superclass).to be nil end it "raises ArgumentError if superclass == self" do expect do o = ClassObject.new(:root, :Object) do |o| o.superclass = :Object end end.to raise_error(ArgumentError) end it "tells the world if it is an exception class" do o = ClassObject.new(:root, :MyClass) o2 = ClassObject.new(:root, :OtherClass) o2.superclass = :SystemCallError o3 = ClassObject.new(:root, :StandardError) o3.superclass = :Object o4 = ClassObject.new(:root, :Object) o.superclass = :Object expect(o.is_exception?).to be false o.superclass = :Exception expect(o.is_exception?).to be true o.superclass = :NoMethodError expect(o.is_exception?).to be true o.superclass = o2 expect(o.is_exception?).to be true o.superclass = o3 expect(o.is_exception?).to be true end it "does not raise ArgumentError if superclass is proxy in different namespace" do expect do o = ClassObject.new(:root, :X) do |o| o.superclass = P('OTHER::X') end end.not_to raise_error end end endyard-master/spec/code_objects/code_object_list_spec.rb000066400000000000000000000015631265676644000235420ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::CodeObjectList do before { Registry.clear } describe "#push" do it "only allows CodeObjects::Base, String or Symbol" do list = CodeObjectList.new(nil) expect { list.push(:hash => 1) }.to raise_error(ArgumentError) list << "Test" list << :Test2 list << ModuleObject.new(nil, :YARD) expect(list.size).to eq 3 end end it "added value should be a proxy if parameter was String or Symbol" do list = CodeObjectList.new(nil) list << "Test" expect(list.first.class).to eq Proxy end it "contains a unique list of objects" do obj = ModuleObject.new(nil, :YARD) list = CodeObjectList.new(nil) list << P(:YARD) list << obj expect(list.size).to eq 1 list << :Test list << "Test" expect(list.size).to eq 2 end endyard-master/spec/code_objects/constants_spec.rb000066400000000000000000000060341265676644000222610ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects do describe :CONSTANTMATCH do it "matches a constant" do expect("Constant"[CodeObjects::CONSTANTMATCH]).to eq "Constant" expect("identifier"[CodeObjects::CONSTANTMATCH]).to be nil expect("File.new"[CodeObjects::CONSTANTMATCH]).to eq "File" end end describe :CONSTANTSTART do it "matches a constant" do expect("Constant"[CodeObjects::CONSTANTSTART]).to eq "C" expect("identifier"[CodeObjects::CONSTANTSTART]).to be nil expect("File.new"[CodeObjects::CONSTANTSTART]).to eq "F" end end describe :NAMESPACEMATCH do it "matches a namespace (multiple constants with ::)" do expect("Constant"[CodeObjects::NAMESPACEMATCH]).to eq "Constant" expect("A::B::C.new"[CodeObjects::NAMESPACEMATCH]).to eq "A::B::C" end end describe :METHODNAMEMATCH do it "matches a method name" do expect("method"[CodeObjects::METHODNAMEMATCH]).to eq "method" expect("[]()"[CodeObjects::METHODNAMEMATCH]).to eq "[]" expect("-@"[CodeObjects::METHODNAMEMATCH]).to eq "-@" expect("method?"[CodeObjects::METHODNAMEMATCH]).to eq "method?" expect("method!!"[CodeObjects::METHODNAMEMATCH]).to eq "method!" end end describe :METHODMATCH do it "matches a full class method path" do expect("method"[CodeObjects::METHODMATCH]).to eq "method" expect("A::B::C.method?"[CodeObjects::METHODMATCH]).to eq "A::B::C.method?" expect("A::B::C :: method"[CodeObjects::METHODMATCH]).to eq "A::B::C :: method" expect("SomeClass . method"[CodeObjects::METHODMATCH]).to eq "SomeClass . method" end it "matches self.method" do expect("self :: method!"[CodeObjects::METHODMATCH]).to eq "self :: method!" expect("self.is_a?"[CodeObjects::METHODMATCH]).to eq "self.is_a?" end end describe :BUILTIN_EXCEPTIONS do it "includes all base exceptions" do YARD::CodeObjects::BUILTIN_EXCEPTIONS.each do |name| expect(eval(name)).to be <= Exception end end end describe :BUILTIN_CLASSES do it "includes all base classes" do YARD::CodeObjects::BUILTIN_CLASSES.each do |name| next if name == "MatchingData" && !defined?(::MatchingData) next if name == "Continuation" expect(eval(name)).to be_instance_of(Class) end end it "includes all exceptions" do YARD::CodeObjects::BUILTIN_EXCEPTIONS.each do |name| expect(YARD::CodeObjects::BUILTIN_CLASSES).to include(name) end end end describe :BUILTIN_ALL do it "includes classes, modules, and exceptions" do a = YARD::CodeObjects::BUILTIN_ALL b = YARD::CodeObjects::BUILTIN_CLASSES c = YARD::CodeObjects::BUILTIN_MODULES expect(a).to eq b+c end end describe :BUILTIN_MODULES do it "includes all base modules" do YARD::CodeObjects::BUILTIN_MODULES.each do |name| next if YARD.ruby19? && ["Precision"].include?(name) expect(eval(name)).to be_instance_of(Module) end end end end yard-master/spec/code_objects/extra_file_object_spec.rb000066400000000000000000000120221265676644000237070ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::ExtraFileObject do describe "#initialize" do it "attempts to read contents from filesystem if contents=nil" do expect(File).to receive(:read).with('file.txt').and_return('') ExtraFileObject.new('file.txt') end it "raises Errno::ENOENT if contents=nil and file does not exist" do expect { ExtraFileObject.new('file.txt') }.to raise_error(Errno::ENOENT) end it "does not attempt to read from disk if contents are provided" do # TODO: no assertions here! ExtraFileObject.new('file.txt', 'CONTENTS') end it "sets filename to filename" do file = ExtraFileObject.new('a/b/c/file.txt', 'CONTENTS') expect(file.filename).to eq "a/b/c/file.txt" end it "parses out attributes at top of the file" do file = ExtraFileObject.new('file.txt', "# @title X\n# @some_attribute Y\nFOO BAR") expect(file.attributes[:title]).to eq "X" expect(file.attributes[:some_attribute]).to eq "Y" expect(file.contents).to eq "FOO BAR" end it "allows whitespace prior to '#' marker when parsing attributes" do file = ExtraFileObject.new('file.txt', " \t # @title X\nFOO BAR") expect(file.attributes[:title]).to eq "X" expect(file.contents).to eq "FOO BAR" end it "parses out old-style #!markup shebang format" do file = ExtraFileObject.new('file.txt', "#!foobar\nHello") expect(file.attributes[:markup]).to eq "foobar" end it "does not parse old-style #!markup if any whitespace is found" do file = ExtraFileObject.new('file.txt', " #!foobar\nHello") expect(file.attributes[:markup]).to be nil expect(file.contents).to eq " #!foobar\nHello" end it "does not parse out attributes if there are newlines prior to attributes" do file = ExtraFileObject.new('file.txt', "\n# @title\nFOO BAR") expect(file.attributes).to be_empty expect(file.contents).to eq "\n# @title\nFOO BAR" end it "sets contents to data after attributes" do file = ExtraFileObject.new('file.txt', "# @title\nFOO BAR") expect(file.contents).to eq "FOO BAR" end it "preserves newlines" do file = ExtraFileObject.new('file.txt', "FOO\r\nBAR\nBAZ") expect(file.contents).to eq "FOO\r\nBAR\nBAZ" end it "does not include newlines in attribute data" do file = ExtraFileObject.new('file.txt', "# @title FooBar\r\nHello world") expect(file.attributes[:title]).to eq "FooBar" end it "forces encoding to @encoding attribute if present" do expect(log).not_to receive(:warn) data = "# @encoding sjis\nFOO" data.force_encoding('binary') file = ExtraFileObject.new('file.txt', data) expect(['Shift_JIS', 'Windows-31J']).to include(file.contents.encoding.to_s) end if YARD.ruby19? it "warns if @encoding is invalid" do expect(log).to receive(:warn).with("Invalid encoding `INVALID' in file.txt") data = "# @encoding INVALID\nFOO" encoding = data.encoding file = ExtraFileObject.new('file.txt', data) expect(file.contents.encoding).to eq encoding end if YARD.ruby19? it "ignores encoding in 1.8.x (or encoding-unaware platforms)" do expect(log).not_to receive(:warn) file = ExtraFileObject.new('file.txt', "# @encoding INVALID\nFOO") end if YARD.ruby18? it "attempts to re-parse data as 8-bit ascii if parsing fails" do expect(log).not_to receive(:warn) str, out = *(["\xB0"] * 2) if str.respond_to?(:force_encoding) str.force_encoding('utf-8') out.force_encoding('binary') end file = ExtraFileObject.new('file.txt', str) expect(file.contents).to eq out end end describe "#name" do it "returns basename (not extension) of filename" do file = ExtraFileObject.new('file.txt', '') expect(file.name).to eq 'file' end end describe "#title" do it "returns @title attribute if present" do file = ExtraFileObject.new('file.txt', '# @title FOO') expect(file.title).to eq 'FOO' end it "returns #name if no @title attribute exists" do file = ExtraFileObject.new('file.txt', '') expect(file.title).to eq 'file' end end describe "#locale=" do it "translates contents" do file = ExtraFileObject.new('file.txt', 'Hello') file.locale = 'fr' fr_locale = I18n::Locale.new('fr') fr_messages = fr_locale.instance_variable_get(:@messages) fr_messages["Hello"] = 'Bonjour' expect(Registry).to receive(:locale).with('fr').and_return(fr_locale) expect(file.contents).to eq 'Bonjour' end end describe "#==" do it "defines equality based on filename alone" do file1 = ExtraFileObject.new('file.txt', 'A') file2 = ExtraFileObject.new('file.txt', 'B') expect(file1).to eq file2 expect(file1).to eql file2 expect(file1).to equal file2 # Another way to test the equality interface a = [file1] a |= [file2] expect(a.size).to eq 1 end end end yard-master/spec/code_objects/macro_object_spec.rb000066400000000000000000000102071265676644000226710ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::MacroObject do before do Registry.clear end describe ".create" do def create(*args) MacroObject.create(*args) end it "creates an object" do create('foo', '') obj = Registry.at('.macro.foo') expect(obj).not_to be nil end it "uses identity map" do obj1 = create('foo', '') obj2 = create('foo', '') expect(obj1.object_id).to eq obj2.object_id end it "allows specifying of macro data" do obj = create('foo', 'MACRODATA') expect(obj.macro_data).to eq 'MACRODATA' end context "if a method object is provided" do it "attaches it" do obj = create('foo', 'MACRODATA', P('Foo.property')) expect(obj.method_object).to eq P('Foo.property') expect(obj).to be_attached end end end describe ".find" do before { MacroObject.create('foo', 'DATA') } it "searches for an object by name" do expect(MacroObject.find('foo').macro_data).to eq 'DATA' end it "accepts Symbol" do expect(MacroObject.find(:foo).macro_data).to eq 'DATA' end end describe ".find_or_create" do it "looks up name if @!macro is present and find object" do macro1 = MacroObject.create('foo', 'FOO') macro2 = MacroObject.find_or_create('foo', "a b c") expect(macro1).to eq macro2 end it "creates new macro if macro by that name does not exist" do MacroObject.find_or_create('foo', "@!method $1") expect(MacroObject.find('foo').macro_data).to eq "@!method $1" end end describe ".apply" do let(:args) { %w(foo a b c) } def apply(comments) MacroObject.apply(comments, args) end it "only expands macros if @macro is present" do expect(apply("$1$2$3")).to eq "$1$2$3" end it "handles macro text inside block" do expect(apply("@!macro\n foo$1$2$3\nfoobaz")).to eq "fooabc\nfoobaz" end it "appends docstring to existing macro" do macro = MacroObject.create('name', '$3$2$1') result = MacroObject.apply("@!macro name\nfoobar", args) expect(result).to eq "cba\nfoobar" end it "uses only non-macro data if docstring is an existing macro" do data = "@!macro name\n $3$2$1\nEXTRA" result = MacroObject.apply(data, args, 'SOURCE') expect(result).to eq "cba\nEXTRA" expect(MacroObject.apply("@!macro name\nFOO", args)).to eq "cba\nFOO" end it "creates macros if they don't exist" do result = MacroObject.apply("@!macro name\n foo!$1", args, 'SOURCE') expect(result).to eq "foo!a" expect(MacroObject.find('name').macro_data).to eq 'foo!$1' end it "keeps other tags" do expect(apply("@!macro\n foo$1$2$3\n@param name foo\nfoo")).to eq( "fooabc\nfoo\n@param name\n foo") end end describe ".expand" do def expand(comments) args = %w(foo a b c) full_line = 'foo :bar, :baz' MacroObject.expand(comments, args, full_line) end it "allows escaping of macro syntax" do expect(expand("$1\\$2$3")).to eq "a$2c" end it "replaces $* with the whole statement" do expect(expand("$* ${*}")).to eq "foo :bar, :baz foo :bar, :baz" end it "replaces $0 with method name" do expect(expand("$0 ${0}")).to eq "foo foo" end it "replaces all $N values with the Nth argument in the method call" do expect(expand("$1$2$3${3}\nfoobar")).to eq "abcc\nfoobar" end it "replaces ${N-M} ranges with N-M arguments (incl. commas)" do expect(expand("${1-2}x")).to eq "a, bx" end it "handles open ended ranges (${N-})" do expect(expand("${2-}")).to eq "b, c" end it "handles negative indexes ($-N)" do expect(expand("$-1 ${-2-} ${-2--2}")).to eq "c b, c b" end it "accepts Docstring objects" do expect(expand(Docstring.new("$1\n@param name foo"))).to eq "a\n@param name foo" end end describe "#expand" do it "expands a macro given its data" do macro = MacroObject.create_docstring('foo', '$1 $2 THREE!') expect(macro.expand(['NAME', 'ONE', 'TWO'])).to eq "ONE TWO THREE!" end end end yard-master/spec/code_objects/method_object_spec.rb000066400000000000000000000135521265676644000230560ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::MethodObject do before do Registry.clear @yard = ModuleObject.new(:root, :YARD) end context "for an instance method in the root" do it "has a path of testing" do meth = MethodObject.new(:root, :testing) expect(meth.path).to eq "#testing" end end context "for an instance method in YARD" do it "has a path of YARD#testing" do meth = MethodObject.new(@yard, :testing) expect(meth.path).to eq "YARD#testing" end end context "for a class method in YARD" do it "has a path of YARD.testing" do meth = MethodObject.new(@yard, :testing, :class) expect(meth.path).to eq "YARD.testing" end end context "for a class method added to root namespace" do it "has a path of ::testing (note the ::)" do meth = MethodObject.new(:root, :testing, :class) expect(meth.path).to eq "::testing" end end it "exists in the registry after successful creation" do obj = MethodObject.new(@yard, :something, :class) expect(Registry.at("YARD.something")).not_to be nil expect(Registry.at("YARD#something")).to be nil expect(Registry.at("YARD::something")).to be nil obj = MethodObject.new(@yard, :somethingelse) expect(Registry.at("YARD#somethingelse")).not_to be nil end it "allows #scope to be changed after creation" do obj = MethodObject.new(@yard, :something, :class) expect(Registry.at("YARD.something")).not_to be nil obj.scope = :instance expect(Registry.at("YARD.something")).to be nil expect(Registry.at("YARD#something")).not_to be nil end it "creates object in :class scope if scope is :module" do obj = MethodObject.new(@yard, :module_func, :module) expect(obj.scope).to eq :class expect(obj.visibility).to eq :public expect(Registry.at('YARD.module_func')).not_to be nil end it "creates second private instance method if scope is :module" do MethodObject.new(@yard, :module_func, :module) obj = Registry.at('YARD#module_func') expect(obj).not_to be nil expect(obj.visibility).to eq :private expect(obj.scope).to eq :instance end it "yields block to second method if scope is :module" do MethodObject.new(@yard, :module_func, :module) do |o| o.docstring = 'foo' end expect(Registry.at('YARD.module_func').docstring).to eq 'foo' expect(Registry.at('YARD#module_func').docstring).to eq 'foo' end describe "#name" do it "shows a prefix for an instance method when prefix=true" do obj = MethodObject.new(nil, :something) expect(obj.name(true)).to eq "#something" end it "never shows a prefix for a class method" do obj = MethodObject.new(nil, :something, :class) expect(obj.name).to eq :"something" expect(obj.name(true)).to eq "something" end end describe "#is_attribute?" do it "only returns true if attribute is set in namespace for read/write" do obj = MethodObject.new(@yard, :foo) @yard.attributes[:instance][:foo] = {:read => obj, :write => nil} expect(obj.is_attribute?).to be true expect(MethodObject.new(@yard, :foo=).is_attribute?).to be false end end describe "#attr_info" do it "returns attribute info if namespace is available" do obj = MethodObject.new(@yard, :foo) @yard.attributes[:instance][:foo] = {:read => obj, :write => nil} expect(obj.attr_info).to eq @yard.attributes[:instance][:foo] end it "returns nil if namespace is proxy" do obj = MethodObject.new(P(:ProxyClass), :foo) expect(MethodObject.new(@yard, :foo).attr_info).to eq nil end it "returns nil if meth is not an attribute" do expect(MethodObject.new(@yard, :notanattribute).attr_info).to eq nil end end describe "#writer?" do it "returns true if method is a writer attribute" do obj = MethodObject.new(@yard, :foo=) @yard.attributes[:instance][:foo] = {:read => nil, :write => obj} expect(obj.writer?).to be true expect(MethodObject.new(@yard, :NOTfoo=).writer?).to be false end end describe "#reader?" do it "returns true if method is a reader attribute" do obj = MethodObject.new(@yard, :foo) @yard.attributes[:instance][:foo] = {:read => obj, :write => nil} expect(obj.reader?).to be true expect(MethodObject.new(@yard, :NOTfoo).reader?).to be false end end describe "#constructor?" do before { @class = ClassObject.new(:root, :MyClass) } it "marks the #initialize method as constructor" do MethodObject.new(@class, :initialize) end it "does not mark Klass.initialize as constructor" do expect(MethodObject.new(@class, :initialize, :class).constructor?).to be false end it "does not mark module method #initialize as constructor" do expect(MethodObject.new(@yard, :initialize).constructor?).to be false end end describe "#overridden_method" do before { Registry.clear } it "returns overridden method from mixin first" do YARD.parse_string(<<-eof) module C; def foo; end end class A; def foo; end end class B < A; include C; def foo; end end eof expect(Registry.at('B#foo').overridden_method).to eq Registry.at('C#foo') end it "returns overridden method from superclass" do YARD.parse_string(<<-eof) class A; def foo; end end class B < A; def foo; end end eof expect(Registry.at('B#foo').overridden_method).to eq Registry.at('A#foo') end it "returns nil if none is found" do YARD.parse_string(<<-eof) class A; end class B < A; def foo; end end eof expect(Registry.at('B#foo').overridden_method).to be nil end it "returns nil if namespace is a proxy" do YARD.parse_string "def ARGV.foo; end" expect(Registry.at('ARGV.foo').overridden_method).to be nil end end end yard-master/spec/code_objects/module_object_spec.rb000066400000000000000000000113021265676644000230520ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::ModuleObject do describe "#meths" do before do Registry.clear # setup the object space: # # YARD:module # YARD#foo:method # YARD#foo2:method # YARD#xyz:method # YARD.bar:method # SomeMod#mixmethod # SomeMod#xyz:method # @yard = ModuleObject.new(:root, :YARD) MethodObject.new(@yard, :foo) MethodObject.new(@yard, :xyz) MethodObject.new(@yard, :foo2) do |o| o.visibility = :protected end MethodObject.new(@yard, :bar, :class) do |o| o.visibility = :private end @other = ModuleObject.new(:root, :SomeMod) MethodObject.new(@other, :mixmethod) MethodObject.new(@other, :xyz) MethodObject.new(@other, :baz, :class) @another = ModuleObject.new(:root, :AnotherMod) MethodObject.new(@another, :fizz) MethodObject.new(@another, :bar) MethodObject.new(@another, :fazz, :class) @yard.instance_mixins << @other @yard.class_mixins << @another end it "lists all methods (including mixin methods) via #meths" do meths = @yard.meths expect(meths).to include(P("YARD#foo")) expect(meths).to include(P("YARD#foo2")) expect(meths).to include(P("YARD.bar")) expect(meths).to include(P("SomeMod#mixmethod")) expect(meths).to include(P("AnotherMod#fizz")) end it "allows :visibility to be set" do meths = @yard.meths(:visibility => :public) expect(meths).not_to include(P("YARD.bar")) meths = @yard.meths(:visibility => [:public, :private]) expect(meths).to include(P("YARD#foo")) expect(meths).to include(P("YARD.bar")) expect(meths).not_to include(P("YARD#foo2")) end it "only displays class methods for :scope => :class" do meths = @yard.meths(:scope => :class) expect(meths).not_to include(P("YARD#foo")) expect(meths).not_to include(P("YARD#foo2")) expect(meths).not_to include(P("SomeMod#mixmethod")) expect(meths).not_to include(P("SomeMod.baz")) expect(meths).not_to include(P("AnotherMod#fazz")) expect(meths).to include(P("YARD.bar")) expect(meths).to include(P("AnotherMod#fizz")) end it "only displays instance methods for :scope => :class" do meths = @yard.meths(:scope => :instance) expect(meths).to include(P("YARD#foo")) expect(meths).to include(P("YARD#foo2")) expect(meths).to include(P("SomeMod#mixmethod")) expect(meths).not_to include(P("YARD.bar")) expect(meths).not_to include(P("AnotherMod#fizz")) end it "allows :included to be set" do meths = @yard.meths(:included => false) expect(meths).not_to include(P("SomeMod#mixmethod")) expect(meths).not_to include(P("AnotherMod#fizz")) expect(meths).to include(P("YARD#foo")) expect(meths).to include(P("YARD#foo2")) expect(meths).to include(P("YARD.bar")) end it "chooses the method defined in the class over an included module" do meths = @yard.meths expect(meths).not_to include(P("SomeMod#xyz")) expect(meths).to include(P("YARD#xyz")) expect(meths).not_to include(P("AnotherMod#bar")) expect(meths).to include(P("YARD.bar")) meths = @other.meths expect(meths).to include(P("SomeMod#xyz")) meths = @another.meths expect(meths).to include(P("AnotherMod#bar")) end end describe "#inheritance_tree" do before do Registry.clear @mod1 = ModuleObject.new(:root, :Mod1) @mod2 = ModuleObject.new(:root, :Mod2) @mod3 = ModuleObject.new(:root, :Mod3) @mod4 = ModuleObject.new(:root, :Mod4) @mod5 = ModuleObject.new(:root, :Mod5) @mod1.instance_mixins << @mod2 @mod2.instance_mixins << @mod3 @mod3.instance_mixins << @mod4 @mod1.instance_mixins << @mod4 @proxy = P(:SomeProxyClass) @mod5.instance_mixins << @proxy end it "shows only itself for an inheritance tree without included modules" do expect(@mod1.inheritance_tree).to eq [@mod1] end it "shows proper inheritance tree when modules are included" do expect(@mod1.inheritance_tree(true)).to eq [@mod1, @mod2, @mod3, @mod4] end it "does not list inheritance tree of proxy objects in inheritance tree" do expect(@proxy).not_to receive(:inheritance_tree) expect(@mod5.instance_mixins).to eq [@proxy] end it "lists class mixins in inheritance tree" do mod = ModuleObject.new(:root, :ClassMethods) recvmod = ModuleObject.new(:root, :ReceivingModule) recvmod.class_mixins << mod expect(recvmod.inheritance_tree(true)).to eq [recvmod, mod] end end endyard-master/spec/code_objects/namespace_object_spec.rb000066400000000000000000000127001265676644000235240ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::NamespaceObject do before { Registry.clear } describe "#child" do it "returns the object matching the name passed in if argument is a Symbol" do obj = NamespaceObject.new(nil, :YARD) other = NamespaceObject.new(obj, :Other) expect(obj.child(:Other)).to eq other expect(obj.child('Other')).to eq other end it "looks for attributes matching the object if the argument is a Hash" do obj = NamespaceObject.new(nil, :YARD) NamespaceObject.new(obj, :NotOther) other = NamespaceObject.new(obj, :Other) other.somevalue = 2 expect(obj.child(:somevalue => 2)).to eq other end end describe "#meths" do it "returns #meths even if parent is a Proxy" do obj = NamespaceObject.new(P(:String), :YARD) expect(obj.meths).to be_empty end it "does not list included methods that are already defined in the namespace using #meths" do a = ModuleObject.new(nil, :Mod1) ameth = MethodObject.new(a, :testing) b = ModuleObject.new(nil, :Mod2) bmeth = MethodObject.new(b, :foo) c = NamespaceObject.new(nil, :YARD) cmeth = MethodObject.new(c, :testing) cmeth2 = MethodObject.new(c, :foo) c.instance_mixins << a c.class_mixins << b meths = c.meths expect(meths).to include(bmeth) expect(meths).to include(cmeth) expect(meths).to include(cmeth2) expect(meths).not_to include(ameth) meths = c.included_meths expect(meths).to include(bmeth) expect(meths).not_to include(ameth) expect(meths).not_to include(cmeth) expect(meths).not_to include(cmeth2) end end describe "#included_meths" do it "lists methods mixed into the class scope as class methods" do b = ModuleObject.new(nil, :Mod2) bmeth = MethodObject.new(b, :foo) bmeth2 = MethodObject.new(b, :foo2) c = NamespaceObject.new(nil, :YARD) c.class_mixins << b [bmeth, bmeth2].each { |o| expect(o.scope).to eq :instance } meths = c.included_meths(:scope => :class) meths.each { |o| expect(o.scope).to eq :class } end it "does not list methods overridden by another included module" do a = ModuleObject.new(nil, :Mod) ameth = MethodObject.new(a, :testing) b = ModuleObject.new(nil, :Mod2) bmeth = MethodObject.new(b, :testing) c = NamespaceObject.new(nil, :YARD) c.instance_mixins.unshift a c.instance_mixins.unshift b c.class_mixins.unshift b c.class_mixins.unshift a meths = c.included_meths(:scope => :instance) expect(meths).not_to include(ameth) expect(meths).to include(bmeth) meths = c.included_meths(:scope => :class) expect(meths).to include(ameth) expect(meths).not_to include(bmeth) end end describe "#class_attributes" do it "lists class attributes" do a = NamespaceObject.new(nil, :Mod) a.attributes[:instance][:a] = { :read => MethodObject.new(a, :a), :write => nil } a.attributes[:instance][:b] = { :read => MethodObject.new(a, :b), :write => nil } a.attributes[:class][:a] = { :read => MethodObject.new(a, :a, :class), :write => nil } expect(a.class_attributes.keys).to include(:a) expect(a.class_attributes.keys).not_to include(:b) end end describe "#instance_attributes" do it "lists instance attributes" do a = NamespaceObject.new(nil, :Mod) a.attributes[:instance][:a] = { :read => MethodObject.new(a, :a), :write => nil } a.attributes[:instance][:b] = { :read => MethodObject.new(a, :b), :write => nil } a.attributes[:class][:a] = { :read => MethodObject.new(a, :a, :class), :write => nil } expect(a.instance_attributes.keys).to include(:a) expect(a.instance_attributes.keys).to include(:b) end end describe "#constants/#included_constants" do before do Registry.clear YARD.parse_string <<-eof module A CONST1 = 1 CONST2 = 2 end module B CONST2 = -2 CONST3 = -3 end class C CONST3 = 3 CONST4 = 4 include A include B end eof end it "lists all included constants by default" do consts = P(:C).constants expect(consts).to include(P('A::CONST1')) expect(consts).to include(P('C::CONST4')) end it "allows :included to be set to false to ignore included constants" do consts = P(:C).constants(:included => false) expect(consts).not_to include(P('A::CONST1')) expect(consts).to include(P('C::CONST4')) end it "does not list an included constant if it is defined in the object" do consts = P(:C).constants expect(consts).to include(P('C::CONST3')) expect(consts).not_to include(P('B::CONST3')) end it "does not list an included constant if it is shadowed by another included constant" do consts = P(:C).included_constants expect(consts).to include(P('B::CONST2')) expect(consts).not_to include(P('A::CONST2')) end end describe "#included_meths" do it "returns all included methods with :all = true" do YARD.parse_string <<-eof module B; def foo; end end module C; def bar; end end class A; include B; include C; def foo; end; def bar; end end eof expect(Registry.at('A').included_meths(:all => true)).to eq [P('C#bar'), P('B#foo')] end end end yard-master/spec/code_objects/proxy_spec.rb000066400000000000000000000104031265676644000214210ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::CodeObjects::Proxy do before { Registry.clear } it "returns the object if it's in the Registry" do pathobj = ModuleObject.new(:root, :YARD) proxyobj = P(:root, :YARD) expect(proxyobj.type).to eq :module expect(Proxy === proxyobj).to be false end it "handles complex string namespaces" do ModuleObject.new(:root, :A) pathobj = ModuleObject.new(P(nil, :A), :B) expect(P(:root, "A::B")).to be_instance_of(ModuleObject) end it "does not return true to Proxy === obj if obj is a Proxy class holding a resolved object" do expect(Proxy === P(:root, 'a')).to be true expect(Proxy === P(:root)).to be false MethodObject.new(:root, 'a') expect(Proxy === P(:root, 'a')).to be false x = Proxy.new(:root, 'a') expect(Proxy === x).to be false end it "returns the object if it's an included Module" do yardobj = ModuleObject.new(:root, :YARD) pathobj = ClassObject.new(:root, :TestClass) pathobj.instance_mixins << yardobj expect(P(P(nil, :TestClass), :YARD)).to be_instance_of(ModuleObject) end it "responds to respond_to?" do obj = ClassObject.new(:root, :Object) yardobj = ModuleObject.new(:root, :YARD) expect(P(:YARD).respond_to?(:children)).to be true expect(P(:NOTYARD).respond_to?(:children)).to be false expect(P(:YARD).respond_to?(:initialize)).to be false expect(P(:YARD).respond_to?(:initialize, true)).to be true expect(P(:NOTYARD).respond_to?(:initialize)).to be false expect(P(:NOTYARD).respond_to?(:initialize, true)).to be true end it "makes itself obvious that it's a proxy" do pathobj = P(:root, :YARD) expect(pathobj.class).to eq Proxy expect(Proxy === pathobj).to be true end it "pretends it's the object's type if it can resolve" do pathobj = ModuleObject.new(:root, :YARD) proxyobj = P(:root, :YARD) expect(proxyobj).to be_instance_of(ModuleObject) end it "handles instance method names" do obj = P(nil, '#test') expect(obj.name).to eq :test expect(obj.path).to eq "#test" expect(obj.namespace).to eq Registry.root end it "handles instance method names under a namespace" do pathobj = ModuleObject.new(:root, :YARD) obj = P(pathobj, "A::B#test") expect(obj.name).to eq :test expect(obj.path).to eq "A::B#test" end it "allows type to be changed" do obj = P("InvalidClass") expect(obj.type).to eq :proxy expect(Proxy === obj).to be true obj.type = :class expect(obj.type).to eq :class end it "does NOT retain a type change between Proxy objects" do P("InvalidClass").type = :class expect(P("InvalidClass").type).to eq :proxy end it "uses type to ensure resolved object is of intended type" do YARD.parse_string <<-eof module Foo class Bar; end def self.Bar; end end eof proxy = Proxy.new(P('Foo'), 'Bar') proxy.type = :method expect(proxy.path).to eq 'Foo.Bar' end it "allows type in initializer" do expect(Proxy.new(Registry.root, 'Foo', :method).type).to eq :method expect(P(Registry.root, 'Foo', :method).type).to eq :method end it "never equals Registry.root" do expect(P("MYPROXY")).not_to eq Registry.root expect(P("X::A")).not_to eq Registry.root end it "resets namespace and name when object is resolved" do obj1 = ModuleObject.new(:root, :YARD) obj2 = ModuleObject.new(:root, :NOTYARD) resolved = Proxy.new(obj2, :YARD) expect(resolved).to eq obj1 expect(resolved.namespace).to eq Registry.root expect(resolved.name).to eq :YARD end it "ensures that the correct object was resolved" do foo = ModuleObject.new(:root, :Foo) foobar = ModuleObject.new(foo, :Bar) foobaz = ClassObject.new(foo, :Baz) # Remember, we're looking for Qux::Bar, not just 'Bar' proxy = Proxy.new(foobar, 'Foo::Qux::Bar') expect(proxy.type).to eq :proxy qux = ModuleObject.new(foo, :Qux) quxbar = ModuleObject.new(qux, :Bar) # Now it should resolve expect(proxy.type).to eq :module end it "handles constant names in namespaces" do YARD.parse_string <<-eof module A; end; B = A module B::C; def foo; end end eof expect(Proxy.new(:root, 'B::C')).to eq Registry.at('A::C') end end yard-master/spec/code_objects/spec_helper.rb000066400000000000000000000001231265676644000215150ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "..", "spec_helper") include CodeObjectsyard-master/spec/config_spec.rb000066400000000000000000000201231265676644000170620ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "spec_helper") require 'yaml' describe YARD::Config do describe ".load" do before do expect(File).to receive(:file?).twice.with(CLI::Yardoc::DEFAULT_YARDOPTS_FILE).and_return(false) end it "uses default options if no ~/.yard/config is found" do expect(File).to receive(:file?).with(YARD::Config::IGNORED_PLUGINS).and_return(false) expect(File).to receive(:file?).with(YARD::Config::CONFIG_FILE).and_return(false) YARD::Config.load expect(YARD::Config.options).to eq YARD::Config::DEFAULT_CONFIG_OPTIONS end it "overwrites options with data in ~/.yard/config" do expect(File).to receive(:file?).with(YARD::Config::CONFIG_FILE).and_return(true) expect(File).to receive(:file?).with(YARD::Config::IGNORED_PLUGINS).and_return(false) expect(YAML).to receive(:load_file).with(YARD::Config::CONFIG_FILE).and_return({'test' => true}) YARD::Config.load expect(YARD::Config.options[:test]).to be true end it "ignores any plugins specified in '~/.yard/ignored_plugins'" do expect(File).to receive(:file?).with(YARD::Config::CONFIG_FILE).and_return(false) expect(File).to receive(:file?).with(YARD::Config::IGNORED_PLUGINS).and_return(true) expect(File).to receive(:read).with(YARD::Config::IGNORED_PLUGINS).and_return('yard-plugin plugin2') YARD::Config.load expect(YARD::Config.options[:ignored_plugins]).to eq ['yard-plugin', 'yard-plugin2'] expect(YARD::Config).not_to receive(:require).with('yard-plugin2') expect(YARD::Config.load_plugin('yard-plugin2')).to be false end it "loads safe_mode setting from --safe command line option" do expect(File).to receive(:file?).with(YARD::Config::IGNORED_PLUGINS).and_return(false) expect(File).to receive(:file?).with(YARD::Config::CONFIG_FILE).and_return(false) ARGV.replace(['--safe']) YARD::Config.load expect(YARD::Config.options[:safe_mode]).to be true ARGV.replace(['']) end end describe ".save" do it "saves options to config file" do allow(YARD::Config).to receive(:options).and_return(:a => 1, :b => %w(a b c)) file = double(:file) expect(File).to receive(:open).with(YARD::Config::CONFIG_FILE, 'w').and_yield(file) expect(file).to receive(:write).with(YAML.dump(:a => 1, :b => %w(a b c))) YARD::Config.save end end describe ".load_plugin" do it "loads a plugin by 'name' as 'yard-name'" do expect(YARD::Config).to receive(:require).with('yard-foo') expect(log).to receive(:debug).with(/Loading plugin 'yard-foo'/).once expect(YARD::Config.load_plugin('foo')).to be true end it "does not load plugins like 'doc-*'" do expect(YARD::Config).not_to receive(:require).with('yard-doc-core') YARD::Config.load_plugin('doc-core') YARD::Config.load_plugin('yard-doc-core') end it "loads plugin by 'yard-name' as 'yard-name'" do expect(YARD::Config).to receive(:require).with('yard-foo') expect(log).to receive(:debug).with(/Loading plugin 'yard-foo'/).once expect(YARD::Config.load_plugin('yard-foo')).to be true end it "loads plugin by 'yard_name' as 'yard_name'" do expect(YARD::Config).to receive(:require).with('yard_foo') expect(log).to receive(:debug).with(/Loading plugin 'yard_foo'/).once log.show_backtraces = false expect(YARD::Config.load_plugin('yard_foo')).to be true end it "logs error if plugin is not found" do expect(YARD::Config).to receive(:require).with('yard-foo').and_raise(LoadError) expect(log).to receive(:warn).with(/Error loading plugin 'yard-foo'/).once expect(YARD::Config.load_plugin('yard-foo')).to be false end it "sanitizes plugin name (remove /'s)" do expect(YARD::Config).to receive(:require).with('yard-foofoo') expect(YARD::Config.load_plugin('foo/foo')).to be true end it "ignores plugins in :ignore_plugins" do allow(YARD::Config).to receive(:options).and_return(:ignored_plugins => ['yard-foo', 'yard-bar']) expect(YARD::Config.load_plugin('foo')).to be false expect(YARD::Config.load_plugin('bar')).to be false end end describe ".load_plugins" do it "loads gem plugins if :load_plugins is true" do allow(YARD::Config).to receive(:options).and_return(:load_plugins => true, :ignored_plugins => [], :autoload_plugins => []) allow(YARD::Config).to receive(:load_plugin) expect(YARD::Config).to receive(:require).with('rubygems') YARD::Config.load_plugins end it "ignores gem loading if RubyGems cannot load" do allow(YARD::Config).to receive(:options).and_return(:load_plugins => true, :ignored_plugins => [], :autoload_plugins => []) expect(YARD::Config).to receive(:require).with('rubygems').and_raise(LoadError) expect(YARD::Config.load_plugins).to be false end it "loads certain plugins automatically when specified in :autoload_plugins" do expect(File).to receive(:file?).with(CLI::Yardoc::DEFAULT_YARDOPTS_FILE).and_return(false) allow(YARD::Config).to receive(:options).and_return(:load_plugins => false, :ignored_plugins => [], :autoload_plugins => ['yard-plugin']) expect(YARD::Config).to receive(:require).with('yard-plugin').and_return(true) expect(YARD::Config.load_plugins).to be true end it "parses --plugin from command line arguments" do expect(YARD::Config).to receive(:arguments).at_least(1).times.and_return(%w(--plugin foo --plugin bar a b c)) expect(YARD::Config).to receive(:load_plugin).with('foo').and_return(true) expect(YARD::Config).to receive(:load_plugin).with('bar').and_return(true) expect(YARD::Config.load_plugins).to be true end it "loads --plugin arguments from .yardopts" do expect(File).to receive(:file?).with(CLI::Yardoc::DEFAULT_YARDOPTS_FILE).twice.and_return(true) expect(File).to receive(:file?).with(YARD::Config::CONFIG_FILE).and_return(false) expect(File).to receive(:file?).with(YARD::Config::IGNORED_PLUGINS).and_return(false) expect(File).to receive(:read_binary).with(CLI::Yardoc::DEFAULT_YARDOPTS_FILE).twice.and_return('--plugin foo') expect(YARD::Config).to receive(:load_plugin).with('foo') YARD::Config.load end it "loads any gem plugins starting with 'yard_' or 'yard-'" do expect(File).to receive(:file?).with(CLI::Yardoc::DEFAULT_YARDOPTS_FILE).and_return(false) allow(YARD::Config).to receive(:options).and_return(:load_plugins => true, :ignored_plugins => ['yard_plugin'], :autoload_plugins => []) plugins = { 'yard' => double('yard'), 'yard_plugin' => double('yard_plugin'), 'yard-plugin' => double('yard-plugin'), 'my-yard-plugin' => double('yard-plugin'), 'rspec' => double('rspec'), } plugins.each do |k, v| expect(v).to receive(:name).at_least(1).times.and_return(k) end source_mock = double(:source_index) expect(source_mock).to receive(:find_name).with('').and_return(plugins.values) expect(Gem).to receive(:source_index).and_return(source_mock) expect(YARD::Config).to receive(:load_plugin).with('yard_plugin').and_return(false) expect(YARD::Config).to receive(:load_plugin).with('yard-plugin').and_return(true) expect(YARD::Config.load_plugins).to be true end it "logs an error if a gem raises an error" do allow(YARD::Config).to receive(:options).and_return(:load_plugins => true, :ignored_plugins => [], :autoload_plugins => []) plugins = { 'yard-plugin' => double('yard-plugin') } plugins.each do |k, v| expect(v).to receive(:name).at_least(1).times.and_return(k) end source_mock = double(:source_index) expect(source_mock).to receive(:find_name).with('').and_return(plugins.values) expect(Gem).to receive(:source_index).and_return(source_mock) expect(YARD::Config).to receive(:load_plugin).with('yard-plugin').and_raise(Gem::LoadError) expect(log).to receive(:warn).with(/Error loading plugin 'yard-plugin'/) expect(YARD::Config.load_plugins).to be false end end endyard-master/spec/core_ext/000077500000000000000000000000001265676644000160705ustar00rootroot00000000000000yard-master/spec/core_ext/array_spec.rb000066400000000000000000000005271265676644000205510ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe Array do describe "#place" do it "creates an Insertion object" do expect([].place('x')).to be_kind_of(Insertion) end it "allows multiple objects to be placed" do expect([1, 2].place('x', 'y', 'z').before(2)).to eq [1, 'x', 'y', 'z', 2] end end end yard-master/spec/core_ext/file_spec.rb000066400000000000000000000042051265676644000203470ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe File do describe ".relative_path" do it "returns the relative path between two files" do expect(File.relative_path('a/b/c/d.html', 'a/b/d/q.html')).to eq '../d/q.html' end it "returns the relative path between two directories" do expect(File.relative_path('a/b/c/d/', 'a/b/d/')).to eq '../d' end it "returns only the to file if from file is in the same directory as the to file" do expect(File.relative_path('a/b/c/d', 'a/b/c/e')).to eq 'e' end it "handles non-normalized paths" do expect(File.relative_path('Hello/./I/Am/Fred', 'Hello/Fred')).to eq '../../Fred' expect(File.relative_path('A//B/C', 'Q/X')).to eq '../../Q/X' end end describe ".cleanpath" do it "cleans double brackets" do expect(File.cleanpath('A//B/C')).to eq "A/B/C" end it "cleans a path with ." do expect(File.cleanpath('Hello/./I/.Am/Fred')).to eq "Hello/I/.Am/Fred" end it "cleans a path with .." do expect(File.cleanpath('Hello/../World')).to eq "World" end it "cleans a path with multiple .." do expect(File.cleanpath('A/B/C/../../D')).to eq "A/D" end it "cleans a path ending in .." do expect(File.cleanpath('A/B/C/D/..')).to eq "A/B/C" end it "passes the initial directory" do expect(File.cleanpath('C/../../D')).to eq "../D" end it "does not remove multiple '../' at the beginning" do expect(File.cleanpath('../../A/B')).to eq '../../A/B' end end describe ".open!" do it "creates the path before opening" do expect(File).to receive(:directory?).with('/path/to').and_return(false) expect(FileUtils).to receive(:mkdir_p).with('/path/to') expect(File).to receive(:open).with('/path/to/file', 'w') File.open!('/path/to/file', 'w') end it "just opens the file if the path exists" do expect(File).to receive(:directory?).with('/path/to').and_return(true) expect(FileUtils).not_to receive(:mkdir_p) expect(File).to receive(:open).with('/path/to/file', 'w') File.open!('/path/to/file', 'w') end end endyard-master/spec/core_ext/hash_spec.rb000066400000000000000000000006041265676644000203520ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe Hash do describe ".[]" do it "accepts an Array argument (Ruby 1.8.6 and older)" do list = [['foo', 'bar'], ['foo2', 'bar2']] expect(Hash[list]).to eq({'foo' => 'bar', 'foo2' => 'bar2'}) end it "accepts an array as a key" do expect(Hash[['a', 'b'], 1]).to eq({['a', 'b'] => 1}) end end endyard-master/spec/core_ext/insertion_spec.rb000066400000000000000000000021561265676644000214450ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe Insertion do describe "#before" do it "places an object before another" do expect([1, 2].place(3).before(2)).to eq [1, 3, 2] expect([1, 2].place(3).before(1)).to eq [3, 1, 2] expect([1, [4], 2].place(3).before(2)).to eq [1, [4], 3, 2] end end describe "#after" do it "places an object after another" do expect([1, 2].place(3).after(2)).to eq [1, 2, 3] end it "no longer places an object after another and its subsections (0.6)" do expect([1, [2]].place(3).after(1)).to eq [1, 3, [2]] end it "places an array after an object" do expect([1, 2, 3].place([4]).after(1)).to eq [1, [4], 2, 3] end end describe "#before_any" do it "places an object before another anywhere inside list (including sublists)" do expect([1, 2, [3]].place(4).before_any(3)).to eq [1, 2, [4, 3]] end end describe "#after_any" do it "places an object after another anywhere inside list (including sublists)" do expect([1, 2, [3]].place(4).after_any(3)).to eq [1, 2, [3, 4]] end end end yard-master/spec/core_ext/module_spec.rb000066400000000000000000000006261265676644000207200ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe Module do describe "#class_name" do it "returns just the name of the class/module" do expect(YARD::CodeObjects::Base.class_name).to eq "Base" end end describe "#namespace" do it "returns everything before the class name" do expect(YARD::CodeObjects::Base.namespace_name).to eq "YARD::CodeObjects" end end endyard-master/spec/core_ext/string_spec.rb000066400000000000000000000023261265676644000207400ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' #described_in_docs String, '#camelcase' #described_in_docs String, '#underscore' describe String do describe "#shell_split" do it "splits simple non-quoted text" do expect("a b c".shell_split).to eq %w(a b c) end it "splits double quoted text into single token" do expect('a "b c d" e'.shell_split).to eq ["a", "b c d", "e"] end it "splits single quoted text into single token" do expect("a 'b c d' e".shell_split).to eq ["a", "b c d", "e"] end it "handles escaped quotations in quotes" do expect("'a \\' b'".shell_split).to eq ["a ' b"] end it "handles escaped quotations outside quotes" do expect("\\'a 'b'".shell_split).to eq %w('a b) end it "handles escaped backslash" do expect("\\\\'a b c'".shell_split).to eq ['\a b c'] end it "handles any whitespace as space" do text = "foo\tbar\nbaz\r\nfoo2 bar2" expect(text.shell_split).to eq %w(foo bar baz foo2 bar2) end it "handles complex input" do text = "hello \\\"world \"1 2\\\" 3\" a 'b \"\\\\\\'' c" expect(text.shell_split).to eq ["hello", "\"world", "1 2\" 3", "a", "b \"\\'", "c"] end end endyard-master/spec/core_ext/symbol_hash_spec.rb000066400000000000000000000042661265676644000217470ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe SymbolHash do it "allows access to keys as String or Symbol" do h = SymbolHash.new(false) h['test'] = true expect(h[:test]).to be true expect(h['test']).to be true end describe "#delete" do it "accepts either Strings or Symbols as deletion key" do h = SymbolHash.new expect(h.keys.length).to eq 0 h['test'] = true expect(h.keys.length).to eq 1 h.delete(:test) expect(h.keys.length).to eq 0 h[:test] = true expect(h.keys.length).to eq 1 h.delete('test') expect(h.keys.length).to eq 0 end end describe "#has_key?" do it "returns same result for String or Symbol" do h = SymbolHash.new h[:test] = 1 expect(h.has_key?(:test)).to be true expect(h.has_key?('test')).to be true end end it "symbolizes value if it is a String (and only a string)" do class Substring < String; end h = SymbolHash.new h['test1'] = "hello" h['test2'] = Substring.new("hello") expect(h['test1']).to eq :hello expect(h['test2']).to eq "hello" end it "does not symbolize value if SymbolHash.new(false) is created" do h = SymbolHash.new(false) h['test'] = "hello" expect(h[:test]).to eq "hello" end it "does not symbolize value if it is not a String" do h = SymbolHash.new h['test'] = [1,2,3] expect(h['test']).to eq [1,2,3] end it "supports symbolization using #update or #merge!" do h = SymbolHash.new h.update('test' => 'value') expect(h[:test]).to eq :value h.merge!('test' => 'value2') expect(h[:test]).to eq :value2 end it "supports symbolization non-destructively using #merge" do h = SymbolHash.new expect(h.merge('test' => 'value')[:test]).to eq :value expect(h).to eq SymbolHash.new end it "supports #initializing of a hash" do h = SymbolHash[:test => 1] expect(h[:test]).to eq 1 expect(h[:somethingelse]).to be nil end it "supports reverse merge syntax" do opts = {} opts = SymbolHash[ 'default' => 1 ].update(opts) expect(opts.keys).to eq [:default] expect(opts[:default]).to eq 1 end end yard-master/spec/docstring_parser_spec.rb000066400000000000000000000140611265676644000211710ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::DocstringParser do after(:all) do YARD::Registry.clear end def parse(content, object = nil, handler = nil) @library ||= Tags::Library.instance @parser = DocstringParser.new(@library) @parser.parse(content, object, handler) @parser end def docstring(content, object = nil, handler = nil) parse(content, object, handler).to_docstring end describe "#parse" do it "parses comments into tags" do doc = docstring(<<-eof) @param name Hello world how are you? @param name2 this is a new line @param name3 and this is a new paragraph: right here. eof tags = doc.tags(:param) expect(tags[0].name).to eq "name" expect(tags[0].text).to eq "Hello world\nhow are you?" expect(tags[1].name).to eq "name2" expect(tags[1].text).to eq "this is a new line" expect(tags[2].name).to eq "name3" expect(tags[2].text).to eq "and this\nis a new paragraph:\n\nright here." end it "ends parsing a tag on de-dent" do doc = docstring(<<-eof) @note test one two three rest of docstring eof expect(doc.tag(:note).text).to eq "test\none two three" expect(doc).to eq "rest of docstring" end it "parses examples embedded in doc" do doc = docstring(<<-eof) test string here @example code def foo(x, y, z) end class A; end more stuff eof expect(doc).to eq "test string here\nmore stuff" expect(doc.tag(:example).text).to eq "\ndef foo(x, y, z)\nend\n\nclass A; end" end it "removes only original indentation from beginning of line in tags" do doc = docstring(<<-eof) @param name some value foo bar baz eof expect(doc.tag(:param).text).to eq "some value\nfoo bar\n baz" end it "allows numbers in tags" do Tags::Library.define_tag(nil, :foo1) Tags::Library.define_tag(nil, :foo2) Tags::Library.define_tag(nil, :foo3) doc = docstring(<<-eof) @foo1 bar1 @foo2 bar2 @foo3 bar3 eof expect(doc.tag(:foo1).text).to eq "bar1" expect(doc.tag(:foo2).text).to eq "bar2" end it "ends tag on newline if next line is not indented" do doc = docstring(<<-eof) @author bar1 @api bar2 Hello world eof expect(doc.tag(:author).text).to eq "bar1" expect(doc.tag(:api).text).to eq "bar2" end it "warns about unknown tag" do expect(log).to receive(:warn).with(/Unknown tag @hello$/) docstring("@hello world") end it "does not add trailing whitespace to freeform tags" do doc = docstring("@api private \t ") expect(doc.tag(:api).text).to eq "private" end end describe "#parse with custom tag library" do class TestLibrary < Tags::Library; end before { @library = TestLibrary.new } it "accepts valid tags" do valid = %w( testing valid is_a is_A __ ) valid.each do |tag| TestLibrary.define_tag("Tag", tag) doc = docstring('@' + tag + ' foo bar') expect(doc.tag(tag).text).to eq 'foo bar' end end it "does not parse invalid tag names" do invalid = %w( @ @return@ @param, @x-y @.x.y.z ) invalid.each do |tag| expect(docstring(tag + ' foo bar')).to eq tag + ' foo bar' end end it "allows namespaced tags in the form @x.y.z" do TestLibrary.define_tag("Tag", 'x.y.z') doc = docstring("@x.y.z foo bar") expect(doc.tag('x.y.z').text).to eq 'foo bar' end it "ignores new directives without @! prefix syntax" do TestLibrary.define_directive('dir1', Tags::ScopeDirective) expect(log).to receive(:warn).with(/@dir1/) docstring("@dir1") end %w(attribute endgroup group macro method scope visibility).each do |tag| it "handles non prefixed @#{tag} syntax as directive, not tag" do TestLibrary.define_directive(tag, Tags::ScopeDirective) parse("@#{tag}") expect(@parser.directives.first).to be_a(Tags::ScopeDirective) end end it "handles directives with @! prefix syntax" do TestLibrary.define_directive('dir1', Tags::ScopeDirective) docstring("@!dir1 class") expect(@parser.state.scope).to eq :class end end describe "#text" do it "only returns text data" do parse("Foo\n@param foo x y z\nBar") expect(@parser.text).to eq "Foo\nBar" end end describe "#raw_text" do it "returns the entire original data" do data = "Foo\n@param foo x y z\nBar" parse(data) expect(@parser.raw_text).to eq data end end describe "#tags" do it "returns the parsed tags" do data = "Foo\n@param foo x y z\nBar" parse(data) expect(@parser.tags.size).to eq 1 expect(@parser.tags.first.tag_name).to eq 'param' end end describe "#directives" do it "groups all processed directives" do data = "Foo\n@!scope class\n@!visibility private\nBar" parse(data) dirs = @parser.directives dirs.size == 2 expect(dirs[0]).to be_a(Tags::ScopeDirective) expect(dirs[0].tag.text).to eq 'class' expect(dirs[1]).to be_a(Tags::VisibilityDirective) expect(dirs[1].tag.text).to eq 'private' end end describe "#state" do it "handles modified state" do parse("@!scope class") expect(@parser.state.scope).to eq :class end end describe "after_parse" do it "allows specifying of callbacks" do parser = DocstringParser.new the_yielded_obj = nil DocstringParser.after_parse {|obj| the_yielded_obj = obj } parser.parse("Some text") expect(the_yielded_obj).to eq parser end it "warns about invalid named parameters" do expect(log).to receive(:warn).with(/@param tag has unknown parameter name: notaparam/) YARD.parse_string <<-eof # @param notaparam foo def foo(a) end eof end it "warns about duplicate named parameters" do expect(log).to receive(:warn).with(/@param tag has duplicate parameter name: a/) YARD.parse_string <<-eof # @param a foo # @param a foo def foo(a) end eof end end end yard-master/spec/docstring_spec.rb000066400000000000000000000265521265676644000176250ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Docstring do before { YARD::Registry.clear } describe "#initialize" do it "handles docstrings with empty newlines" do expect(Docstring.new("\n\n")).to eq "" end end describe "#+" do it "adds another Docstring" do d = Docstring.new("FOO") + Docstring.new("BAR") expect(d).to eq "FOO\nBAR" end it "copies over tags" do d1 = Docstring.new("FOO\n@api private\n") d2 = Docstring.new("BAR\n@param foo descr") d = (d1 + d2) expect(d).to have_tag(:api) expect(d).to have_tag(:param) end it "adds a String" do d = Docstring.new("FOO") + "BAR" expect(d).to eq "FOOBAR" end end describe "#line" do it "returns nil if #line_range is not set" do expect(Docstring.new('foo').line).to be nil end it "returns line_range.first if #line_range is set" do doc = Docstring.new('foo') doc.line_range = (1..10) expect(doc.line).to eq doc.line_range.first end end describe "#summary" do it "handles empty docstrings" do o1 = Docstring.new expect(o1.summary).to eq "" end it "handles multiple calls" do o1 = Docstring.new("Hello. world") 5.times { expect(o1.summary).to eq "Hello." } end it "strips HTML before summarizing" do doc = Docstring.new("

    Hello world

    .") expect(doc.summary).to eq 'Hello world.' end it "strips newlines in first paragraph before summarizing" do doc = Docstring.new("Foo\n== bar.") expect(doc.summary).to eq 'Foo == bar.' end it "returns the first sentence" do o = Docstring.new("DOCSTRING. Another sentence") expect(o.summary).to eq "DOCSTRING." end it "returns the first paragraph" do o = Docstring.new("DOCSTRING, and other stuff\n\nAnother sentence.") expect(o.summary).to eq "DOCSTRING, and other stuff." end it "returns proper summary when docstring is changed" do o = Docstring.new "DOCSTRING, and other stuff\n\nAnother sentence." expect(o.summary).to eq "DOCSTRING, and other stuff." o = Docstring.new "DOCSTRING." expect(o.summary).to eq "DOCSTRING." end it "does not double the ending period" do o = Docstring.new("Returns a list of tags specified by +name+ or all tags if +name+ is not specified.\n\nTest") expect(o.summary).to eq "Returns a list of tags specified by +name+ or all tags if +name+ is not specified." doc = Docstring.new(<<-eof) Returns a list of tags specified by +name+ or all tags if +name+ is not specified. @param name the tag name to return data for, or nil for all tags @return [Array] the list of tags by the specified tag name eof expect(doc.summary).to eq "Returns a list of tags specified by +name+ or all tags if +name+ is not specified." end it "does not attach period if entire summary is include" do YARD.parse_string "# docstring\ndef foo; end" expect(Docstring.new("{include:#foo}").summary).to eq '{include:#foo}' Registry.clear end it "handles references embedded in summary" do expect(Docstring.new("Aliasing {Test.test}. Done.").summary).to eq "Aliasing {Test.test}." end it "only ends first sentence when outside parentheses" do expect(Docstring.new("Hello (the best.) world. Foo bar.").summary).to eq "Hello (the best.) world." expect(Docstring.new("A[b.]c.").summary).to eq "A[b.]c." end it "only sees '.' as period if whitespace (or eof) follows" do expect(Docstring.new("hello 1.5 times.").summary).to eq "hello 1.5 times." expect(Docstring.new("hello... me").summary).to eq "hello..." expect(Docstring.new("hello.").summary).to eq "hello." end it "returns summary if there is a newline and parentheses count doesn't match" do expect(Docstring.new("Happy method call :-)\n\nCall any time.").summary).to eq "Happy method call :-)." expect(Docstring.new("Sad method call :-(\n\nCall any time.").summary).to eq "Sad method call :-(." expect(Docstring.new("Hello (World. Forget to close.\n\nNew text").summary).to eq "Hello (World. Forget to close." expect(Docstring.new("Hello (World. Forget to close\n\nNew text").summary).to eq "Hello (World. Forget to close." end end describe "#ref_tags" do it "parses reference tag into ref_tags" do doc = Docstring.new("@return (see Foo#bar)") expect(doc.ref_tags.size).to eq 1 expect(doc.ref_tags.first.owner).to eq P("Foo#bar") expect(doc.ref_tags.first.tag_name).to eq "return" expect(doc.ref_tags.first.name).to be nil end it "parses named reference tag into ref_tags" do doc = Docstring.new("@param blah \n (see Foo#bar )") expect(doc.ref_tags.size).to eq 1 expect(doc.ref_tags.first.owner).to eq P("Foo#bar") expect(doc.ref_tags.first.tag_name).to eq "param" expect(doc.ref_tags.first.name).to eq "blah" end it "fails to parse named reference tag into ref_tags" do doc = Docstring.new("@param blah THIS_BREAKS_REFTAG (see Foo#bar)") expect(doc.ref_tags.size).to eq 0 end it "returns all valid reference tags along with #tags" do o = CodeObjects::MethodObject.new(:root, 'Foo#bar') o.docstring.add_tag Tags::Tag.new('return', 'testing') doc = Docstring.new("@return (see Foo#bar)") tags = doc.tags expect(tags.size).to eq 1 expect(tags.first.text).to eq 'testing' expect(tags.first).to be_kind_of(Tags::RefTag) expect(tags.first.owner).to eq o end it "returns all valid named reference tags along with #tags(name)" do o = CodeObjects::MethodObject.new(:root, 'Foo#bar') o.docstring.add_tag Tags::Tag.new('param', 'testing', nil, '*args') o.docstring.add_tag Tags::Tag.new('param', 'NOTtesting', nil, 'notargs') doc = Docstring.new("@param *args (see Foo#bar)") tags = doc.tags('param') expect(tags.size).to eq 1 expect(tags.first.text).to eq 'testing' expect(tags.first).to be_kind_of(Tags::RefTag) expect(tags.first.owner).to eq o end it "ignores invalid reference tags" do doc = Docstring.new("@param *args (see INVALID::TAG#tag)") tags = doc.tags('param') expect(tags.size).to eq 0 end it "resolves references to methods in the same class with #methname" do klass = CodeObjects::ClassObject.new(:root, "Foo") o = CodeObjects::MethodObject.new(klass, "bar") ref = CodeObjects::MethodObject.new(klass, "baz") o.docstring.add_tag Tags::Tag.new('param', 'testing', nil, 'arg1') ref.docstring = "@param (see #bar)" tags = ref.docstring.tags("param") expect(tags.size).to eq 1 expect(tags.first.text).to eq "testing" expect(tags.first).to be_kind_of(Tags::RefTag) expect(tags.first.owner).to eq o end end describe "#empty?/#blank?" do before(:all) do Tags::Library.define_tag "Invisible", :invisible_tag end it "is blank and empty if it has no content and no tags" do expect(Docstring.new).to be_blank expect(Docstring.new).to be_empty end it "isn't empty or blank if it has content" do d = Docstring.new("foo bar") expect(d).not_to be_empty expect(d).not_to be_blank end it "is empty but not blank if it has tags" do d = Docstring.new("@param foo") expect(d).to be_empty expect(d).not_to be_blank end it "is empty but not blank if it has ref tags" do o = CodeObjects::MethodObject.new(:root, 'Foo#bar') o.docstring.add_tag Tags::Tag.new('return', 'testing') d = Docstring.new("@return (see Foo#bar)") expect(d).to be_empty expect(d).not_to be_blank end it "is blank if it has no visible tags" do d = Docstring.new("@invisible_tag value") expect(d).to be_blank end it "is not blank if it has invisible tags and only_visible_tags = false" do d = Docstring.new("@invisible_tag value") d.add_tag Tags::Tag.new('invisible_tag', nil, nil) expect(d.blank?(false)).to be false end end describe "#delete_tags" do it "deletes tags by a given tag name" do doc = Docstring.new("@param name x\n@param name2 y\n@return foo") doc.delete_tags(:param) expect(doc.tags.size).to eq 1 end end describe "#delete_tag_if" do it "deletes tags for a given block" do doc = Docstring.new("@param name x\n@param name2 y\n@return foo") doc.delete_tag_if {|t| t.name == 'name2' } expect(doc.tags.size).to eq 2 end end describe "#to_raw" do it "returns a clean representation of tags" do doc = Docstring.new("Hello world\n@return [String, X] foobar\n@param name the name\nBYE!") expect(doc.to_raw).to eq "Hello world\nBYE!\n@param [Array] name\n the name\n@return [String, X] foobar" end it "handles tags with newlines and indentation" do doc = Docstring.new("@example TITLE\n the \n example\n @foo\n@param [X] name\n the name") expect(doc.to_raw).to eq "@example TITLE\n the \n example\n @foo\n@param [X] name\n the name" end it "handles deleted tags" do doc = Docstring.new("@example TITLE\n the \n example\n @foo\n@param [X] name\n the name") doc.delete_tags(:param) expect(doc.to_raw).to eq "@example TITLE\n the \n example\n @foo" end it "handles added tags" do doc = Docstring.new("@example TITLE\n the \n example\n @foo") doc.add_tag(Tags::Tag.new('foo', 'foo')) expect(doc.to_raw).to eq "@example TITLE\n the \n example\n @foo\n@foo foo" end it "is equal to .all if not modified" do doc = Docstring.new("123\n@param") expect(doc.to_raw).to eq doc.all end # @bug gh-563 it "handles full @option tags" do doc = Docstring.new("@option foo [String] bar (nil) baz") expect(doc.to_raw).to eq "@option foo [String] bar (nil) baz" end # @bug gh-563 it "handles simple @option tags" do doc = Docstring.new("@option foo :key bar") expect(doc.to_raw).to eq "@option foo :key bar" end end describe "#dup" do it "duplicates docstring text" do doc = Docstring.new("foo") expect(doc.dup).to eq doc expect(doc.dup.all).to eq doc end it "duplicates tags to new list" do doc = Docstring.new("@param x\n@return y") doc2 = doc.dup doc2.delete_tags(:param) expect(doc.tags.size).to eq 2 expect(doc2.tags.size).to eq 1 end it "preserves summary" do doc = Docstring.new("foo. bar") expect(doc.dup.summary).to eq doc.summary end it "preserves hash_flag" do doc = Docstring.new doc.hash_flag = 'foo' expect(doc.dup.hash_flag).to eq doc.hash_flag end it "preserves line_range" do doc = Docstring.new doc.line_range = (1..2) expect(doc.dup.line_range).to eq doc.line_range end end describe "reference docstrings" do it "allows for construction of docstring with ref object" do YARD.parse_string <<-eof class A # Docstring # @return [Boolean] def a; end # (see #a) def b; end end eof object = YARD::Registry.at('A#b') expect(object.docstring).to eq 'Docstring' expect(object.tags.map {|x| x.tag_name }).to eq ['return'] YARD::Registry.clear end end end yard-master/spec/handlers/000077500000000000000000000000001265676644000160605ustar00rootroot00000000000000yard-master/spec/handlers/alias_handler_spec.rb000066400000000000000000000053361265676644000222140ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}AliasHandler" do before(:all) { parse_file :alias_handler_001, __FILE__ } it "throws alias into namespace object list" do expect(P(:A).aliases[P("A#b")]).to eq :a end ['c', 'd?', '[]', '[]=', '-@', '%', '*', 'cstrkey', 'cstrmeth'].each do |a| it "handles the Ruby 'alias' keyword syntax for method ##{a}" do expect(P('A#' + a)).to be_instance_of(CodeObjects::MethodObject) expect(P('A#' + a).is_alias?).to be true end end it "handles keywords as the alias name" do expect(P('A#for')).to be_instance_of(CodeObjects::MethodObject) end it "allows ConstantNames to be specified as aliases" do expect(P('A#ConstantName')).to be_instance_of(CodeObjects::MethodObject) end it "creates a new method object for the alias" do expect(P("A#b")).to be_instance_of(CodeObjects::MethodObject) end it "pulls the method into the current class if it's from another one" do expect(P(:B).aliases[P("B#q")]).to eq :x expect(P(:B).aliases[P("B#r?")]).to eq :x end it "gracefully fails to pull a method in if the original method cannot be found" do expect(P(:B).aliases[P("B#s")]).to eq :to_s end it "allows complex Ruby expressions after the alias parameters" do expect(P(:B).aliases[P("B#t")]).to eq :inspect end it "shows up in #is_alias? for method" do expect(P("B#t").is_alias?).to be true expect(P('B#r?').is_alias?).to be true end it "allows operators and keywords to be specified as symbols" do expect(P('B#<<')).to be_instance_of(CodeObjects::MethodObject) expect(P('B#for')).to be_instance_of(CodeObjects::MethodObject) end it "handles keywords in alias names" do expect(P('B#do').is_alias?).to be true expect(P('B#x2').is_alias?).to be true expect(P(:B).aliases[P('B#do')]).to eq :x expect(P(:B).aliases[P('B#x2')]).to eq :do end it "handles quoted symbols" do foo = Registry.at('A#foo') expect(foo).not_to be nil expect(foo.is_alias?).to be true expect(Registry.at('A').aliases[foo]).to eq :a end it "prepends aliases object's docstring to comments" do expect(Registry.at('D#a').tag(:return).types).to eq ['Numeric'] expect(Registry.at('D#b').tag(:return).types).to eq ['String'] expect(Registry.at('D#b').docstring).to eq "Foo bar" end it "raises an UndocumentableError if only one parameter is passed" do undoc_error "alias_method :q" end it "raises an UndocumentableError if the parameter is not a Symbol or String" do undoc_error "alias_method CONST, Something" undoc_error "alias_method variable, ClassName" undoc_error "alias_method variable, other_variable" end end yard-master/spec/handlers/attribute_handler_spec.rb000066400000000000000000000055411265676644000231240ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}AttributeHandler" do before(:all) { parse_file :attribute_handler_001, __FILE__ } def read_write(namespace, name, read, write, scope = :instance) rname, wname = namespace.to_s+"#"+name.to_s, namespace.to_s+"#"+name.to_s+"=" if read expect(Registry.at(rname)).to be_instance_of(CodeObjects::MethodObject) else expect(Registry.at(rname)).to eq nil end if write expect(Registry.at(wname)).to be_kind_of(CodeObjects::MethodObject) else expect(Registry.at(wname)).to eq nil end attrs = Registry.at(namespace).attributes[scope][name] expect(attrs[:read]).to eq (read ? Registry.at(rname) : nil) expect(attrs[:write]).to eq (write ? Registry.at(wname) : nil) end it "parses attributes inside modules too" do expect(Registry.at("A#x=")).not_to eq nil end it "parses 'attr'" do read_write(:B, :a, true, true) read_write(:B, :a2, true, false) read_write(:B, "a3", true, false) end it "parses 'attr_reader'" do read_write(:B, :b, true, false) end it "parses 'attr_writer'" do read_write(:B, :e, false, true) end it "parses 'attr_accessor'" do read_write(:B, :f, true, true) end it "parses a list of attributes" do read_write(:B, :b, true, false) read_write(:B, :c, true, false) read_write(:B, :d, true, false) end it "has a default docstring if one is not supplied" do expect(Registry.at("B#f=").docstring).not_to be_empty end it "sets the correct docstring if one is supplied" do expect(Registry.at("B#b").docstring).to eq "Docstring" expect(Registry.at("B#c").docstring).to eq "Docstring" expect(Registry.at("B#d").docstring).to eq "Docstring" end it "is able to differentiate between class and instance attributes" do expect(P('B').class_attributes[:z][:read].scope).to eq :class expect(P('B').instance_attributes[:z][:read].scope).to eq :instance end it "responds true in method's #is_attribute?" do expect(P('B#a').is_attribute?).to be true expect(P('B#a=').is_attribute?).to be true end it "does not return true for #is_explicit? in created methods" do Registry.at(:B).meths.each do |meth| expect(meth.is_explicit?).to be false end end it "handles attr call with no arguments" do expect { StubbedSourceParser.parse_string "attr" }.not_to raise_error end it "adds existing reader method as part of attr_writer combo" do expect(Registry.at('C#foo=').attr_info[:read]).to eq Registry.at('C#foo') end it "adds existing writer method as part of attr_reader combo" do expect(Registry.at('C#foo').attr_info[:write]).to eq Registry.at('C#foo=') end it "maintains visibility for attr_reader" do expect(Registry.at('D#parser').visibility).to eq :protected end endyard-master/spec/handlers/base_spec.rb000066400000000000000000000153151265676644000203360ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' require 'ostruct' include Parser describe YARD::Handlers::Base do describe "#handles and inheritance" do before do allow(Handlers::Base).to receive(:inherited) end it "keeps track of subclasses" do expect(Handlers::Base).to receive(:inherited).once class TestHandler < Handlers::Base; end end it "raises NotImplementedError if process is called on a class with no #process" do class TestNotImplementedHandler < Handlers::Base end expect { TestNotImplementedHandler.new(0, 0).process }.to raise_error(NotImplementedError) end it "allows multiple handles arguments" do expect(Handlers::Base).to receive(:inherited).once class TestHandler1 < Handlers::Base handles :a, :b, :c end expect(TestHandler1.handlers).to eq [:a, :b, :c] end it "allows multiple handles calls" do expect(Handlers::Base).to receive(:inherited).once class TestHandler2 < Handlers::Base handles :a handles :b handles :c end expect(TestHandler2.handlers).to eq [:a, :b, :c] end end describe "#abort! (and HandlerAborted)" do it "allows HandlerAborted to be raised" do class AbortHandler1 < Handlers::Ruby::Base process { abort! } end expect { AbortHandler1.new(nil, nil).process }.to raise_error(HandlerAborted) end end describe "transitive tags" do it "adds transitive tags to children" do Registry.clear YARD.parse_string <<-eof # @since 1.0 # @author Foo class A def foo; end # @since 1.1 def bar; end end eof expect(Registry.at('A').tag(:since).text).to eq "1.0" expect(Registry.at('A#foo').tag(:since).text).to eq "1.0" expect(Registry.at('A#bar').tag(:since).text).to eq "1.1" expect(Registry.at('A#bar').tag(:author)).to be nil end end describe "sharing global state" do it "allows globals to share global state among handlers" do class GlobalStateHandler1 < Handlers::Ruby::Base class << self; attr_accessor :state end handles :class process { self.class.state = globals.foo; globals.foo = :bar } end class GlobalStateHandler2 < Handlers::Ruby::Base class << self; attr_accessor :state end handles :def process { self.class.state = globals.foo } end 2.times do YARD.parse_string 'class Foo; end; def foo; end' expect(GlobalStateHandler1.state).to eq nil expect(GlobalStateHandler2.state).to eq :bar end end end if HAVE_RIPPER describe "#push_state" do def process(klass) state = OpenStruct.new(:namespace => "ROOT", :scope => :instance, :owner => "ROOT") klass.new(state, nil).process end it "pushes and return all old state info after block" do class PushStateHandler1 < Handlers::Base include RSpec::Matchers RSpec::Expectations::Syntax.enable_expect(self) def process push_state(:namespace => "FOO", :scope => :class, :owner => "BAR") do expect(namespace).to eq "FOO" expect(scope).to eq :class expect(owner).to eq "BAR" end expect(namespace).to eq "ROOT" expect(owner).to eq "ROOT" expect(scope).to eq :instance end end process PushStateHandler1 end it "allows owner to be pushed individually" do class PushStateHandler2 < Handlers::Base include RSpec::Matchers RSpec::Expectations::Syntax.enable_expect(self) def process push_state(:owner => "BAR") do expect(namespace).to eq "ROOT" expect(scope).to eq :instance expect(owner).to eq "BAR" end expect(owner).to eq "ROOT" end end process PushStateHandler2 end it "allows scope to be pushed individually" do class PushStateHandler3 < Handlers::Base include RSpec::Matchers RSpec::Expectations::Syntax.enable_expect(self) def process push_state(:scope => :foo) do expect(namespace).to eq "ROOT" expect(scope).to eq :foo expect(owner).to eq "ROOT" end expect(scope).to eq :instance end end process PushStateHandler3 end end describe ".in_file" do def parse(filename, parser_type, src = "class A; end") parser = Parser::SourceParser.new(parser_type) parser.instance_variable_set("@file", filename) parser.parse(StringIO.new(src)) end def create_handler(stmts, parser_type) $handler_counter ||= 0 sklass = parser_type == :ruby ? "Base" : "Legacy::Base" instance_eval(<<-eof) class ::InFileHandler#{$handler_counter += 1} < Handlers::Ruby::#{sklass} handles /^class/ #{stmts} def process; MethodObject.new(:root, :FOO) end end eof end def test_handler(file, stmts, creates = true, parser_type = :ruby) Registry.clear expect(Registry.at('#FOO')).to be nil create_handler(stmts, parser_type) parse(file, parser_type) expect(Registry.at('#FOO')).send(creates ? :not_to : :to, be_nil) Handlers::Base.subclasses.delete_if {|k,v| k.to_s =~ /^InFileHandler/ } end [:ruby, :ruby18].each do |parser_type| next if parser_type == :ruby && LEGACY_PARSER describe "Parser type = #{parser_type.inspect}" do it "allows handler to be specific to a file" do test_handler 'file_a.rb', 'in_file "file_a.rb"', true, parser_type end it "ignores handler if filename does not match" do test_handler 'file_b.rb', 'in_file "file_a.rb"', false, parser_type end it "only tests filename part when given a String" do test_handler '/path/to/file_a.rb', 'in_file "/to/file_a.rb"', false, parser_type end it "tests exact match for entire String" do test_handler 'file_a.rb', 'in_file "file"', false, parser_type end it "allows a Regexp as argument and test against full path" do test_handler 'file_a.rbx', 'in_file /\.rbx$/', true, parser_type test_handler '/path/to/file_a.rbx', 'in_file /\/to\/file_/', true, parser_type test_handler '/path/to/file_a.rbx', 'in_file /^\/path/', true, parser_type end it "allows multiple in_file declarations" do stmts = 'in_file "x"; in_file /y/; in_file "foo.rb"' test_handler 'foo.rb', stmts, true, parser_type test_handler 'xyzzy.rb', stmts, true, parser_type test_handler 'x', stmts, true, parser_type end end end end end yard-master/spec/handlers/c/000077500000000000000000000000001265676644000163025ustar00rootroot00000000000000yard-master/spec/handlers/c/alias_handler_spec.rb000066400000000000000000000017211265676644000224300ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::AliasHandler do it "allows defining of aliases (rb_define_alias)" do parse <<-eof /* FOO */ VALUE foo(VALUE x) { int value = x; } void Init_Foo() { rb_cFoo = rb_define_class("Foo", rb_cObject); rb_define_method(rb_cFoo, "foo", foo, 1); rb_define_alias(rb_cFoo, "bar", "foo"); } eof expect(Registry.at('Foo#bar')).to be_is_alias expect(Registry.at('Foo#bar').docstring).to eq 'FOO' end it "allows defining of aliases (rb_define_alias) of attributes" do parse <<-eof /* FOO */ VALUE foo(VALUE x) { int value = x; } void Init_Foo() { rb_cFoo = rb_define_class("Foo", rb_cObject); rb_define_attr(rb_cFoo, "foo", 1, 0); rb_define_alias(rb_cFoo, "foo?", "foo"); } eof expect(Registry.at('Foo#foo')).to be_reader expect(Registry.at('Foo#foo?')).to be_is_alias end end yard-master/spec/handlers/c/attribute_handler_spec.rb000066400000000000000000000022001265676644000233330ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::AttributeHandler do def run(read, write, commented = nil) parse <<-eof /* FOO */ VALUE foo(VALUE x) { int value = x; } void Init_Foo() { rb_cFoo = rb_define_class("Foo", rb_cObject); #{commented ? '/*' : ''} rb_define_attr(rb_cFoo, "foo", #{read}, #{write}); #{commented ? '*/' : ''} } eof end it "handles readonly attribute (rb_define_attr)" do run(1, 0) expect(Registry.at('Foo#foo')).to be_reader expect(Registry.at('Foo#foo=')).to be nil end it "handles writeonly attribute (rb_define_attr)" do run(0, 1) expect(Registry.at('Foo#foo')).to be nil expect(Registry.at('Foo#foo=')).to be_writer end it "handles readwrite attribute (rb_define_attr)" do run(1, 1) expect(Registry.at('Foo#foo')).to be_reader expect(Registry.at('Foo#foo=')).to be_writer end it "handles commented writeonly attribute (/* rb_define_attr */)" do run(1, 1, true) expect(Registry.at('Foo#foo')).to be_reader expect(Registry.at('Foo#foo=')).to be_writer end end yard-master/spec/handlers/c/class_handler_spec.rb000066400000000000000000000044511265676644000224470ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::ClassHandler do it "registers classes" do parse_init 'cFoo = rb_define_class("Foo", rb_cObject);' expect(Registry.at('Foo').type).to eq :class end it "registers classes under namespaces" do parse_init <<-EOF cBar = rb_define_class("Bar", rb_cObject); cFoo = rb_define_class_under(cBar, "Foo", rb_cObject); EOF expect(Registry.at('Bar::Foo').type).to eq :class end it "remembers symbol defined with class" do parse_init(<<-eof) cXYZ = rb_define_class("Foo", rb_cObject); rb_define_method(cXYZ, "bar", bar, 0); eof expect(Registry.at('Foo').type).to eq :class expect(Registry.at('Foo#bar')).not_to be nil end it "looks up superclass symbol name" do parse_init(<<-eof) cXYZ = rb_define_class("Foo", rb_cObject); cBar = rb_define_class("Bar", cXYZ); eof expect(Registry.at('Bar').superclass).to eq Registry.at('Foo') end it "uses superclass symbol name as proxy if not found" do parse_init(<<-eof) // cXYZ = rb_define_class("Foo", rb_cObject); cBar = rb_define_class("Bar", cXYZ); eof expect(Registry.at('Bar').superclass).to eq P('XYZ') end it "does not associate declaration comments as class docstring" do parse_init(<<-eof) /* Docstring! */ cFoo = rb_define_class("Foo", cObject); eof expect(Registry.at('Foo').docstring).to be_blank end it "associates a file with the declaration" do parse_init(<<-eof) cFoo = rb_define_class("Foo", cObject); eof expect(Registry.at('Foo').file).to eq '(stdin)' expect(Registry.at('Foo').line).to eq 2 end it "properly handles Proxy superclasses" do parse_init <<-eof mFoo = rb_define_module("Foo"); cBar = rb_define_class_under(mFoo, "Bar", rb_cBar); eof expect(Registry.at('Foo::Bar').type).to eq :class expect(Registry.at('Foo::Bar').superclass).to eq P('Bar') expect(Registry.at('Foo::Bar').superclass.type).to eq :class end it "resolves namespace variable names across multiple files" do parse_multi_file_init( 'cBar = rb_define_class_under(cFoo, "Bar", rb_cObject);', 'cFoo = rb_define_class("Foo", rb_cObject);' ) expect(Registry.at('Foo::Bar').type).to eq :class end end yard-master/spec/handlers/c/constant_handler_spec.rb000066400000000000000000000037761265676644000232040ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::ConstantHandler do it "registers constants" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_const(mFoo, "FOO", ID2SYM(100)); eof expect( Registry.at('Foo::FOO').type).to eq :constant end it "looks for override comments" do parse <<-eof /* Document-const: FOO * Document-const: Foo::BAR * Foo bar! */ void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_const(mFoo, "FOO", ID2SYM(100)); rb_define_const(mFoo, "BAR", ID2SYM(101)); } eof foo = Registry.at('Foo::FOO') expect(foo.type).to eq :constant expect(foo.docstring).to eq 'Foo bar!' expect(foo.value).to eq 'ID2SYM(100)' expect(foo.file).to eq '(stdin)' expect(foo.line).to eq 8 bar = Registry.at('Foo::BAR') expect(bar.type).to eq :constant expect(bar.docstring).to eq 'Foo bar!' expect(bar.file).to eq '(stdin)' expect(bar.line).to eq 9 expect(bar.value).to eq 'ID2SYM(101)' end it "uses comment attached to declaration as fallback" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_const(mFoo, "FOO", ID2SYM(100)); // foobar! eof foo = Registry.at('Foo::FOO') expect(foo.value).to eq 'ID2SYM(100)' expect(foo.docstring).to eq 'foobar!' end it "allows the form VALUE: DOCSTRING to document value" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_const(mFoo, "FOO", ID2SYM(100)); // 100: foobar! eof foo = Registry.at('Foo::FOO') expect(foo.value).to eq '100' expect(foo.docstring).to eq 'foobar!' end it "allows escaping of backslashes in VALUE: DOCSTRING syntax" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_const(mFoo, "FOO", ID2SYM(100)); // 100\\:x\\:y: foobar:x! eof foo = Registry.at('Foo::FOO') expect(foo.value).to eq '100:x:y' expect(foo.docstring).to eq 'foobar:x!' end endyard-master/spec/handlers/c/init_handler_spec.rb000066400000000000000000000022271265676644000223040ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::InitHandler do it "adds documentation in Init_ClassName() to ClassName" do parse(<<-eof) // Bar! void Init_A() { rb_cA = rb_define_class("A", rb_cObject); } eof expect(Registry.at('A').docstring).to eq 'Bar!' end it "does not add documentation if ClassName is not created in Init" do parse(<<-eof) // Bar! void Init_A() { } eof expect(Registry.at('A')).to be nil end it "does not overwrite override comment" do parse(<<-eof) /* Document-class: A * Foo! */ // Bar! void Init_A() { rb_cA = rb_define_class("A", rb_cObject); } eof expect(Registry.at('A').docstring).to eq 'Foo!' end it "checks non-Init methods for declarations too" do parse(<<-eof) void foo(int x, int y, char *name) { rb_cB = rb_define_class("B", rb_cObject); rb_define_method(rb_cB, "foo", foo_impl, 0); } eof expect(Registry.at('B')).to be_a(CodeObjects::ClassObject) expect(Registry.at('B#foo')).to be_a(CodeObjects::MethodObject) end end yard-master/spec/handlers/c/method_handler_spec.rb000066400000000000000000000257321265676644000226270ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::MethodHandler do it "registers methods" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "bar", bar, 0); eof expect(Registry.at('Foo#bar')).not_to be nil expect(Registry.at('Foo#bar').visibility).to eq :public end it "registers private methods" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_private_method(mFoo, "bar", bar, 0); eof expect(Registry.at('Foo#bar')).not_to be nil expect(Registry.at('Foo#bar').visibility).to eq :private end it "registers singleton methods" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_singleton_method(mFoo, "bar", bar, 0); eof expect(Registry.at('Foo.bar')).not_to be nil expect(Registry.at('Foo.bar').visibility).to eq :public end it "registers module functions" do parse <<-eof /* DOCSTRING * @return [String] foo! */ static VALUE bar(VALUE self) { x(); y(); z(); } void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_module_function(mFoo, "bar", bar, 0); } eof bar_c = Registry.at('Foo.bar') bar_i = Registry.at('Foo#bar') expect(bar_c).to be_module_function expect(bar_c.visibility).to eq :public expect(bar_c.docstring).to eq "DOCSTRING" expect(bar_c.tag(:return).object).to eq bar_c expect(bar_c.source).to eq "static VALUE bar(VALUE self) { x(); y(); z(); }" expect(bar_i).not_to be_module_function expect(bar_i.visibility).to eq :private expect(bar_i.docstring).to eq "DOCSTRING" expect(bar_i.tag(:return).object).to eq bar_i expect(bar_i.source).to eq bar_c.source end it "registers global functions into Kernel" do parse_init 'rb_define_global_function("bar", bar, 0);' expect(Registry.at('Kernel#bar')).not_to be nil end it "looks for symbol containing method source" do parse <<-eof static VALUE foo(VALUE self) { x(); y(); z(); } VALUE bar() { a(); b(); c(); } void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo", foo, 0); rb_define_method(mFoo, "bar", bar, 0); } eof foo = Registry.at('Foo#foo') bar = Registry.at('Foo#bar') expect(foo.source).to eq "static VALUE foo(VALUE self) { x(); y(); z(); }" expect(foo.file).to eq '(stdin)' expect(foo.line).to eq 1 expect(bar.source).to eq "VALUE bar() { a(); b(); c(); }" expect(bar.file).to eq '(stdin)' expect(bar.line).to eq 2 end it "finds docstrings attached to method symbols" do parse <<-eof /* DOCSTRING */ static VALUE foo(VALUE self) { x(); y(); z(); } void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo", foo, 0); } eof foo = Registry.at('Foo#foo') expect(foo.docstring).to eq 'DOCSTRING' end it "uses declaration comments as docstring if there are no others" do parse <<-eof static VALUE foo(VALUE self) { x(); y(); z(); } void Init_Foo() { mFoo = rb_define_module("Foo"); /* DOCSTRING */ rb_define_method(mFoo, "foo", foo, 0); // DOCSTRING! rb_define_method(mFoo, "bar", bar, 0); } eof foo = Registry.at('Foo#foo') expect(foo.docstring).to eq 'DOCSTRING' bar = Registry.at('Foo#bar') expect(bar.docstring).to eq 'DOCSTRING!' end it "looks for symbols in other file" do other = <<-eof /* DOCSTRING! */ static VALUE foo() { x(); } eof expect(File).to receive(:read).with('other.c').and_return(other) parse <<-eof void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo", foo, 0); // in other.c } eof foo = Registry.at('Foo#foo') expect(foo.docstring).to eq 'DOCSTRING!' expect(foo.file).to eq 'other.c' expect(foo.line).to eq 2 expect(foo.source).to eq 'static VALUE foo() { x(); }' end it "allows extra file to include /'s and other filename characters" do expect(File).to receive(:read).at_least(1).times.with('ext/a-file.c').and_return(<<-eof) /* FOO */ VALUE foo(VALUE x) { int value = x; } /* BAR */ VALUE bar(VALUE x) { int value = x; } eof parse_init <<-eof rb_define_method(rb_cFoo, "foo", foo, 1); /* in ext/a-file.c */ rb_define_global_function("bar", bar, 1); /* in ext/a-file.c */ eof expect(Registry.at('Foo#foo').docstring).to eq 'FOO' expect(Registry.at('Kernel#bar').docstring).to eq 'BAR' end it "warns if other file can't be found" do expect(log).to receive(:warn).with(/Missing source file `other.c' when parsing Foo#foo/) parse <<-eof void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo", foo, 0); // in other.c } eof end it "looks at override comments for docstring" do parse <<-eof /* Document-method: Foo::foo * Document-method: new * Document-method: Foo::Bar#baz * Foo bar! */ // init comments void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo", foo, 0); rb_define_method(mFoo, "initialize", foo, 0); mBar = rb_define_module_under(mFoo, "Bar"); rb_define_method(mBar, "baz", foo, 0); } eof expect(Registry.at('Foo#foo').docstring).to eq 'Foo bar!' expect(Registry.at('Foo#initialize').docstring).to eq 'Foo bar!' expect(Registry.at('Foo::Bar#baz').docstring).to eq 'Foo bar!' end it "looks at overrides in other files" do other = <<-eof /* Document-method: Foo::foo * Document-method: new * Document-method: Foo::Bar#baz * Foo bar! */ eof expect(File).to receive(:read).with('foo/bar/other.c').and_return(other) src = <<-eof void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo", foo, 0); // in foo/bar/other.c rb_define_method(mFoo, "initialize", foo, 0); // in foo/bar/other.c mBar = rb_define_module_under(mFoo, "Bar"); // in foo/bar/other.c rb_define_method(mBar, "baz", foo, 0); // in foo/bar/other.c } eof parse(src, 'foo/bar/baz/init.c') expect(Registry.at('Foo#foo').docstring).to eq 'Foo bar!' expect(Registry.at('Foo#initialize').docstring).to eq 'Foo bar!' expect(Registry.at('Foo::Bar#baz').docstring).to eq 'Foo bar!' end it "adds return tag on methods ending in '?'" do parse <<-eof /* DOCSTRING */ static VALUE foo(VALUE self) { x(); y(); z(); } void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo?", foo, 0); } eof foo = Registry.at('Foo#foo?') expect(foo.docstring).to eq 'DOCSTRING' expect(foo.tag(:return).types).to eq ['Boolean'] end it "does not add return tag if return tags exist" do parse <<-eof // @return [String] foo static VALUE foo(VALUE self) { x(); y(); z(); } void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "foo?", foo, 0); } eof foo = Registry.at('Foo#foo?') expect(foo.tag(:return).types).to eq ['String'] end it "handles casted method names" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "bar", (METHOD)bar, 0); rb_define_global_function("baz", (METHOD)baz, 0); eof expect(Registry.at('Foo#bar')).not_to be nil expect(Registry.at('Kernel#baz')).not_to be nil end it "extracts at regular method parameters from C function signatures" do parse <<-eof static VALUE noargs_func(VALUE self) { return Qnil; } static VALUE twoargs_func(VALUE self, VALUE a, VALUE b) { return a; } void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "noargs", noargs_func, 0); rb_define_method(mFoo, "twoargs", twoargs_func, 2); } eof expect(Registry.at('Foo#noargs').parameters).to be_empty expect(Registry.at('Foo#twoargs').parameters).to eq [['a', nil], ['b', nil]] end it "extracts at varargs method parameters from C function signatures" do parse <<-eof static VALUE varargs_func(int argc, VALUE *argv, VALUE self) { return self; } /* let's see if parser is robust in the face of strange spacing */ static VALUE varargs_func2( int argc , VALUE * argv ,VALUE self ) {return self;} void Init_Foo() { mFoo = rb_define_module("Foo"); rb_define_method(mFoo, "varargs", varargs_func, -1); rb_define_method( mFoo ,"varargs2",varargs_func2 ,-1); } eof expect(Registry.at('Foo#varargs').parameters).to eq [['*args', nil]] expect(Registry.at('Foo#varargs2').parameters).to eq [['*args', nil]] end it "is not too strict or too loose about matching override comments to methods" do parse <<-eof /* Document-method: Foo::foo * Document-method: new * Document-method: Foo::Bar#baz * Foo bar! */ void Init_Foo() { mFoo = rb_define_module("Foo"); mBar = rb_define_module_under(mFoo, "Bar"); rb_define_method(mFoo, "foo", foo, 0); rb_define_singleton_method(mFoo, "foo", foo, 0); rb_define_method(mBar, "foo", foo, 0); rb_define_singleton_method(mBar, "foo", foo, 0); rb_define_method(mFoo, "initialize", foo, 0); rb_define_method(mBar, "initialize", foo, 0); rb_define_method(mFoo, "baz", foo, 0); rb_define_singleton_method(mFoo, "baz", foo, 0); rb_define_method(mBar, "baz", foo, 0); rb_define_singleton_method(mBar, "baz", foo, 0); } eof expect(Registry.at('Foo#foo').docstring).to eq 'Foo bar!' expect(Registry.at('Foo.foo').docstring).to eq 'Foo bar!' expect(Registry.at('Foo::Bar#foo').docstring).to be_empty expect(Registry.at('Foo::Bar.foo').docstring).to be_empty expect(Registry.at('Foo#initialize').docstring).to eq 'Foo bar!' expect(Registry.at('Foo::Bar#initialize').docstring).to eq 'Foo bar!' expect(Registry.at('Foo#baz').docstring).to be_empty expect(Registry.at('Foo.baz').docstring).to be_empty expect(Registry.at('Foo::Bar#baz').docstring).to eq 'Foo bar!' expect(Registry.at('Foo::Bar.baz').docstring).to be_empty end it "recognizes core Ruby classes and modules provided by ruby.h" do parse_init <<-eof rb_define_method(rb_cFixnum, "popcount", fix_popcount, 0); rb_define_private_method(rb_mKernel, "pp", obj_pp, 0); rb_define_method(rb_mEnumerable, "to_hash", enum_to_hash, 0); eof expect(Registry.at('Fixnum').type).to eq :class expect(Registry.at('Fixnum#popcount').type).to eq :method expect(Registry.at('Object').type).to eq :class # Methods defined on Kernel are treated as if they were defined on Object expect(Registry.at('Object#pp').type).to eq :method expect(Registry.at('Enumerable').type).to eq :module expect(Registry.at('Enumerable#to_hash').type).to eq :method end end yard-master/spec/handlers/c/mixin_handler_spec.rb000066400000000000000000000014441265676644000224650ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::MixinHandler do it "adds includes to modules or classes" do parse_init <<-eof mFoo = rb_define_module("Foo"); cBar = rb_define_class("Bar", rb_cObject); mBaz = rb_define_module("Baz"); rb_include_module(cBar, mFoo); rb_include_module(mBaz, mFoo); eof foo = Registry.at('Foo') bar = Registry.at('Bar') baz = Registry.at('Baz') expect(bar.mixins(:instance)).to eq [foo] expect(baz.mixins(:instance)).to eq [foo] end it "adds include as proxy if symbol lookup fails" do parse_init <<-eof mFoo = rb_define_module("Foo"); rb_include_module(mFoo, mXYZ); eof foo = Registry.at('Foo') expect(foo.mixins(:instance)).to eq [P('XYZ')] end end yard-master/spec/handlers/c/module_handler_spec.rb000066400000000000000000000037071265676644000226320ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::ClassHandler do it "registers modules" do parse_init 'mFoo = rb_define_module("Foo");' expect(Registry.at('Foo').type).to eq :module end it "registers classes under namespaces" do parse_init <<-EOF mBar = rb_define_module("Bar"); mFoo = rb_define_module_under(mBar, "Foo"); EOF expect(Registry.at('Bar::Foo').type).to eq :module end it "remembers symbol defined with class" do parse_init(<<-eof) cXYZ = rb_define_module("Foo"); rb_define_method(cXYZ, "bar", bar, 0); eof expect(Registry.at('Foo').type).to eq :module expect(Registry.at('Foo#bar')).not_to be nil end it "does not associate declaration comments as module docstring" do parse_init(<<-eof) /* Docstring! */ mFoo = rb_define_module("Foo"); eof expect(Registry.at('Foo').docstring).to be_blank end it "associates a file with the declaration" do parse_init(<<-eof) mFoo = rb_define_module("Foo"); eof expect(Registry.at('Foo').file).to eq '(stdin)' expect(Registry.at('Foo').line).to eq 2 end it "resolves namespace variable names across multiple files" do parse_multi_file_init( 'mBar = rb_define_module_under(mFoo, "Bar");', 'mFoo = rb_define_module("Foo");' ) expect(Registry.at('Foo::Bar').type).to eq :module end it "raises undoc error if a class is defined under a namespace that cannot be resolved" do with_parser(:c) do undoc_error <<-eof void Init_Foo() { mFoo = rb_define_class_under(invalid, "Foo", rb_cObject); } eof end end unless ENV['LEGACY'] it "raises undoc error if a module is defined under a namespace that cannot be resolved" do with_parser(:c) do undoc_error <<-eof void Init_Foo() { mFoo = rb_define_module_under(invalid, "Foo"); } eof end end unless ENV['LEGACY'] end yard-master/spec/handlers/c/override_comment_handler_spec.rb000066400000000000000000000023511265676644000247000ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::OverrideCommentHandler do [:class, :module].each do |type| it "handles Document-#{type}" do parse(<<-eof) void something; /* Document-#{type}: A * Foo bar baz */ void eof expect(Registry.at('A').type).to eq type expect(Registry.at('A').docstring).to eq 'Foo bar baz' expect(Registry.at('A').file).to eq '(stdin)' expect(Registry.at('A').line).to eq 2 end end it "handles multiple class/module combinations" do parse(<<-eof) /* Document-class: A * Document-class: B * Document-module: C * Foo bar baz */ eof expect(Registry.at('A').docstring).to eq 'Foo bar baz' expect(Registry.at('B').docstring).to eq 'Foo bar baz' expect(Registry.at('C').docstring).to eq 'Foo bar baz' expect(Registry.at('C').type).to eq :module end it "handles Document-class with inheritance" do parse(<<-eof) /* Document-class: A < B * Foo bar baz */ void eof obj = Registry.at('A') expect(obj.type).to eq :class expect(obj.docstring).to eq 'Foo bar baz' expect(obj.superclass).to eq P('B') end end yard-master/spec/handlers/c/path_handler_spec.rb000066400000000000000000000023051265676644000222720ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Handlers::C::PathHandler do it "tracks variable names defined under namespaces" do parse_init <<-eof mFoo = rb_define_module("Foo"); cBar = rb_define_class_under(mFoo, "Bar", rb_cObject); rb_define_method(cBar, "foo", foo, 1); eof expect(Registry.at('Foo::Bar')).not_to be nil expect(Registry.at('Foo::Bar#foo')).not_to be nil end it "tracks variable names defined under namespaces" do parse_init <<-eof mFoo = rb_define_module("Foo"); cBar = rb_define_class_under(mFoo, "Bar", rb_cObject); mBaz = rb_define_module_under(cBar, "Baz"); rb_define_method(mBaz, "foo", foo, 1); eof expect(Registry.at('Foo::Bar::Baz')).not_to be nil expect(Registry.at('Foo::Bar::Baz#foo')).not_to be nil end it "handles rb_path2class() calls" do parse_init <<-eof somePath = rb_path2class("Foo::Bar::Baz") mFoo = rb_define_module("Foo"); cBar = rb_define_class_under(mFoo, "Bar", rb_cObject); mBaz = rb_define_module_under(cBar, "Baz"); rb_define_method(somePath, "foo", foo, 1); eof expect(Registry.at('Foo::Bar::Baz#foo')).not_to be nil end end yard-master/spec/handlers/c/spec_helper.rb000066400000000000000000000012371265676644000211230ustar00rootroot00000000000000require File.dirname(__FILE__) + "/../spec_helper" def parse(src, file = '(stdin)') YARD::Registry.clear parser = YARD::Parser::SourceParser.new(:c) parser.file = file parser.parse(StringIO.new(src)) end def parse_init(src) YARD::Registry.clear YARD.parse_string("void Init_Foo() {\n#{src}\n}", :c) end def parse_multi_file_init(*srcs) YARD::Registry.clear srcs = srcs.map {|src| StringIO.new("void Init_Foo() {\n#{src}\n}") } orig_type = YARD::Parser::SourceParser.parser_type YARD::Parser::SourceParser.parser_type = :c YARD::Parser::OrderedParser.new(OpenStruct.new, srcs).parse ensure YARD::Parser::SourceParser.parser_type = orig_type end yard-master/spec/handlers/c/struct_handler_spec.rb000066400000000000000000000007001265676644000226570ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Handlers::C::StructHandler do after { Registry.clear } it "handles Struct class definitions" do parse_init <<-eof rb_cRange = rb_struct_define_without_accessor( "Range", rb_cFoo, range_alloc, "begin", "end", "excl", NULL); eof expect(Registry.at('Range').type).to eq :class expect(Registry.at('Range').superclass).to eq P(:Foo) end endyard-master/spec/handlers/class_condition_handler_spec.rb000066400000000000000000000036341265676644000242750ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}ClassConditionHandler" do before(:all) { parse_file :class_condition_handler_001, __FILE__ } def verify_method(*names) names.each {|name| expect(Registry.at("A##{name}")).not_to be nil } names.each {|name| expect(Registry.at("A##{name}not")).to be nil } end def no_undoc_error(code) expect { StubbedSourceParser.parse_string(code) }.not_to raise_error end it "parses all unless blocks for complex conditions" do verify_method :g end it "does not parse conditionals inside methods" do verify_method :h end it "only parses then block if condition is literal value `true`" do verify_method :p end it "only parses then block if condition is literal integer != 0" do verify_method :o end it "inverts block to parse for literal condition if it's an unless block" do verify_method :e end it "handles conditions such as 'defined? VALUE'" do verify_method :j, :k end it "parses all if/elsif blocks for complex conditions" do verify_method :a, :b, :c, :d end it "parses else block if condition is literal value `false`" do verify_method :q end it "only parses else block if condition is literal integer == 0" do verify_method :n end it "maintains visibility and scope state inside condition" do expect(Registry.at('A#m').visibility).to eq :private expect(Registry.at('A#mnot').visibility).to eq :private end it "does not fail on complex conditions" do expect(log).not_to receive(:warn) expect(log).not_to receive(:error) no_undoc_error "if defined?(A) && defined?(B); puts 'hi' end" no_undoc_error(<<-eof) (<<-TEST) unless defined?(ABCD_MODEL_TEST) 'String' TEST eof no_undoc_error "if caller.none? { |l| l =~ %r{lib/rails/generators\\.rb:(\\d+):in `lookup!'$} }; end" end endyard-master/spec/handlers/class_handler_spec.rb000066400000000000000000000213301265676644000222200ustar00rootroot00000000000000require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}ClassHandler" do before(:all) { parse_file :class_handler_001, __FILE__ } it "parses a class block with docstring" do expect(P("A").docstring).to eq "Docstring" end it "handles complex class names" do expect(P("A::B::C")).not_to eq nil end it "handles the subclassing syntax" do expect(P("A::B::C").superclass).to eq P(:String) expect(P("A::X").superclass).to eq Registry.at("A::B::C") end it "interprets class << self as a class level block" do expect(P("A.classmethod1")).not_to eq nil end it "interprets class << ClassName as a class level block in ClassName's namespace" do expect(P("A::B::C.Hello")).to be_instance_of(CodeObjects::MethodObject) end it "makes visibility public when parsing a block" do expect(P("A::B::C#method1").visibility).to eq :public end it "sets superclass type to :class if it is a Proxy" do expect(P("A::B::C").superclass.type).to eq :class end it "looks for a superclass before creating the class if it shares the same name" do expect(P('B::A').superclass).to eq P('A') end it "handles class definitions in the form ::ClassName" do expect(Registry.at("MyRootClass")).not_to be nil end it "handles superclass as a constant-style method (camping style < R /path/)" do expect(P('Test1').superclass).to eq P(:R) expect(P('Test2').superclass).to eq P(:R) expect(P('Test6').superclass).to eq P(:NotDelegateClass) end it "handles superclass with OStruct.new or Struct.new syntax (superclass should be OStruct/Struct)" do expect(P('Test3').superclass).to eq P(:Struct) expect(P('Test4').superclass).to eq P(:OStruct) end it "handles DelegateClass(CLASSNAME) superclass syntax" do expect(P('Test5').superclass).to eq P(:Array) end it "handles a superclass of the same name in the form ::ClassName" do expect(P('Q::Logger').superclass).to eq P(:Logger) expect(P('Q::Foo').superclass).not_to eq P('Q::Logger') end ["CallMethod('test')", "VSD^#}}", 'not.aclass', 'self'].each do |klass| it "raises an UndocumentableError for invalid class '#{klass}'" do with_parser(:ruby18) { undoc_error "class #{klass}; end" } end end ['@@INVALID', 'hi', '$MYCLASS', 'AnotherClass.new'].each do |klass| it "raises an UndocumentableError for invalid superclass '#{klass}' but it should create the class." do expect(YARD::CodeObjects::ClassObject).to receive(:new).with(Registry.root, 'A') with_parser(:ruby18) { undoc_error "class A < #{klass}; end" } expect(Registry.at('A').superclass).to eq P(:Object) end end ['not.aclass', 'self', 'AnotherClass.new'].each do |klass| it "raises an UndocumentableError if the constant class reference 'class << SomeConstant' does not point to a valid class name" do with_parser(:ruby18) do undoc_error <<-eof CONST = #{klass} class << CONST; end eof end expect(Registry.at(klass)).to be nil end end it "documents 'class << SomeConstant' by using SomeConstant's value as a reference to the real class name" do expect(Registry.at('String.classmethod')).not_to be nil end it "allows class << SomeRubyClass to create the class if it does not exist" do expect(Registry.at('Symbol.toString')).not_to be nil end it "documents 'class Exception' without running into superclass issues" do Parser::SourceParser.parse_string <<-eof class Exception end eof expect(Registry.at(:Exception)).not_to be nil end it "documents 'class RT < XX::RT' with proper superclass even if XX::RT is a proxy" do expect(Registry.at(:RT)).not_to be nil expect(Registry.at(:RT).superclass).to eq P('XX::RT') end it "does not overwrite docstring with an empty one" do expect(Registry.at(:Zebra).docstring).to eq "Docstring 2" end it "turns 'class Const < Struct.new(:sym)' into class Const with attr :sym" do obj = Registry.at("Point") expect(obj).to be_kind_of(CodeObjects::ClassObject) attrs = obj.attributes[:instance] [:x, :y, :z].each do |key| expect(attrs).to have_key(key) expect(attrs[key][:read]).not_to be nil expect(attrs[key][:write]).not_to be nil end end it "turns 'class Const < Struct.new('Name', :sym)' into class Const with attr :sym" do obj = Registry.at("AnotherPoint") expect(obj).to be_kind_of(CodeObjects::ClassObject) attrs = obj.attributes[:instance] [:a, :b, :c].each do |key| expect(attrs).to have_key(key) expect(attrs[key][:read]).not_to be nil expect(attrs[key][:write]).not_to be nil end expect(Registry.at("XPoint")).to be nil end it "creates a Struct::Name class when class Const < Struct.new('Name', :sym) is found" do obj = Registry.at("Struct::XPoint") expect(obj).not_to be nil end it "attaches attribtues to the generated Struct::Name class when Struct.new('Name') is used" do obj = Registry.at("Struct::XPoint") attrs = obj.attributes[:instance] [:a, :b, :c].each do |key| expect(attrs).to have_key(key) expect(attrs[key][:read]).not_to be nil expect(attrs[key][:write]).not_to be nil end end it "uses @attr to set attribute descriptions on Struct subclasses" do obj = Registry.at("DoccedStruct#input") expect(obj.docstring).to eq "the input stream" end it "uses @attr to set attribute types on Struct subclasses" do obj = Registry.at("DoccedStruct#someproc") expect(obj).not_to be nil expect(obj.tag(:return)).not_to be nil expect(obj.tag(:return).types).to eq ["Proc", "#call"] end it "defaults types unspecified by @attr to Object on Struct subclasses" do obj = Registry.at("DoccedStruct#mode") expect(obj).not_to be nil expect(obj.tag(:return)).not_to be nil expect(obj.tag(:return).types).to eq ["Object"] end it "creates parameters for writers of Struct subclass's attributes" do obj = Registry.at("DoccedStruct#input=") expect(obj.tags(:param).size).to eq 1 expect(obj.tag(:param).types).to eq ["IO"] end ["SemiDoccedStruct", "NotAStruct"].each do |struct| describe("Attributes on a " + (struct == "NotAStruct" ? "class" : "struct")) do it "defines both readers and writers when @attr is used on Structs" do obj = Registry.at(struct) attrs = obj.attributes[:instance] expect(attrs[:first][:read]).not_to be nil expect(attrs[:first][:write]).not_to be nil end it "defines only a reader when only @attr_reader is used on Structs" do obj = Registry.at(struct) attrs = obj.attributes[:instance] expect(attrs[:second][:read]).not_to be nil expect(attrs[:second][:write]).to be nil end it "defines only a writer when only @attr_writer is used on Structs" do obj = Registry.at(struct) attrs = obj.attributes[:instance] expect(attrs[:third][:read]).to be nil expect(attrs[:third][:write]).not_to be nil end it "defines a reader with correct return types when @attr_reader is used on Structs" do obj = Registry.at("#{struct}#second") expect(obj.tag(:return).types).to eq ["Fixnum"] end it "defines a writer with correct parameter types when @attr_writer is used on Structs" do obj = Registry.at("#{struct}#third=") expect(obj.tag(:param).types).to eq ["Array"] end it "defines a reader and a writer when both @attr_reader and @attr_writer are used" do obj = Registry.at(struct) attrs = obj.attributes[:instance] expect(attrs[:fourth][:read]).not_to be nil expect(attrs[:fourth][:write]).not_to be nil end it "uses @attr_reader for the getter when both @attr_reader and @attr_writer are given" do obj = Registry.at("#{struct}#fourth") expect(obj.tag(:return).types).to eq ["#read"] end it "uses @attr_writer for the setter when both @attr_reader and @attr_writer are given" do obj = Registry.at("#{struct}#fourth=") expect(obj.tag(:param).types).to eq ["IO"] end it "extracts text from @attr_reader" do expect(Registry.at("#{struct}#fourth").docstring).to eq "returns a proc that reads" end it "extracts text from @attr_writer" do expect(Registry.at("#{struct}#fourth=").docstring).to eq "sets the proc that writes stuff" end end end it "inherits from a regular struct" do expect(Registry.at('RegularStruct').superclass).to eq P(:Struct) expect(Registry.at('RegularStruct2').superclass).to eq P(:Struct) end it "handles inheritance from 'self'" do expect(Registry.at('Outer1::Inner1').superclass).to eq Registry.at('Outer1') end endyard-master/spec/handlers/class_variable_handler_spec.rb000066400000000000000000000006261265676644000240720ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}ClassVariableHandler" do before(:all) { parse_file :class_variable_handler_001, __FILE__ } it "does not parse class variables inside methods" do obj = Registry.at("A::B::@@somevar") expect(obj.source).to eq "@@somevar = \"hello\"" expect(obj.value).to eq '"hello"' end endyard-master/spec/handlers/constant_handler_spec.rb000066400000000000000000000045541265676644000227550ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}ConstantHandler" do before(:all) { parse_file :constant_handler_001, __FILE__ } it "does not parse constants inside methods" do expect(Registry.at("A::B::SOMECONSTANT").source).to eq "SOMECONSTANT= \"hello\"" end it "only parses valid constants" do expect(Registry.at("A::B::notaconstant")).to be nil end it "maintains newlines" do expect(Registry.at("A::B::MYCONSTANT").value.gsub("\r", "")).to eq "A +\nB +\nC +\nD" end it "turns Const = Struct.new(:sym) into class Const with attr :sym" do obj = Registry.at("MyClass") expect(obj).to be_kind_of(CodeObjects::ClassObject) attrs = obj.attributes[:instance] [:a, :b, :c].each do |key| expect(attrs).to have_key(key) expect(attrs[key][:read]).not_to be nil expect(attrs[key][:write]).not_to be nil end end it "turns Const = Struct.new('Name', :sym) into class Const with attr :sym" do obj = Registry.at("NotMyClass") expect(obj).to be_kind_of(CodeObjects::ClassObject) attrs = obj.attributes[:instance] [:b, :c].each do |key| expect(attrs).to have_key(key) expect(attrs[key][:read]).not_to be nil expect(attrs[key][:write]).not_to be nil end expect(Registry.at("NotMyClass2")).to be nil end it "turns Const = Struct.new into empty struct" do obj = Registry.at("MyEmptyStruct") expect(obj).not_to be nil expect(obj.attributes[:instance]).to be_empty end it "maintains docstrings on structs defined via constants" do obj = Registry.at("DocstringStruct") expect(obj).not_to be nil expect(obj.docstring).to eq "A crazy struct." expect(obj.attributes[:instance]).not_to be_empty a1 = Registry.at("DocstringStruct#bar") a2 = Registry.at("DocstringStruct#baz") expect(a1.docstring).to eq "An attr" expect(a1.tag(:return).types).to eq ["String"] expect(a2.docstring).to eq "Another attr" expect(a2.tag(:return).types).to eq ["Number"] a3 = Registry.at("DocstringStruct#new_syntax") expect(a3.docstring).to eq "Attribute defined with the new syntax" expect(a3.tag(:return).types).to eq ["Symbol"] end it "raises undocumentable error in 1.9 parser for Struct.new assignment to non-const" do undoc_error "nonconst = Struct.new" end unless LEGACY_PARSER endyard-master/spec/handlers/dsl_handler_spec.rb000066400000000000000000000150751265676644000217060ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' require 'ostruct' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}DSLHandler" do before(:all) { parse_file :dsl_handler_001, __FILE__ } it "creates a readable attribute when @!attribute r is found" do obj = Registry.at('Foo#attr1') expect(obj).not_to be nil expect(obj).to be_reader expect(obj.tag(:return).types).to eq ['Numeric'] expect(Registry.at('Foo#attr1=')).to be nil end it "creates a writable attribute when @!attribute w is found" do obj = Registry.at('Foo#attr2=') expect(obj).not_to be nil expect(obj).to be_writer expect(Registry.at('Foo#attr2')).to be nil end it "defaults to readwrite @!attribute" do obj = Registry.at('Foo#attr3') expect(obj).not_to be nil expect(obj).to be_reader obj = Registry.at('Foo#attr3=') expect(obj).not_to be nil expect(obj).to be_writer end it "allows @!attribute to define alternate method name" do expect(Registry.at('Foo#attr4')).to be nil expect(Registry.at('Foo#custom')).not_to be nil end it "defaults to creating an instance method for any DSL method with special tags" do obj = Registry.at('Foo#implicit0') expect(obj).not_to be nil expect(obj.docstring).to eq "IMPLICIT METHOD!" expect(obj.tag(:return).types).to eq ['String'] end it "recognizes implicit docstring when it has scope tag" do obj = Registry.at("Foo.implicit1") expect(obj).not_to be nil expect(obj.scope).to eq :class end it "recognizes implicit docstring when it has visibility tag" do obj = Registry.at("Foo#implicit2") expect(obj).not_to be nil expect(obj.visibility).to eq :protected end it "does not recognize implicit docstring with any other normal tag" do obj = Registry.at('Foo#implicit_invalid3') expect(obj).to be nil end it "sets the method name when using @!method" do obj = Registry.at('Foo.xyz') expect(obj).not_to be nil expect(obj.signature).to eq 'def xyz(a, b, c)' expect(obj.parameters).to eq [['a', nil], ['b', nil], ['c', nil]] expect(obj.source).to eq 'foo_bar' expect(obj.docstring).to eq 'The foo method' end it "allows setting of @!scope" do expect(Registry.at('Foo.xyz').scope).to eq :class end it "creates module function if @!scope is module" do mod_c = Registry.at('Foo.modfunc1') mod_i = Registry.at('Foo#modfunc1') expect(mod_c.scope).to eq :class expect(mod_i.visibility).to eq :private end it "allows setting of @!visibility" do expect(Registry.at('Foo.xyz').visibility).to eq :protected end it "ignores DSL methods without tags" do expect(Registry.at('Foo#implicit_invalid')).to be nil end it "accepts a DSL method without tags if it has hash_flag (##)" do expect(Registry.at('Foo#implicit_valid')).not_to be nil expect(Registry.at('Foo#implicit_invalid2')).to be nil end it "allows creation of macros" do macro = CodeObjects::MacroObject.find('property') expect(macro).not_to be nil expect(macro).not_to be_attached expect(macro.method_object).to be nil end it "handles macros with no parameters to expand" do expect(Registry.at('Foo#none')).not_to be nil expect(Registry.at('Baz#none').signature).to eq 'def none(foo, bar)' end it "expands $N on method definitions" do expect(Registry.at('Foo#regular_meth').docstring).to eq 'a b c' end it "applies new macro docstrings on new objects" do obj = Registry.at('Foo#name') expect(obj).not_to be nil expect(obj.source).to eq 'property :name, String, :a, :b, :c' expect(obj.signature).to eq 'def name(a, b, c)' expect(obj.docstring).to eq 'A property that is awesome.' expect(obj.tag(:param).name).to eq 'a' expect(obj.tag(:param).text).to eq 'first parameter' expect(obj.tag(:return).types).to eq ['String'] expect(obj.tag(:return).text).to eq 'the property name' end it "allows reuse of named macros" do obj = Registry.at('Foo#age') expect(obj).not_to be nil expect(obj.source).to eq 'property :age, Fixnum, :value' expect(obj.signature).to eq 'def age(value)' expect(obj.docstring).to eq 'A property that is awesome.' expect(obj.tag(:param).name).to eq 'value' expect(obj.tag(:param).text).to eq 'first parameter' expect(obj.tag(:return).types).to eq ['Fixnum'] expect(obj.tag(:return).text).to eq 'the property age' end it "knows about method information on DSL with macro expansion" do expect(Registry.at('Foo#right_name')).not_to be nil expect(Registry.at('Foo#right_name').source).to eq 'implicit_with_different_method_name :wrong, :right' expect(Registry.at('Foo#wrong_name')).to be nil end it "uses attached macros" do macro = CodeObjects::MacroObject.find('parser') expect(macro.macro_data).to eq "@!method $1(opts = {})\n@return NOTHING!" expect(macro).not_to be nil expect(macro).to be_attached expect(macro.method_object).to eq P('Foo.parser') obj = Registry.at('Foo#c_parser') expect(obj).not_to be nil expect(obj.docstring).to eq "" expect(obj.signature).to eq "def c_parser(opts = {})" expect(obj.docstring.tag(:return).text).to eq "NOTHING!" end it "appends docstring on DSL method to attached macro" do obj = Registry.at('Foo#d_parser') expect(obj).not_to be nil expect(obj.docstring).to eq "Another docstring" expect(obj.signature).to eq "def d_parser(opts = {})" expect(obj.docstring.tag(:return).text).to eq "NOTHING!" end it "only uses attached macros on methods defined in inherited hierarchy" do expect(Registry.at('Bar#x_parser')).to be nil expect(Registry.at('Baz#y_parser')).not_to be nil end it "looks through mixins for attached macros" do meth = Registry.at('Baz#mixin_method') expect(meth).not_to be nil expect(meth.docstring).to eq 'DSL method mixin_method' end it "handles top-level DSL methods" do obj = Registry.at('#my_other_method') expect(obj).not_to be nil expect(obj.docstring).to eq "Docstring for method" end it "handles Constant.foo syntax" do obj = Registry.at('#beep') expect(obj).not_to be nil expect(obj.signature).to eq 'def beep(a, b, c)' end it "expands attached macros in first DSL method" do expect(Registry.at('DSLMethods#foo').docstring).to eq "Returns String for foo" expect(Registry.at('DSLMethods#bar').docstring).to eq "Returns Integer for bar" end it "does not detect implicit macros with invalid method names" do undoc_error <<-eof ## # IMPLICIT METHOD THAT SHOULD # NOT BE DETECTED dsl_method '/foo/bar' eof end endyard-master/spec/handlers/examples/000077500000000000000000000000001265676644000176765ustar00rootroot00000000000000yard-master/spec/handlers/examples/alias_handler_001.rb.txt000066400000000000000000000012271265676644000242110ustar00rootroot00000000000000module A def a; end alias_method :b, :a alias_method :"cstrmeth", :"a" # Handle keyword syntax too alias :c :a alias :"cstrkey" :a alias d? a alias [] a alias []= a alias -@ a alias % a alias * a alias for a alias ConstantName a # Handle quoted symbols alias :'foo' :'a' end class C def x; end end class B < C alias_method(:q, :x) alias_method :r?, :x alias_method :s, :to_s alias_method :t, :inspect if 500 == 3 * CONSTANT alias_method :<<, :a alias_method :for, :a alias do x alias x2 do end class D # Foo bar def a; "FOO" end # @return [String] alias b a # @return [Numeric] def a; 0 end endyard-master/spec/handlers/examples/attribute_handler_001.rb.txt000066400000000000000000000005501265676644000251210ustar00rootroot00000000000000module A attr_writer :x end class B class << self attr_accessor :z end attr :a, true attr :a2, false attr :a3 # Docstring attr_reader :b, :c, :d attr_writer :e attr_accessor 'f' attr_accessor :z end class C def foo; end attr_writer :foo def bar=(value); end attr_reader :bar end class D protected attr_reader :parser endyard-master/spec/handlers/examples/class_condition_handler_001.rb.txt000066400000000000000000000013131265676644000262670ustar00rootroot00000000000000class A if some_condition def a; end elsif 1 == 1 def b; end else def c; end end def d; end if 50 * 2 == 101 unless false def e; end else def enot; end end def g; end unless 5 * 2 == 101 def h if 1 def hnot; end end end if defined? A def j; end else def jnot; end end if defined? RUBY_VERSION def k; end else def knot; end end if 0 def nnot; end else def n; end end if 256 def o; end else def onot; end end if true def p; end else def pnot; end end if false def qnot; end else def q; end end private if a == 1 def m; end else def mnot; end end endyard-master/spec/handlers/examples/class_handler_001.rb.txt000066400000000000000000000037471265676644000242360ustar00rootroot00000000000000# Docstring class A module B; end private class B::C < String; def method1; end def method2; end end class X :ruby)) end it "starts with public visibility" do expect(@proc.visibility).to eq :public end it "starts in instance scope" do expect(@proc.scope).to eq :instance end it "starts in root namespace" do expect(@proc.namespace).to eq Registry.root end it "has a globals structure" do expect(@proc.globals).to be_a(OpenStruct) end it "ignores HandlerAborted exceptions (but print debug info)" do class AbortHandlerProcessor < YARD::Handlers::Ruby::Base process { abort! } end stmt = OpenStruct.new(:line => 1, :show => 'SOURCE') allow(@proc).to receive(:find_handlers).and_return([AbortHandlerProcessor]) expect(log).to receive(:debug).with(/AbortHandlerProcessor cancelled from/) expect(log).to receive(:debug).with("\tin file '(stdin)':1:\n\nSOURCE\n") @proc.process([stmt]) end end yard-master/spec/handlers/ruby/000077500000000000000000000000001265676644000170415ustar00rootroot00000000000000yard-master/spec/handlers/ruby/base_spec.rb000066400000000000000000000060551265676644000213200ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Handlers::Ruby::Base, '#valid_handler?' do include YARD::Parser::Ruby; YARD::Parser::Ruby::AstNode before do allow(Handlers::Ruby::Base).to receive(:inherited) @processor = Handlers::Processor.new(OpenStruct.new(:parser_type => :ruby)) end after(:all) do Handlers::Base.clear_subclasses end def valid(handler, stmt) expect(@processor.find_handlers(stmt)).to include(handler) end def invalid(handler, stmt) expect(@processor.find_handlers(stmt)).not_to include(handler) end it "only handles Handlers inherited from Ruby::Base class" do class IgnoredHandler < Handlers::Base handles :list end class NotIgnoredHandler < Handlers::Ruby::Base handles :list end allow(Handlers::Base).to receive(:subclasses).and_return [IgnoredHandler, NotIgnoredHandler] expect(@processor.find_handlers(s())).to eq [NotIgnoredHandler] end it "handles string input (matches AstNode#source)" do class StringHandler < Handlers::Ruby::Base handles "x" end allow(Handlers::Base).to receive(:subclasses).and_return [StringHandler] ast = Parser::Ruby::RubyParser.parse("if x == 2 then true end").ast valid StringHandler, ast[0][0][0] invalid StringHandler, ast[0][1] end it "handles symbol input (matches AstNode#type)" do class SymbolHandler < Handlers::Ruby::Base handles :myNodeType end allow(Handlers::Base).to receive(:subclasses).and_return [SymbolHandler] valid SymbolHandler, s(:myNodeType, s(1, 2, 3)) invalid SymbolHandler, s(:NOTmyNodeType, s(1, 2, 3)) end it "handles regex input (matches AstNode#source)" do class RegexHandler < Handlers::Ruby::Base handles %r{^if x ==} end allow(Handlers::Base).to receive(:subclasses).and_return [RegexHandler] ast = Parser::Ruby::RubyParser.parse("if x == 2 then true end").ast valid RegexHandler, ast invalid RegexHandler, ast[0][1] end it "handles AstNode input (matches AST literally)" do class ASTHandler < Handlers::Ruby::Base handles s(:vcall, s(:ident, "hello_world")) end allow(Handlers::Base).to receive(:subclasses).and_return [ASTHandler] valid ASTHandler, s(:vcall, s(:ident, "hello_world")) invalid ASTHandler, s(:vcall, s(:ident, "NOTHELLOWORLD")) end it "handles #method_call(:methname) on a valid AST" do class MethCallHandler < Handlers::Ruby::Base handles method_call(:meth) end allow(Handlers::Base).to receive(:subclasses).and_return [MethCallHandler] ast = Parser::Ruby::RubyParser.parse(<<-"eof").ast meth # 0 meth() # 1 meth(1,2,3) # 2 meth 1,2,3 # 3 NotMeth.meth # 4 NotMeth.meth { } # 5 NotMeth.meth do end # 6 NotMeth.meth 1, 2, 3 # 7 NotMeth.meth(1, 2, 3) # 8 NotMeth # 9 eof (0..8).each do |i| valid MethCallHandler, ast[i] end invalid MethCallHandler, ast[9] end end if HAVE_RIPPER yard-master/spec/handlers/ruby/legacy/000077500000000000000000000000001265676644000203055ustar00rootroot00000000000000yard-master/spec/handlers/ruby/legacy/base_spec.rb000066400000000000000000000052321265676644000225600ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../../spec_helper' include Parser::Ruby::Legacy describe YARD::Handlers::Ruby::Legacy::Base, "#handles and inheritance" do before do allow(Handlers::Ruby::Legacy::Base).to receive(:inherited) if RUBY_VERSION > '1.8.7' allow(Handlers::Ruby::Legacy::MixinHandler).to receive(:inherited) # fixes a Ruby1.9 issue end @processor = Handlers::Processor.new(OpenStruct.new(:parser_type => :ruby18)) end after(:all) do Handlers::Base.clear_subclasses end def stmt(string) Statement.new(TokenList.new(string)) end it "only handles Handlers inherited from Ruby::Legacy::Base class" do class IgnoredHandler < Handlers::Base handles "hello" end class NotIgnoredHandlerLegacy < Handlers::Ruby::Legacy::Base handles "hello" end allow(Handlers::Base).to receive(:subclasses).and_return [IgnoredHandler, NotIgnoredHandlerLegacy] expect(@processor.find_handlers(stmt("hello world"))).to eq [NotIgnoredHandlerLegacy] end it "handles a string input" do class TestStringHandler < Handlers::Ruby::Legacy::Base handles "hello" end expect(TestStringHandler.handles?(stmt("hello world"))).to be true expect(TestStringHandler.handles?(stmt("nothello world"))).to be false end it "handles regex input" do class TestRegexHandler < Handlers::Ruby::Legacy::Base handles /^nothello$/ end expect(TestRegexHandler.handles?(stmt("nothello"))).to be true expect(TestRegexHandler.handles?(stmt("not hello hello"))).to be false end it "handles token input" do class TestTokenHandler < Handlers::Ruby::Legacy::Base handles TkMODULE end expect(TestTokenHandler.handles?(stmt("module"))).to be true expect(TestTokenHandler.handles?(stmt("if"))).to be false end it "parses a do/end or { } block with #parse_block" do class MyBlockHandler < Handlers::Ruby::Legacy::Base handles /\AmyMethod\b/ def process parse_block(:owner => "test") end end class MyBlockInnerHandler < Handlers::Ruby::Legacy::Base handles "inner" def self.reset; @@reached = false end def self.reached?; @@reached ||= false end def process; @@reached = true end end allow(Handlers::Base).to receive(:subclasses).and_return [MyBlockHandler, MyBlockInnerHandler] Parser::SourceParser.parser_type = :ruby18 Parser::SourceParser.parse_string "myMethod do inner end" expect(MyBlockInnerHandler).to be_reached MyBlockInnerHandler.reset Parser::SourceParser.parse_string "myMethod { inner }" expect(MyBlockInnerHandler).to be_reached Parser::SourceParser.parser_type = :ruby end end yard-master/spec/handlers/spec_helper.rb000066400000000000000000000014631265676644000207020ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "..", "spec_helper") require 'stringio' include Handlers def undoc_error(code) expect { StubbedSourceParser.parse_string(code) }.to raise_error(Parser::UndocumentableError) end def with_parser(parser_type, &block) tmp = StubbedSourceParser.parser_type StubbedSourceParser.parser_type = parser_type yield StubbedSourceParser.parser_type = tmp end class StubbedProcessor < Processor def process(statements) statements.each_with_index do |stmt, index| find_handlers(stmt).each do |handler| handler.new(self, stmt).process end end end end class StubbedSourceParser < Parser::SourceParser StubbedSourceParser.parser_type = :ruby def post_process post = StubbedProcessor.new(self) post.process(@parser.enumerator) end end yard-master/spec/handlers/visibility_handler_spec.rb000066400000000000000000000026331265676644000233070ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}VisibilityHandler" do before(:all) { parse_file :visibility_handler_001, __FILE__ } it "is able to set visibility to public" do expect(Registry.at("Testing#pub").visibility).to eq :public expect(Registry.at("Testing#pub2").visibility).to eq :public end it "is able to set visibility to private" do expect(Registry.at("Testing#priv").visibility).to eq :private end it "is able to set visibility to protected" do expect(Registry.at("Testing#prot").visibility).to eq :protected end it "supports parameters and only set visibility on those methods" do expect(Registry['Testing#notpriv'].visibility).to eq :protected expect(Registry['Testing#notpriv2'].visibility).to eq :protected expect(Registry['Testing#notpriv?'].visibility).to eq :protected end it "only accepts strings and symbols" do expect(Registry.at('Testing#name')).to be nil expect(Registry.at('Testing#argument')).to be nil expect(Registry.at('Testing#method_call')).to be nil end it "handles constants passed in as symbols" do expect(Registry.at('Testing#Foo').visibility).to eq :private end it "does not register classes with visibility" do expect(Registry.at('Testing::Bar').visibility).to eq :public expect(Registry.at('Testing::Baz').visibility).to eq :public end endyard-master/spec/handlers/yield_handler_spec.rb000066400000000000000000000042211265676644000222210ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}YieldHandler" do before(:all) { parse_file :yield_handler_001, __FILE__ } it "only parses yield blocks in methods" do expect(P(:Testing).tag(:yield)).to be nil expect(P(:Testing).tag(:yieldparam)).to be nil end it "handles an empty yield statement" do expect(P('Testing#mymethod').tag(:yield)).to be nil expect(P('Testing#mymethod').tag(:yieldparam)).to be nil end it "does not document a yield statement in a method with either @yield or @yieldparam" do expect(P('Testing#mymethod2').tag(:yield).types).to eq ['a', 'b'] expect(P('Testing#mymethod2').tag(:yield).text).to eq "Blah" expect(P('Testing#mymethod2').tags(:yieldparam).size).to eq 2 expect(P('Testing#mymethod3').tag(:yield).types).to eq ['a', 'b'] expect(P('Testing#mymethod3').tags(:yieldparam).size).to eq 0 expect(P('Testing#mymethod4').tag(:yieldparam).name).to eq '_self' expect(P('Testing#mymethod4').tag(:yieldparam).text).to eq 'BLAH' end it "handles any arbitrary yield statement" do expect(P('Testing#mymethod5').tag(:yield).types).to eq [':a', 'b', '_self', 'File.read(\'file\', \'w\')', 'CONSTANT'] end it "handles parentheses" do expect(P('Testing#mymethod6').tag(:yield).types).to eq ['b', 'a'] end it "only documents the first yield statement in a method (limitation of yield handler)" do expect(P('Testing#mymethod7').tag(:yield).types).to eq ['a'] end it "handles `self` keyword and list object type as yieldparam for _self" do expect(P('Testing#mymethod8').tag(:yield).types).to eq ['_self'] expect(P('Testing#mymethod8').tag(:yieldparam).types).to eq ['Testing'] expect(P('Testing#mymethod8').tag(:yieldparam).text).to eq "the object that the method was called on" end it "handles `super` keyword and document it under _super" do expect(P('Testing#mymethod9').tag(:yield).types).to eq ['_super'] expect(P('Testing#mymethod9').tag(:yieldparam).types).to be nil expect(P('Testing#mymethod9').tag(:yieldparam).text).to eq "the result of the method from the superclass" end endyard-master/spec/i18n/000077500000000000000000000000001265676644000150375ustar00rootroot00000000000000yard-master/spec/i18n/locale_spec.rb000066400000000000000000000037171265676644000176450ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::I18n::Locale do def locale(name) YARD::I18n::Locale.new(name) end before do @locale = locale("fr") end describe "#name" do it "returns name" do expect(locale("fr").name).to eq "fr" end end describe "#load" do it "returns false for nonexistent PO" do expect(File).to receive(:exist?).with('foo/fr.po').and_return(false) expect(@locale.load('foo')).to be false end have_gettext_gem = true if RUBY_VERSION < "1.9" begin require "gettext/tools/poparser" rescue LoadError have_gettext_gem = false end else begin require "gettext/po_parser" rescue LoadError begin require "gettext/tools/poparser" rescue LoadError have_gettext_gem = false end end end it "returns true for existent PO", :if => have_gettext_gem do data = <<-eop msgid "" msgstr "" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "Hello" msgstr "Bonjour" eop parser = GetText::POParser.new expect(File).to receive(:exist?).with('foo/fr.po').and_return(true) expect(GetText::POParser).to receive(:new).and_return(parser) expect(parser).to receive(:parse_file) do |file, hash| expect(file).to eq 'foo/fr.po' parser.parse(data, hash) end expect(@locale.load('foo')).to be true expect(@locale.translate('Hello')).to eq "Bonjour" end end describe "#translate" do before do messages = @locale.instance_variable_get(:@messages) messages["Hello"] = "Bonjour" end it "returns translated string for existent string" do expect(@locale.translate("Hello")) == "Bonjour" end it "returns original string for nonexistent string" do expect(@locale.translate("nonexistent")) == "nonexistent" end end end yard-master/spec/i18n/message_spec.rb000066400000000000000000000025061265676644000200250ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::I18n::Message do def message(id) YARD::I18n::Message.new(id) end before do @message = message("Hello World!") end describe "#id" do it "returns ID" do expect(message("Hello World!").id).to eq "Hello World!" end end describe "#add_location" do it "adds some locations" do @message.add_location("hello.rb", 10) @message.add_location("message.rb", 5) expect(@message.locations).to eq Set.new([["hello.rb", 10], ["message.rb", 5]]) end end describe "#add_comment" do it "adds some comments" do @message.add_comment("YARD.title") @message.add_comment("Hello#message") expect(@message.comments).to eq Set.new(["YARD.title", "Hello#message"]) end end describe "#==" do it "returns true for same value messages" do locations = [["hello.rb", 10], ["message.rb", 5]] comments = ["YARD.title", "Hello#message"] other_message = message(@message.id) locations.each do |path, line| @message.add_location(path, line) other_message.add_location(path, line) end comments.each do |comment| @message.add_comment(comment) other_message.add_comment(comment) end expect(@message).to eq other_message end end end yard-master/spec/i18n/messages_spec.rb000066400000000000000000000033331265676644000202070ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::I18n::Messages do def message(id) YARD::I18n::Message.new(id) end def messages YARD::I18n::Messages.new end before do @messages = messages end describe "#each" do it "enumerates messages" do @messages.register("Hello World!") @messages.register("Title") enumerated_messages = [] @messages.each do |message| enumerated_messages << message end enumerated_messages = enumerated_messages.sort_by {|m| m.id } expect(enumerated_messages).to eq [message("Hello World!"), message("Title")] end it "does not yield any message if there are none" do enumerated_messages = [] @messages.each do |message| enumerated_messages << message end expect(enumerated_messages).to eq [] end end describe "#[]" do it "returns registered message" do @messages.register("Hello World!") expect(@messages["Hello World!"]).to eq message("Hello World!") end it "returns nil for nonexistent message ID" do expect(@messages["Hello World!"]).to eq nil end end describe "#register" do it "returns registered message" do expect(@messages.register("Hello World!")).to eq message("Hello World!") end it "returns existent message" do message = @messages.register("Hello World!") expect(@messages.register("Hello World!").object_id).to eq message.object_id end end describe "#==" do it "returns true for same value messages" do @messages.register("Hello World!") other_messages = messages other_messages.register("Hello World!") expect(@messages).to eq other_messages end end end yard-master/spec/i18n/pot_generator_spec.rb000066400000000000000000000205021265676644000212450ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::I18n::PotGenerator do def create_messages(messages) yard_messages = YARD::I18n::Messages.new add_messages(yard_messages, messages) yard_messages end def add_messages(yard_messages, messages) messages.each do |id, properties| yard_message = yard_messages.register(id) (properties[:locations] || []).each do |path, line| yard_message.add_location(path, line) end (properties[:comments] || []).each do |comment| yard_message.add_comment(comment) end end end before do @generator = YARD::I18n::PotGenerator.new("..") end describe "Generate" do it "generates the default header" do current_time = Time.parse("2011-11-20 22:17+0900") allow(@generator).to receive(:current_time).and_return(current_time) pot_creation_date = current_time.strftime("%Y-%m-%d %H:%M%z") expect(@generator.generate).to eq <<-eoh # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\\n" "Report-Msgid-Bugs-To: \\n" "POT-Creation-Date: #{pot_creation_date}\\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n" "Last-Translator: FULL NAME \\n" "Language-Team: LANGUAGE \\n" "Language: \\n" "MIME-Version: 1.0\\n" "Content-Type: text/plain; charset=UTF-8\\n" "Content-Transfer-Encoding: 8bit\\n" eoh end it "generates messages in location order" do allow(@generator).to receive(:header).and_return("HEADER\n\n") messages = { "tag|see|Parser::SourceParser.parse" => { :locations => [["yard.rb", 14]], :comments => ["@see"], }, "Parses a path or set of paths" => { :locations => [["yard.rb", 12], ["yard/parser/source_parser.rb", 83]], :comments => ["YARD.parse", "YARD::Parser::SourceParser.parse"], } } add_messages(@generator.messages, messages) expect(@generator.generate).to eq <<-'eoh' HEADER # YARD.parse # YARD::Parser::SourceParser.parse #: ../yard.rb:12 #: ../yard/parser/source_parser.rb:83 msgid "Parses a path or set of paths" msgstr "" # @see #: ../yard.rb:14 msgid "tag|see|Parser::SourceParser.parse" msgstr "" eoh end end describe "Escape" do def generate_message_pot(message_id) pot = "" message = YARD::I18n::Message.new(message_id) @generator.send(:generate_message, pot, message) pot end it "escapes <\\>" do expect(generate_message_pot("hello \\ world")).to eq <<-'eop' msgid "hello \\ world" msgstr "" eop end it "escapes <\">" do expect(generate_message_pot("hello \" world")).to eq <<-'eop' msgid "hello \" world" msgstr "" eop end it "escapes <\\n>" do expect(generate_message_pot("hello \n world")).to eq <<-'eop' msgid "hello \n" " world" msgstr "" eop end end describe "Object" do before do Registry.clear @yard = YARD::CodeObjects::ModuleObject.new(:root, :YARD) end it "extracts at docstring" do object = YARD::CodeObjects::MethodObject.new(@yard, :parse, :module) do |o| o.docstring = "An alias to {Parser::SourceParser}'s parsing method" end @generator.parse_objects([object]) expect(@generator.messages).to eq create_messages({ "An alias to {Parser::SourceParser}'s parsing method" => { :locations => [], :comments => ["YARD.parse"], } }) end it "extracts at location" do object = YARD::CodeObjects::MethodObject.new(@yard, :parse, :module) do |o| o.docstring = "An alias to {Parser::SourceParser}'s parsing method" o.files = [["yard.rb", 12]] end @generator.parse_objects([object]) expect(@generator.messages).to eq create_messages({ "An alias to {Parser::SourceParser}'s parsing method" => { :locations => [["yard.rb", 13]], :comments => ["YARD.parse"], } }) end it "extracts at tag name" do object = YARD::CodeObjects::MethodObject.new(@yard, :parse, :module) do |o| o.docstring = "@see Parser::SourceParser.parse" o.files = [["yard.rb", 12]] end @generator.parse_objects([object]) expect(@generator.messages).to eq create_messages({ "tag|see|Parser::SourceParser.parse" => { :locations => [["yard.rb", 12]], :comments => ["@see"], }, }) end it "extracts at tag text" do object = YARD::CodeObjects::MethodObject.new(@yard, :parse, :module) do |o| o.docstring = <<-eod @example Parse a glob of files YARD.parse('lib/**/*.rb') eod o.files = [["yard.rb", 12]] end @generator.parse_objects([object]) expect(@generator.messages).to eq create_messages({ "tag|example|Parse a glob of files" => { :locations => [["yard.rb", 12]], :comments => ["@example"], }, "YARD.parse('lib/**/*.rb')" => { :locations => [["yard.rb", 12]], :comments => ["@example Parse a glob of files"], } }) end it "extracts at tag types" do object = YARD::CodeObjects::MethodObject.new(@yard, :parse, :module) do |o| o.docstring = <<-eod @param [String, Array] paths a path, glob, or list of paths to parse eod o.files = [["yard.rb", 12]] end @generator.parse_objects([object]) expect(@generator.messages).to eq create_messages({ "tag|param|paths" => { :locations => [["yard.rb", 12]], :comments => ["@param [String, Array]"], }, "a path, glob, or list of paths to\nparse" => { :locations => [["yard.rb", 12]], :comments => ["@param [String, Array] paths"], } }) end it "extracts at overload tag recursively" do object = YARD::CodeObjects::MethodObject.new(@yard, :parse, :module) do |o| o.docstring = <<-eod @overload foo(i) docstring foo(i) @param [Integer] i integer parameter eod end @generator.parse_objects([object]) expect(@generator.messages).to eq create_messages({ "tag|overload|foo" => { :locations => [], :comments => ["@overload"] }, "docstring foo(i)" => { :locations => [], :comments => ["YARD.parse"] }, "tag|param|i" => { :locations => [], :comments => ["@param [Integer]"] }, "integer parameter" => { :locations => [], :comments => ["@param [Integer] i"] }, }) end end describe "File" do it "extracts at attribute" do path = "GettingStarted.md" text = <<-eor # @title Getting Started Guide # Getting Started with YARD eor allow(File).to receive(:open).with(path).and_yield(StringIO.new(text)) allow(File).to receive(:read).with(path).and_return(text) file = YARD::CodeObjects::ExtraFileObject.new(path) @generator.parse_files([file]) expect(@generator.messages).to eq create_messages({ "Getting Started Guide" => { :locations => [[path, 1]], :comments => ["title"], }, "# Getting Started with YARD" => { :locations => [[path, 3]], :comments => [], } }) end it "extracts at paragraphs" do path = "README.md" paragraph1 = <<-eop.strip Note that class methods must not be referred to with the "::" namespace separator. Only modules, classes and constants should use "::". eop paragraph2 = <<-eop.strip You can also do lookups on any installed gems. Just make sure to build the .yardoc databases for installed gems with: eop text = <<-eot #{paragraph1} #{paragraph2} eot allow(File).to receive(:open).with(path).and_yield(StringIO.new(text)) allow(File).to receive(:read).with(path).and_return(text) file = YARD::CodeObjects::ExtraFileObject.new(path) @generator.parse_files([file]) expect(@generator.messages).to eq create_messages({ paragraph1 => { :locations => [[path, 1]], :comments => [], }, paragraph2 => { :locations => [[path, 4]], :comments => [], } }) end end end yard-master/spec/i18n/text_spec.rb000066400000000000000000000075201265676644000173660ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::I18n::Text do describe "#extract_messages" do def extract_messages(input, options={}) text = YARD::I18n::Text.new(StringIO.new(input), options) messages = [] text.extract_messages do |*message| messages << message end messages end describe "Header" do it "extracts at attribute" do text = <<-eot # @title Getting Started Guide # Getting Started with YARD eot expect(extract_messages(text, :have_header => true)).to eq( [[:attribute, "title", "Getting Started Guide", 1], [:paragraph, "# Getting Started with YARD", 3]]) end it "ignores markup line" do text = <<-eot #!markdown # @title Getting Started Guide # Getting Started with YARD eot expect(extract_messages(text, :have_header => true)).to eq( [[:attribute, "title", "Getting Started Guide", 2], [:paragraph, "# Getting Started with YARD", 4]]) end it "terminates header block by markup line not at the first line" do text = <<-eot # @title Getting Started Guide #!markdown # Getting Started with YARD eot expect(extract_messages(text, :have_header => true)).to eq( [[:attribute, "title", "Getting Started Guide", 1], [:paragraph, "#!markdown", 2], [:paragraph, "# Getting Started with YARD", 4]]) end end describe "Body" do it "splits to paragraphs" do paragraph1 = <<-eop.strip Note that class methods must not be referred to with the "::" namespace separator. Only modules, classes and constants should use "::". eop paragraph2 = <<-eop.strip You can also do lookups on any installed gems. Just make sure to build the .yardoc databases for installed gems with: eop text = <<-eot #{paragraph1} #{paragraph2} eot expect(extract_messages(text)).to eq( [[:paragraph, paragraph1, 1], [:paragraph, paragraph2, 4]]) end end end describe "#translate" do def locale locale = YARD::I18n::Locale.new("fr") messages = locale.instance_variable_get(:@messages) messages["markdown"] = "markdown (markdown in fr)" messages["Hello"] = "Bonjour (Hello in fr)" messages["Paragraph 1."] = "Paragraphe 1." messages["Paragraph 2."] = "Paragraphe 2." locale end def translate(input, options={}) text = YARD::I18n::Text.new(StringIO.new(input), options) text.translate(locale) end describe "Header" do it "extracts at attribute" do text = <<-eot # @title Hello # Getting Started with YARD Paragraph. eot expect(translate(text, :have_header => true)).to eq <<-eot # @title Bonjour (Hello in fr) # Getting Started with YARD Paragraph. eot end it "ignores markup line" do text = <<-eot #!markdown # @title Hello # Getting Started with YARD Paragraph. eot expect(translate(text, :have_header => true)).to eq <<-eot #!markdown # @title Bonjour (Hello in fr) # Getting Started with YARD Paragraph. eot end end describe "Body" do it "splits to paragraphs" do paragraph1 = <<-eop.strip Paragraph 1. eop paragraph2 = <<-eop.strip Paragraph 2. eop text = <<-eot #{paragraph1} #{paragraph2} eot expect(translate(text)).to eq <<-eot Paragraphe 1. Paragraphe 2. eot end it "does not modify non-translated message" do nonexistent_paragraph = <<-eop.strip Nonexsitent paragraph. eop text = <<-eot #{nonexistent_paragraph} eot expect(translate(text)).to eq <<-eot #{nonexistent_paragraph} eot end it "keeps empty lines" do text = <<-eot Paragraph 1. Paragraph 2. eot expect(translate(text)).to eq <<-eot Paragraphe 1. Paragraphe 2. eot end end end end yard-master/spec/logging_spec.rb000066400000000000000000000022521265676644000172460ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "spec_helper") describe YARD::Logger do describe "#show_backtraces" do it "is true if debug level is on" do log.show_backtraces = true log.enter_level(Logger::DEBUG) do log.show_backtraces = false expect(log.show_backtraces).to be true end expect(log.show_backtraces).to be false end end describe "#backtrace" do before { log.show_backtraces = true } after { log.show_backtraces = false } it "logs backtrace in error by default" do expect(log).to receive(:error).with("RuntimeError: foo") expect(log).to receive(:error).with("Stack trace:\n\tline1\n\tline2\n") exc = RuntimeError.new("foo") exc.set_backtrace(['line1', 'line2']) log.enter_level(Logger::INFO) { log.backtrace(exc) } end it "allows backtrace to be entered in other modes" do expect(log).to receive(:warn).with("RuntimeError: foo") expect(log).to receive(:warn).with("Stack trace:\n\tline1\n\tline2\n") exc = RuntimeError.new("foo") exc.set_backtrace(['line1', 'line2']) log.enter_level(Logger::INFO) { log.backtrace(exc, :warn) } end end end yard-master/spec/options_spec.rb000066400000000000000000000111651265676644000173160ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Options do class FooOptions < YARD::Options attr_accessor :foo def initialize; self.foo = "abc" end end describe ".default_attr" do it "allows default attributes to be defined with symbols" do class DefaultOptions1 < YARD::Options default_attr :foo, 'HELLO' end o = DefaultOptions1.new o.reset_defaults expect(o.foo).to eq 'HELLO' end it "calls lambda if value is a Proc" do class DefaultOptions2 < YARD::Options default_attr :foo, lambda { 100 } end o = DefaultOptions2.new o.reset_defaults expect(o.foo).to eq 100 end end describe "#reset_defaults" do it "does not define defaults until reset is called" do class ResetDefaultOptions1 < YARD::Options default_attr :foo, 'FOO' end expect(ResetDefaultOptions1.new.foo).to be nil o = ResetDefaultOptions1.new o.reset_defaults expect(o.foo).to eq 'FOO' end it "uses defaults from superclass as well" do class ResetDefaultOptions2 < YARD::Options default_attr :foo, 'FOO' end class ResetDefaultOptions3 < ResetDefaultOptions2 end o = ResetDefaultOptions3.new o.reset_defaults expect(o.foo).to eq 'FOO' end end describe "#delete" do it "deletes an option" do o = FooOptions.new o.delete(:foo) expect(o.to_hash).to eq({}) end it "does not error if an option is deleted that does not exist" do o = FooOptions.new o.delete(:foo) o.delete(:foo) expect(o.to_hash).to eq({}) end end describe "#[]" do it "handles getting option values using hash syntax" do expect(FooOptions.new[:foo]).to eq "abc" end end describe "#[]=" do it "handles setting options using hash syntax" do o = FooOptions.new o[:foo] = "xyz" expect(o[:foo]).to eq "xyz" end it "allows setting of unregistered keys" do o = FooOptions.new o[:bar] = "foo" expect(o[:bar]).to eq "foo" end end describe "#method_missing" do it "allows setting of unregistered keys" do o = FooOptions.new o.bar = 'foo' expect(o.bar).to eq 'foo' end it "allows getting values of unregistered keys (return nil)" do expect(FooOptions.new.bar).to be nil end it "prints debugging messages about unregistered keys" do expect(log).to receive(:debug).with("Attempting to access unregistered key bar on FooOptions") FooOptions.new.bar expect(log).to receive(:debug).with("Attempting to set unregistered key bar on FooOptions") FooOptions.new.bar = 1 end end describe "#update" do it "allows updating of options" do expect(FooOptions.new.update(:foo => "xyz").foo).to eq "xyz" end it "does not ignore keys with no setter (OpenStruct behaviour)" do o = FooOptions.new o.update(:bar => "xyz") expect(o.to_hash).to eq({:foo => "abc", :bar => "xyz"}) end end describe "#merge" do it "updates a new object" do o = FooOptions.new expect(o.merge(:foo => "xyz").object_id).not_to eq o.object_id expect(o.merge(:foo => "xyz").to_hash).to eq({:foo => "xyz"}) end it "adds in values from original object" do o = FooOptions.new o.update(:bar => "foo") expect(o.merge(:baz => 1).to_hash).to eq({:foo => "abc", :bar => "foo", :baz => 1}) end end describe "#to_hash" do it "converts all instance variables and symbolized keys" do class ToHashOptions1 < YARD::Options attr_accessor :foo, :bar, :baz def initialize; @foo = 1; @bar = 2; @baz = "hello" end end o = ToHashOptions1.new hash = o.to_hash expect(hash.keys).to include(:foo, :bar, :baz) expect(hash[:foo]).to eq 1 expect(hash[:bar]).to eq 2 expect(hash[:baz]).to eq "hello" end it "uses accessor when converting values to hash" do class ToHashOptions2 < YARD::Options def initialize; @foo = 1 end def foo; "HELLO#{@foo}" end end o = ToHashOptions2.new expect(o.to_hash).to eq({:foo => "HELLO1"}) end it "ignores ivars with no accessor" do class ToHashOptions3 < YARD::Options attr_accessor :foo def initialize; @foo = 1; @bar = "NOIGNORE" end end o = ToHashOptions3.new expect(o.to_hash).to eq({:foo => 1, :bar => "NOIGNORE"}) end end describe "#tap" do it "supports #tap(&block) (even in 1.8.6)" do o = FooOptions.new.tap {|o| o.foo = :BAR } expect(o.to_hash).to eq({:foo => :BAR}) end end end yard-master/spec/parser/000077500000000000000000000000001265676644000155545ustar00rootroot00000000000000yard-master/spec/parser/base_spec.rb000066400000000000000000000014421265676644000200260ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe YARD::Parser::Base do describe "#initialize" do class MyParser < Parser::Base; def initialize(a, b) end end it "takes 2 arguments" do expect { YARD::Parser::Base.new }.to raise_error(ArgumentError, /wrong (number|#) of arguments|given 0, expected 2/) end it "raises NotImplementedError on #initialize" do expect { YARD::Parser::Base.new('a', 'b') }.to raise_error(NotImplementedError) end it "raises NotImplementedError on #parse" do expect { MyParser.new('a', 'b').parse }.to raise_error(NotImplementedError) end it "raises NotImplementedError on #tokenize" do expect { MyParser.new('a', 'b').tokenize }.to raise_error(NotImplementedError) end end end yard-master/spec/parser/c_parser_spec.rb000066400000000000000000000135741265676644000207230ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe YARD::Parser::C::CParser do describe "#parse" do def parse(contents) Registry.clear YARD.parse_string(contents, :c) end describe "Array class" do before(:all) do file = File.join(File.dirname(__FILE__), 'examples', 'array.c.txt') parse(File.read(file)) end it "parses Array class" do obj = YARD::Registry.at('Array') expect(obj).not_to be nil expect(obj.docstring).not_to be_blank end it "parses method" do obj = YARD::Registry.at('Array#initialize') expect(obj.docstring).not_to be_blank expect(obj.tags(:overload).size).to be > 1 end end describe "Source located in extra files" do before(:all) do @multifile = File.join(File.dirname(__FILE__), 'examples', 'multifile.c.txt') @extrafile = File.join(File.dirname(__FILE__), 'examples', 'extrafile.c.txt') @contents = File.read(@multifile) end it "looks for methods in extra files (if 'in' comment is found)" do extra_contents = File.read(@extrafile) expect(File).to receive(:read).with('extra.c').and_return(extra_contents) parse(@contents) expect(Registry.at('Multifile#extra').docstring).to eq 'foo' end it "stops searching for extra source file gracefully if file is not found" do expect(File).to receive(:read).with('extra.c').and_raise(Errno::ENOENT) expect(log).to receive(:warn).with("Missing source file `extra.c' when parsing Multifile#extra") parse(@contents) expect(Registry.at('Multifile#extra').docstring).to eq '' end it "differentiates between a struct and a pointer to a struct retval" do parse(@contents) expect(Registry.at('Multifile#hello_mars').docstring).to eq 'Hello Mars' end end describe "Foo class" do it "does not include comments in docstring source" do parse <<-eof /* * Hello world */ VALUE foo(VALUE x) { int value = x; } void Init_Foo() { rb_define_method(rb_cFoo, "foo", foo, 1); } eof expect(Registry.at('Foo#foo').source.gsub(/\s\s+/, ' ')).to eq( "VALUE foo(VALUE x) { int value = x;\n}") end end describe "Constant" do it "does not truncate docstring" do parse <<-eof #define MSK_DEADBEEF 0xdeadbeef void Init_Mask(void) { rb_cMask = rb_define_class("Mask", rb_cObject); /* 0xdeadbeef: This constant is frequently used to indicate a * software crash or deadlock in embedded systems. */ rb_define_const(rb_cMask, "DEADBEEF", INT2FIX(MSK_DEADBEEF)); } eof constant = Registry.at('Mask::DEADBEEF') expect(constant.value).to eq '0xdeadbeef' expect(constant.docstring).to eq "This constant is frequently used to indicate a\nsoftware crash or deadlock in embedded systems." end end describe "Macros" do it "handles param## inside of macros" do thr = Thread.new do parse <<-eof void Init_gobject_gparamspecs(void) { VALUE cParamSpec = GTYPE2CLASS(G_TYPE_PARAM); VALUE c; #define DEF_NUMERIC_PSPEC_METHODS(c, typename) \ G_STMT_START {\ rbg_define_method(c, "initialize", typename##_initialize, 7); \ rbg_define_method(c, "minimum", typename##_minimum, 0); \ rbg_define_method(c, "maximum", typename##_maximum, 0); \ rbg_define_method(c, "range", typename##_range, 0); \ } G_STMT_END #if 0 rbg_define_method(c, "default_value", typename##_default_value, 0); \ rb_define_alias(c, "default", "default_value"); \ #endif c = G_DEF_CLASS(G_TYPE_PARAM_CHAR, "Char", cParamSpec); DEF_NUMERIC_PSPEC_METHODS(c, char); eof end thr.join(5) if thr.alive? fail "Did not parse in time" thr.kill end end end describe "C macros in declaration" do it "handles C macros in method declaration" do Registry.clear parse <<-eof // docstring FOOBAR VALUE func() { } void Init_mod(void) { rb_define_method(rb_cFoo, "func", func, 0); \ } eof expect(Registry.at('Foo#func').docstring).to eq "docstring" end end end describe "Override comments" do before(:all) do Registry.clear override_file = File.join(File.dirname(__FILE__), 'examples', 'override.c.txt') @override_parser = YARD.parse_string(File.read(override_file), :c) end it "parses GMP::Z class" do z = YARD::Registry.at('GMP::Z') expect(z).not_to be nil expect(z.docstring).not_to be_blank end it "parses GMP::Z methods w/ bodies" do add = YARD::Registry.at('GMP::Z#+') expect(add.docstring).not_to be_blank expect(add.source).not_to be nil expect(add.source).not_to be_empty add_self = YARD::Registry.at('GMP::Z#+') expect(add_self.docstring).not_to be_blank expect(add_self.source).not_to be nil expect(add_self.source).not_to be_empty sqrtrem = YARD::Registry.at('GMP::Z#+') expect(sqrtrem.docstring).not_to be_blank expect(sqrtrem.source).not_to be nil expect(sqrtrem.source).not_to be_empty end it "parses GMP::Z methods w/o bodies" do neg = YARD::Registry.at('GMP::Z#neg') expect(neg.docstring).not_to be_blank expect(neg.source).to be nil neg_self = YARD::Registry.at('GMP::Z#neg') expect(neg_self.docstring).not_to be_blank expect(neg_self.source).to be nil end end end yard-master/spec/parser/examples/000077500000000000000000000000001265676644000173725ustar00rootroot00000000000000yard-master/spec/parser/examples/array.c.txt000066400000000000000000002742171265676644000215070ustar00rootroot00000000000000/********************************************************************** array.c - $Author: yugui $ created at: Fri Aug 6 09:46:12 JST 1993 Copyright (C) 1993-2007 Yukihiro Matsumoto Copyright (C) 2000 Network Applied Communication Laboratory, Inc. Copyright (C) 2000 Information-technology Promotion Agency, Japan **********************************************************************/ #include "ruby/ruby.h" #include "ruby/util.h" #include "ruby/st.h" #ifndef ARRAY_DEBUG # define NDEBUG #endif #include VALUE rb_cArray; static ID id_cmp; #define ARY_DEFAULT_SIZE 16 #define ARY_MAX_SIZE (LONG_MAX / sizeof(VALUE)) void rb_mem_clear(register VALUE *mem, register long size) { while (size--) { *mem++ = Qnil; } } static inline void memfill(register VALUE *mem, register long size, register VALUE val) { while (size--) { *mem++ = val; } } # define ARY_SHARED_P(ary) \ (assert(!FL_TEST(ary, ELTS_SHARED) || !FL_TEST(ary, RARRAY_EMBED_FLAG)), \ FL_TEST(ary,ELTS_SHARED)) # define ARY_EMBED_P(ary) \ (assert(!FL_TEST(ary, ELTS_SHARED) || !FL_TEST(ary, RARRAY_EMBED_FLAG)), \ FL_TEST(ary, RARRAY_EMBED_FLAG)) #define ARY_HEAP_PTR(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.ptr) #define ARY_HEAP_LEN(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.len) #define ARY_EMBED_PTR(a) (assert(ARY_EMBED_P(a)), RARRAY(a)->as.ary) #define ARY_EMBED_LEN(a) \ (assert(ARY_EMBED_P(a)), \ (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \ (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT))) #define ARY_OWNS_HEAP_P(a) (!FL_TEST(a, ELTS_SHARED|RARRAY_EMBED_FLAG)) #define FL_SET_EMBED(a) do { \ assert(!ARY_SHARED_P(a)); \ assert(!OBJ_FROZEN(a)); \ FL_SET(a, RARRAY_EMBED_FLAG); \ } while (0) #define FL_UNSET_EMBED(ary) FL_UNSET(ary, RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK) #define FL_SET_SHARED(ary) do { \ assert(!ARY_EMBED_P(ary)); \ FL_SET(ary, ELTS_SHARED); \ } while (0) #define FL_UNSET_SHARED(ary) FL_UNSET(ary, ELTS_SHARED) #define ARY_SET_PTR(ary, p) do { \ assert(!ARY_EMBED_P(ary)); \ assert(!OBJ_FROZEN(ary)); \ RARRAY(ary)->as.heap.ptr = (p); \ } while (0) #define ARY_SET_EMBED_LEN(ary, n) do { \ long tmp_n = n; \ assert(ARY_EMBED_P(ary)); \ assert(!OBJ_FROZEN(ary)); \ RBASIC(ary)->flags &= ~RARRAY_EMBED_LEN_MASK; \ RBASIC(ary)->flags |= (tmp_n) << RARRAY_EMBED_LEN_SHIFT; \ } while (0) #define ARY_SET_HEAP_LEN(ary, n) do { \ assert(!ARY_EMBED_P(ary)); \ RARRAY(ary)->as.heap.len = n; \ } while (0) #define ARY_SET_LEN(ary, n) do { \ if (ARY_EMBED_P(ary)) { \ ARY_SET_EMBED_LEN(ary, n); \ } \ else { \ ARY_SET_HEAP_LEN(ary, n); \ } \ assert(RARRAY_LEN(ary) == n); \ } while (0) #define ARY_INCREASE_PTR(ary, n) do { \ assert(!ARY_EMBED_P(ary)); \ assert(!OBJ_FROZEN(ary)); \ RARRAY(ary)->as.heap.ptr += n; \ } while (0) #define ARY_INCREASE_LEN(ary, n) do { \ assert(!OBJ_FROZEN(ary)); \ if (ARY_EMBED_P(ary)) { \ ARY_SET_EMBED_LEN(ary, RARRAY_LEN(ary)+n); \ } \ else { \ RARRAY(ary)->as.heap.len += n; \ } \ } while (0) #define ARY_CAPA(ary) (ARY_EMBED_P(ary) ? RARRAY_EMBED_LEN_MAX : \ ARY_SHARED_ROOT_P(ary) ? RARRAY_LEN(ary) : RARRAY(ary)->as.heap.aux.capa) #define ARY_SET_CAPA(ary, n) do { \ assert(!ARY_EMBED_P(ary)); \ assert(!ARY_SHARED_P(ary)); \ assert(!OBJ_FROZEN(ary)); \ RARRAY(ary)->as.heap.aux.capa = (n); \ } while (0) #define ARY_SHARED(ary) (assert(ARY_SHARED_P(ary)), RARRAY(ary)->as.heap.aux.shared) #define ARY_SET_SHARED(ary, value) do { \ assert(!ARY_EMBED_P(ary)); \ assert(ARY_SHARED_P(ary)); \ assert(ARY_SHARED_ROOT_P(value)); \ RARRAY(ary)->as.heap.aux.shared = (value); \ } while (0) #define RARRAY_SHARED_ROOT_FLAG FL_USER5 #define ARY_SHARED_ROOT_P(ary) (FL_TEST(ary, RARRAY_SHARED_ROOT_FLAG)) #define ARY_SHARED_NUM(ary) \ (assert(ARY_SHARED_ROOT_P(ary)), RARRAY(ary)->as.heap.aux.capa) #define ARY_SET_SHARED_NUM(ary, value) do { \ assert(ARY_SHARED_ROOT_P(ary)); \ RARRAY(ary)->as.heap.aux.capa = (value); \ } while (0) #define FL_SET_SHARED_ROOT(ary) do { \ assert(!ARY_EMBED_P(ary)); \ FL_SET(ary, RARRAY_SHARED_ROOT_FLAG); \ } while (0) static void ary_resize_capa(VALUE ary, long capacity) { assert(RARRAY_LEN(ary) <= capacity); assert(!OBJ_FROZEN(ary)); assert(!ARY_SHARED_P(ary)); if (capacity > RARRAY_EMBED_LEN_MAX) { if (ARY_EMBED_P(ary)) { long len = ARY_EMBED_LEN(ary); VALUE *ptr = ALLOC_N(VALUE, (capacity)); MEMCPY(ptr, ARY_EMBED_PTR(ary), VALUE, len); FL_UNSET_EMBED(ary); ARY_SET_PTR(ary, ptr); ARY_SET_HEAP_LEN(ary, len); } else { REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, (capacity)); } ARY_SET_CAPA(ary, (capacity)); } else { if (!ARY_EMBED_P(ary)) { long len = RARRAY_LEN(ary); VALUE *ptr = RARRAY_PTR(ary); MEMCPY(RARRAY(ary)->as.ary, ptr, VALUE, len); FL_SET_EMBED(ary); ARY_SET_LEN(ary, len); xfree(ptr); } } } static void rb_ary_decrement_share(VALUE shared) { if (shared) { int num = ARY_SHARED_NUM(shared) - 1; if (num == 0) { rb_ary_free(shared); rb_gc_force_recycle(shared); } else if (num > 0) { ARY_SET_SHARED_NUM(shared, num); } } } static void rb_ary_unshare(VALUE ary) { VALUE shared = RARRAY(ary)->as.heap.aux.shared; rb_ary_decrement_share(shared); FL_UNSET_SHARED(ary); } static inline void rb_ary_unshare_safe(VALUE ary) { if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) { rb_ary_unshare(ary); } } static VALUE rb_ary_increment_share(VALUE shared) { int num = ARY_SHARED_NUM(shared); if (num >= 0) { ARY_SET_SHARED_NUM(shared, num + 1); } return shared; } static void rb_ary_set_shared(VALUE ary, VALUE shared) { rb_ary_increment_share(shared); FL_SET_SHARED(ary); ARY_SET_SHARED(ary, shared); } static inline void rb_ary_modify_check(VALUE ary) { if (OBJ_FROZEN(ary)) rb_error_frozen("array"); if (!OBJ_UNTRUSTED(ary) && rb_safe_level() >= 4) rb_raise(rb_eSecurityError, "Insecure: can't modify array"); } static void rb_ary_modify(VALUE ary) { rb_ary_modify_check(ary); if (ARY_SHARED_P(ary)) { long len = RARRAY_LEN(ary); if (len <= RARRAY_EMBED_LEN_MAX) { VALUE *ptr = ARY_HEAP_PTR(ary); VALUE shared = ARY_SHARED(ary); FL_UNSET_SHARED(ary); FL_SET_EMBED(ary); MEMCPY(ARY_EMBED_PTR(ary), ptr, VALUE, len); rb_ary_decrement_share(shared); ARY_SET_EMBED_LEN(ary, len); } else { VALUE *ptr = ALLOC_N(VALUE, len); MEMCPY(ptr, RARRAY_PTR(ary), VALUE, len); rb_ary_unshare(ary); ARY_SET_CAPA(ary, len); ARY_SET_PTR(ary, ptr); } } } VALUE rb_ary_freeze(VALUE ary) { return rb_obj_freeze(ary); } /* * call-seq: * array.frozen? -> true or false * * Return true if this array is frozen (or temporarily frozen * while being sorted). */ static VALUE rb_ary_frozen_p(VALUE ary) { if (OBJ_FROZEN(ary)) return Qtrue; return Qfalse; } static VALUE ary_alloc(VALUE klass) { NEWOBJ(ary, struct RArray); OBJSETUP(ary, klass, T_ARRAY); FL_SET_EMBED((VALUE)ary); ARY_SET_EMBED_LEN((VALUE)ary, 0); return (VALUE)ary; } static VALUE ary_new(VALUE klass, long len) { VALUE ary; if (len < 0) { rb_raise(rb_eArgError, "negative array size (or size too big)"); } if (len > ARY_MAX_SIZE) { rb_raise(rb_eArgError, "array size too big"); } ary = ary_alloc(klass); if (len > RARRAY_EMBED_LEN_MAX) { FL_UNSET_EMBED(ary); ARY_SET_PTR(ary, ALLOC_N(VALUE, len)); ARY_SET_CAPA(ary, len); ARY_SET_HEAP_LEN(ary, 0); } return ary; } VALUE rb_ary_new2(long len) { return ary_new(rb_cArray, len); } VALUE rb_ary_new(void) { return rb_ary_new2(RARRAY_EMBED_LEN_MAX); } #include VALUE rb_ary_new3(long n, ...) { va_list ar; VALUE ary; long i; ary = rb_ary_new2(n); va_start(ar, n); for (i=0; i 0 && elts) { MEMCPY(RARRAY_PTR(ary), elts, VALUE, n); ARY_SET_LEN(ary, n); } return ary; } VALUE rb_ary_tmp_new(long len) { return ary_new(0, len); } void rb_ary_free(VALUE ary) { if (ARY_OWNS_HEAP_P(ary)) { xfree(RARRAY_PTR(ary)); } } static VALUE ary_make_shared(VALUE ary) { assert(!ARY_EMBED_P(ary)); if (ARY_SHARED_P(ary)) { return ARY_SHARED(ary); } else { NEWOBJ(shared, struct RArray); OBJSETUP(shared, 0, T_ARRAY); FL_UNSET_EMBED(shared); ARY_SET_LEN((VALUE)shared, RARRAY_LEN(ary)); ARY_SET_PTR((VALUE)shared, RARRAY_PTR(ary)); FL_SET_SHARED_ROOT(shared); ARY_SET_SHARED_NUM((VALUE)shared, 1); FL_SET_SHARED(ary); ARY_SET_SHARED(ary, (VALUE)shared); OBJ_FREEZE(shared); return (VALUE)shared; } } static VALUE ary_make_substitution(VALUE ary) { if (RARRAY_LEN(ary) <= RARRAY_EMBED_LEN_MAX) { VALUE subst = rb_ary_new2(RARRAY_LEN(ary)); MEMCPY(ARY_EMBED_PTR(subst), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary)); ARY_SET_EMBED_LEN(subst, RARRAY_LEN(ary)); return subst; } else { return rb_ary_increment_share(ary_make_shared(ary)); } } VALUE rb_assoc_new(VALUE car, VALUE cdr) { return rb_ary_new3(2, car, cdr); } static VALUE to_ary(VALUE ary) { return rb_convert_type(ary, T_ARRAY, "Array", "to_ary"); } VALUE rb_check_array_type(VALUE ary) { return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary"); } /* * call-seq: * Array.try_convert(obj) -> array or nil * * Try to convert obj into an array, using to_ary method. * Returns converted array or nil if obj cannot be converted * for any reason. This method is to check if an argument is an * array. * * Array.try_convert([1]) # => [1] * Array.try_convert("1") # => nil * * if tmp = Array.try_convert(arg) * # the argument is an array * elsif tmp = String.try_convert(arg) * # the argument is a string * end * */ static VALUE rb_ary_s_try_convert(VALUE dummy, VALUE ary) { return rb_check_array_type(ary); } /* * call-seq: * Array.new(size=0, obj=nil) * Array.new(array) * Array.new(size) {|index| block } * * Returns a new array. In the first form, the new array is * empty. In the second it is created with _size_ copies of _obj_ * (that is, _size_ references to the same * _obj_). The third form creates a copy of the array * passed as a parameter (the array is generated by calling * to_ary on the parameter). In the last form, an array * of the given size is created. Each element in this array is * calculated by passing the element's index to the given block and * storing the return value. * * Array.new * Array.new(2) * Array.new(5, "A") * * # only one copy of the object is created * a = Array.new(2, Hash.new) * a[0]['cat'] = 'feline' * a * a[1]['cat'] = 'Felix' * a * * # here multiple copies are created * a = Array.new(2) { Hash.new } * a[0]['cat'] = 'feline' * a * * squares = Array.new(5) {|i| i*i} * squares * * copy = Array.new(squares) */ static VALUE rb_ary_initialize(int argc, VALUE *argv, VALUE ary) { long len; VALUE size, val; rb_ary_modify(ary); if (argc == 0) { if (ARY_OWNS_HEAP_P(ary) && RARRAY_PTR(ary)) { xfree(RARRAY_PTR(ary)); } rb_ary_unshare_safe(ary); FL_SET_EMBED(ary); ARY_SET_EMBED_LEN(ary, 0); if (rb_block_given_p()) { rb_warning("given block not used"); } return ary; } rb_scan_args(argc, argv, "02", &size, &val); if (argc == 1 && !FIXNUM_P(size)) { val = rb_check_array_type(size); if (!NIL_P(val)) { rb_ary_replace(ary, val); return ary; } } len = NUM2LONG(size); if (len < 0) { rb_raise(rb_eArgError, "negative array size"); } if (len > ARY_MAX_SIZE) { rb_raise(rb_eArgError, "array size too big"); } rb_ary_modify(ary); ary_resize_capa(ary, len); if (rb_block_given_p()) { long i; if (argc == 2) { rb_warn("block supersedes default value argument"); } for (i=0; i 0 && argv) { MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc); ARY_SET_LEN(ary, argc); } return ary; } void rb_ary_store(VALUE ary, long idx, VALUE val) { if (idx < 0) { idx += RARRAY_LEN(ary); if (idx < 0) { rb_raise(rb_eIndexError, "index %ld out of array", idx - RARRAY_LEN(ary)); } } else if (idx >= ARY_MAX_SIZE) { rb_raise(rb_eIndexError, "index %ld too big", idx); } rb_ary_modify(ary); if (idx >= ARY_CAPA(ary)) { long new_capa = ARY_CAPA(ary) / 2; if (new_capa < ARY_DEFAULT_SIZE) { new_capa = ARY_DEFAULT_SIZE; } if (new_capa >= ARY_MAX_SIZE - idx) { new_capa = (ARY_MAX_SIZE - idx) / 2; } new_capa += idx; ary_resize_capa(ary, new_capa); } if (idx > RARRAY_LEN(ary)) { rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), idx-RARRAY_LEN(ary) + 1); } if (idx >= RARRAY_LEN(ary)) { ARY_SET_LEN(ary, idx + 1); } RARRAY_PTR(ary)[idx] = val; } static VALUE ary_make_partial(VALUE ary, VALUE klass, long offset, long len) { assert(offset >= 0); assert(len >= 0); assert(offset+len <= RARRAY_LEN(ary)); if (len <= RARRAY_EMBED_LEN_MAX) { VALUE result = ary_alloc(klass); MEMCPY(ARY_EMBED_PTR(result), RARRAY_PTR(ary) + offset, VALUE, len); ARY_SET_EMBED_LEN(result, len); return result; } else { VALUE shared, result = ary_alloc(klass); FL_UNSET_EMBED(result); shared = ary_make_shared(ary); ARY_SET_PTR(result, RARRAY_PTR(ary)); ARY_SET_LEN(result, RARRAY_LEN(ary)); rb_ary_set_shared(result, shared); ARY_INCREASE_PTR(result, offset); ARY_SET_LEN(result, len); return result; } } static VALUE ary_make_shared_copy(VALUE ary) { return ary_make_partial(ary, rb_obj_class(ary), 0, RARRAY_LEN(ary)); } enum ary_take_pos_flags { ARY_TAKE_FIRST = 0, ARY_TAKE_LAST = 1 }; static VALUE ary_take_first_or_last(int argc, VALUE *argv, VALUE ary, enum ary_take_pos_flags last) { VALUE nv; long n; long offset = 0; rb_scan_args(argc, argv, "1", &nv); n = NUM2LONG(nv); if (n > RARRAY_LEN(ary)) { n = RARRAY_LEN(ary); } else if (n < 0) { rb_raise(rb_eArgError, "negative array size"); } if (last) { offset = RARRAY_LEN(ary) - n; } return ary_make_partial(ary, rb_cArray, offset, n); } /* * call-seq: * array << obj -> array * * Append---Pushes the given object on to the end of this array. This * expression returns the array itself, so several appends * may be chained together. * * [ 1, 2 ] << "c" << "d" << [ 3, 4 ] * #=> [ 1, 2, "c", "d", [ 3, 4 ] ] * */ VALUE rb_ary_push(VALUE ary, VALUE item) { rb_ary_store(ary, RARRAY_LEN(ary), item); return ary; } /* * call-seq: * array.push(obj, ... ) -> array * * Append---Pushes the given object(s) on to the end of this array. This * expression returns the array itself, so several appends * may be chained together. * * a = [ "a", "b", "c" ] * a.push("d", "e", "f") * #=> ["a", "b", "c", "d", "e", "f"] */ static VALUE rb_ary_push_m(int argc, VALUE *argv, VALUE ary) { rb_ary_modify_check(ary); while (argc--) { rb_ary_push(ary, *argv++); } return ary; } VALUE rb_ary_pop(VALUE ary) { long n; rb_ary_modify_check(ary); if (RARRAY_LEN(ary) == 0) return Qnil; if (ARY_OWNS_HEAP_P(ary) && RARRAY_LEN(ary) * 3 < ARY_CAPA(ary) && ARY_CAPA(ary) > ARY_DEFAULT_SIZE) { ary_resize_capa(ary, RARRAY_LEN(ary) * 2); } n = RARRAY_LEN(ary)-1; ARY_SET_LEN(ary, n); return RARRAY_PTR(ary)[n]; } /* * call-seq: * array.pop -> obj or nil * array.pop(n) -> array * * Removes the last element from self and returns it, or * nil if the array is empty. * * If a number _n_ is given, returns an array of the last n elements * (or less) just like array.slice!(-n, n) does. * * a = [ "a", "b", "c", "d" ] * a.pop #=> "d" * a.pop(2) #=> ["b", "c"] * a #=> ["a"] */ static VALUE rb_ary_pop_m(int argc, VALUE *argv, VALUE ary) { VALUE result; if (argc == 0) { return rb_ary_pop(ary); } rb_ary_modify_check(ary); result = ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST); ARY_INCREASE_LEN(ary, -RARRAY_LEN(result)); return result; } VALUE rb_ary_shift(VALUE ary) { VALUE top; rb_ary_modify_check(ary); if (RARRAY_LEN(ary) == 0) return Qnil; top = RARRAY_PTR(ary)[0]; if (!ARY_SHARED_P(ary)) { if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) { MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, RARRAY_LEN(ary)-1); ARY_INCREASE_LEN(ary, -1); return top; } assert(!ARY_EMBED_P(ary)); /* ARY_EMBED_LEN_MAX < ARY_DEFAULT_SIZE */ RARRAY_PTR(ary)[0] = Qnil; ary_make_shared(ary); } ARY_INCREASE_PTR(ary, 1); /* shift ptr */ ARY_INCREASE_LEN(ary, -1); return top; } /* * call-seq: * array.shift -> obj or nil * array.shift(n) -> array * * Returns the first element of self and removes it (shifting all * other elements down by one). Returns nil if the array * is empty. * * If a number _n_ is given, returns an array of the first n elements * (or less) just like array.slice!(0, n) does. * * args = [ "-m", "-q", "filename" ] * args.shift #=> "-m" * args #=> ["-q", "filename"] * * args = [ "-m", "-q", "filename" ] * args.shift(2) #=> ["-m", "-q"] * args #=> ["filename"] */ static VALUE rb_ary_shift_m(int argc, VALUE *argv, VALUE ary) { VALUE result; long n; if (argc == 0) { return rb_ary_shift(ary); } rb_ary_modify_check(ary); result = ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST); n = RARRAY_LEN(result); if (ARY_SHARED_P(ary)) { ARY_INCREASE_PTR(ary, n); } else { MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE, RARRAY_LEN(ary)-n); } ARY_INCREASE_LEN(ary, -n); return result; } /* * call-seq: * array.unshift(obj, ...) -> array * * Prepends objects to the front of array. * other elements up one. * * a = [ "b", "c", "d" ] * a.unshift("a") #=> ["a", "b", "c", "d"] * a.unshift(1, 2) #=> [ 1, 2, "a", "b", "c", "d"] */ static VALUE rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary) { long len; if (argc == 0) return ary; rb_ary_modify(ary); if (ARY_CAPA(ary) <= (len = RARRAY_LEN(ary)) + argc) { ary_resize_capa(ary, len + argc + ARY_DEFAULT_SIZE); } /* sliding items */ MEMMOVE(RARRAY_PTR(ary) + argc, RARRAY_PTR(ary), VALUE, len); MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc); ARY_INCREASE_LEN(ary, argc); return ary; } VALUE rb_ary_unshift(VALUE ary, VALUE item) { return rb_ary_unshift_m(1,&item,ary); } /* faster version - use this if you don't need to treat negative offset */ static inline VALUE rb_ary_elt(VALUE ary, long offset) { if (RARRAY_LEN(ary) == 0) return Qnil; if (offset < 0 || RARRAY_LEN(ary) <= offset) { return Qnil; } return RARRAY_PTR(ary)[offset]; } VALUE rb_ary_entry(VALUE ary, long offset) { if (offset < 0) { offset += RARRAY_LEN(ary); } return rb_ary_elt(ary, offset); } VALUE rb_ary_subseq(VALUE ary, long beg, long len) { VALUE klass; if (beg > RARRAY_LEN(ary)) return Qnil; if (beg < 0 || len < 0) return Qnil; if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) { len = RARRAY_LEN(ary) - beg; } klass = rb_obj_class(ary); if (len == 0) return ary_new(klass, 0); return ary_make_partial(ary, klass, beg, len); } /* * call-seq: * array[index] -> obj or nil * array[start, length] -> an_array or nil * array[range] -> an_array or nil * array.slice(index) -> obj or nil * array.slice(start, length) -> an_array or nil * array.slice(range) -> an_array or nil * * Element Reference---Returns the element at _index_, * or returns a subarray starting at _start_ and * continuing for _length_ elements, or returns a subarray * specified by _range_. * Negative indices count backward from the end of the * array (-1 is the last element). Returns nil if the index * (or starting index) are out of range. * * a = [ "a", "b", "c", "d", "e" ] * a[2] + a[0] + a[1] #=> "cab" * a[6] #=> nil * a[1, 2] #=> [ "b", "c" ] * a[1..3] #=> [ "b", "c", "d" ] * a[4..7] #=> [ "e" ] * a[6..10] #=> nil * a[-3, 3] #=> [ "c", "d", "e" ] * # special cases * a[5] #=> nil * a[5, 1] #=> [] * a[5..10] #=> [] * */ VALUE rb_ary_aref(int argc, VALUE *argv, VALUE ary) { VALUE arg; long beg, len; if (argc == 2) { beg = NUM2LONG(argv[0]); len = NUM2LONG(argv[1]); if (beg < 0) { beg += RARRAY_LEN(ary); } return rb_ary_subseq(ary, beg, len); } if (argc != 1) { rb_scan_args(argc, argv, "11", 0, 0); } arg = argv[0]; /* special case - speeding up */ if (FIXNUM_P(arg)) { return rb_ary_entry(ary, FIX2LONG(arg)); } /* check if idx is Range */ switch (rb_range_beg_len(arg, &beg, &len, RARRAY_LEN(ary), 0)) { case Qfalse: break; case Qnil: return Qnil; default: return rb_ary_subseq(ary, beg, len); } return rb_ary_entry(ary, NUM2LONG(arg)); } /* * call-seq: * array.at(index) -> obj or nil * * Returns the element at _index_. A * negative index counts from the end of _self_. Returns +nil+ * if the index is out of range. See also Array#[]. * * a = [ "a", "b", "c", "d", "e" ] * a.at(0) #=> "a" * a.at(-1) #=> "e" */ static VALUE rb_ary_at(VALUE ary, VALUE pos) { return rb_ary_entry(ary, NUM2LONG(pos)); } /* * call-seq: * array.first -> obj or nil * array.first(n) -> an_array * * Returns the first element, or the first +n+ elements, of the array. * If the array is empty, the first form returns nil, and the * second form returns an empty array. * * a = [ "q", "r", "s", "t" ] * a.first #=> "q" * a.first(2) #=> ["q", "r"] */ static VALUE rb_ary_first(int argc, VALUE *argv, VALUE ary) { if (argc == 0) { if (RARRAY_LEN(ary) == 0) return Qnil; return RARRAY_PTR(ary)[0]; } else { return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST); } } /* * call-seq: * array.last -> obj or nil * array.last(n) -> an_array * * Returns the last element(s) of self. If the array is empty, * the first form returns nil. * * a = [ "w", "x", "y", "z" ] * a.last #=> "z" * a.last(2) #=> ["y", "z"] */ VALUE rb_ary_last(int argc, VALUE *argv, VALUE ary) { if (argc == 0) { if (RARRAY_LEN(ary) == 0) return Qnil; return RARRAY_PTR(ary)[RARRAY_LEN(ary)-1]; } else { return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST); } } /* * call-seq: * array.fetch(index) -> obj * array.fetch(index, default ) -> obj * array.fetch(index) {|index| block } -> obj * * Tries to return the element at position index. If the index * lies outside the array, the first form throws an * IndexError exception, the second form returns * default, and the third form returns the value of invoking * the block, passing in the index. Negative values of index * count from the end of the array. * * a = [ 11, 22, 33, 44 ] * a.fetch(1) #=> 22 * a.fetch(-1) #=> 44 * a.fetch(4, 'cat') #=> "cat" * a.fetch(4) { |i| i*i } #=> 16 */ static VALUE rb_ary_fetch(int argc, VALUE *argv, VALUE ary) { VALUE pos, ifnone; long block_given; long idx; rb_scan_args(argc, argv, "11", &pos, &ifnone); block_given = rb_block_given_p(); if (block_given && argc == 2) { rb_warn("block supersedes default value argument"); } idx = NUM2LONG(pos); if (idx < 0) { idx += RARRAY_LEN(ary); } if (idx < 0 || RARRAY_LEN(ary) <= idx) { if (block_given) return rb_yield(pos); if (argc == 1) { rb_raise(rb_eIndexError, "index %ld out of array", idx); } return ifnone; } return RARRAY_PTR(ary)[idx]; } /* * call-seq: * array.index(obj) -> int or nil * array.index {|item| block} -> int or nil * * Returns the index of the first object in self such that is * == to obj. If a block is given instead of an * argument, returns first object for which block is true. * Returns nil if no match is found. * * a = [ "a", "b", "c" ] * a.index("b") #=> 1 * a.index("z") #=> nil * a.index{|x|x=="b"} #=> 1 * * This is an alias of #find_index. */ static VALUE rb_ary_index(int argc, VALUE *argv, VALUE ary) { VALUE val; long i; if (argc == 0) { RETURN_ENUMERATOR(ary, 0, 0); for (i=0; i int or nil * * Returns the index of the last object in array * == to obj. If a block is given instead of an * argument, returns first object for which block is * true. Returns nil if no match is found. * * a = [ "a", "b", "b", "b", "c" ] * a.rindex("b") #=> 3 * a.rindex("z") #=> nil * a.rindex{|x|x=="b"} #=> 3 */ static VALUE rb_ary_rindex(int argc, VALUE *argv, VALUE ary) { VALUE val; long i = RARRAY_LEN(ary); if (argc == 0) { RETURN_ENUMERATOR(ary, 0, 0); while (i--) { if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) return LONG2NUM(i); if (i > RARRAY_LEN(ary)) { i = RARRAY_LEN(ary); } } return Qnil; } rb_scan_args(argc, argv, "01", &val); while (i--) { if (rb_equal(RARRAY_PTR(ary)[i], val)) return LONG2NUM(i); if (i > RARRAY_LEN(ary)) { i = RARRAY_LEN(ary); } } return Qnil; } VALUE rb_ary_to_ary(VALUE obj) { if (TYPE(obj) == T_ARRAY) { return obj; } if (rb_respond_to(obj, rb_intern("to_ary"))) { return to_ary(obj); } return rb_ary_new3(1, obj); } static void rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl) { long rlen; if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len); if (beg < 0) { beg += RARRAY_LEN(ary); if (beg < 0) { beg -= RARRAY_LEN(ary); rb_raise(rb_eIndexError, "index %ld out of array", beg); } } if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) { len = RARRAY_LEN(ary) - beg; } if (rpl == Qundef) { rlen = 0; } else { rpl = rb_ary_to_ary(rpl); rlen = RARRAY_LEN(rpl); } rb_ary_modify(ary); if (beg >= RARRAY_LEN(ary)) { if (beg > ARY_MAX_SIZE - rlen) { rb_raise(rb_eIndexError, "index %ld too big", beg); } len = beg + rlen; if (len >= ARY_CAPA(ary)) { ary_resize_capa(ary, len); } rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), beg - RARRAY_LEN(ary)); if (rlen > 0) { MEMCPY(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen); } ARY_SET_LEN(ary, len); } else { long alen; alen = RARRAY_LEN(ary) + rlen - len; if (alen >= ARY_CAPA(ary)) { ary_resize_capa(ary, alen); } if (len != rlen) { MEMMOVE(RARRAY_PTR(ary) + beg + rlen, RARRAY_PTR(ary) + beg + len, VALUE, RARRAY_LEN(ary) - (beg + len)); ARY_SET_LEN(ary, alen); } if (rlen > 0) { MEMMOVE(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen); } } } /* * call-seq: * array[index] = obj -> obj * array[start, length] = obj or an_array or nil -> obj or an_array or nil * array[range] = obj or an_array or nil -> obj or an_array or nil * * Element Assignment---Sets the element at _index_, * or replaces a subarray starting at _start_ and * continuing for _length_ elements, or replaces a subarray * specified by _range_. If indices are greater than * the current capacity of the array, the array grows * automatically. A negative indices will count backward * from the end of the array. Inserts elements if _length_ is * zero. An +IndexError+ is raised if a negative index points * past the beginning of the array. See also * Array#push, and Array#unshift. * * a = Array.new * a[4] = "4"; #=> [nil, nil, nil, nil, "4"] * a[0, 3] = [ 'a', 'b', 'c' ] #=> ["a", "b", "c", nil, "4"] * a[1..2] = [ 1, 2 ] #=> ["a", 1, 2, nil, "4"] * a[0, 2] = "?" #=> ["?", 2, nil, "4"] * a[0..2] = "A" #=> ["A", "4"] * a[-1] = "Z" #=> ["A", "Z"] * a[1..-1] = nil #=> ["A", nil] * a[1..-1] = [] #=> ["A"] */ static VALUE rb_ary_aset(int argc, VALUE *argv, VALUE ary) { long offset, beg, len; if (argc == 3) { beg = NUM2LONG(argv[0]); len = NUM2LONG(argv[1]); rb_ary_splice(ary, beg, len, argv[2]); return argv[2]; } if (argc != 2) { rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc); } if (FIXNUM_P(argv[0])) { offset = FIX2LONG(argv[0]); goto fixnum; } if (rb_range_beg_len(argv[0], &beg, &len, RARRAY_LEN(ary), 1)) { /* check if idx is Range */ rb_ary_splice(ary, beg, len, argv[1]); return argv[1]; } offset = NUM2LONG(argv[0]); fixnum: rb_ary_store(ary, offset, argv[1]); return argv[1]; } /* * call-seq: * array.insert(index, obj...) -> array * * Inserts the given values before the element with the given index * (which may be negative). * * a = %w{ a b c d } * a.insert(2, 99) #=> ["a", "b", 99, "c", "d"] * a.insert(-2, 1, 2, 3) #=> ["a", "b", 99, "c", 1, 2, 3, "d"] */ static VALUE rb_ary_insert(int argc, VALUE *argv, VALUE ary) { long pos; if (argc == 1) return ary; if (argc < 1) { rb_raise(rb_eArgError, "wrong number of arguments (at least 1)"); } pos = NUM2LONG(argv[0]); if (pos == -1) { pos = RARRAY_LEN(ary); } if (pos < 0) { pos++; } rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1)); return ary; } /* * call-seq: * array.each {|item| block } -> array * * Calls block once for each element in self, passing that * element as a parameter. * * a = [ "a", "b", "c" ] * a.each {|x| print x, " -- " } * * produces: * * a -- b -- c -- */ VALUE rb_ary_each(VALUE ary) { long i; RETURN_ENUMERATOR(ary, 0, 0); for (i=0; i array * * Same as Array#each, but passes the index of the element * instead of the element itself. * * a = [ "a", "b", "c" ] * a.each_index {|x| print x, " -- " } * * produces: * * 0 -- 1 -- 2 -- */ static VALUE rb_ary_each_index(VALUE ary) { long i; RETURN_ENUMERATOR(ary, 0, 0); for (i=0; iArray#each, but traverses self in reverse * order. * * a = [ "a", "b", "c" ] * a.reverse_each {|x| print x, " " } * * produces: * * c b a */ static VALUE rb_ary_reverse_each(VALUE ary) { long len; RETURN_ENUMERATOR(ary, 0, 0); len = RARRAY_LEN(ary); while (len--) { rb_yield(RARRAY_PTR(ary)[len]); if (RARRAY_LEN(ary) < len) { len = RARRAY_LEN(ary); } } return ary; } /* * call-seq: * array.length -> int * * Returns the number of elements in self. May be zero. * * [ 1, 2, 3, 4, 5 ].length #=> 5 */ static VALUE rb_ary_length(VALUE ary) { long len = RARRAY_LEN(ary); return LONG2NUM(len); } /* * call-seq: * array.empty? -> true or false * * Returns true if self array contains no elements. * * [].empty? #=> true */ static VALUE rb_ary_empty_p(VALUE ary) { if (RARRAY_LEN(ary) == 0) return Qtrue; return Qfalse; } VALUE rb_ary_dup(VALUE ary) { VALUE dup = rb_ary_new2(RARRAY_LEN(ary)); int is_embed = ARY_EMBED_P(dup); DUPSETUP(dup, ary); if (is_embed) FL_SET_EMBED(dup); MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary)); ARY_SET_LEN(dup, RARRAY_LEN(ary)); return dup; } extern VALUE rb_output_fs; static VALUE recursive_join(VALUE ary, VALUE argp, int recur) { VALUE *arg = (VALUE *)argp; if (recur) { return rb_usascii_str_new2("[...]"); } return rb_ary_join(arg[0], arg[1]); } VALUE rb_ary_join(VALUE ary, VALUE sep) { long len = 1, i; int taint = Qfalse; int untrust = Qfalse; VALUE result, tmp; if (RARRAY_LEN(ary) == 0) return rb_str_new(0, 0); if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = Qtrue; if (OBJ_UNTRUSTED(ary) || OBJ_UNTRUSTED(sep)) untrust = Qtrue; for (i=0; i 0 && !NIL_P(sep)) rb_str_buf_append(result, sep); rb_str_buf_append(result, tmp); if (OBJ_TAINTED(tmp)) taint = Qtrue; if (OBJ_UNTRUSTED(tmp)) untrust = Qtrue; } if (taint) OBJ_TAINT(result); if (untrust) OBJ_UNTRUST(result); return result; } /* * call-seq: * array.join(sep=$,) -> str * * Returns a string created by converting each element of the array to * a string, separated by sep. * * [ "a", "b", "c" ].join #=> "abc" * [ "a", "b", "c" ].join("-") #=> "a-b-c" */ static VALUE rb_ary_join_m(int argc, VALUE *argv, VALUE ary) { VALUE sep; rb_scan_args(argc, argv, "01", &sep); if (NIL_P(sep)) sep = rb_output_fs; return rb_ary_join(ary, sep); } static VALUE inspect_ary(VALUE ary, VALUE dummy, int recur) { int tainted = OBJ_TAINTED(ary); int untrust = OBJ_UNTRUSTED(ary); long i; VALUE s, str; if (recur) return rb_tainted_str_new2("[...]"); str = rb_str_buf_new2("["); for (i=0; i 0) rb_str_buf_cat2(str, ", "); rb_str_buf_append(str, s); } rb_str_buf_cat2(str, "]"); if (tainted) OBJ_TAINT(str); if (untrust) OBJ_UNTRUST(str); return str; } /* * call-seq: * array.to_s -> string * array.inspect -> string * * Create a printable version of array. */ static VALUE rb_ary_inspect(VALUE ary) { if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new2("[]"); return rb_exec_recursive(inspect_ary, ary, 0); } VALUE rb_ary_to_s(VALUE ary) { return rb_ary_inspect(ary); } /* * call-seq: * array.to_a -> array * * Returns _self_. If called on a subclass of Array, converts * the receiver to an Array object. */ static VALUE rb_ary_to_a(VALUE ary) { if (rb_obj_class(ary) != rb_cArray) { VALUE dup = rb_ary_new2(RARRAY_LEN(ary)); rb_ary_replace(dup, ary); return dup; } return ary; } /* * call-seq: * array.to_ary -> array * * Returns _self_. */ static VALUE rb_ary_to_ary_m(VALUE ary) { return ary; } VALUE rb_ary_reverse(VALUE ary) { VALUE *p1, *p2; VALUE tmp; rb_ary_modify(ary); if (RARRAY_LEN(ary) > 1) { p1 = RARRAY_PTR(ary); p2 = p1 + RARRAY_LEN(ary) - 1; /* points last item */ while (p1 < p2) { tmp = *p1; *p1++ = *p2; *p2-- = tmp; } } return ary; } /* * call-seq: * array.reverse! -> array * * Reverses _self_ in place. * * a = [ "a", "b", "c" ] * a.reverse! #=> ["c", "b", "a"] * a #=> ["c", "b", "a"] */ static VALUE rb_ary_reverse_bang(VALUE ary) { return rb_ary_reverse(ary); } /* * call-seq: * array.reverse -> an_array * * Returns a new array containing self's elements in reverse order. * * [ "a", "b", "c" ].reverse #=> ["c", "b", "a"] * [ 1 ].reverse #=> [1] */ static VALUE rb_ary_reverse_m(VALUE ary) { return rb_ary_reverse(rb_ary_dup(ary)); } struct ary_sort_data { VALUE ary; int opt_methods; int opt_inited; }; enum { sort_opt_Fixnum, sort_opt_String, sort_optimizable_count }; #define STRING_P(s) (TYPE(s) == T_STRING && CLASS_OF(s) == rb_cString) #define SORT_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(sort_opt_,type)) #define SORT_OPTIMIZABLE(data, type) \ ((data->opt_inited & SORT_OPTIMIZABLE_BIT(type)) ? \ (data->opt_methods & SORT_OPTIMIZABLE_BIT(type)) : \ ((data->opt_inited |= SORT_OPTIMIZABLE_BIT(type)), \ rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && \ (data->opt_methods |= SORT_OPTIMIZABLE_BIT(type)))) static VALUE sort_reentered(VALUE ary) { if (RBASIC(ary)->klass) { rb_raise(rb_eRuntimeError, "sort reentered"); } return Qnil; } static int sort_1(const void *ap, const void *bp, void *dummy) { struct ary_sort_data *data = dummy; VALUE retval = sort_reentered(data->ary); VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp; int n; retval = rb_yield_values(2, a, b); n = rb_cmpint(retval, a, b); sort_reentered(data->ary); return n; } static int sort_2(const void *ap, const void *bp, void *dummy) { struct ary_sort_data *data = dummy; VALUE retval = sort_reentered(data->ary); VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp; int n; if (FIXNUM_P(a) && FIXNUM_P(b) && SORT_OPTIMIZABLE(data, Fixnum)) { if ((long)a > (long)b) return 1; if ((long)a < (long)b) return -1; return 0; } if (STRING_P(a) && STRING_P(b) && SORT_OPTIMIZABLE(data, String)) { return rb_str_cmp(a, b); } retval = rb_funcall(a, id_cmp, 1, b); n = rb_cmpint(retval, a, b); sort_reentered(data->ary); return n; } /* * call-seq: * array.sort! -> array * array.sort! {| a,b | block } -> array * * Sorts _self_. Comparisons for * the sort will be done using the <=> operator or using * an optional code block. The block implements a comparison between * a and b, returning -1, 0, or +1. See also * Enumerable#sort_by. * * a = [ "d", "a", "e", "c", "b" ] * a.sort #=> ["a", "b", "c", "d", "e"] * a.sort {|x,y| y <=> x } #=> ["e", "d", "c", "b", "a"] */ VALUE rb_ary_sort_bang(VALUE ary) { rb_ary_modify(ary); assert(!ARY_SHARED_P(ary)); if (RARRAY_LEN(ary) > 1) { VALUE tmp = ary_make_substitution(ary); /* only ary refers tmp */ struct ary_sort_data data; RBASIC(tmp)->klass = 0; data.ary = tmp; data.opt_methods = 0; data.opt_inited = 0; ruby_qsort(RARRAY_PTR(tmp), RARRAY_LEN(tmp), sizeof(VALUE), rb_block_given_p()?sort_1:sort_2, &data); if (ARY_EMBED_P(tmp)) { assert(ARY_EMBED_P(tmp)); if (ARY_SHARED_P(ary)) { /* ary might be destructively operated in the given block */ rb_ary_unshare(ary); } FL_SET_EMBED(ary); MEMCPY(RARRAY_PTR(ary), ARY_EMBED_PTR(tmp), VALUE, ARY_EMBED_LEN(tmp)); ARY_SET_LEN(ary, ARY_EMBED_LEN(tmp)); } else { assert(!ARY_EMBED_P(tmp)); if (ARY_HEAP_PTR(ary) == ARY_HEAP_PTR(tmp)) { assert(!ARY_EMBED_P(ary)); FL_UNSET_SHARED(ary); ARY_SET_CAPA(ary, ARY_CAPA(tmp)); } else { assert(!ARY_SHARED_P(tmp)); if (ARY_EMBED_P(ary)) { FL_UNSET_EMBED(ary); } else if (ARY_SHARED_P(ary)) { /* ary might be destructively operated in the given block */ rb_ary_unshare(ary); } else { xfree(ARY_HEAP_PTR(ary)); } ARY_SET_PTR(ary, RARRAY_PTR(tmp)); ARY_SET_HEAP_LEN(ary, RARRAY_LEN(tmp)); ARY_SET_CAPA(ary, ARY_CAPA(tmp)); } /* tmp was lost ownership for the ptr */ FL_UNSET(tmp, FL_FREEZE); FL_SET_EMBED(tmp); ARY_SET_EMBED_LEN(tmp, 0); FL_SET(tmp, FL_FREEZE); } /* tmp will be GC'ed. */ RBASIC(tmp)->klass = rb_cArray; } return ary; } /* * call-seq: * array.sort -> an_array * array.sort {| a,b | block } -> an_array * * Returns a new array created by sorting self. Comparisons for * the sort will be done using the <=> operator or using * an optional code block. The block implements a comparison between * a and b, returning -1, 0, or +1. See also * Enumerable#sort_by. * * a = [ "d", "a", "e", "c", "b" ] * a.sort #=> ["a", "b", "c", "d", "e"] * a.sort {|x,y| y <=> x } #=> ["e", "d", "c", "b", "a"] */ VALUE rb_ary_sort(VALUE ary) { ary = rb_ary_dup(ary); rb_ary_sort_bang(ary); return ary; } /* * call-seq: * array.collect {|item| block } -> an_array * array.map {|item| block } -> an_array * * Invokes block once for each element of self. Creates a * new array containing the values returned by the block. * See also Enumerable#collect. * * a = [ "a", "b", "c", "d" ] * a.collect {|x| x + "!" } #=> ["a!", "b!", "c!", "d!"] * a #=> ["a", "b", "c", "d"] */ static VALUE rb_ary_collect(VALUE ary) { long i; VALUE collect; RETURN_ENUMERATOR(ary, 0, 0); collect = rb_ary_new2(RARRAY_LEN(ary)); for (i = 0; i < RARRAY_LEN(ary); i++) { rb_ary_push(collect, rb_yield(RARRAY_PTR(ary)[i])); } return collect; } /* * call-seq: * array.collect! {|item| block } -> array * array.map! {|item| block } -> array * * Invokes the block once for each element of _self_, replacing the * element with the value returned by _block_. * See also Enumerable#collect. * * a = [ "a", "b", "c", "d" ] * a.collect! {|x| x + "!" } * a #=> [ "a!", "b!", "c!", "d!" ] */ static VALUE rb_ary_collect_bang(VALUE ary) { long i; RETURN_ENUMERATOR(ary, 0, 0); rb_ary_modify(ary); for (i = 0; i < RARRAY_LEN(ary); i++) { rb_ary_store(ary, i, rb_yield(RARRAY_PTR(ary)[i])); } return ary; } VALUE rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE (*func) (VALUE, long)) { VALUE result = rb_ary_new2(argc); long beg, len, i, j; for (i=0; i an_array * * Returns an array containing the elements in * _self_ corresponding to the given selector(s). The selectors * may be either integer indices or ranges. * See also Array#select. * * a = %w{ a b c d e f } * a.values_at(1, 3, 5) * a.values_at(1, 3, 5, 7) * a.values_at(-1, -3, -5, -7) * a.values_at(1..3, 2...5) */ static VALUE rb_ary_values_at(int argc, VALUE *argv, VALUE ary) { return rb_get_values_at(ary, RARRAY_LEN(ary), argc, argv, rb_ary_entry); } /* * call-seq: * array.select {|item| block } -> an_array * * Invokes the block passing in successive elements from array, * returning an array containing those elements for which the block * returns a true value (equivalent to Enumerable#select). * * a = %w{ a b c d e f } * a.select {|v| v =~ /[aeiou]/} #=> ["a", "e"] */ static VALUE rb_ary_select(VALUE ary) { VALUE result; long i; RETURN_ENUMERATOR(ary, 0, 0); result = rb_ary_new2(RARRAY_LEN(ary)); for (i = 0; i < RARRAY_LEN(ary); i++) { if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) { rb_ary_push(result, rb_ary_elt(ary, i)); } } return result; } /* * call-seq: * array.delete(obj) -> obj or nil * array.delete(obj) { block } -> obj or nil * * Deletes items from self that are equal to obj. If * the item is not found, returns nil. If the optional * code block is given, returns the result of block if the item * is not found. * * a = [ "a", "b", "b", "b", "c" ] * a.delete("b") #=> "b" * a #=> ["a", "c"] * a.delete("z") #=> nil * a.delete("z") { "not found" } #=> "not found" */ VALUE rb_ary_delete(VALUE ary, VALUE item) { VALUE v = item; long i1, i2; for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) { VALUE e = RARRAY_PTR(ary)[i1]; if (rb_equal(e, item)) { v = e; continue; } if (i1 != i2) { rb_ary_store(ary, i2, e); } i2++; } if (RARRAY_LEN(ary) == i2) { if (rb_block_given_p()) { return rb_yield(item); } return Qnil; } rb_ary_modify(ary); if (RARRAY_LEN(ary) > i2) { ARY_SET_LEN(ary, i2); if (i2 * 2 < ARY_CAPA(ary) && ARY_CAPA(ary) > ARY_DEFAULT_SIZE) { ary_resize_capa(ary, i2*2); } } return v; } VALUE rb_ary_delete_at(VALUE ary, long pos) { long len = RARRAY_LEN(ary); VALUE del; if (pos >= len) return Qnil; if (pos < 0) { pos += len; if (pos < 0) return Qnil; } rb_ary_modify(ary); del = RARRAY_PTR(ary)[pos]; MEMMOVE(RARRAY_PTR(ary)+pos, RARRAY_PTR(ary)+pos+1, VALUE, RARRAY_LEN(ary)-pos-1); ARY_INCREASE_LEN(ary, -1); return del; } /* * call-seq: * array.delete_at(index) -> obj or nil * * Deletes the element at the specified index, returning that element, * or nil if the index is out of range. See also * Array#slice!. * * a = %w( ant bat cat dog ) * a.delete_at(2) #=> "cat" * a #=> ["ant", "bat", "dog"] * a.delete_at(99) #=> nil */ static VALUE rb_ary_delete_at_m(VALUE ary, VALUE pos) { return rb_ary_delete_at(ary, NUM2LONG(pos)); } /* * call-seq: * array.slice!(index) -> obj or nil * array.slice!(start, length) -> sub_array or nil * array.slice!(range) -> sub_array or nil * * Deletes the element(s) given by an index (optionally with a length) * or by a range. Returns the deleted object, subarray, or * nil if the index is out of range. * * a = [ "a", "b", "c" ] * a.slice!(1) #=> "b" * a #=> ["a", "c"] * a.slice!(-1) #=> "c" * a #=> ["a"] * a.slice!(100) #=> nil * a #=> ["a"] */ static VALUE rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary) { VALUE arg1, arg2; long pos, len, orig_len; rb_ary_modify_check(ary); if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) { pos = NUM2LONG(arg1); len = NUM2LONG(arg2); delete_pos_len: if (len < 0) return Qnil; orig_len = RARRAY_LEN(ary); if (pos < 0) { pos += orig_len; if (pos < 0) return Qnil; } else if (orig_len < pos) return Qnil; if (orig_len < pos + len) { len = orig_len - pos; } if (len == 0) return rb_ary_new2(0); arg2 = rb_ary_new4(len, RARRAY_PTR(ary)+pos); RBASIC(arg2)->klass = rb_obj_class(ary); rb_ary_splice(ary, pos, len, Qundef); return arg2; } if (!FIXNUM_P(arg1)) { switch (rb_range_beg_len(arg1, &pos, &len, RARRAY_LEN(ary), 0)) { case Qtrue: /* valid range */ goto delete_pos_len; case Qnil: /* invalid range */ return Qnil; default: /* not a range */ break; } } return rb_ary_delete_at(ary, NUM2LONG(arg1)); } /* * call-seq: * array.reject! {|item| block } -> array or nil * * Equivalent to Array#delete_if, deleting elements from * _self_ for which the block evaluates to true, but returns * nil if no changes were made. Also see * Enumerable#reject. */ static VALUE rb_ary_reject_bang(VALUE ary) { long i1, i2; RETURN_ENUMERATOR(ary, 0, 0); rb_ary_modify(ary); for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) { VALUE v = RARRAY_PTR(ary)[i1]; if (RTEST(rb_yield(v))) continue; if (i1 != i2) { rb_ary_store(ary, i2, v); } i2++; } if (RARRAY_LEN(ary) == i2) return Qnil; if (i2 < RARRAY_LEN(ary)) ARY_SET_LEN(ary, i2); return ary; } /* * call-seq: * array.reject {|item| block } -> an_array * * Returns a new array containing the items in _self_ * for which the block is not true. */ static VALUE rb_ary_reject(VALUE ary) { RETURN_ENUMERATOR(ary, 0, 0); ary = rb_ary_dup(ary); rb_ary_reject_bang(ary); return ary; } /* * call-seq: * array.delete_if {|item| block } -> array * * Deletes every element of self for which block evaluates * to true. * * a = [ "a", "b", "c" ] * a.delete_if {|x| x >= "b" } #=> ["a"] */ static VALUE rb_ary_delete_if(VALUE ary) { RETURN_ENUMERATOR(ary, 0, 0); rb_ary_reject_bang(ary); return ary; } static VALUE take_i(VALUE val, VALUE *args, int argc, VALUE *argv) { if (args[1]-- == 0) rb_iter_break(); if (argc > 1) val = rb_ary_new4(argc, argv); rb_ary_push(args[0], val); return Qnil; } static VALUE take_items(VALUE obj, long n) { VALUE result = rb_check_array_type(obj); VALUE args[2]; if (!NIL_P(result)) return rb_ary_subseq(result, 0, n); result = rb_ary_new2(n); args[0] = result; args[1] = (VALUE)n; rb_block_call(obj, rb_intern("each"), 0, 0, take_i, (VALUE)args); return result; } /* * call-seq: * array.zip(arg, ...) -> an_array * array.zip(arg, ...) {| arr | block } -> nil * * Converts any arguments to arrays, then merges elements of * self with corresponding elements from each argument. This * generates a sequence of self.size n-element * arrays, where n is one more that the count of arguments. If * the size of any argument is less than enumObj.size, * nil values are supplied. If a block given, it is * invoked for each output array, otherwise an array of arrays is * returned. * * a = [ 4, 5, 6 ] * b = [ 7, 8, 9 ] * [1,2,3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]] * [1,2].zip(a,b) #=> [[1, 4, 7], [2, 5, 8]] * a.zip([1,2],[8]) #=> [[4,1,8], [5,2,nil], [6,nil,nil]] */ static VALUE rb_ary_zip(int argc, VALUE *argv, VALUE ary) { int i, j; long len; VALUE result = Qnil; len = RARRAY_LEN(ary); for (i=0; i an_array * * Assumes that self is an array of arrays and transposes the * rows and columns. * * a = [[1,2], [3,4], [5,6]] * a.transpose #=> [[1, 3, 5], [2, 4, 6]] */ static VALUE rb_ary_transpose(VALUE ary) { long elen = -1, alen, i, j; VALUE tmp, result = 0; alen = RARRAY_LEN(ary); if (alen == 0) return rb_ary_dup(ary); for (i=0; i array * * Replaces the contents of self with the contents of * other_array, truncating or expanding if necessary. * * a = [ "a", "b", "c", "d", "e" ] * a.replace([ "x", "y", "z" ]) #=> ["x", "y", "z"] * a #=> ["x", "y", "z"] */ VALUE rb_ary_replace(VALUE copy, VALUE orig) { orig = to_ary(orig); rb_ary_modify_check(copy); if (copy == orig) return copy; if (RARRAY_LEN(orig) <= RARRAY_EMBED_LEN_MAX) { VALUE *ptr; VALUE shared = 0; if (ARY_OWNS_HEAP_P(copy)) { xfree(RARRAY_PTR(copy)); } else if (ARY_SHARED_P(copy)) { shared = ARY_SHARED(copy); FL_UNSET_SHARED(copy); } FL_SET_EMBED(copy); ptr = RARRAY_PTR(orig); MEMCPY(RARRAY_PTR(copy), ptr, VALUE, RARRAY_LEN(orig)); if (shared) { rb_ary_decrement_share(shared); } ARY_SET_LEN(copy, RARRAY_LEN(orig)); } else { VALUE shared = ary_make_shared(orig); if (ARY_OWNS_HEAP_P(copy)) { xfree(RARRAY_PTR(copy)); } else { rb_ary_unshare_safe(copy); } FL_UNSET_EMBED(copy); ARY_SET_PTR(copy, RARRAY_PTR(orig)); ARY_SET_LEN(copy, RARRAY_LEN(orig)); rb_ary_set_shared(copy, shared); } return copy; } /* * call-seq: * array.clear -> array * * Removes all elements from _self_. * * a = [ "a", "b", "c", "d", "e" ] * a.clear #=> [ ] */ VALUE rb_ary_clear(VALUE ary) { rb_ary_modify(ary); ARY_SET_LEN(ary, 0); if (ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) { ary_resize_capa(ary, ARY_DEFAULT_SIZE * 2); } return ary; } /* * call-seq: * array.fill(obj) -> array * array.fill(obj, start [, length]) -> array * array.fill(obj, range ) -> array * array.fill {|index| block } -> array * array.fill(start [, length] ) {|index| block } -> array * array.fill(range) {|index| block } -> array * * The first three forms set the selected elements of self (which * may be the entire array) to obj. A start of * nil is equivalent to zero. A length of * nil is equivalent to self.length. The last three * forms fill the array with the value of the block. The block is * passed the absolute index of each element to be filled. * * a = [ "a", "b", "c", "d" ] * a.fill("x") #=> ["x", "x", "x", "x"] * a.fill("z", 2, 2) #=> ["x", "x", "z", "z"] * a.fill("y", 0..1) #=> ["y", "y", "z", "z"] * a.fill {|i| i*i} #=> [0, 1, 4, 9] * a.fill(-2) {|i| i*i*i} #=> [0, 1, 8, 27] */ static VALUE rb_ary_fill(int argc, VALUE *argv, VALUE ary) { VALUE item, arg1, arg2; long beg = 0, end = 0, len = 0; VALUE *p, *pend; int block_p = Qfalse; if (rb_block_given_p()) { block_p = Qtrue; rb_scan_args(argc, argv, "02", &arg1, &arg2); argc += 1; /* hackish */ } else { rb_scan_args(argc, argv, "12", &item, &arg1, &arg2); } switch (argc) { case 1: beg = 0; len = RARRAY_LEN(ary); break; case 2: if (rb_range_beg_len(arg1, &beg, &len, RARRAY_LEN(ary), 1)) { break; } /* fall through */ case 3: beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1); if (beg < 0) { beg = RARRAY_LEN(ary) + beg; if (beg < 0) beg = 0; } len = NIL_P(arg2) ? RARRAY_LEN(ary) - beg : NUM2LONG(arg2); break; } rb_ary_modify(ary); if (len < 0) { return ary; } if (beg >= ARY_MAX_SIZE || len > ARY_MAX_SIZE - beg) { rb_raise(rb_eArgError, "argument too big"); } end = beg + len; if (RARRAY_LEN(ary) < end) { if (end >= ARY_CAPA(ary)) { ary_resize_capa(ary, end); } rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), end - RARRAY_LEN(ary)); ARY_SET_LEN(ary, end); } if (block_p) { VALUE v; long i; for (i=beg; i=RARRAY_LEN(ary)) break; RARRAY_PTR(ary)[i] = v; } } else { p = RARRAY_PTR(ary) + beg; pend = p + len; while (p < pend) { *p++ = item; } } return ary; } /* * call-seq: * array + other_array -> an_array * * Concatenation---Returns a new array built by concatenating the * two arrays together to produce a third array. * * [ 1, 2, 3 ] + [ 4, 5 ] #=> [ 1, 2, 3, 4, 5 ] */ VALUE rb_ary_plus(VALUE x, VALUE y) { VALUE z; long len; y = to_ary(y); len = RARRAY_LEN(x) + RARRAY_LEN(y); z = rb_ary_new2(len); MEMCPY(RARRAY_PTR(z), RARRAY_PTR(x), VALUE, RARRAY_LEN(x)); MEMCPY(RARRAY_PTR(z) + RARRAY_LEN(x), RARRAY_PTR(y), VALUE, RARRAY_LEN(y)); ARY_SET_LEN(z, len); return z; } /* * call-seq: * array.concat(other_array) -> array * * Appends the elements in other_array to _self_. * * [ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ] */ VALUE rb_ary_concat(VALUE x, VALUE y) { y = to_ary(y); if (RARRAY_LEN(y) > 0) { rb_ary_splice(x, RARRAY_LEN(x), 0, y); } return x; } /* * call-seq: * array * int -> an_array * array * str -> a_string * * Repetition---With a String argument, equivalent to * self.join(str). Otherwise, returns a new array * built by concatenating the _int_ copies of _self_. * * * [ 1, 2, 3 ] * 3 #=> [ 1, 2, 3, 1, 2, 3, 1, 2, 3 ] * [ 1, 2, 3 ] * "," #=> "1,2,3" * */ static VALUE rb_ary_times(VALUE ary, VALUE times) { VALUE ary2, tmp; long i, len; tmp = rb_check_string_type(times); if (!NIL_P(tmp)) { return rb_ary_join(ary, tmp); } len = NUM2LONG(times); if (len == 0) { ary2 = ary_new(rb_obj_class(ary), 0); goto out; } if (len < 0) { rb_raise(rb_eArgError, "negative argument"); } if (ARY_MAX_SIZE/len < RARRAY_LEN(ary)) { rb_raise(rb_eArgError, "argument too big"); } len *= RARRAY_LEN(ary); ary2 = ary_new(rb_obj_class(ary), len); ARY_SET_LEN(ary2, len); for (i=0; i an_array or nil * * Searches through an array whose elements are also arrays * comparing _obj_ with the first element of each contained array * using obj.==. * Returns the first contained array that matches (that * is, the first associated array), * or +nil+ if no match is found. * See also Array#rassoc. * * s1 = [ "colors", "red", "blue", "green" ] * s2 = [ "letters", "a", "b", "c" ] * s3 = "foo" * a = [ s1, s2, s3 ] * a.assoc("letters") #=> [ "letters", "a", "b", "c" ] * a.assoc("foo") #=> nil */ VALUE rb_ary_assoc(VALUE ary, VALUE key) { long i; VALUE v; for (i = 0; i < RARRAY_LEN(ary); ++i) { v = rb_check_array_type(RARRAY_PTR(ary)[i]); if (!NIL_P(v) && RARRAY_LEN(v) > 0 && rb_equal(RARRAY_PTR(v)[0], key)) return v; } return Qnil; } /* * call-seq: * array.rassoc(obj) -> an_array or nil * * Searches through the array whose elements are also arrays. Compares * _obj_ with the second element of each contained array using * ==. Returns the first contained array that matches. See * also Array#assoc. * * a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ] * a.rassoc("two") #=> [2, "two"] * a.rassoc("four") #=> nil */ VALUE rb_ary_rassoc(VALUE ary, VALUE value) { long i; VALUE v; for (i = 0; i < RARRAY_LEN(ary); ++i) { v = RARRAY_PTR(ary)[i]; if (TYPE(v) == T_ARRAY && RARRAY_LEN(v) > 1 && rb_equal(RARRAY_PTR(v)[1], value)) return v; } return Qnil; } static VALUE recursive_equal(VALUE ary1, VALUE ary2, int recur) { long i; if (recur) return Qtrue; /* Subtle! */ for (i=0; i bool * * Equality---Two arrays are equal if they contain the same number * of elements and if each element is equal to (according to * Object.==) the corresponding element in the other array. * * [ "a", "c" ] == [ "a", "c", 7 ] #=> false * [ "a", "c", 7 ] == [ "a", "c", 7 ] #=> true * [ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false * */ static VALUE rb_ary_equal(VALUE ary1, VALUE ary2) { if (ary1 == ary2) return Qtrue; if (TYPE(ary2) != T_ARRAY) { if (!rb_respond_to(ary2, rb_intern("to_ary"))) { return Qfalse; } return rb_equal(ary2, ary1); } if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse; return rb_exec_recursive_paired(recursive_equal, ary1, ary2, ary2); } static VALUE recursive_eql(VALUE ary1, VALUE ary2, int recur) { long i; if (recur) return Qtrue; /* Subtle! */ for (i=0; i true or false * * Returns true if _array_ and _other_ are the same object, * or are both arrays with the same content. */ static VALUE rb_ary_eql(VALUE ary1, VALUE ary2) { if (ary1 == ary2) return Qtrue; if (TYPE(ary2) != T_ARRAY) return Qfalse; if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse; return rb_exec_recursive_paired(recursive_eql, ary1, ary2, ary2); } static VALUE recursive_hash(VALUE ary, VALUE dummy, int recur) { long i, h; VALUE n; if (recur) { return LONG2FIX(0); } h = RARRAY_LEN(ary); for (i=0; i fixnum * * Compute a hash-code for this array. Two arrays with the same content * will have the same hash code (and will compare using eql?). */ static VALUE rb_ary_hash(VALUE ary) { return rb_exec_recursive(recursive_hash, ary, 0); } /* * call-seq: * array.include?(obj) -> true or false * * Returns true if the given object is present in * self (that is, if any object == anObject), * false otherwise. * * a = [ "a", "b", "c" ] * a.include?("b") #=> true * a.include?("z") #=> false */ VALUE rb_ary_includes(VALUE ary, VALUE item) { long i; for (i=0; i RARRAY_LEN(ary2)) { len = RARRAY_LEN(ary2); } for (i=0; i other_array -> -1, 0, +1 * * Comparison---Returns an integer (-1, 0, * or +1) if this array is less than, equal to, or greater than * other_array. Each object in each array is compared * (using <=>). If any value isn't * equal, then that inequality is the return value. If all the * values found are equal, then the return is based on a * comparison of the array lengths. Thus, two arrays are * ``equal'' according to Array#<=> if and only if they have * the same length and the value of each element is equal to the * value of the corresponding element in the other array. * * [ "a", "a", "c" ] <=> [ "a", "b", "c" ] #=> -1 * [ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ] #=> +1 * */ VALUE rb_ary_cmp(VALUE ary1, VALUE ary2) { long len; VALUE v; ary2 = to_ary(ary2); if (ary1 == ary2) return INT2FIX(0); v = rb_exec_recursive_paired(recursive_cmp, ary1, ary2, ary2); if (v != Qundef) return v; len = RARRAY_LEN(ary1) - RARRAY_LEN(ary2); if (len == 0) return INT2FIX(0); if (len > 0) return INT2FIX(1); return INT2FIX(-1); } static VALUE ary_make_hash(VALUE ary1, VALUE ary2) { VALUE hash = rb_hash_new(); long i; for (i=0; i an_array * * Array Difference---Returns a new array that is a copy of * the original array, removing any items that also appear in * other_array. (If you need set-like behavior, see the * library class Set.) * * [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ] #=> [ 3, 3, 5 ] */ static VALUE rb_ary_diff(VALUE ary1, VALUE ary2) { VALUE ary3; volatile VALUE hash; long i; hash = ary_make_hash(to_ary(ary2), 0); ary3 = rb_ary_new(); for (i=0; i [ 1, 3 ] */ static VALUE rb_ary_and(VALUE ary1, VALUE ary2) { VALUE hash, ary3, v, vv; long i; ary2 = to_ary(ary2); ary3 = rb_ary_new2(RARRAY_LEN(ary1) < RARRAY_LEN(ary2) ? RARRAY_LEN(ary1) : RARRAY_LEN(ary2)); hash = ary_make_hash(ary2, 0); if (RHASH_EMPTY_P(hash)) return ary3; for (i=0; i an_array * * Set Union---Returns a new array by joining this array with * other_array, removing duplicates. * * [ "a", "b", "c" ] | [ "c", "d", "a" ] * #=> [ "a", "b", "c", "d" ] */ static VALUE rb_ary_or(VALUE ary1, VALUE ary2) { VALUE hash, ary3; VALUE v, vv; long i; ary2 = to_ary(ary2); ary3 = rb_ary_new2(RARRAY_LEN(ary1)+RARRAY_LEN(ary2)); hash = ary_make_hash(ary1, ary2); for (i=0; i array or nil * * Removes duplicate elements from _self_. * Returns nil if no changes are made (that is, no * duplicates are found). * * a = [ "a", "a", "b", "b", "c" ] * a.uniq! #=> ["a", "b", "c"] * b = [ "a", "b", "c" ] * b.uniq! #=> nil */ static VALUE rb_ary_uniq_bang(VALUE ary) { VALUE hash, v, vv; long i, j; hash = ary_make_hash(ary, 0); if (RARRAY_LEN(ary) == RHASH_SIZE(hash)) { return Qnil; } for (i=j=0; i an_array * * Returns a new array by removing duplicate values in self. * * a = [ "a", "a", "b", "b", "c" ] * a.uniq #=> ["a", "b", "c"] */ static VALUE rb_ary_uniq(VALUE ary) { ary = rb_ary_dup(ary); rb_ary_uniq_bang(ary); return ary; } /* * call-seq: * array.compact! -> array or nil * * Removes +nil+ elements from array. * Returns +nil+ if no changes were made. * * [ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ] * [ "a", "b", "c" ].compact! #=> nil */ static VALUE rb_ary_compact_bang(VALUE ary) { VALUE *p, *t, *end; long n; rb_ary_modify(ary); p = t = RARRAY_PTR(ary); end = p + RARRAY_LEN(ary); while (t < end) { if (NIL_P(*t)) t++; else *p++ = *t++; } n = p - RARRAY_PTR(ary); if (RARRAY_LEN(ary) == n) { return Qnil; } ARY_SET_LEN(ary, n); if (n * 2 < ARY_CAPA(ary) && ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) { ary_resize_capa(ary, n * 2); } return ary; } /* * call-seq: * array.compact -> an_array * * Returns a copy of _self_ with all +nil+ elements removed. * * [ "a", nil, "b", nil, "c", nil ].compact * #=> [ "a", "b", "c" ] */ static VALUE rb_ary_compact(VALUE ary) { ary = rb_ary_dup(ary); rb_ary_compact_bang(ary); return ary; } /* * call-seq: * array.count -> int * array.count(obj) -> int * array.count { |item| block } -> int * * Returns the number of elements. If an argument is given, counts * the number of elements which equals to obj. If a block is * given, counts the number of elements yielding a true value. * * ary = [1, 2, 4, 2] * ary.count # => 4 * ary.count(2) # => 2 * ary.count{|x|x%2==0} # => 3 * */ static VALUE rb_ary_count(int argc, VALUE *argv, VALUE ary) { long n = 0; if (argc == 0) { VALUE *p, *pend; if (!rb_block_given_p()) return LONG2NUM(RARRAY_LEN(ary)); for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) { if (RTEST(rb_yield(*p))) n++; } } else { VALUE obj, *p, *pend; rb_scan_args(argc, argv, "1", &obj); if (rb_block_given_p()) { rb_warn("given block not used"); } for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) { if (rb_equal(*p, obj)) n++; } } return LONG2NUM(n); } static VALUE flatten(VALUE ary, int level, int *modified) { long i = 0; VALUE stack, result, tmp, elt; st_table *memo; st_data_t id; stack = ary_new(0, ARY_DEFAULT_SIZE); result = ary_new(0, RARRAY_LEN(ary)); memo = st_init_numtable(); st_insert(memo, (st_data_t)ary, (st_data_t)Qtrue); *modified = 0; while (1) { while (i < RARRAY_LEN(ary)) { elt = RARRAY_PTR(ary)[i++]; tmp = rb_check_array_type(elt); if (RBASIC(result)->klass) { rb_raise(rb_eRuntimeError, "flatten reentered"); } if (NIL_P(tmp) || (level >= 0 && RARRAY_LEN(stack) / 2 >= level)) { rb_ary_push(result, elt); } else { *modified = 1; id = (st_data_t)tmp; if (st_lookup(memo, id, 0)) { st_free_table(memo); rb_raise(rb_eArgError, "tried to flatten recursive array"); } st_insert(memo, id, (st_data_t)Qtrue); rb_ary_push(stack, ary); rb_ary_push(stack, LONG2NUM(i)); ary = tmp; i = 0; } } if (RARRAY_LEN(stack) == 0) { break; } id = (st_data_t)ary; st_delete(memo, &id, 0); tmp = rb_ary_pop(stack); i = NUM2LONG(tmp); ary = rb_ary_pop(stack); } st_free_table(memo); RBASIC(result)->klass = rb_class_of(ary); return result; } /* * call-seq: * array.flatten! -> array or nil * array.flatten!(level) -> array or nil * * Flattens _self_ in place. * Returns nil if no modifications were made (i.e., * array contains no subarrays.) If the optional level * argument determines the level of recursion to flatten. * * a = [ 1, 2, [3, [4, 5] ] ] * a.flatten! #=> [1, 2, 3, 4, 5] * a.flatten! #=> nil * a #=> [1, 2, 3, 4, 5] * a = [ 1, 2, [3, [4, 5] ] ] * a.flatten!(1) #=> [1, 2, 3, [4, 5]] */ static VALUE rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary) { int mod = 0, level = -1; VALUE result, lv; rb_scan_args(argc, argv, "01", &lv); if (!NIL_P(lv)) level = NUM2INT(lv); if (level == 0) return Qnil; result = flatten(ary, level, &mod); if (mod == 0) return Qnil; rb_ary_replace(ary, result); return ary; } /* * call-seq: * array.flatten -> an_array * array.flatten(level) -> an_array * * Returns a new array that is a one-dimensional flattening of this * array (recursively). That is, for every element that is an array, * extract its elements into the new array. If the optional * level argument determines the level of recursion to flatten. * * s = [ 1, 2, 3 ] #=> [1, 2, 3] * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] * a = [ 1, 2, [3, [4, 5] ] ] * a.flatten(1) #=> [1, 2, 3, [4, 5]] */ static VALUE rb_ary_flatten(int argc, VALUE *argv, VALUE ary) { int mod = 0, level = -1; VALUE result, lv; rb_scan_args(argc, argv, "01", &lv); if (!NIL_P(lv)) level = NUM2INT(lv); if (level == 0) return ary_make_shared_copy(ary); result = flatten(ary, level, &mod); OBJ_INFECT(result, ary); return result; } /* * call-seq: * array.shuffle! -> array * * Shuffles elements in _self_ in place. */ static VALUE rb_ary_shuffle_bang(VALUE ary) { long i = RARRAY_LEN(ary); rb_ary_modify(ary); while (i) { long j = rb_genrand_real()*i; VALUE tmp = RARRAY_PTR(ary)[--i]; RARRAY_PTR(ary)[i] = RARRAY_PTR(ary)[j]; RARRAY_PTR(ary)[j] = tmp; } return ary; } /* * call-seq: * array.shuffle -> an_array * * Returns a new array with elements of this array shuffled. * * a = [ 1, 2, 3 ] #=> [1, 2, 3] * a.shuffle #=> [2, 3, 1] */ static VALUE rb_ary_shuffle(VALUE ary) { ary = rb_ary_dup(ary); rb_ary_shuffle_bang(ary); return ary; } /* * call-seq: * array.sample -> obj * array.sample(n) -> an_array * * Choose a random element, or the random +n+ elements, from the array. * If the array is empty, the first form returns nil, and the * second form returns an empty array. * */ static VALUE rb_ary_sample(int argc, VALUE *argv, VALUE ary) { VALUE nv, result, *ptr; long n, len, i, j, k, idx[10]; len = RARRAY_LEN(ary); if (argc == 0) { if (len == 0) return Qnil; i = len == 1 ? 0 : rb_genrand_real()*len; return RARRAY_PTR(ary)[i]; } rb_scan_args(argc, argv, "1", &nv); n = NUM2LONG(nv); if (n < 0) rb_raise(rb_eArgError, "negative sample number"); ptr = RARRAY_PTR(ary); len = RARRAY_LEN(ary); if (n > len) n = len; switch (n) { case 0: return rb_ary_new2(0); case 1: return rb_ary_new4(1, &ptr[(long)(rb_genrand_real()*len)]); case 2: i = rb_genrand_real()*len; j = rb_genrand_real()*(len-1); if (j >= i) j++; return rb_ary_new3(2, ptr[i], ptr[j]); case 3: i = rb_genrand_real()*len; j = rb_genrand_real()*(len-1); k = rb_genrand_real()*(len-2); { long l = j, g = i; if (j >= i) l = i, g = ++j; if (k >= l && (++k >= g)) ++k; } return rb_ary_new3(3, ptr[i], ptr[j], ptr[k]); } if (n < sizeof(idx)/sizeof(idx[0])) { long sorted[sizeof(idx)/sizeof(idx[0])]; sorted[0] = idx[0] = rb_genrand_real()*len; for (i=1; iblock for each element repeatedly _n_ times or * forever if none or nil is given. If a non-positive number is * given or the array is empty, does nothing. Returns nil if the * loop has finished without getting interrupted. * * a = ["a", "b", "c"] * a.cycle {|x| puts x } # print, a, b, c, a, b, c,.. forever. * a.cycle(2) {|x| puts x } # print, a, b, c, a, b, c. * */ static VALUE rb_ary_cycle(int argc, VALUE *argv, VALUE ary) { long n, i; VALUE nv = Qnil; rb_scan_args(argc, argv, "01", &nv); RETURN_ENUMERATOR(ary, argc, argv); if (NIL_P(nv)) { n = -1; } else { n = NUM2LONG(nv); if (n <= 0) return Qnil; } while (RARRAY_LEN(ary) > 0 && (n < 0 || 0 < n--)) { for (i=0; i array * ary.permutation -> enumerator * ary.permutation(n) { |p| block } -> array * ary.permutation(n) -> enumerator * * When invoked with a block, yield all permutations of length n * of the elements of ary, then return the array itself. * If n is not specified, yield all permutations of all elements. * The implementation makes no guarantees about the order in which * the permutations are yielded. * * When invoked without a block, return an enumerator object instead. * * Examples: * * a = [1, 2, 3] * a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] * a.permutation(1).to_a #=> [[1],[2],[3]] * a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]] * a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] * a.permutation(0).to_a #=> [[]] # one permutation of length 0 * a.permutation(4).to_a #=> [] # no permutations of length 4 */ static VALUE rb_ary_permutation(int argc, VALUE *argv, VALUE ary) { VALUE num; long r, n, i; n = RARRAY_LEN(ary); /* Array length */ RETURN_ENUMERATOR(ary, argc, argv); /* Return enumerator if no block */ rb_scan_args(argc, argv, "01", &num); r = NIL_P(num) ? n : NUM2LONG(num); /* Permutation size from argument */ if (r < 0 || n < r) { /* no permutations: yield nothing */ } else if (r == 0) { /* exactly one permutation: the zero-length array */ rb_yield(rb_ary_new2(0)); } else if (r == 1) { /* this is a special, easy case */ for (i = 0; i < RARRAY_LEN(ary); i++) { rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i])); } } else { /* this is the general case */ volatile VALUE t0 = tmpbuf(n,sizeof(long)); long *p = (long*)RSTRING_PTR(t0); volatile VALUE t1 = tmpbuf(n,sizeof(int)); int *used = (int*)RSTRING_PTR(t1); VALUE ary0 = ary_make_substitution(ary); /* private defensive copy of ary */ RBASIC(ary0)->klass = 0; for (i = 0; i < n; i++) used[i] = 0; /* initialize array */ permute0(n, r, p, 0, used, ary0); /* compute and yield permutations */ RB_GC_GUARD(t0); RB_GC_GUARD(t1); RBASIC(ary0)->klass = rb_cArray; } return ary; } static long combi_len(long n, long k) { long i, val = 1; if (k*2 > n) k = n-k; if (k == 0) return 1; if (k < 0) return 0; val = 1; for (i=1; i <= k; i++,n--) { long m = val; val *= n; if (val < m) { rb_raise(rb_eRangeError, "too big for combination"); } val /= i; } return val; } /* * call-seq: * ary.combination(n) { |c| block } -> ary * ary.combination(n) -> enumerator * * When invoked with a block, yields all combinations of length n * of elements from ary and then returns ary itself. * The implementation makes no guarantees about the order in which * the combinations are yielded. * * When invoked without a block, returns an enumerator object instead. * * Examples: * * a = [1, 2, 3, 4] * a.combination(1).to_a #=> [[1],[2],[3],[4]] * a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]] * a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]] * a.combination(4).to_a #=> [[1,2,3,4]] * a.combination(0).to_a #=> [[]] # one combination of length 0 * a.combination(5).to_a #=> [] # no combinations of length 5 * */ static VALUE rb_ary_combination(VALUE ary, VALUE num) { long n, i, len; n = NUM2LONG(num); RETURN_ENUMERATOR(ary, 1, &num); len = RARRAY_LEN(ary); if (n < 0 || len < n) { /* yield nothing */ } else if (n == 0) { rb_yield(rb_ary_new2(0)); } else if (n == 1) { for (i = 0; i < len; i++) { rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i])); } } else { volatile VALUE t0 = tmpbuf(n+1, sizeof(long)); long *stack = (long*)RSTRING_PTR(t0); long nlen = combi_len(len, n); volatile VALUE cc = rb_ary_new2(n); VALUE *chosen = RARRAY_PTR(cc); long lev = 0; RBASIC(cc)->klass = 0; MEMZERO(stack, long, n); stack[0] = -1; for (i = 0; i < nlen; i++) { chosen[lev] = RARRAY_PTR(ary)[stack[lev+1]]; for (lev++; lev < n; lev++) { chosen[lev] = RARRAY_PTR(ary)[stack[lev+1] = stack[lev]+1]; } rb_yield(rb_ary_new4(n, chosen)); do { stack[lev--]++; } while (lev && (stack[lev+1]+n == len+lev+1)); } } return ary; } /* * call-seq: * ary.product(other_ary, ...) * * Returns an array of all combinations of elements from all arrays. * The length of the returned array is the product of the length * of ary and the argument arrays * * [1,2,3].product([4,5]) # => [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]] * [1,2].product([1,2]) # => [[1,1],[1,2],[2,1],[2,2]] * [1,2].product([3,4],[5,6]) # => [[1,3,5],[1,3,6],[1,4,5],[1,4,6], * # [2,3,5],[2,3,6],[2,4,5],[2,4,6]] * [1,2].product() # => [[1],[2]] * [1,2].product([]) # => [] */ static VALUE rb_ary_product(int argc, VALUE *argv, VALUE ary) { int n = argc+1; /* How many arrays we're operating on */ volatile VALUE t0 = tmpbuf(n, sizeof(VALUE)); volatile VALUE t1 = tmpbuf(n, sizeof(int)); VALUE *arrays = (VALUE*)RSTRING_PTR(t0); /* The arrays we're computing the product of */ int *counters = (int*)RSTRING_PTR(t1); /* The current position in each one */ VALUE result; /* The array we'll be returning */ long i,j; long resultlen = 1; RBASIC(t0)->klass = 0; RBASIC(t1)->klass = 0; /* initialize the arrays of arrays */ arrays[0] = ary; for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]); /* initialize the counters for the arrays */ for (i = 0; i < n; i++) counters[i] = 0; /* Compute the length of the result array; return [] if any is empty */ for (i = 0; i < n; i++) { long k = RARRAY_LEN(arrays[i]), l = resultlen; if (k == 0) return rb_ary_new2(0); resultlen *= k; if (resultlen < k || resultlen < l || resultlen / k != l) { rb_raise(rb_eRangeError, "too big to product"); } } /* Otherwise, allocate and fill in an array of results */ result = rb_ary_new2(resultlen); for (i = 0; i < resultlen; i++) { int m; /* fill in one subarray */ VALUE subarray = rb_ary_new2(n); for (j = 0; j < n; j++) { rb_ary_push(subarray, rb_ary_entry(arrays[j], counters[j])); } /* put it on the result array */ rb_ary_push(result, subarray); /* * Increment the last counter. If it overflows, reset to 0 * and increment the one before it. */ m = n-1; counters[m]++; while (m > 0 && counters[m] == RARRAY_LEN(arrays[m])) { counters[m] = 0; m--; counters[m]++; } } return result; } /* * call-seq: * ary.take(n) => array * * Returns first n elements from ary. * * a = [1, 2, 3, 4, 5, 0] * a.take(3) # => [1, 2, 3] * */ static VALUE rb_ary_take(VALUE obj, VALUE n) { long len = NUM2LONG(n); if (len < 0) { rb_raise(rb_eArgError, "attempt to take negative size"); } return rb_ary_subseq(obj, 0, len); } /* * call-seq: * ary.take_while {|arr| block } => array * * Passes elements to the block until the block returns nil or false, * then stops iterating and returns an array of all prior elements. * * a = [1, 2, 3, 4, 5, 0] * a.take_while {|i| i < 3 } # => [1, 2] * */ static VALUE rb_ary_take_while(VALUE ary) { long i; RETURN_ENUMERATOR(ary, 0, 0); for (i = 0; i < RARRAY_LEN(ary); i++) { if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break; } return rb_ary_take(ary, LONG2FIX(i)); } /* * call-seq: * ary.drop(n) => array * * Drops first n elements from ary, and returns rest elements * in an array. * * a = [1, 2, 3, 4, 5, 0] * a.drop(3) # => [4, 5, 0] * */ static VALUE rb_ary_drop(VALUE ary, VALUE n) { VALUE result; long pos = NUM2LONG(n); if (pos < 0) { rb_raise(rb_eArgError, "attempt to drop negative size"); } result = rb_ary_subseq(ary, pos, RARRAY_LEN(ary)); if (result == Qnil) result = rb_ary_new(); return result; } /* * call-seq: * ary.drop_while {|arr| block } => array * * Drops elements up to, but not including, the first element for * which the block returns nil or false and returns an array * containing the remaining elements. * * a = [1, 2, 3, 4, 5, 0] * a.drop_while {|i| i < 3 } # => [3, 4, 5, 0] * */ static VALUE rb_ary_drop_while(VALUE ary) { long i; RETURN_ENUMERATOR(ary, 0, 0); for (i = 0; i < RARRAY_LEN(ary); i++) { if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break; } return rb_ary_drop(ary, LONG2FIX(i)); } /* Arrays are ordered, integer-indexed collections of any object. * Array indexing starts at 0, as in C or Java. A negative index is * assumed to be relative to the end of the array---that is, an index of -1 * indicates the last element of the array, -2 is the next to last * element in the array, and so on. */ void Init_Array(void) { #undef rb_intern #define rb_intern(str) rb_intern_const(str) rb_cArray = rb_define_class("Array", rb_cObject); rb_include_module(rb_cArray, rb_mEnumerable); rb_define_alloc_func(rb_cArray, ary_alloc); rb_define_singleton_method(rb_cArray, "[]", rb_ary_s_create, -1); rb_define_singleton_method(rb_cArray, "try_convert", rb_ary_s_try_convert, 1); rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1); rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1); rb_define_method(rb_cArray, "to_s", rb_ary_inspect, 0); rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0); rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0); rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0); rb_define_method(rb_cArray, "frozen?", rb_ary_frozen_p, 0); rb_define_method(rb_cArray, "==", rb_ary_equal, 1); rb_define_method(rb_cArray, "eql?", rb_ary_eql, 1); rb_define_method(rb_cArray, "hash", rb_ary_hash, 0); rb_define_method(rb_cArray, "[]", rb_ary_aref, -1); rb_define_method(rb_cArray, "[]=", rb_ary_aset, -1); rb_define_method(rb_cArray, "at", rb_ary_at, 1); rb_define_method(rb_cArray, "fetch", rb_ary_fetch, -1); rb_define_method(rb_cArray, "first", rb_ary_first, -1); rb_define_method(rb_cArray, "last", rb_ary_last, -1); rb_define_method(rb_cArray, "concat", rb_ary_concat, 1); rb_define_method(rb_cArray, "<<", rb_ary_push, 1); rb_define_method(rb_cArray, "push", rb_ary_push_m, -1); rb_define_method(rb_cArray, "pop", rb_ary_pop_m, -1); rb_define_method(rb_cArray, "shift", rb_ary_shift_m, -1); rb_define_method(rb_cArray, "unshift", rb_ary_unshift_m, -1); rb_define_method(rb_cArray, "insert", rb_ary_insert, -1); rb_define_method(rb_cArray, "each", rb_ary_each, 0); rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0); rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0); rb_define_method(rb_cArray, "length", rb_ary_length, 0); rb_define_alias(rb_cArray, "size", "length"); rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0); rb_define_method(rb_cArray, "find_index", rb_ary_index, -1); rb_define_method(rb_cArray, "index", rb_ary_index, -1); rb_define_method(rb_cArray, "rindex", rb_ary_rindex, -1); rb_define_method(rb_cArray, "join", rb_ary_join_m, -1); rb_define_method(rb_cArray, "reverse", rb_ary_reverse_m, 0); rb_define_method(rb_cArray, "reverse!", rb_ary_reverse_bang, 0); rb_define_method(rb_cArray, "sort", rb_ary_sort, 0); rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0); rb_define_method(rb_cArray, "collect", rb_ary_collect, 0); rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0); rb_define_method(rb_cArray, "map", rb_ary_collect, 0); rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0); rb_define_method(rb_cArray, "select", rb_ary_select, 0); rb_define_method(rb_cArray, "values_at", rb_ary_values_at, -1); rb_define_method(rb_cArray, "delete", rb_ary_delete, 1); rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at_m, 1); rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0); rb_define_method(rb_cArray, "reject", rb_ary_reject, 0); rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0); rb_define_method(rb_cArray, "zip", rb_ary_zip, -1); rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0); rb_define_method(rb_cArray, "replace", rb_ary_replace, 1); rb_define_method(rb_cArray, "clear", rb_ary_clear, 0); rb_define_method(rb_cArray, "fill", rb_ary_fill, -1); rb_define_method(rb_cArray, "include?", rb_ary_includes, 1); rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1); rb_define_method(rb_cArray, "slice", rb_ary_aref, -1); rb_define_method(rb_cArray, "slice!", rb_ary_slice_bang, -1); rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1); rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1); rb_define_method(rb_cArray, "+", rb_ary_plus, 1); rb_define_method(rb_cArray, "*", rb_ary_times, 1); rb_define_method(rb_cArray, "-", rb_ary_diff, 1); rb_define_method(rb_cArray, "&", rb_ary_and, 1); rb_define_method(rb_cArray, "|", rb_ary_or, 1); rb_define_method(rb_cArray, "uniq", rb_ary_uniq, 0); rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0); rb_define_method(rb_cArray, "compact", rb_ary_compact, 0); rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0); rb_define_method(rb_cArray, "flatten", rb_ary_flatten, -1); rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, -1); rb_define_method(rb_cArray, "count", rb_ary_count, -1); rb_define_method(rb_cArray, "shuffle!", rb_ary_shuffle_bang, 0); rb_define_method(rb_cArray, "shuffle", rb_ary_shuffle, 0); rb_define_method(rb_cArray, "sample", rb_ary_sample, -1); rb_define_method(rb_cArray, "cycle", rb_ary_cycle, -1); rb_define_method(rb_cArray, "permutation", rb_ary_permutation, -1); rb_define_method(rb_cArray, "combination", rb_ary_combination, 1); rb_define_method(rb_cArray, "product", rb_ary_product, -1); rb_define_method(rb_cArray, "take", rb_ary_take, 1); rb_define_method(rb_cArray, "take_while", rb_ary_take_while, 0); rb_define_method(rb_cArray, "drop", rb_ary_drop, 1); rb_define_method(rb_cArray, "drop_while", rb_ary_drop_while, 0); id_cmp = rb_intern("<=>"); } yard-master/spec/parser/examples/example1.rb.txt000066400000000000000000000001171265676644000222500ustar00rootroot00000000000000module Hello class Hi # Docstring def me "Value" end end endyard-master/spec/parser/examples/extrafile.c.txt000066400000000000000000000001051265676644000223330ustar00rootroot00000000000000/* * foo */ VALUE rb_extra(VALUE obj, VALUE n) { return Qtrue; } yard-master/spec/parser/examples/multifile.c.txt000066400000000000000000000005701265676644000223500ustar00rootroot00000000000000struct hoge * rb_fuga(VALUE obj) { return Qtrue; } /* * Hello Mars */ VALUE rb_hello_mars(VALUE obj, VALUE n) { return Qtrue; } void Init_Multifile(void) { rb_cMultifile = rb_define_class("Multifile", rb_cObject); rb_define_method(rb_cMultifile, "extra", rb_extra, 1); /* in extra.c */ rb_define_method(rb_cMultifile, "hello_mars", rb_hello_mars, 1); } yard-master/spec/parser/examples/override.c.txt000066400000000000000000000251111265676644000221730ustar00rootroot00000000000000#include #include #include /* * Document-class: GMP::Z * * GMP Multiple Precision Integer. * * Instances of this class can store variables of the type mpz_t. This class * also contains many methods that act as the functions for mpz_t variables, * as well as a few methods that attempt to make this library more Ruby-ish. */ /********************************************************************** * Macros * **********************************************************************/ /* * DEFUN_INT2INT defines two functions. The first takes a GMP::Z as * self, calls mpz_fname on the contained mpz_t, whose arguments are * exactly (0) the return argument and (1) self. The second is the same * destructive method. */ #define DEFUN_INT2INT(fname,mpz_fname) \ static VALUE r_gmpz_##fname(VALUE self) \ { \ MP_INT *self_val, *res_val; \ VALUE res; \ mpz_get_struct(self, self_val); \ mpz_make_struct_init(res, res_val); \ mpz_fname(res_val, self_val); \ return res; \ } \ \ static VALUE r_gmpz_##fname##_self(VALUE self) \ { \ MP_INT *self_val; \ mpz_get_struct(self, self_val); \ mpz_fname(self_val, self_val); \ return self; \ } /********************************************************************** * Integer Arithmetic * **********************************************************************/ /* * call-seq: * a + b * * Adds _a_ to _b_. _b_ must be an instance of one of: * * GMP::Z * * Fixnum * * GMP::Q * * GMP::F * * Bignum */ VALUE r_gmpz_add(VALUE self, VALUE arg) { MP_INT *self_val, *arg_val, *res_val; VALUE res; mpz_get_struct(self,self_val); if (GMPZ_P(arg)) { mpz_get_struct(arg,arg_val); mpz_make_struct_init(res, res_val); mpz_add(res_val, self_val, arg_val); } else if (FIXNUM_P(arg)) { mpz_make_struct_init(res, res_val); if (FIX2NUM(arg) > 0) mpz_add_ui(res_val, self_val, FIX2NUM(arg)); else mpz_sub_ui(res_val, self_val, -FIX2NUM(arg)); } else if (GMPQ_P(arg)) { return r_gmpq_add(arg, self); } else if (GMPF_P(arg)) { #ifndef MPFR return r_gmpf_add(arg, self); #else return rb_funcall(arg, rb_intern("+"), 1, self); #endif } else if (BIGNUM_P(arg)) { mpz_make_struct_init(res, res_val); mpz_init(res_val); mpz_set_bignum(res_val, arg); mpz_add(res_val, res_val, self_val); } else { typeerror(ZQFXB); } return res; } /* * call-seq: * a.add!(_b_) * * Adds _a_ to _b_ in-place, setting _a_ to the sum. _b_ must be an instance of one of: * * GMP::Z * * Fixnum * * GMP::Q * * GMP::F * * Bignum */ VALUE r_gmpz_add_self(VALUE self, VALUE arg) { MP_INT *self_val, *arg_val; mpz_get_struct(self,self_val); if (GMPZ_P(arg)) { mpz_get_struct(arg,arg_val); mpz_add(self_val, self_val, arg_val); } else if (FIXNUM_P(arg)) { if (FIX2NUM(arg) > 0) mpz_add_ui(self_val, self_val, FIX2NUM(arg)); else mpz_sub_ui(self_val, self_val, -FIX2NUM(arg)); } else if (BIGNUM_P(arg)) { mpz_temp_from_bignum(arg_val, arg); mpz_add(self_val, self_val, arg_val); mpz_temp_free(arg_val); } else { typeerror(ZXB); } return Qnil; } /* * call-seq: * a - b * * Subtracts _b_ from _a_. _b_ must be an instance of one of: * * GMP::Z * * Fixnum * * GMP::Q * * GMP::F * * Bignum */ VALUE r_gmpz_sub(VALUE self, VALUE arg) { MP_RAT *res_val_q, *arg_val_q; MP_INT *self_val, *arg_val, *res_val; MP_FLOAT *arg_val_f, *res_val_f; VALUE res; unsigned long prec; mpz_get_struct(self,self_val); if (GMPZ_P(arg)) { mpz_make_struct_init(res, res_val); mpz_get_struct(arg,arg_val); mpz_sub (res_val, self_val, arg_val); } else if (FIXNUM_P(arg)) { mpz_make_struct_init(res, res_val); if (FIX2NUM(arg) > 0) mpz_sub_ui (res_val, self_val, FIX2NUM(arg)); else mpz_add_ui (res_val, self_val, -FIX2NUM(arg)); } else if (GMPQ_P(arg)) { mpq_make_struct_init(res, res_val_q); mpq_get_struct(arg,arg_val_q); mpz_set (mpq_denref(res_val_q), mpq_denref(arg_val_q)); mpz_mul (mpq_numref(res_val_q), mpq_denref(arg_val_q), self_val); mpz_sub (mpq_numref(res_val_q), mpq_numref(res_val_q), mpq_numref(arg_val_q)); } else if (GMPF_P(arg)) { mpf_get_struct_prec (arg, arg_val_f, prec); mpf_make_struct_init(res, res_val_f, prec); mpf_set_z (res_val_f, self_val); mpf_sub (res_val_f, res_val_f, arg_val_f); } else if (BIGNUM_P(arg)) { mpz_make_struct_init(res, res_val); mpz_set_bignum (res_val, arg); mpz_sub (res_val, self_val, res_val); } else { typeerror (ZQFXB); } return res; } /* * call-seq: * a.sub!(b) * * Subtracts _b_ from _a_ in-place, setting _a_ to the difference. _b_ must be an * instance of one of: * * GMP::Z * * Fixnum * * GMP::Q * * GMP::F * * Bignum */ VALUE r_gmpz_sub_self(VALUE self, VALUE arg) { MP_INT *self_val, *arg_val; mpz_get_struct(self,self_val); if (GMPZ_P(arg)) { mpz_get_struct(arg, arg_val); mpz_sub (self_val, self_val, arg_val); } else if (FIXNUM_P(arg)) { if (FIX2NUM(arg) > 0) mpz_sub_ui (self_val, self_val, FIX2NUM(arg)); else mpz_add_ui (self_val, self_val, -FIX2NUM(arg)); } else if (BIGNUM_P(arg)) { mpz_temp_from_bignum(arg_val, arg); mpz_sub (self_val, self_val, arg_val); mpz_temp_free (arg_val); } else { typeerror (ZXB); } return Qnil; } /* * call-seq: * a * b * * Multiplies _a_ with _b_. _a_ must be an instance of one of * * GMP::Z * * Fixnum * * GMP::Q * * GMP::F * * Bignum */ VALUE r_gmpz_mul(VALUE self, VALUE arg) { MP_INT *self_val, *arg_val, *res_val; VALUE res; mpz_get_struct(self,self_val); if (GMPZ_P(arg)) { mpz_make_struct_init(res, res_val); mpz_get_struct(arg,arg_val); mpz_mul(res_val, self_val, arg_val); } else if (FIXNUM_P(arg)) { mpz_make_struct_init(res, res_val); mpz_mul_si(res_val, self_val, FIX2NUM(arg)); } else if (GMPQ_P(arg)) { return r_gmpq_mul(arg, self); } else if (GMPF_P(arg)) { #ifndef MPFR return r_gmpf_mul(arg, self); #else return rb_funcall(arg, rb_intern("*"), 1, self); #endif } else if (BIGNUM_P(arg)) { mpz_make_struct_init(res, res_val); mpz_set_bignum(res_val, arg); mpz_mul(res_val, res_val, self_val); } else { typeerror(ZQFXB); } return res; } /* * call-seq: * a.addmul!(b, c) * * @since 0.4.17 * * Sets _a_ to _a_ plus _b_ times _c_. _b_ and _c_ must each be an instance of one of * * GMP::Z * * Fixnum * * Bignum */ VALUE r_gmpz_addmul_self(VALUE self, VALUE b, VALUE c) { MP_INT *self_val, *b_val, *c_val; int free_b_val = 0; if (GMPZ_P(b)) { mpz_get_struct(b, b_val); } else if (FIXNUM_P(b)) { mpz_temp_alloc(b_val); mpz_init_set_si(b_val, FIX2NUM(b)); free_b_val = 1; } else if (BIGNUM_P(b)) { mpz_temp_from_bignum(b_val, b); free_b_val = 1; } else { typeerror_as(ZXB, "addend"); } mpz_get_struct(self, self_val); if (GMPZ_P(c)) { mpz_get_struct(c, c_val); mpz_addmul(self_val, b_val, c_val); } else if (FIXNUM_P(c)) { if (FIX2NUM(c) < 0) { if (free_b_val) { mpz_temp_free(b_val); } rb_raise(rb_eRangeError, "multiplicand (Fixnum) must be nonnegative"); } mpz_addmul_ui(self_val, b_val, FIX2NUM(c)); } else if (BIGNUM_P(c)) { mpz_temp_from_bignum(c_val, c); mpz_addmul(self_val, b_val, c_val); mpz_temp_free(c_val); } else { if (free_b_val) mpz_temp_free(b_val); typeerror_as(ZXB, "multiplicand"); } if (free_b_val) mpz_temp_free(b_val); return self; } /* * Document-method: neg * * call-seq: * a.neg * -a * * Returns -_a_. */ /* * Document-method: neg! * * call-seq: * a.neg! * * Sets _a_ to -_a_. */ DEFUN_INT2INT(neg, mpz_neg) /* * Document-method: abs * * call-seq: * a.abs * * Returns the absolute value of _a_. */ /* * Document-method: abs! * * call-seq: * a.abs! * * Sets _a_ to its absolute value. */ DEFUN_INT2INT(abs, mpz_abs) /********************************************************************** * Integer Roots * **********************************************************************/ /* * Document-method: sqrt * * call-seq: * a.sqrt * * Returns the truncated integer part of the square root of _a_. */ /* * Document-method: sqrt! * * call-seq: * a.sqrt! * * Sets _a_ to the truncated integer part of its square root. */ DEFUN_INT2INT(sqrt, mpz_sqrt) /* * call-seq: * a.sqrtrem #=> s, r * * Returns the truncated integer part of the square root of _a_ as _s_ and the remainder * a - s * s as _r_, which will be zero if _a_ is a perfect square. */ static VALUE r_gmpz_sqrtrem(VALUE self) { MP_INT *self_val, *sqrt_val, *rem_val; VALUE sqrt, rem; mpz_get_struct(self, self_val); mpz_make_struct_init(sqrt, sqrt_val); mpz_make_struct_init(rem, rem_val); mpz_sqrtrem(sqrt_val, rem_val, self_val); return rb_assoc_new(sqrt, rem); } /********************************************************************** * Init function * **********************************************************************/ void init_gmpz() { mGMP = rb_define_module("GMP"); rb_define_module_function(mGMP, "Z", r_gmpmod_z, -1); cGMP_Z = rb_define_class_under(mGMP, "Z", rb_cInteger); // Integer Arithmetic rb_define_method(cGMP_Z, "+", r_gmpz_add, 1); rb_define_method(cGMP_Z, "add!", r_gmpz_add_self, 1); rb_define_method(cGMP_Z, "-", r_gmpz_sub, 1); rb_define_method(cGMP_Z, "sub!", r_gmpz_sub_self, 1); rb_define_method(cGMP_Z, "*", r_gmpz_mul, 1); rb_define_method(cGMP_Z, "addmul!", r_gmpz_addmul_self, 2); rb_define_method(cGMP_Z, "neg", r_gmpz_neg, 0); rb_define_method(cGMP_Z, "neg!", r_gmpz_neg_self, 0); rb_define_method(cGMP_Z, "-@", r_gmpz_neg, 0); rb_define_method(cGMP_Z, "abs", r_gmpz_abs, 0); rb_define_method(cGMP_Z, "abs!", r_gmpz_abs_self, 0); // Integer Roots rb_define_method(cGMP_Z, "root", r_gmpz_root, 1); rb_define_method(cGMP_Z, "sqrt", r_gmpz_sqrt, 0); rb_define_method(cGMP_Z, "sqrt!", r_gmpz_sqrt_self, 0); rb_define_method(cGMP_Z, "sqrtrem", r_gmpz_sqrtrem, 0); } yard-master/spec/parser/examples/parse_in_order_001.rb.txt000066400000000000000000000000341265676644000241050ustar00rootroot00000000000000class MyModule::MyClass end yard-master/spec/parser/examples/parse_in_order_002.rb.txt000066400000000000000000000000231265676644000241040ustar00rootroot00000000000000module MyModule endyard-master/spec/parser/examples/tag_handler_001.rb.txt000066400000000000000000000000771265676644000233710ustar00rootroot00000000000000class Foo # @api public # @return nil def foo end endyard-master/spec/parser/ruby/000077500000000000000000000000001265676644000165355ustar00rootroot00000000000000yard-master/spec/parser/ruby/ast_node_spec.rb000066400000000000000000000021371265676644000216730ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper') require 'pp' require 'stringio' include YARD::Parser::Ruby describe YARD::Parser::Ruby::AstNode do describe "#jump" do it "jumps to the first specific inner node if found" do ast = s(:paren, s(:paren, s(:params, s(s(:ident, "hi"), s(:ident, "bye"))))) expect(ast.jump(:params)[0][0].type).to equal(:ident) end it "returns the original ast if no inner node is found" do ast = s(:paren, s(:list, s(:list, s(s(:ident, "hi"), s(:ident, "bye"))))) expect(ast.jump(:params).object_id).to eq ast.object_id end end describe "#pretty_print" do it "shows a list of nodes" do obj = YARD::Parser::Ruby::RubyParser.parse("# x\nbye", "x").ast out = StringIO.new PP.pp(obj, out) vcall = RUBY_VERSION >= '1.9.3' ? 'vcall' : 'var_ref' expect(out.string).to eq "s(s(:#{vcall},\n" + " s(:ident, \"bye\", line: 2..2, source: 4..6),\n" + " docstring: \"x\",\n" + " line: 2..2,\n" + " source: 4..6))\n" end end end if HAVE_RIPPER yard-master/spec/parser/ruby/legacy/000077500000000000000000000000001265676644000200015ustar00rootroot00000000000000yard-master/spec/parser/ruby/legacy/statement_list_spec.rb000066400000000000000000000175171265676644000244120ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') describe YARD::Parser::Ruby::Legacy::StatementList do def stmts(code) YARD::Parser::Ruby::Legacy::StatementList.new(code) end def stmt(code) stmts(code).first end it "parses dangling block expressions" do s = stmt <<-eof if foo puts 'hi' end eof expect(s.tokens.to_s(true)).to eq "if\n foo\n ...\n end" expect(s.tokens.to_s).to eq "if\n foo" expect(s.block.to_s).to eq "puts 'hi'" s = stmt <<-eof if foo || bar puts 'hi' end eof expect(s.tokens.to_s(true)).to eq "if foo ||\n bar\n ...\n end" expect(s.tokens.to_s).to eq "if foo ||\n bar" expect(s.block.to_s).to eq "puts 'hi'" end it "allows semicolons within parentheses" do s = stmt "(foo; bar)" expect(s.tokens.to_s(true)).to eq "(foo; bar)" expect(s.block).to be nil end it "allows for non-block statements" do s = stmt "hello_world(1, 2, 3)" expect(s.tokens.to_s).to eq "hello_world(1, 2, 3)" expect(s.block).to be nil end it "allows block statements to be used as part of other block statements" do s = stmt "while (foo; bar); foo = 12; end; while" expect(s.tokens.to_s(true)).to eq "while (foo; bar); ... end" expect(s.tokens.to_s).to eq "while (foo; bar)" expect(s.block.to_s).to eq "foo = 12" end it "allows continued processing after a block" do s = stmt "if foo; end.stuff" expect(s.tokens.to_s(true)).to eq "if foo; end.stuff" expect(s.block.to_s).to eq "" s = stmt "if foo; end[stuff]" expect(s.tokens.to_s(true)).to eq "if foo; end[stuff]" expect(s.block.to_s).to eq "" s = stmt "if foo; hi end.map do; 123; end" expect(s.tokens.to_s(true)).to eq "if foo; ... end.map do; 123; end" expect(s.block.to_s).to eq "hi" end it "parses default arguments" do s = stmt "def foo(bar, baz = 1, bang = 2); bar; end" expect(s.tokens.to_s(true)).to eq "def foo(bar, baz = 1, bang = 2) ... end" expect(s.block.to_s).to eq "bar" s = stmt "def foo bar, baz = 1, bang = 2; bar; end" expect(s.tokens.to_s(true)).to eq "def foo bar, baz = 1, bang = 2; ... end" expect(s.block.to_s).to eq "bar" s = stmt "def foo bar , baz = 1 , bang = 2; bar; end" expect(s.tokens.to_s(true)).to eq "def foo bar , baz = 1 , bang = 2; ... end" expect(s.block.to_s).to eq "bar" end it "parses complex default arguments" do s = stmt "def foo(bar, baz = File.new(1, 2), bang = 3); bar; end" expect(s.tokens.to_s(true)).to eq "def foo(bar, baz = File.new(1, 2), bang = 3) ... end" expect(s.block.to_s).to eq "bar" s = stmt "def foo bar, baz = File.new(1, 2), bang = 3; bar; end" expect(s.tokens.to_s(true)).to eq "def foo bar, baz = File.new(1, 2), bang = 3; ... end" expect(s.block.to_s).to eq "bar" s = stmt "def foo bar , baz = File.new(1, 2) , bang = 3; bar; end" expect(s.tokens.to_s(true)).to eq "def foo bar , baz = File.new(1, 2) , bang = 3; ... end" expect(s.block.to_s).to eq "bar" end it "parses blocks with do/end" do s = stmt <<-eof foo do puts 'hi' end eof expect(s.tokens.to_s(true)).to eq "foo do\n ...\n end" expect(s.block.to_s).to eq "puts 'hi'" end it "parses blocks with {}" do s = stmt "x { y }" expect(s.tokens.to_s(true)).to eq "x { ... }" expect(s.block.to_s).to eq "y" s = stmt "x() { y }" expect(s.tokens.to_s(true)).to eq "x() { ... }" expect(s.block.to_s).to eq "y" end it "parses blocks with begin/end" do s = stmt "begin xyz end" expect(s.tokens.to_s(true)).to eq "begin ... end" expect(s.block.to_s).to eq "xyz" end it "parses nested blocks" do s = stmt "foo(:x) { baz(:y) { skippy } }" expect(s.tokens.to_s(true)).to eq "foo(:x) { ... }" expect(s.block.to_s).to eq "baz(:y) { skippy }" end it "does not parse hashes as blocks" do s = stmt "x({})" expect(s.tokens.to_s(true)).to eq "x({})" expect(s.block.to_s).to eq "" s = stmt "x = {}" expect(s.tokens.to_s(true)).to eq "x = {}" expect(s.block.to_s).to eq "" s = stmt "x(y, {})" expect(s.tokens.to_s(true)).to eq "x(y, {})" expect(s.block.to_s).to eq "" end it "parses hashes in blocks with {}" do s = stmt "x {x = {}}" expect(s.tokens.to_s(true)).to eq "x {...}" expect(s.block.to_s).to eq "x = {}" end it "parses blocks with {} in hashes" do s = stmt "[:foo, x {}]" expect(s.tokens.to_s(true)).to eq "[:foo, x {}]" expect(s.block.to_s).to eq "" end it "handles multiple methods" do s = stmt <<-eof def %; end def b; end eof expect(s.to_s).to eq "def %; end" end it "handles nested methods" do s = stmt <<-eof def *(o) def +@; end def ~@ end end eof expect(s.tokens.to_s(true)).to eq "def *(o) ... end" expect(s.block.to_s).to eq "def +@; end\n def ~@\n end" s = stmts(<<-eof) def /(other) 'hi' end def method1 def dynamic; end end eof expect(s[1].to_s).to eq "def method1\n def dynamic; end\n end" end it "gets comment line numbers" do s = stmt <<-eof # comment # comment # comment def method; end eof expect(s.comments).to eq ["comment", "comment", "comment"] expect(s.comments_range).to eq (1..3) s = stmt <<-eof # comment # comment def method; end eof expect(s.comments).to eq ["comment", "comment"] expect(s.comments_range).to eq (2..3) s = stmt <<-eof # comment # comment def method; end eof expect(s.comments).to eq ["comment", "comment"] expect(s.comments_range).to eq (1..2) s = stmt <<-eof # comment def method; end eof expect(s.comments).to eq ["comment"] expect(s.comments_range).to eq (1..1) s = stmt <<-eof def method; end # comment eof expect(s.comments).to eq ["comment"] expect(s.comments_range).to eq (1..1) end it "only looks up to two lines back for comments" do s = stmt <<-eof # comments # comments def method; end eof expect(s.comments).to eq ["comments"] s = stmt <<-eof # comments def method; end eof expect(s.comments).to eq nil ss = stmts <<-eof # comments def method; end # hello def method2; end eof expect(ss[0].comments).to eq nil expect(ss[1].comments).to eq ['hello'] end it "handles CRLF (Windows) newlines" do s = stmts("require 'foo'\r\n\r\n# Test Test\r\n# \r\n# Example:\r\n# example code\r\ndef test\r\nend\r\n") expect(s[1].comments).to eq ['Test Test', '', 'Example:', ' example code'] end it "handles elsif blocks" do s = stmts(stmt("if 0\n foo\nelsif 2\n bar\nend\nbaz").block) expect(s.size).to eq 2 expect(s[1].tokens.to_s).to eq "elsif 2" expect(s[1].block.to_s).to eq "bar" end it "handles else blocks" do s = stmts(stmt("if 0\n foo\nelse\n bar\nend\nbaz").block) expect(s.size).to eq 2 expect(s[1].tokens.to_s).to eq "else" expect(s[1].block.to_s).to eq "bar" end it "allows aliasing keywords" do ['do x', 'x do', 'end begin', 'begin end'].each do |a| s = stmt("alias #{a}\ndef foo; end") expect(s.tokens.to_s).to eq "alias #{a}" expect(s.block).to be nil end s = stmt("alias do x if 2 ==\n 2") expect(s.tokens.to_s).to eq "alias do x if 2 ==\n 2" end it "does not open a block on an aliased keyword block opener" do s = stmts(<<-eof) class A; alias x do end class B; end eof expect(s[0].block.to_s).to eq 'alias x do' expect(s.size).to be > 1 end it "converts heredoc to string" do src = "<<-XML\n foo\n\nXML" s = stmt(src) expect(s.source).to eq '"foo\n\n"' end end yard-master/spec/parser/ruby/legacy/token_list_spec.rb000066400000000000000000000045521265676644000235210ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', '..', '..', 'spec_helper') include YARD::Parser::Ruby::Legacy include YARD::Parser::Ruby::Legacy::RubyToken describe YARD::Parser::Ruby::Legacy::TokenList do describe "#initialize / #push" do it "accepts a tokenlist (via constructor or push)" do expect { TokenList.new(TokenList.new) }.not_to raise_error expect(TokenList.new.push(TokenList.new("x = 2")).size).to eq 6 end it "accept a token (via constructor or push)" do expect { TokenList.new(Token.new(0, 0)) }.not_to raise_error expect(TokenList.new.push(Token.new(0, 0), Token.new(1, 1)).size).to eq 2 end it "accepts a string and parse it as code (via constructor or push)" do expect { TokenList.new("x = 2") }.not_to raise_error x = TokenList.new x.push("x", "=", "2") expect(x.size).to eq 6 expect(x.to_s).to eq "x\n=\n2\n" end it "does not accept any other input" do expect { TokenList.new(:notcode) }.to raise_error(ArgumentError) end it "does not interpolate string data" do x = TokenList.new('x = "hello #{world}"') expect(x.size).to eq 6 expect(x[4].class).to eq TkDSTRING expect(x.to_s).to eq 'x = "hello #{world}"' + "\n" end it "handles label syntax" do x = TokenList.new('a:1,b:2') expect(x[0].class).to eq TkLABEL expect(x[0].text).to eq 'a:' expect(x[3].class).to eq TkLABEL expect(x[3].text).to eq 'b:' end end describe "#to_s" do before do @t = TokenList.new @t << TkDEF.new(1, 1, "def") @t << TkSPACE.new(1, 1) @t << TkIDENTIFIER.new(1, 1, "x") @t << TkStatementEnd.new(1, 1) @t << TkSEMICOLON.new(1, 1) << TkSPACE.new(1, 1) @t << TkBlockContents.new(1, 1) @t << TkSPACE.new(1, 1) << TkEND.new(1, 1, "end") @t[0].set_text "def" @t[1].set_text " " @t[2].set_text "x" @t[4].set_text ";" @t[5].set_text " " @t[7].set_text " " @t[8].set_text "end" end it "only shows the statement portion of the tokens by default" do expect(@t.to_s).to eq "def x" end it "shows ... for the block token if all of the tokens are shown" do expect(@t.to_s(true)).to eq "def x; ... end" end it "ignores ... if show_block = false" do expect(@t.to_s(true, false)).to eq "def x; end" end end endyard-master/spec/parser/ruby/ruby_parser_spec.rb000066400000000000000000000237751265676644000224470ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper') describe YARD::Parser::Ruby::RubyParser do def stmt(stmt) YARD::Parser::Ruby::RubyParser.new(stmt, nil).parse.root.first end def stmts(stmts) YARD::Parser::Ruby::RubyParser.new(stmts, nil).parse.root end def tokenize(stmt) YARD::Parser::Ruby::RubyParser.new(stmt, nil).parse.tokens end describe "#parse" do it "gets comment line numbers" do s = stmt <<-eof # comment # comment # comment def method; end eof expect(s.comments).to eq "comment\ncomment\ncomment" expect(s.comments_range).to eq (1..3) s = stmt <<-eof # comment # comment def method; end eof expect(s.comments).to eq "comment\ncomment" expect(s.comments_range).to eq (2..3) s = stmt <<-eof # comment # comment def method; end eof expect(s.comments).to eq "comment\ncomment" expect(s.comments_range).to eq (1..2) s = stmt <<-eof # comment def method; end eof expect(s.comments).to eq "comment" expect(s.comments_range).to eq (1..1) s = stmt <<-eof def method; end # comment eof expect(s.comments).to eq "comment" expect(s.comments_range).to eq (1..1) end it "only looks up to two lines back for comments" do s = stmts <<-eof # comments # comments def method; end eof expect(s[1].comments).to eq "comments" s = stmts <<-eof # comments def method; end eof expect(s[1].comments).to eq nil ss = stmts <<-eof # comments def method; end # hello def method2; end eof expect(ss[1].comments).to eq nil expect(ss[2].comments).to eq 'hello' end it "handles block comment followed by line comment" do ss = stmts <<-eof # comments1 =begin comments2 =end # comments3 def hello; end eof expect(ss.last.comments).to eq "comments3" end it "handles block comment followed by block comment" do ss = stmts <<-eof =begin comments1 =end =begin comments2 =end def hello; end eof expect(ss.last.comments.strip).to eq "comments2" end it "handles 1.9 lambda syntax with args" do src = "->(a,b,c=1,*args,&block) { hello_world }" expect(stmt(src).source).to eq src end it "handles 1.9 lambda syntax" do src = "-> { hello_world }" expect(stmt(src).source).to eq src end it "handles standard lambda syntax" do src = "lambda { hello_world }" expect(stmt(src).source).to eq src end it "throws a ParserSyntaxError on invalid code" do expect { stmt("Foo, bar.") }.to raise_error(YARD::Parser::ParserSyntaxError) end it "handles bare hashes as method parameters" do src = "command :a => 1, :b => 2, :c => 3" expect(stmt(src).jump(:command)[1].source).to eq ":a => 1, :b => 2, :c => 3" src = "command a: 1, b: 2, c: 3" expect(stmt(src).jump(:command)[1].source).to eq "a: 1, b: 2, c: 3" end it "handles source for hash syntax" do src = "{ :a => 1, :b => 2, :c => 3 }" expect(stmt(src).jump(:hash).source).to eq "{ :a => 1, :b => 2, :c => 3 }" end it "handles an empty hash" do expect(stmt("{}").jump(:hash).source).to eq "{}" end it "new hash label syntax should show label without colon" do ast = stmt("{ a: 1 }").jump(:label) expect(ast[0]).to eq "a" expect(ast.source).to eq "a:" end it "handles begin/rescue blocks" do ast = stmt("begin; X; rescue => e; Y end").jump(:rescue) expect(ast.source).to eq "rescue => e; Y end" ast = stmt("begin; X; rescue A => e; Y end").jump(:rescue) expect(ast.source).to eq "rescue A => e; Y end" ast = stmt("begin; X; rescue A, B => e; Y end").jump(:rescue) expect(ast.source).to eq "rescue A, B => e; Y end" end it "handles method rescue blocks" do ast = stmt("def x; A; rescue Y; B end") expect(ast.source).to eq "def x; A; rescue Y; B end" expect(ast.jump(:rescue).source).to eq "rescue Y; B end" end it "handles defs with keywords as method name" do ast = stmt("# docstring\nclass A;\ndef class; end\nend") expect(ast.jump(:class).docstring).to eq "docstring" expect(ast.jump(:class).line_range).to eq (2..4) end it "handles defs with unnamed argument with default values" do ast = stmt('def hello(one, two = 2, three = 3) end').jump(:params) expect(ast.source).to eq 'one, two = 2, three = 3' end it "handles defs with splats" do ast = stmt('def hello(one, *two) end').jump(:params) expect(ast.source).to eq 'one, *two' end if YARD.ruby2? it "handles defs with named arguments with default values" do ast = stmt('def hello(one, two: 2, three: 3) end').jump(:params) expect(ast.source).to eq 'one, two: 2, three: 3' end end if NAMED_OPTIONAL_ARGUMENTS it "handles defs with named arguments without default values" do ast = stmt('def hello(one, two:, three:) end').jump(:params) expect(ast.source).to eq 'one, two:, three:' end it "handles defs with double splats" do ast = stmt('def hello(one, **two) end').jump(:params) expect(ast.source).to eq 'one, **two' end end it "ends source properly on array reference" do ast = stmt("AS[0, 1 ] ") expect(ast.source).to eq 'AS[0, 1 ]' ast = stmt('def x(a = S[1]) end').jump(:params) expect(ast.source).to eq 'a = S[1]' end it "ends source properly on if/unless mod" do %w(if unless while).each do |mod| expect(stmt("A=1 #{mod} true").source).to eq "A=1 #{mod} true" end end it "shows proper source for assignment" do expect(stmt("A=1").jump(:assign).source).to eq "A=1" end it "shows proper source for a top_const_ref" do s = stmt("::\nFoo::Bar") expect(s.jump(:top_const_ref).source).to eq "::\nFoo" expect(s).to be_ref expect(s.jump(:top_const_ref)).to be_ref expect(s.source).to eq "::\nFoo::Bar" expect(s.line_range.to_a).to eq [1, 2] end it "shows proper source for inline heredoc" do src = "def foo\n foo(<<-XML, 1, 2)\n bar\n\n XML\nend" s = stmt(src) t = tokenize(src) expect(s.source).to eq src expect(t.map { |x| x[1] }.join).to eq src end it "shows proper source for regular heredoc" do src = "def foo\n x = <<-XML\n Hello \#{name}!\n Bye!\n XML\nend" s = stmt(src) t = tokenize(src) expect(s.source).to eq src expect(t.map { |x| x[1] }.join).to eq src end it "shows proper source for heredoc with comment" do src = "def foo\n x = <<-XML # HI!\n Hello \#{name}!\n Bye!\n XML\nend" s = stmt(src) t = tokenize(src) expect(s.source).to eq src expect(t.map {|x| x[1] }.join).to eq src end it "shows proper source for string" do ["'", '"'].each do |q| src = "#{q}hello\n\nworld#{q}" s = stmt(src) expect(s.jump(:string_content).source).to eq "hello\n\nworld" expect(s.source).to eq src end src = '("this is a string")' expect(stmt(src).jump(:string_literal).source).to eq '"this is a string"' end it "shows proper source for %w() array" do src = "%w(\na b c\n d e f\n)" expect(stmt(src).jump(:qwords_literal).source).to eq src end it "shows proper source for %w{} array" do src = "%w{\na b c\n d e f\n}" expect(stmt(src).jump(:array).source).to eq src end it "parses %w() array in constant declaration" do s = stmt(<<-eof) class Foo FOO = %w( foo bar ) end eof expect(s.jump(:qwords_literal).source).to eq '%w( foo bar )' if RUBY_VERSION >= '1.9.3' # ripper fix: array node encapsulates qwords expect(s.jump(:array).source).to eq '%w( foo bar )' end end it "parses %w() array source in object[] parsed context" do s = stmts(<<-eof) {}[:key] FOO = %w( foo bar ) eof expect(s[1].jump(:array).source).to eq '%w( foo bar )' end it "parses %w() array source in object[]= parsed context" do s = stmts(<<-eof) {}[:key] = :value FOO = %w( foo bar ) eof expect(s[1].jump(:array).source).to eq '%w( foo bar )' end it "parses [] as array" do s = stmt(<<-eof) class Foo FOO = ['foo', 'bar'] end eof expect(s.jump(:array).source).to eq "['foo', 'bar']" end it "shows source for unary minus" do expect(stmt("X = - 1").jump(:unary).source).to eq '- 1' end it "shows source for unary exclamation" do expect(stmt("X = !1").jump(:unary).source).to eq '!1' end it "has the correct line range for class/modules" do s = stmt(<<-eof) class Foo def foo; end # Ending comment end eof expect(s.jump(:class).line_range).to eq (1..7) end it "finds lone comments" do Registry.clear ast = YARD.parse_string(<<-eof).enumerator class Foo ## # comment here def foo; end # end comment end eof comment = ast.first.last.first expect(comment.type).to eq :comment expect(comment.docstring_hash_flag).to be true expect(comment.docstring.strip).to eq "comment here" expect(ast.first.last.last.type).to eq :comment expect(ast.first.last.last.docstring).to eq "end comment" end it "does not group comments if they don't begin the line" do Registry.clear ast = YARD.parse_string(<<-eof).enumerator class Foo CONST1 = 1 # Comment here CONST2 = 2 # Another comment here end eof expect(Registry.at("Foo::CONST1").docstring).to eq "Comment here" expect(Registry.at("Foo::CONST2").docstring).to eq "Another comment here" end end end if HAVE_RIPPER yard-master/spec/parser/source_parser_spec.rb000066400000000000000000000606711265676644000220010ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', 'spec_helper') class MyParser < Parser::Base; end shared_examples_for "parser type registration" do after do Parser::SourceParser.parser_types.delete(:my_parser) Parser::SourceParser.parser_type_extensions.delete(:my_parser) end end describe YARD::Parser::SourceParser do before do Registry.clear end def parse_list(*list) files = list.map do |v| filename, source = *v allow(File).to receive(:read_binary).with(filename).and_return(source) filename end Parser::SourceParser.send(:parse_in_order, *files) end def before_list(&block) Parser::SourceParser.before_parse_list(&block) end def after_list(&block) Parser::SourceParser.after_parse_list(&block) end def before_file(&block) Parser::SourceParser.before_parse_file(&block) end def after_file(&block) Parser::SourceParser.after_parse_file(&block) end describe ".before_parse_list" do before do Parser::SourceParser.before_parse_list_callbacks.clear Parser::SourceParser.after_parse_list_callbacks.clear end it "handles basic callback support" do before_list do |files, globals| expect(files).to eq ['foo.rb', 'bar.rb'] expect(globals).to eq OpenStruct.new end parse_list ['foo.rb', 'foo!'], ['bar.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil end it "supports multiple callbacks" do checks = [] before_list { checks << :one } before_list { checks << :two } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :two] end it "cancels parsing if it returns false" do checks = [] before_list { checks << :one } before_list { false } before_list { checks << :three } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).to be nil expect(checks).to eq [:one] end it "does not cancel on nil" do checks = [] before_list { checks << :one } before_list { nil } before_list { checks << :two } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :two] end it "passes in globals" do before_list {|f,g| g.x = 1 } before_list {|f,g| g.x += 1 } before_list {|f,g| g.x += 1 } after_list {|f,g| expect(g.x).to eq 3 } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil end end describe ".after_parse_list" do before do Parser::SourceParser.before_parse_list_callbacks.clear Parser::SourceParser.after_parse_list_callbacks.clear end it "handles basic callback support and maintain files/globals" do before_list do |f,g| g.foo = :bar end after_list do |files, globals| expect(files).to eq ['foo.rb', 'bar.rb'] expect(globals.foo).to eq :bar end parse_list ['foo.rb', 'foo!'], ['bar.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil end it "supports multiple callbacks" do checks = [] after_list { checks << :one } after_list { checks << :two } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :two] end it "does not cancel parsing if it returns false" do checks = [] after_list { checks << :one } after_list { false } after_list { checks << :three } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :three] end end describe ".before_parse_file" do before do Parser::SourceParser.before_parse_file_callbacks.clear Parser::SourceParser.after_parse_file_callbacks.clear end it "handles basic callback support" do before_file do |parser| expect(parser.contents).to eq 'class Foo; end' expect(parser.file).to match /(foo|bar)\.rb/ end parse_list ['foo.rb', 'class Foo; end'], ['bar.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil end it "supports multiple callbacks" do checks = [] before_file { checks << :one } before_file { checks << :two } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :two, :one, :two, :one, :two] end it "cancels parsing if it returns false" do checks = [] before_file { checks << :one } before_file { false } before_file { checks << :three } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).to be nil expect(checks).to eq [:one, :one, :one] end it "does not cancel on nil" do checks = [] before_file { checks << :one } before_file { nil } before_file { checks << :two } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :two, :one, :two, :one, :two] end end describe ".after_parse_file" do before do Parser::SourceParser.before_parse_file_callbacks.clear Parser::SourceParser.after_parse_file_callbacks.clear end it "handles basic callback support" do after_file do |parser| expect(parser.contents).to eq 'class Foo; end' expect(parser.file).to match /(foo|bar)\.rb/ end parse_list ['foo.rb', 'class Foo; end'], ['bar.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil end it "supports multiple callbacks" do checks = [] after_file { checks << :one } after_file { checks << :two } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :two, :one, :two, :one, :two] end it "does not cancel parsing if it returns false" do checks = [] after_file { checks << :one } after_file { false } after_file { checks << :three } parse_list ['file.rb', ''], ['file2.rb', ''], ['file3.rb', 'class Foo; end'] expect(Registry.at('Foo')).not_to be nil expect(checks).to eq [:one, :three, :one, :three, :one, :three] end end describe ".register_parser_type" do it_should_behave_like "parser type registration" it "registers a subclass of Parser::Base" do parser = double(:parser) expect(parser).to receive(:parse) expect(MyParser).to receive(:new).with('content', '(stdin)').and_return(parser) Parser::SourceParser.register_parser_type(:my_parser, MyParser, 'myparser') Parser::SourceParser.parse_string('content', :my_parser) end it "requires class to be a subclass of Parser::Base" do expect { Parser::SourceParser.register_parser_type(:my_parser, String) }.to raise_error(ArgumentError) expect { Parser::SourceParser.register_parser_type(:my_parser, Parser::Base) }.to raise_error(ArgumentError) end end describe ".parser_type_for_extension" do it_should_behave_like "parser type registration" it "finds an extension in a registered array of extensions" do Parser::SourceParser.register_parser_type(:my_parser, MyParser, ['a', 'b', 'd']) expect(Parser::SourceParser.parser_type_for_extension('a')).to eq :my_parser expect(Parser::SourceParser.parser_type_for_extension('b')).to eq :my_parser expect(Parser::SourceParser.parser_type_for_extension('d')).to eq :my_parser expect(Parser::SourceParser.parser_type_for_extension('c')).not_to eq :my_parser end it "finds an extension in a Regexp" do Parser::SourceParser.register_parser_type(:my_parser, MyParser, /abc$/) expect(Parser::SourceParser.parser_type_for_extension('dabc')).to eq :my_parser expect(Parser::SourceParser.parser_type_for_extension('dabcd')).not_to eq :my_parser end it "finds an extension in a list of Regexps" do Parser::SourceParser.register_parser_type(:my_parser, MyParser, [/ab$/, /abc$/]) expect(Parser::SourceParser.parser_type_for_extension('dabc')).to eq :my_parser expect(Parser::SourceParser.parser_type_for_extension('dabcd')).not_to eq :my_parser end it "finds an extension in a String" do Parser::SourceParser.register_parser_type(:my_parser, MyParser, "abc") expect(Parser::SourceParser.parser_type_for_extension('abc')).to eq :my_parser expect(Parser::SourceParser.parser_type_for_extension('abcd')).not_to eq :my_parser end end describe "#parse_string" do it "parses basic Ruby code" do YARD.parse_string(<<-eof) module Hello class Hi # Docstring # Docstring2 def me; "VALUE" end end end eof expect(Registry.at(:Hello)).not_to eq nil expect(Registry.at("Hello::Hi#me")).not_to eq nil expect(Registry.at("Hello::Hi#me").docstring).to eq "Docstring\nDocstring2" expect(Registry.at("Hello::Hi#me").docstring.line_range).to eq (3..4) end it "parses Ruby code with metaclasses" do YARD.parse_string(<<-eof) module Hello class Hi class < false, '##' => true}.each do |hash, expected| YARD.parse_string "#{hash}\n# Foo bar\nclass Foo; end" expect(Registry.at(:Foo).docstring.hash_flag).to eq expected end end it "removes shebang from initial file comments" do YARD.parse_string "#!/bin/ruby\n# this is a comment\nclass Foo; end" expect(Registry.at(:Foo).docstring).to eq "this is a comment" end it "removes encoding line from initial file comments" do YARD.parse_string "# encoding: utf-8\n# this is a comment\nclass Foo; end" expect(Registry.at(:Foo).docstring).to eq "this is a comment" end it "adds macros on any object" do YARD.parse_string <<-eof # @!macro [new] foo # This is a macro # @return [String] the string class Foo # @!macro foo def foo; end end eof macro = CodeObjects::MacroObject.find('foo') expect(macro.macro_data).to eq "This is a macro\n@return [String] the string" expect(Registry.at('Foo').docstring.to_raw).to eq macro.macro_data expect(Registry.at('Foo#foo').docstring.to_raw).to eq macro.macro_data end it "allows directives parsed on lone comments" do YARD.parse_string(<<-eof) class Foo # @!method foo(a = "hello") # @!scope class # @!visibility private # @param [String] a the name of the foo # @return [Symbol] the symbolized foo # @!method bar(value) end eof foo = Registry.at('Foo.foo') bar = Registry.at('Foo#bar') expect(foo).not_to be nil expect(foo.visibility).to eq :private expect(foo.tag(:param).name).to eq 'a' expect(foo.tag(:return).types).to eq ['Symbol'] expect(bar).not_to be nil expect(bar.signature).to eq 'def bar(value)' end it "parses lone comments at end of blocks" do YARD.parse_string(<<-eof) class Foo none # @!method foo(a = "hello") end eof foo = Registry.at('Foo#foo') expect(foo).not_to be nil expect(foo.signature).to eq 'def foo(a = "hello")' end it "handles lone comment with no code" do YARD.parse_string '# @!method foo(a = "hello")' foo = Registry.at('#foo') expect(foo).not_to be nil expect(foo.signature).to eq 'def foo(a = "hello")' end it "handles non-ASCII encoding in heredoc" do YARD.parse_string <<-eof # encoding: utf-8 heredoc <<-ending foo\u{ffe2} bar. ending # Hello \u{ffe2} world class Foo < Bar attr_accessor :foo end eof expect(Registry.at('Foo').superclass).to eq P('Bar') end end describe "#parse" do it "parses a basic Ruby file" do parse_file :example1, __FILE__ expect(Registry.at(:Hello)).not_to eq nil expect(Registry.at("Hello::Hi#me")).not_to eq nil expect(Registry.at("Hello::Hi#me").docstring).to eq "Docstring" end it "parses a set of file globs" do expect(Dir).to receive(:[]).with('lib/**/*.rb').and_return([]) YARD.parse('lib/**/*.rb') end it "parses a set of absolute paths" do expect(Dir).not_to receive(:[]) expect(File).to receive(:file?).with('/path/to/file').and_return(true) expect(File).to receive(:read_binary).with('/path/to/file').and_return("") YARD.parse('/path/to/file') end it "cleans paths before parsing" do expect(File).to receive(:open).and_return("") parser = Parser::SourceParser.new(:ruby, true) parser.parse('a//b//c') expect(parser.file).to eq 'a/b/c' end it "parses files with '*' in them as globs and others as absolute paths" do expect(Dir).to receive(:[]).with('*.rb').and_return(['a.rb', 'b.rb']) expect(File).to receive(:file?).with('/path/to/file').and_return(true) expect(File).to receive(:file?).with('a.rb').and_return(true) expect(File).to receive(:file?).with('b.rb').and_return(true) expect(File).to receive(:read_binary).with('/path/to/file').and_return("") expect(File).to receive(:read_binary).with('a.rb').and_return("") expect(File).to receive(:read_binary).with('b.rb').and_return("") YARD.parse ['/path/to/file', '*.rb'] end it "converts directories into globs" do expect(Dir).to receive(:[]).with('foo/**/*.{rb,c,cc,cxx,cpp}').and_return(['foo/a.rb', 'foo/bar/b.rb']) expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/a.rb').and_return(true) expect(File).to receive(:file?).with('foo/bar/b.rb').and_return(true) expect(File).to receive(:read_binary).with('foo/a.rb').and_return("") expect(File).to receive(:read_binary).with('foo/bar/b.rb').and_return("") YARD.parse ['foo'] end it "uses Registry.checksums cache if file is cached" do data = 'DATA' hash = Registry.checksum_for(data) cmock = double(:cmock) expect(cmock).to receive(:[]).with('foo/bar').and_return(hash) expect(Registry).to receive(:checksums).and_return(cmock) expect(File).to receive(:file?).with('foo/bar').and_return(true) expect(File).to receive(:read_binary).with('foo/bar').and_return(data) YARD.parse('foo/bar') end it "supports excluded paths" do expect(File).to receive(:file?).with('foo/bar').and_return(true) expect(File).to receive(:file?).with('foo/baz').and_return(true) expect(File).not_to receive(:read_binary) YARD.parse(["foo/bar", "foo/baz"], ["foo", /baz$/]) end it "converts file contents to proper encoding if coding line is present" do valid = [] valid << "# encoding: sjis" valid << "# encoding: utf-8" valid << "# xxxxxencoding: sjis" valid << "# xxxxxencoding: sjis xxxxxx" valid << "# ENCODING: sjis" valid << "#coDiNG: sjis" valid << "# -*- coding: sjis -*-" valid << "# -*- coding: utf-8; indent-tabs-mode: nil" valid << "### coding: sjis" valid << "# encoding=sjis" valid << "# encoding:sjis" valid << "# encoding = sjis" valid << "# encoding == sjis" valid << "# encoding : sjis" valid << "# encoding :: sjis" valid << "#!/bin/shebang\n# encoding: sjis" valid << "#!/bin/shebang\r\n# coding: sjis" invalid = [] invalid << "#\n# encoding: sjis" invalid << "#!/bin/shebang\n#\n# encoding: sjis" invalid << "# !/bin/shebang\n# encoding: sjis" {:to => valid, :not_to => invalid}.each do |msg, list| list.each do |src| Registry.clear parser = Parser::SourceParser.new expect(File).to receive(:read_binary).with('tmpfile').and_return(src) result = parser.parse("tmpfile") if HAVE_RIPPER && YARD.ruby19? if msg == :not_to default_encoding = 'UTF-8' expect(result.enumerator[0].source.encoding.to_s).to eq(default_encoding) else expect(['Shift_JIS', 'Windows-31J', 'UTF-8']).send(msg, include( result.enumerator[0].source.encoding.to_s)) end end expect(result.encoding_line).send(msg, eq(src.split("\n").last)) end end end it "converts C file contents to proper encoding if coding line is present" do valid = [] valid << "/* coding: utf-8 */" valid << "/* -*- coding: utf-8; c-file-style: \"ruby\" -*- */" valid << "// coding: utf-8" valid << "// -*- coding: utf-8; c-file-style: \"ruby\" -*-" invalid = [] {:to => valid, :not_to => invalid}.each do |msg, list| list.each do |src| Registry.clear parser = Parser::SourceParser.new expect(File).to receive(:read_binary).with('tmpfile.c').and_return(src) result = parser.parse("tmpfile.c") content = result.instance_variable_get("@content") expect(['UTF-8']).send(msg, include(content.encoding.to_s)) end end end if YARD.ruby19? Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS.each do |encoding, bom| it "understands #{encoding.upcase} BOM" do parser = Parser::SourceParser.new src = bom + "class FooBar; end".force_encoding('binary') src.force_encoding('binary') expect(File).to receive(:read_binary).with('tmpfile').and_return(src) result = parser.parse('tmpfile') expect(Registry.all(:class).first.path).to eq "FooBar" expect(result.enumerator[0].source.encoding.to_s.downcase).to eq encoding end end if HAVE_RIPPER && YARD.ruby19? end describe "#parse_in_order" do def in_order_parse(*files) paths = files.map {|f| File.join(File.dirname(__FILE__), 'examples', f.to_s + '.rb.txt') } YARD::Parser::SourceParser.parse(paths, [], Logger::DEBUG) end it "attempts to parse files in order" do log.enter_level(Logger::DEBUG) do msgs = [] expect(log).to receive(:debug) {|m| msgs << m }.at_least(:once) allow(log).to receive(:<<) in_order_parse 'parse_in_order_001', 'parse_in_order_002' expect(msgs[1]).to match /Parsing .+parse_in_order_001.+/ expect(msgs[2]).to match /Missing object MyModule/ expect(msgs[3]).to match /Parsing .+parse_in_order_002.+/ expect(msgs[4]).to match /Re-processing .+parse_in_order_001.+/ end end it "attempts to order files by length for globs (process toplevel files first)" do files = %w(a a/b a/b/c) files.each do |file| expect(File).to receive(:file?).with(file).and_return(true) expect(File).to receive(:read_binary).with(file).ordered.and_return('') end expect(Dir).to receive(:[]).with('a/**/*').and_return(files.reverse) YARD.parse 'a/**/*' end it "allows overriding of length sorting when single file is presented" do files = %w(a/b/c a a/b) files.each do |file| expect(File).to receive(:file?).with(file).at_least(1).times.and_return(true) expect(File).to receive(:read_binary).with(file).ordered.and_return('') end expect(Dir).to receive(:[]).with('a/**/*').and_return(files.reverse) YARD.parse ['a/b/c', 'a/**/*'] end end describe "#parse_statements" do before do Registry.clear end it "displays a warning for invalid parser type" do expect(log).to receive(:warn).with(/unrecognized file/) expect(log).to receive(:backtrace) YARD::Parser::SourceParser.parse_string("int main() { }", :d) end if HAVE_RIPPER it "displays a warning for a syntax error (with new parser)" do expect(log).to receive(:warn).with(/Syntax error in/) expect(log).to receive(:backtrace) YARD::Parser::SourceParser.parse_string("%!!!", :ruby) end end it "handles groups" do YARD.parse_string <<-eof class A # @group Group Name def foo; end def foo2; end # @endgroup def bar; end # @group Group 2 def baz; end end eof expect(Registry.at('A').groups).to eq ['Group Name', 'Group 2'] expect(Registry.at('A#bar').group).to be nil expect(Registry.at('A#foo').group).to eq "Group Name" expect(Registry.at('A#foo2').group).to eq "Group Name" expect(Registry.at('A#baz').group).to eq "Group 2" end it "handles multi-line class/module references" do YARD.parse_string <<-eof class A:: B::C; end eof expect(Registry.all).to eq [P('A::B::C')] end it "handles sclass definitions of multi-line class/module references" do YARD.parse_string <<-eof class << A:: B::C def foo; end end eof expect(Registry.all.size).to eq 2 expect(Registry.at('A::B::C')).not_to be nil expect(Registry.at('A::B::C.foo')).not_to be nil end it "handles lone comment blocks at the end of a namespace" do YARD.parse_string <<-eof module A class B def c; end # @!method d end end eof expect(Registry.at('A#d')).to be nil expect(Registry.at('A::B#d')).not_to be nil end if YARD.ruby2? it "supports named arguments with default values" do YARD.parse_string 'def foo(a, b = 1, *c, d, e: 3, **f, &g) end' args = [['a', nil], ['b', '1'], ['*c', nil], ['d', nil], ['e:', '3'], ['**f', nil], ['&g', nil]] expect(Registry.at('#foo').parameters).to eq(args) end end if NAMED_OPTIONAL_ARGUMENTS && !LEGACY_PARSER it "supports named arguments without default values" do YARD.parse_string 'def foo(a, b = 1, *c, d, e: 3, f:, **g, &h) end' args = [['a', nil], ['b', '1'], ['*c', nil], ['d', nil], ['e:', '3'], ['f:', nil], ['**g', nil], ['&h', nil]] expect(Registry.at('#foo').parameters).to eq(args) end end end end yard-master/spec/parser/tag_parsing_spec.rb000066400000000000000000000007631265676644000214170ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe YARD::Parser, "tag handling" do before { parse_file :tag_handler_001, __FILE__ } it "knows the list of all available tags" do expect(P("Foo#foo").tags).to include(P("Foo#foo").tag(:api)) end it "knows the text of tags on a method" do expect(P("Foo#foo").tag(:api).text).to eq "public" end it "returns true when asked whether a tag exists" do expect(P("Foo#foo").has_tag?(:api)).to be true end end yard-master/spec/rake/000077500000000000000000000000001265676644000152025ustar00rootroot00000000000000yard-master/spec/rake/yardoc_task_spec.rb000066400000000000000000000061511265676644000210470ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Rake::YardocTask do before do @yardoc = YARD::CLI::Yardoc.new @yardoc.statistics = false @yardoc.use_document_file = false @yardoc.use_yardopts_file = false @yardoc.generate = false allow(Templates::Engine).to receive(:render) allow(Templates::Engine).to receive(:generate) allow(YARD).to receive(:parse) allow(Registry).to receive(:load) allow(Registry).to receive(:save) allow(YARD::CLI::Yardoc).to receive(:new).and_return(@yardoc) ::Rake.application.clear end def run ::Rake.application.tasks[0].invoke end describe "#initialize" do it "allows separate rake task name to be set" do YARD::Rake::YardocTask.new(:notyardoc) expect(::Rake.application.tasks[0].name).to eq "notyardoc" end end describe "#files" do it "allows files to be set" do YARD::Rake::YardocTask.new do |t| t.files = ['a', 'b', 'c'] end run expect(@yardoc.files).to eq %w(a b c) end end describe "#options" do it "allows extra options to be set" do YARD::Rake::YardocTask.new do |t| t.options = ['--private', '--protected'] end run expect(@yardoc.visibilities).to eq [:public, :private, :protected] end it "allows --api and --no-api" do YARD::Rake::YardocTask.new do |t| t.options = %w(--api public --no-api) end run expect(@yardoc.options.verifier.expressions).to include('["public"].include?(@api.text) || !@api') end end describe "#stats_options" do before do @yard_stats = Object.new allow(@yard_stats).to receive(:run) allow(YARD::CLI::Stats).to receive(:new).and_return(@yard_stats) end it "invokes stats" do expect(@yard_stats).to receive(:run).with('--list-undoc', '--use-cache') @yardoc.statistics = true YARD::Rake::YardocTask.new do |t| t.stats_options = %w(--list-undoc) end run expect(@yardoc.statistics).to be false end end describe "#before" do it "allows before callback" do proc = lambda { } expect(proc).to receive(:call) expect(@yardoc).to receive(:run) YARD::Rake::YardocTask.new {|t| t.before = proc } run end end describe "#after" do it "allows after callback" do proc = lambda { } expect(proc).to receive(:call) expect(@yardoc).to receive(:run) YARD::Rake::YardocTask.new {|t| t.after = proc } run end end describe "#verifier" do it "allows a verifier proc to be set" do verifier = Verifier.new expect(@yardoc).to receive(:run) do expect(@yardoc.options[:verifier]).to eq verifier end YARD::Rake::YardocTask.new {|t| t.verifier = verifier } run end it "overrides --query options" do verifier = Verifier.new expect(@yardoc).to receive(:run) do expect(@yardoc.options[:verifier]).to eq verifier end YARD::Rake::YardocTask.new do |t| t.options += ['--query', '@return'] t.verifier = verifier end run end end end yard-master/spec/registry_spec.rb000066400000000000000000000332421265676644000174730ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "spec_helper") include CodeObjects require "thread" describe YARD::Registry do before { Registry.clear } describe ".yardoc_file_for_gem" do before do @gem = double('gem') allow(@gem).to receive(:name).and_return('foo') allow(@gem).to receive(:full_name).and_return('foo-1.0') allow(@gem).to receive(:full_gem_path).and_return('/path/to/foo') end it "returns nil if gem isn't found" do expect(Gem.source_index).to receive(:find_name).with('foo', '>= 0').and_return([]) expect(Registry.yardoc_file_for_gem('foo')).to eq nil end it "allows version to be specified" do expect(Gem.source_index).to receive(:find_name).with('foo', '= 2').and_return([]) expect(Registry.yardoc_file_for_gem('foo', '= 2')).to eq nil end it "returns existing .yardoc path for gem when for_writing=false" do expect(File).to receive(:exist?).and_return(false) expect(File).to receive(:exist?).with('/path/to/foo/.yardoc').and_return(true) expect(Gem.source_index).to receive(:find_name).with('foo', '>= 0').and_return([@gem]) expect(Registry.yardoc_file_for_gem('foo')).to eq '/path/to/foo/.yardoc' end it "returns nil if no .yardoc path exists in gem when for_writing=false" do expect(File).to receive(:exist?).and_return(false) expect(File).to receive(:exist?).with('/path/to/foo/.yardoc').and_return(false) expect(Gem.source_index).to receive(:find_name).with('foo', '>= 0').and_return([@gem]) expect(Registry.yardoc_file_for_gem('foo')).to eq nil end it "searches local gem path first if for_writing=false" do expect(File).to receive(:exist?).and_return(true) expect(Gem.source_index).to receive(:find_name).with('foo', '>= 0').and_return([@gem]) expect(Registry.yardoc_file_for_gem('foo')).to match %r{/.yard/gem_index/foo-1.0.yardoc$} end it "returns global .yardoc path for gem if for_writing=true and dir is writable" do expect(File).to receive(:writable?).with(@gem.full_gem_path).and_return(true) expect(Gem.source_index).to receive(:find_name).with('foo', '>= 0').and_return([@gem]) expect(Registry.yardoc_file_for_gem('foo', '>= 0', true)).to eq '/path/to/foo/.yardoc' end it "returns local .yardoc path for gem if for_writing=true and dir is not writable" do expect(File).to receive(:writable?).with(@gem.full_gem_path).and_return(false) expect(Gem.source_index).to receive(:find_name).with('foo', '>= 0').and_return([@gem]) expect(Registry.yardoc_file_for_gem('foo', '>= 0', true)).to match %r{/.yard/gem_index/foo-1.0.yardoc$} end it "returns gem path if gem starts with yard-doc- and for_writing=false" do allow(@gem).to receive(:name).and_return('yard-doc-core') allow(@gem).to receive(:full_name).and_return('yard-doc-core-1.0') allow(@gem).to receive(:full_gem_path).and_return('/path/to/yard-doc-core') expect(Gem.source_index).to receive(:find_name).with('yard-doc-core', '>= 0').and_return([@gem]) expect(File).to receive(:exist?).with('/path/to/yard-doc-core/.yardoc').and_return(true) expect(Registry.yardoc_file_for_gem('yard-doc-core')).to eq '/path/to/yard-doc-core/.yardoc' end it "returns nil if gem starts with yard-doc- and for_writing=true" do allow(@gem).to receive(:name).and_return('yard-doc-core') allow(@gem).to receive(:full_name).and_return('yard-doc-core-1.0') allow(@gem).to receive(:full_gem_path).and_return('/path/to/yard-doc-core') expect(Gem.source_index).to receive(:find_name).with('yard-doc-core', '>= 0').and_return([@gem]) expect(File).to receive(:exist?).with('/path/to/yard-doc-core/.yardoc').and_return(true) expect(Registry.yardoc_file_for_gem('yard-doc-core', '>= 0', true)).to eq nil end end describe ".root" do it "has an empty path for root" do expect(Registry.root.path).to eq "" end end describe ".locale" do it "loads locale object" do fr_locale = I18n::Locale.new("fr") store = Registry.send(:thread_local_store) expect(store).to receive(:locale).with("fr").and_return(fr_locale) expect(Registry.locale("fr")).to eq fr_locale end end describe ".resolve" do it "resolves any existing namespace" do o1 = ModuleObject.new(:root, :A) o2 = ModuleObject.new(o1, :B) o3 = ModuleObject.new(o2, :C) expect(Registry.resolve(o1, "B::C")).to eq o3 Registry.resolve(:root, "A::B::C") end it "resolves an object in the root namespace when prefixed with ::" do o1 = ModuleObject.new(:root, :A) o2 = ModuleObject.new(o1, :B) o3 = ModuleObject.new(o2, :C) expect(Registry.resolve(o3, "::A")).to eq o1 expect(Registry.resolve(o3, "::String", false, true)).to eq P(:String) end it "resolves instance methods with # prefix" do o1 = ModuleObject.new(:root, :A) o2 = ModuleObject.new(o1, :B) o3 = ModuleObject.new(o2, :C) o4 = MethodObject.new(o3, :methname) expect(Registry.resolve(o1, "B::C#methname")).to eq o4 expect(Registry.resolve(o2, "C#methname")).to eq o4 expect(Registry.resolve(o3, "#methname")).to eq o4 end it "resolves instance methods in the root without # prefix" do o = MethodObject.new(:root, :methname) expect(Registry.resolve(:root, 'methname')).to eq o end it "resolves superclass methods when inheritance = true" do superyard = ClassObject.new(:root, :SuperYard) yard = ClassObject.new(:root, :YARD) yard.superclass = superyard imeth = MethodObject.new(superyard, :hello) cmeth = MethodObject.new(superyard, :class_hello, :class) expect(Registry.resolve(yard, "#hello", false)).to be nil expect(Registry.resolve(yard, "#hello", true)).to eq imeth expect(Registry.resolve(yard, "class_hello", false)).to be nil expect(Registry.resolve(yard, "class_hello", true)).to eq cmeth end it "resolves mixin methods when inheritance = true" do yard = ClassObject.new(:root, :YARD) mixin = ModuleObject.new(:root, :Mixin) yard.mixins(:instance) << mixin imeth = MethodObject.new(mixin, :hello) cmeth = MethodObject.new(mixin, :class_hello, :class) expect(Registry.resolve(yard, "#hello", false)).to be nil expect(Registry.resolve(yard, "#hello", true)).to eq imeth expect(Registry.resolve(yard, "class_hello", false)).to be nil expect(Registry.resolve(yard, "class_hello", true)).to eq cmeth end it "resolves methods in Object when inheritance = true" do YARD.parse_string <<-eof class Object; def foo; end end class A; end class MyObject < A; end eof expect(Registry.resolve(P('MyObject'), '#foo', true)).to eq P('Object#foo') end it "resolves methods in BasicObject when inheritance = true" do YARD.parse_string <<-eof class BasicObject; def foo; end end class A; end class MyObject < A; end eof expect(Registry.resolve(P('MyObject'), '#foo', true)).to eq P('BasicObject#foo') end it "does not resolve methods in Object if inheriting BasicObject when inheritance = true" do YARD.parse_string <<-eof class Object; def foo; end end class MyObject < BasicObject; end eof expect(Registry.resolve(P('MyObject'), '#foo', true)).to be nil end it "allows type=:typename to ensure resolved object is of a certain type" do YARD.parse_string "class Foo; end" expect(Registry.resolve(Registry.root, 'Foo')).to eq Registry.at('Foo') expect(Registry.resolve(Registry.root, 'Foo', false, false, :method)).to be nil end it "allows keep trying to find obj where type equals object type" do YARD.parse_string <<-eof module Foo class Bar; end def self.Bar; end end eof expect(Registry.resolve(P('Foo'), 'Bar')).to eq Registry.at('Foo::Bar') expect(Registry.resolve(P('Foo'), 'Bar', false, false, :method)).to eq( Registry.at('Foo.Bar')) end it "returns proxy fallback with given type if supplied" do YARD.parse_string "module Foo; end" proxy = Registry.resolve(P('Foo'), 'Bar', false, true, :method) expect(proxy.type).to eq :method proxy = Registry.resolve(P('Qux'), 'Bar', false, true, :method) expect(proxy.type).to eq :method end it "only checks 'Path' in lookup on root namespace" do expect(Registry).to receive(:at).once.with('Test').and_return(true) Registry.resolve(Registry.root, "Test") end it "does not perform lookup by joining namespace and name without separator" do yard = ClassObject.new(:root, :YARD) expect(Registry).not_to receive(:at).with('YARDB') Registry.resolve(yard, 'B') end end describe ".all" do it "returns objects of types specified by arguments" do ModuleObject.new(:root, :A) o1 = ClassObject.new(:root, :B) o2 = MethodObject.new(:root, :testing) r = Registry.all(:method, :class) expect(r).to include(o1, o2) end it "returns code objects" do o1 = ModuleObject.new(:root, :A) o2 = ClassObject.new(:root, :B) MethodObject.new(:root, :testing) r = Registry.all.select {|t| NamespaceObject === t } expect(r).to include(o1, o2) end it "allows .all to omit list" do o1 = ModuleObject.new(:root, :A) o2 = ClassObject.new(:root, :B) r = Registry.all expect(r).to include(o1, o2) end end describe ".paths" do it "returns all object paths" do o1 = ModuleObject.new(:root, :A) o2 = ClassObject.new(:root, :B) expect(Registry.paths).to include('A', 'B') end end describe ".load_yardoc" do it "delegates load to RegistryStore" do store = RegistryStore.new expect(store).to receive(:load).with('foo') expect(RegistryStore).to receive(:new).and_return(store) Registry.yardoc_file = 'foo' Registry.load_yardoc end it "returns itself" do expect(Registry.load_yardoc).to eq Registry end it "maintains hash key equality on loaded objects" do Registry.clear Registry.load!(File.dirname(__FILE__) + '/serializers/data/serialized_yardoc') baz = Registry.at('Foo#baz') expect(Registry.at('Foo').aliases.keys).to include(baz) expect(Registry.at('Foo').aliases.has_key?(baz)).to be true end end ['load', 'load_all', 'load!'].each do |meth| describe('.' + meth) do it "returns itself" do expect(Registry.send(meth)).to eq Registry end end end describe ".each" do before do YARD.parse_string "def a; end; def b; end; def c; end" end after { Registry.clear } it "iterates over .all" do items = [] Registry.each {|x| items << x.path } expect(items.sort).to eq ['#a', '#b', '#c'] end it "includes Enumerable and allow for find, select" do expect(Registry.find {|x| x.path == "#a" }).to be_a(CodeObjects::MethodObject) end end describe ".instance" do it "returns itself" do expect(Registry.instance).to eq Registry end end describe ".single_object_db" do it "defaults to nil" do expect(Registry.single_object_db).to eq nil Thread.new { expect(Registry.single_object_db).to eq nil }.join end end describe "Thread local" do it "maintains two Registries in separate threads" do barrier = 0 mutex = Mutex.new threads = [] threads << Thread.new do Registry.clear YARD.parse_string "# docstring 1\nclass Foo; end" mutex.synchronize { barrier += 1 } while barrier < 2 do s = "barrier < 2, spinning" end expect(Registry.at('Foo').docstring).to eq "docstring 1" end threads << Thread.new do Registry.clear YARD.parse_string "# docstring 2\nclass Foo; end" mutex.synchronize { barrier += 1 } while barrier < 2 do s = "barrier < 2, spinning" end expect(Registry.at('Foo').docstring).to eq "docstring 2" end threads.each {|t| t.join } end it "allows setting of yardoc_file in separate threads" do barrier = 0 mutex = Mutex.new threads = [] threads << Thread.new do expect(Registry.yardoc_file).to eq '.yardoc' Registry.yardoc_file = 'foo' mutex.synchronize { barrier += 1 } while barrier == 1 do s = "barrier = 1, spinning" end expect(Registry.yardoc_file).to eq 'foo' end threads << Thread.new do while barrier == 0 do s = "barrier = 0, spinning" end expect(Registry.yardoc_file).to eq '.yardoc' mutex.synchronize { barrier += 1 } Registry.yardoc_file = 'foo2' end threads.each {|t| t.join } Registry.yardoc_file = Registry::DEFAULT_YARDOC_FILE end it "automatically clears in new threads" do Thread.new { expect(Registry.all).to be_empty }.join end it "allows setting of po_dir in separate threads" do barrier = 0 mutex = Mutex.new threads = [] threads << Thread.new do expect(Registry.po_dir).to eq 'po' Registry.po_dir = 'locale' mutex.synchronize { barrier += 1 } while barrier == 1 do s = "barrier = 1, spinning" end expect(Registry.po_dir).to eq 'locale' end threads << Thread.new do while barrier == 0 do s = "barrier = 0, spinning" end expect(Registry.po_dir).to eq 'po' mutex.synchronize { barrier += 1 } Registry.po_dir = '.' end threads.each {|t| t.join } Registry.po_dir = Registry::DEFAULT_PO_DIR end end end yard-master/spec/registry_store_spec.rb000066400000000000000000000305311265676644000207050ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "spec_helper") describe YARD::RegistryStore do before do FileUtils.rm_rf("foo") @store = RegistryStore.new @serializer = Serializers::YardocSerializer.new('foo') @foo = CodeObjects::MethodObject.new(nil, :foo) @bar = CodeObjects::ClassObject.new(nil, :Bar) allow(Serializers::YardocSerializer).to receive(:new).and_return(@serializer) end describe "#load" do it "loads root.dat as full object list if it is a Hash" do expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/checksums').and_return(false) expect(File).to receive(:file?).with('foo/proxy_types').and_return(false) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(@serializer).to receive(:deserialize).with('root').and_return({:root => @foo, :A => @bar}) expect(@store.load('foo')).to be true expect(@store.root).to eq @foo expect(@store.get('A')).to eq @bar end it "loads old yardoc format if .yardoc is a file" do expect(File).to receive(:directory?).with('foo').and_return(false) expect(File).to receive(:file?).with('foo').and_return(true) expect(File).to receive(:read_binary).with('foo').and_return('FOO') expect(Marshal).to receive(:load).with('FOO') @store.load('foo') end it "loads new yardoc format if .yardoc is a directory" do expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/checksums').and_return(false) expect(File).to receive(:file?).with('foo/proxy_types').and_return(false) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(File).to receive(:file?).with('foo/objects/root.dat').and_return(false) expect(@store.load('foo')).to be true end it "returns true if .yardoc is loaded (file)" do expect(File).to receive(:directory?).with('myyardoc').and_return(false) expect(File).to receive(:file?).with('myyardoc').and_return(true) expect(File).to receive(:read_binary).with('myyardoc').and_return(Marshal.dump('')) expect(@store.load('myyardoc')).to be true end it "returns true if .yardoc is loaded (directory)" do expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/checksums').and_return(false) expect(File).to receive(:file?).with('foo/proxy_types').and_return(false) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(File).to receive(:file?).with('foo/objects/root.dat').and_return(false) expect(@store.load('foo')).to be true end it "returns false if .yardoc does not exist" do expect(@store.load('NONEXIST')).to be false end it "returns false if there is no file to load" do expect(@store.load(nil)).to be false end it "loads checksums if they exist" do expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/checksums').and_return(true) expect(File).to receive(:file?).with('foo/proxy_types').and_return(false) expect(File).to receive(:file?).with('foo/objects/root.dat').and_return(false) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(File).to receive(:readlines).with('foo/checksums').and_return([ 'file1 CHECKSUM1', ' file2 CHECKSUM2 ' ]) expect(@store.load('foo')).to be true expect(@store.checksums).to eq({'file1' => 'CHECKSUM1', 'file2' => 'CHECKSUM2'}) end it "loads proxy_types if they exist" do expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/checksums').and_return(false) expect(File).to receive(:file?).with('foo/proxy_types').and_return(true) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(File).to receive(:file?).with('foo/objects/root.dat').and_return(false) expect(File).to receive(:read_binary).with('foo/proxy_types').and_return(Marshal.dump({'a' => 'b'})) expect(@store.load('foo')).to be true expect(@store.proxy_types).to eq({'a' => 'b'}) end it "loads root object if it exists" do expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/checksums').and_return(false) expect(File).to receive(:file?).with('foo/proxy_types').and_return(false) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(File).to receive(:file?).with('foo/objects/root.dat').and_return(true) expect(File).to receive(:read_binary).with('foo/objects/root.dat').and_return(Marshal.dump(@foo)) expect(@store.load('foo')).to be true expect(@store.root).to eq @foo end end describe "#save" do before do allow(@store).to receive(:write_proxy_types) allow(@store).to receive(:write_checksums) allow(@store).to receive(:destroy) end after do Registry.single_object_db = nil end def saves_to_singledb expect(@serializer).to receive(:serialize).once.with(instance_of(Hash)) @store.save(true, 'foo') end def add_items(n) n.times {|i| @store[i.to_s] = @foo } end def saves_to_multidb times = @store.keys.size expect(@serializer).to receive(:serialize).exactly(times).times @store.save(true, 'foo') @last = times end it "saves as single object db if single_object_db is nil and there are less than 3000 objects" do Registry.single_object_db = nil add_items(100) saves_to_singledb end it "saves as single object db if single_object_db is nil and there are more than 3000 objects" do Registry.single_object_db = nil add_items(5000) saves_to_singledb end it "saves as single object db if single_object_db is true (and any amount of objects)" do Registry.single_object_db = true add_items(100) saves_to_singledb add_items(5000) saves_to_singledb end it "never saves as single object db if single_object_db is false" do Registry.single_object_db = false add_items(100) saves_to_multidb add_items(5000) saves_to_multidb end end describe "#put" do it "assigns values" do @store.put(:YARD, @foo) expect(@store.get(:YARD)).to eq @foo end it "treats '' as root" do @store.put('', @foo) expect(@store.get(:root)).to eq @foo end end describe "#get" do it "hits cache if object exists" do @store.put(:YARD, @foo) expect(@store.get(:YARD)).to eq @foo end it "hits backstore on cache miss and cache is not fully loaded" do serializer = double(:serializer) expect(serializer).to receive(:deserialize).once.with(:YARD).and_return(@foo) @store.load('foo') @store.instance_variable_set("@loaded_objects", 0) @store.instance_variable_set("@available_objects", 100) @store.instance_variable_set("@serializer", serializer) expect(@store.get(:YARD)).to eq @foo expect(@store.get(:YARD)).to eq @foo expect(@store.instance_variable_get("@loaded_objects")).to eq 1 end end [:keys, :values].each do |item| describe "##{item}" do it "loads entire database if reload=true" do expect(File).to receive(:directory?).with('foo').and_return(true) @store.load('foo') expect(@store).to receive(:load_all) @store.send(item, true) end it "does not load entire database if reload=false" do expect(File).to receive(:directory?).with('foo').and_return(true) @store.load('foo') expect(@store).not_to receive(:load_all) @store.send(item, false) end end end describe "#paths_for_type" do after { Registry.clear } it "sets all object types if not set by object_types" do expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/checksums').and_return(false) expect(File).to receive(:file?).with('foo/proxy_types').and_return(false) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(@serializer).to receive(:deserialize).with('root').and_return({:'A#foo' => @foo, :A => @bar}) @store.load('foo') expect(@store.paths_for_type(:method)).to eq ['#foo'] expect(@store.paths_for_type(:class)).to eq ['Bar'] end it "keeps track of types when assigning values" do @store.put(:abc, @foo) expect(@store.paths_for_type(@foo.type)).to eq ['abc'] end it "reassigns path if type changes" do foo = CodeObjects::ClassObject.new(:root, :Foo) @store.put('Foo', foo) expect(@store.get('Foo').type).to eq :class expect(@store.paths_for_type(:class)).to eq ["Foo"] foo = CodeObjects::ModuleObject.new(:root, :Foo) @store.put('Foo', foo) expect(@store.get('Foo').type).to eq :module expect(@store.paths_for_type(:class)).to eq [] expect(@store.paths_for_type(:module)).to eq ["Foo"] end end describe "#values_for_type" do it "returns all objects with type" do @store.put(:abc, @foo) expect(@store.values_for_type(@foo.type)).to eq [@foo] end end describe "#load_all" do it "loads the entire database" do foomock = double(:Foo) barmock = double(:Bar) allow(foomock).to receive(:type).and_return(:class) allow(barmock).to receive(:type).and_return(:class) expect(foomock).to receive(:path).and_return('Foo') expect(barmock).to receive(:path).and_return('Bar') expect(File).to receive(:directory?).with('foo').and_return(true) expect(File).to receive(:file?).with('foo/proxy_types').and_return(false) expect(File).to receive(:file?).with('foo/object_types').and_return(false) expect(File).to receive(:file?).with('foo/checksums').and_return(false) expect(File).to receive(:file?).with('foo/objects/root.dat').and_return(false) expect(@store).to receive(:all_disk_objects).at_least(1).times.and_return(['foo/objects/foo', 'foo/objects/bar']) @store.load('foo') serializer = @store.instance_variable_get("@serializer") expect(serializer).to receive(:deserialize).with('foo/objects/foo', true).and_return(foomock) expect(serializer).to receive(:deserialize).with('foo/objects/bar', true).and_return(barmock) @store.send(:load_all) expect(@store.instance_variable_get("@available_objects")).to eq 2 expect(@store.instance_variable_get("@loaded_objects")).to eq 2 expect(@store[:Foo]).to eq foomock expect(@store[:Bar]).to eq barmock end end describe "#destroy" do it "destroys file ending in .yardoc when force=false" do expect(File).to receive(:file?).with('foo.yardoc').and_return(true) expect(File).to receive(:unlink).with('foo.yardoc') @store.instance_variable_set("@file", 'foo.yardoc') expect(@store.destroy).to be true end it "destroys dir ending in .yardoc when force=false" do expect(File).to receive(:directory?).with('foo.yardoc').and_return(true) expect(FileUtils).to receive(:rm_rf).with('foo.yardoc') @store.instance_variable_set("@file", 'foo.yardoc') expect(@store.destroy).to be true end it "does not destroy file/dir not ending in .yardoc when force=false" do expect(File).not_to receive(:file?).with('foo') expect(File).not_to receive(:directory?).with('foo') expect(File).not_to receive(:unlink).with('foo') expect(FileUtils).not_to receive(:rm_rf).with('foo') @store.instance_variable_set("@file", 'foo') expect(@store.destroy).to be false end it "destroys any file/dir when force=true" do expect(File).to receive(:file?).with('foo').and_return(true) expect(File).to receive(:unlink).with('foo') @store.instance_variable_set("@file", 'foo') expect(@store.destroy(true)).to be true end end describe "#locale" do it "loads ./po/LOCALE_NAME.po" do fr_locale = I18n::Locale.new("fr") expect(I18n::Locale).to receive(:new).with("fr").and_return(fr_locale) expect(Registry).to receive(:po_dir).and_return("po") expect(fr_locale).to receive(:load).with("po") expect(@store.locale("fr")).to eq fr_locale end end end yard-master/spec/rubygems/000077500000000000000000000000001265676644000161155ustar00rootroot00000000000000yard-master/spec/rubygems/doc_manager_spec.rb000066400000000000000000000073631265676644000217240ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' require File.join(YARD::ROOT, 'rubygems_plugin') require 'fileutils' describe Gem::DocManager do before do # Ensure filesystem integrity allow(FileUtils).to receive(:mkdir_p) allow(FileUtils).to receive(:rm_rf) allow(Dir).to receive(:chdir) allow(YARD::CLI::Yardoc).to receive(:run) @spec_file = File.join(YARD::ROOT, '..', 'yard.gemspec') @spec = Gem::SourceIndex.load_specification(@spec_file) @spec.has_yardoc = false # no yardoc docs for now @yardopts = File.join(@spec.full_gem_path, '.yardopts') @doc = Gem::DocManager.new(@spec) allow(@doc).to receive(:install_ri_yard_orig) allow(@doc).to receive(:install_rdoc_yard_orig) end def runs; expect(YARD::CLI::Yardoc).to receive(:run) end describe ".load_yardoc" do it "properly loads YARD" do expect(Gem::DocManager).to receive(:require) do |path| expect(File.expand_path(path)).to eq YARD::ROOT + '/yard' end Gem::DocManager.load_yardoc end end describe "#install_ri_yard" do def install msg = "Building YARD (yri) index for #{@spec.full_name}..." expect(@doc).to receive(:say).with(msg) @doc.install_ri_yard end it "passes --quiet to all documentation" do runs.with('-c', '-n', '--quiet', 'lib') install end it "passes extra_rdoc_files to documentation" do @spec.extra_rdoc_files = %w(README LICENSE) runs.with('-c', '-n', '--quiet', 'lib', '-', 'README', 'LICENSE') install end it "adds --backtrace if Gem.configuration.backtrace" do Gem.configuration.backtrace = true runs.with('-c', '-n', '--quiet', '--backtrace', 'lib') install Gem.configuration.backtrace = false end it "adds require_paths if there is no .yardopts" do expect(File).to receive(:file?).with(@yardopts).and_return(true) runs.with('-c', '-n', '--quiet') install end it "adds extra_rdoc_files if there is no .yardopts" do @spec.extra_rdoc_files = %w(README LICENSE) expect(File).to receive(:file?).with(@yardopts).and_return(true) runs.with('-c', '-n', '--quiet') install end it "switches to directory before running command" do old = Dir.pwd expect(Dir).to receive(:chdir).with(@spec.full_gem_path) expect(Dir).to receive(:chdir).with(old) install end it "ensures that directory is switched back at end of command in failure" do old = Dir.pwd expect(Dir).to receive(:chdir).with(@spec.full_gem_path) expect(Dir).to receive(:chdir).with(old) expect(@doc.ui.errs).to receive(:puts).with(/ERROR:\s*While generating documentation/) expect(@doc.ui.errs).to receive(:puts).with(/MESSAGE:\s*foo/) expect(@doc.ui.errs).to receive(:puts).with(/YARDOC args:\s*-c -n --quiet lib/) expect(@doc.ui.errs).to receive(:puts).with("(continuing with the rest of the installation)") expect(YARD::CLI::Yardoc).to receive(:run).and_raise(RuntimeError.new("foo")) install end it "handles permission errors" do expect(YARD::CLI::Yardoc).to receive(:run).and_raise(Errno::EACCES.new("- dir")) expect { install }.to raise_error(Gem::FilePermissionError) end end describe "#install_rdoc_yard" do def install msg = "Installing YARD documentation for #{@spec.full_name}..." expect(@doc).to receive(:say).with(msg) @doc.install_rdoc_yard end it "adds -o outdir when generating docs" do expect(File).to receive(:file?).with(@yardopts).and_return(true) @spec.has_yardoc = true doc_dir = File.join(@doc.instance_variable_get("@doc_dir"), 'rdoc') runs.with('-o', doc_dir, '--quiet') install end end end if Gem::VERSION < '2.0.0' yard-master/spec/serializers/000077500000000000000000000000001265676644000166145ustar00rootroot00000000000000yard-master/spec/serializers/data/000077500000000000000000000000001265676644000175255ustar00rootroot00000000000000yard-master/spec/serializers/data/serialized_yardoc/000077500000000000000000000000001265676644000232215ustar00rootroot00000000000000yard-master/spec/serializers/data/serialized_yardoc/checksums000066400000000000000000000000611265676644000251260ustar00rootroot00000000000000test.rb 80e5834ff1e98223761615c0917ff9b77b7ae057 yard-master/spec/serializers/data/serialized_yardoc/objects/000077500000000000000000000000001265676644000246525ustar00rootroot00000000000000yard-master/spec/serializers/data/serialized_yardoc/objects/Foo.dat000066400000000000000000000012621265676644000260700ustar00rootroot00000000000000o:#YARD::CodeObjects::ClassObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[Iu:YARD::StubProxy Foo#bar:EFIu; Foo#baz; F: @ownerIu;Foo; F:@class_mixinsIC;[; Iu;Foo; F:@instance_mixinsIC;[; Iu;Foo; F:@attributesIC:SymbolHash{: classIC;{:@symbolize_valueT: instanceIC;{;T;T: @aliases{Iu; Foo#baz; F:bar: @files[[I" test.rb; Ti:@current_file_has_commentsF: @name:Foo:@source_type: ruby: @tags[:@docstringIC:YARD::Docstring" ; F: @objectIu;Foo; F: @summary0:@ref_tags[;[: @allI"; F:@line_range0:@namespaceIu;; F:@superclasso:YARD::CodeObjects::Proxy : @imethod0:@origname0:@orignamespace0;: Object;"Iu;; F: @obj0yard-master/spec/serializers/data/serialized_yardoc/objects/Foo/000077500000000000000000000000001265676644000253755ustar00rootroot00000000000000yard-master/spec/serializers/data/serialized_yardoc/objects/Foo/bar_i.dat000066400000000000000000000006371265676644000271510ustar00rootroot00000000000000o:$YARD::CodeObjects::MethodObject: @scope: instance:@visibility: public:@parameters[: @files[[I" test.rb:ETi:@current_file_has_commentsF: @name:bar:@source_type: ruby: @tags[:@docstringIC:YARD::Docstring" ; F: @objectIu:YARD::StubProxy Foo#bar; F: @summary0:@ref_tags[;[: @allI"; F:@line_range0:@namespaceIu;Foo; F: @sourceI"def bar; end; F:@signatureI"def bar( ); F:@explicitTyard-master/spec/serializers/data/serialized_yardoc/objects/Foo/baz_i.dat000066400000000000000000000006231265676644000271540ustar00rootroot00000000000000o:$YARD::CodeObjects::MethodObject: @scope: instance:@visibility: public:@parameters[: @files[[I" test.rb:ETi[@ i:@current_file_has_commentsF: @name:baz:@source_type: ruby: @tags[:@docstringIC:YARD::Docstring" ; F: @objectIu:YARD::StubProxy Foo#baz; F: @summary0:@ref_tags[;[: @all0:@line_range0:@namespaceIu;Foo; F: @sourceI"def bar; end; F:@signatureI"def bar( ); Fyard-master/spec/serializers/data/serialized_yardoc/objects/root.dat000066400000000000000000000007501265676644000263310ustar00rootroot00000000000000o:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[Iu:YARD::StubProxyFoo:EF: @ownerIu;; F:@class_mixinsIC;[; Iu;; F:@instance_mixinsIC;[; Iu;; F:@attributesIC:SymbolHash{: classIC;{:@symbolize_valueT: instanceIC;{;T;T: @aliases{: @files[:@current_file_has_commentsF: @name: root:@source_type: ruby: @tags[:@docstringIC:YARD::Docstring" ; F: @objectIu;; F: @summary0:@ref_tags[;[: @allI"; F:@namespace0yard-master/spec/serializers/data/serialized_yardoc/proxy_types000066400000000000000000000000311265676644000255430ustar00rootroot00000000000000{I" Object:EF: classyard-master/spec/serializers/file_system_serializer_spec.rb000066400000000000000000000113331265676644000247300ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "spec_helper") require 'stringio' describe YARD::Serializers::FileSystemSerializer do before do allow(FileUtils).to receive(:mkdir_p) allow(File).to receive(:open) end describe "#basepath" do it "defaults the base path to the 'doc/'" do obj = Serializers::FileSystemSerializer.new expect(obj.basepath).to eq 'doc' end end describe "#extension" do it "defaults the file extension to .html" do obj = Serializers::FileSystemSerializer.new expect(obj.extension).to eq "html" end end describe "#serialized_path" do it "allows no extension to be used" do obj = Serializers::FileSystemSerializer.new :extension => nil yard = CodeObjects::ClassObject.new(nil, :FooBar) expect(obj.serialized_path(yard)).to eq 'FooBar' end it "serializes to top-level-namespace for root" do obj = Serializers::FileSystemSerializer.new :extension => nil expect(obj.serialized_path(Registry.root)).to eq "top-level-namespace" end it "returns serialized_path for a String" do s = Serializers::FileSystemSerializer.new(:basepath => 'foo', :extension => 'txt') expect(s.serialized_path('test.txt')).to eq 'test.txt' end it "removes special chars from path" do m = CodeObjects::MethodObject.new(nil, 'a') s = Serializers::FileSystemSerializer.new { :gsub! => 'gsub_21_i.html', :ask? => 'ask_3F_i.html', :=== => '_3D_3D_3D_i.html', :+ => '_2B_i.html', :- => '-_i.html', :[]= => '_5B_5D_3D_i.html', :<< => '_3C_3C_i.html', :>= => '_3E_3D_i.html', :` => '_60_i.html', :& => '_26_i.html', :* => '_2A_i.html', :| => '_7C_i.html', :/ => '_2F_i.html', :=~ => '_3D_7E_i.html' }.each do |meth, value| allow(m).to receive(:name).and_return(meth) expect(s.serialized_path(m)).to eq value end end it "handles ExtraFileObject's" do s = Serializers::FileSystemSerializer.new e = CodeObjects::ExtraFileObject.new('filename.txt', '') expect(s.serialized_path(e)).to eq 'file.filename.html' end it "differentiates instance and class methods from serialized path" do s = Serializers::FileSystemSerializer.new m1 = CodeObjects::MethodObject.new(nil, 'meth') m2 = CodeObjects::MethodObject.new(nil, 'meth', :class) expect(s.serialized_path(m1)).not_to eq s.serialized_path(m2) end it "serializes path from overload tag" do YARD.parse_string <<-'eof' class Foo # @overload bar def bar; end end eof serializer = Serializers::FileSystemSerializer.new object = Registry.at('Foo#bar').tag(:overload) expect(serializer.serialized_path(object)).to eq "Foo/bar_i.html" end it "maps matching case sensitive object names to different files on disk" do Registry.clear o1 = CodeObjects::ClassObject.new(:root, "AB") o2 = CodeObjects::ClassObject.new(:root, "Ab") s = Serializers::FileSystemSerializer.new expect([["AB_.html", "Ab.html"], ["AB.html", "Ab_.html"]]).to include( [s.serialized_path(o1), s.serialized_path(o2)]) end it "handles case sensitivity of nested paths for objects with matching names" do Registry.clear YARD.parse_string <<-eof class Abc; class D; end end class ABC; class D; end end eof s = Serializers::FileSystemSerializer.new expect(s.serialized_path(Registry.at('ABC::D'))).to eq "ABC/D.html" expect(s.serialized_path(Registry.at('Abc::D'))).to eq "Abc/D.html" end end describe "#serialize" do it "serializes to the correct path" do yard = CodeObjects::ClassObject.new(nil, :FooBar) meth = CodeObjects::MethodObject.new(yard, :baz, :class) meth2 = CodeObjects::MethodObject.new(yard, :baz) { 'foo/FooBar/baz_c.txt' => meth, 'foo/FooBar/baz_i.txt' => meth2, 'foo/FooBar.txt' => yard }.each do |path, obj| io = StringIO.new expect(File).to receive(:open).with(path, 'wb').and_yield(io) expect(io).to receive(:write).with("data") s = Serializers::FileSystemSerializer.new(:basepath => 'foo', :extension => 'txt') s.serialize(obj, "data") end end it "guarantees the directory exists" do o1 = CodeObjects::ClassObject.new(nil, :Really) o2 = CodeObjects::ClassObject.new(o1, :Long) o3 = CodeObjects::ClassObject.new(o2, :PathName) obj = CodeObjects::MethodObject.new(o3, :foo) expect(FileUtils).to receive(:mkdir_p).once.with('doc/Really/Long/PathName') s = Serializers::FileSystemSerializer.new s.serialize(obj, "data") end end end yard-master/spec/serializers/spec_helper.rb000066400000000000000000000001131265676644000214250ustar00rootroot00000000000000require File.join(File.dirname(__FILE__), "..", "spec_helper") include YARDyard-master/spec/serializers/yardoc_serializer_spec.rb000066400000000000000000000025411265676644000236670ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" instance_eval do class YARD::Serializers::YardocSerializer public :dump public :internal_dump end end describe YARD::Serializers::YardocSerializer do before do @serializer = YARD::Serializers::YardocSerializer.new('.yardoc') Registry.clear @foo = CodeObjects::ClassObject.new(:root, :Foo) @bar = CodeObjects::MethodObject.new(@foo, :bar) end describe "#dump" do it "maintains object equality when loading a dumped object" do newfoo = @serializer.internal_dump(@foo) expect(newfoo).to equal(@foo) expect(newfoo).to eq @foo expect(@foo).to equal(newfoo) expect(@foo).to eq newfoo expect(newfoo.hash).to eq @foo.hash end it "maintains hash key equality when loading a dumped object" do newfoo = @serializer.internal_dump(@foo) expect({@foo => 1}).to have_key(newfoo) expect({newfoo => 1}).to have_key(@foo) end end describe "#serialize" do it "accepts a hash of codeobjects (and write to root)" do data = {:root => Registry.root} marshaldata = Marshal.dump(data) filemock = double(:file) expect(filemock).to receive(:write).with(marshaldata) expect(File).to receive(:open!).with('.yardoc/objects/root.dat', 'wb').and_yield(filemock) @serializer.serialize(data) end end endyard-master/spec/server/000077500000000000000000000000001265676644000155665ustar00rootroot00000000000000yard-master/spec/server/adapter_spec.rb000066400000000000000000000021341265676644000205450ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Server::Adapter do after(:all) { Server::Adapter.shutdown } describe "#add_library" do it "adds a library" do lib = LibraryVersion.new('yard') a = Adapter.new({}) expect(a.libraries).to be_empty a.add_library(lib) expect(a.libraries['yard']).to eq [lib] end end describe "#start" do it "does not implement #start" do expect { Adapter.new({}).start }.to raise_error(NotImplementedError) end end describe ".setup" do it "adds template paths and helpers" do Adapter.setup expect(Templates::Template.extra_includes).to include(DocServerHelper) expect(Templates::Engine.template_paths).to include(YARD::ROOT + '/yard/server/templates') end end describe ".shutdown" do it "cleans up template paths and helpers" do Adapter.setup Adapter.shutdown expect(Templates::Template.extra_includes).not_to include(DocServerHelper) expect(Templates::Engine.template_paths).not_to include(YARD::ROOT + '/yard/server/templates') end end endyard-master/spec/server/commands/000077500000000000000000000000001265676644000173675ustar00rootroot00000000000000yard-master/spec/server/commands/base_spec.rb000066400000000000000000000051661265676644000216500ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' class MyProcCommand < Base def initialize(&block) self.class.send(:define_method, :run, &block) end end class MyCacheCommand < Base def run; cache 'foo' end end describe YARD::Server::Commands::Base do describe "#cache" do before do @command = MyCacheCommand.new(:adapter => mock_adapter, :caching => true) @command.request = OpenStruct.new end it "does not cache if caching == false" do expect(File).not_to receive(:open) @command.caching = false @command.run end it "requires document root to cache" do expect(File).not_to receive(:open) @command.adapter.document_root = nil @command.run end it "caches to path/to/file.html and create directories" do expect(FileUtils).to receive(:mkdir_p).with('/public/path/to') expect(File).to receive(:open).with('/public/path/to/file.html', anything) @command.request.path = '/path/to/file.html' @command.run end end describe "#redirect" do it "returns a valid redirection" do cmd = MyProcCommand.new { redirect '/foo' } expect(cmd.call(mock_request('/foo'))).to eq( [302, {"Content-Type" => "text/html", "Location" => "/foo"}, [""]]) end end describe "#call" do it "handles a NotFoundError and use message as body" do cmd = MyProcCommand.new { raise NotFoundError, "hello world" } s, h, b = *cmd.call(mock_request('/foo')) expect(s).to eq 404 expect(b).to eq ["hello world"] end it "does not use message as body if not provided in NotFoundError" do cmd = MyProcCommand.new { raise NotFoundError } s, h, b = *cmd.call(mock_request('/foo')) expect(s).to eq 404 expect(b).to eq ["Not found: /foo"] end it "handles 404 status code from #run" do cmd = MyProcCommand.new { self.status = 404 } s, h, b = *cmd.call(mock_request('/foo')) expect(s).to eq 404 expect(b).to eq ["Not found: /foo"] end it "does not override body if status is 404 and body is defined" do cmd = MyProcCommand.new { self.body = "foo"; self.status = 404 } s, h, b = *cmd.call(mock_request('/bar')) expect(s).to eq 404 expect(b).to eq ['foo'] end it "handles body as Array" do cmd = MyProcCommand.new { self.body = ['a', 'b', 'c'] } s, h, b = *cmd.call(mock_request('/foo')) expect(b).to eq %w(a b c) end it "allows headers to be defined" do cmd = MyProcCommand.new { self.headers['Foo'] = 'BAR' } s, h, b = *cmd.call(mock_request('/foo')) expect(h['Foo']).to eq 'BAR' end end endyard-master/spec/server/commands/library_command_spec.rb000066400000000000000000000020651265676644000240730ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' require 'ostruct' describe YARD::Server::Commands::LibraryCommand do before do allow(Templates::Engine).to receive(:render) allow(Templates::Engine).to receive(:generate) allow(YARD).to receive(:parse) allow(Registry).to receive(:load) allow(Registry).to receive(:save) @cmd = LibraryCommand.new(:adapter => mock_adapter) @request = OpenStruct.new(:xhr? => false, :path => "/foo") @library = OpenStruct.new(:source_path => '.') @cmd.library = @library allow(@cmd).to receive(:load_yardoc).and_return(nil) end def call expect { @cmd.call(@request) }.to raise_error(NotImplementedError) end describe "#call" do it "raises NotImplementedError" do call end it "sets :rdoc as the default markup in incremental mode" do @cmd.incremental = true call expect(@cmd.options[:markup]).to eq :rdoc end it "sets :rdoc as the default markup in regular mode" do call expect(@cmd.options[:markup]).to eq :rdoc end end endyard-master/spec/server/commands/static_file_command_spec.rb000066400000000000000000000062461265676644000247220ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Server::Commands::StaticFileCommand do before do adapter = mock_adapter adapter.document_root = '/c' @cmd = StaticFileCommand.new(:adapter => adapter) end describe "#run" do def run(path, status = nil, body = nil) s, h, b = *@cmd.call(mock_request(path)) expect(body).to eq b.first if body expect(status).to eq s if status [s, h, b] end it "searches through document root before static paths" do expect(File).to receive(:exist?).with('/c/path/to/file.txt').ordered.and_return(false) StaticFileCommand::STATIC_PATHS.reverse.each do |path| expect(File).to receive(:exist?).with(File.join(path, 'path/to/file.txt')).ordered.and_return(false) end run '/path/to/file.txt' end it "returns file contents if found" do tpl = Templates::Engine.template(:default, :fulldoc, :html) expect(File).to receive(:exist?).with('/c/path/to/file.txt').and_return(false) expect(tpl).to receive(:find_file).with('/path/to/file.txt').and_return('/path/to/foo') expect(File).to receive(:read).with('/path/to/foo').and_return('FOO') run('/path/to/file.txt', 200, 'FOO') end it "allows registering of new paths and use those before other static paths" do Server.register_static_path '/foo' path = '/foo/path/to/file.txt' expect(File).to receive(:exist?).with('/c/path/to/file.txt').and_return(false) expect(File).to receive(:exist?).with(path).and_return(true) expect(File).to receive(:read).with(path).and_return('FOO') run('/path/to/file.txt', 200, 'FOO') end it "does not use registered path before docroot" do Server.register_static_path '/foo' path = '/foo/path/to/file.txt' expect(File).to receive(:exist?).with('/c/path/to/file.txt').and_return(true) expect(File).to receive(:read).with('/c/path/to/file.txt').and_return('FOO') run('/c/path/to/file.txt', 200, 'FOO') end it "returns 404 if not found" do expect(File).to receive(:exist?).with('/c/path/to/file.txt').ordered.and_return(false) StaticFileCommand::STATIC_PATHS.reverse.each do |path| expect(File).to receive(:exist?).with(File.join(path, 'path/to/file.txt')).ordered.and_return(false) end run('/path/to/file.txt', 404) end it "returns text/html for file with no extension" do expect(File).to receive(:exist?).with('/c/file').and_return(true) expect(File).to receive(:read).with('/c/file') s, h, b = *run('/file') expect(h['Content-Type']).to eq 'text/html' end { "js" => "text/javascript", "css" => "text/css", "png" => "image/png", "gif" => "image/gif", "htm" => "text/html", "html" => "text/html", "txt" => "text/plain", "unknown" => "application/octet-stream" }.each do |ext, mime| it "serves file.#{ext} as #{mime}" do expect(File).to receive(:exist?).with('/c/file.' + ext).and_return(true) expect(File).to receive(:read).with('/c/file.' + ext) s, h, b = *run('/file.' + ext) expect(h['Content-Type']).to eq mime end end end endyard-master/spec/server/doc_server_helper_spec.rb000066400000000000000000000030071265676644000226170ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" class MyDocServerSerializerRouter attr_accessor :request def docs_prefix; 'PREFIX' end def initialize; @request = mock_request end end class MockDocServerHelper include YARD::Templates::Helpers::BaseHelper include YARD::Templates::Helpers::HtmlHelper include YARD::Server::DocServerHelper attr_accessor :adapter attr_accessor :single_library attr_accessor :library def initialize @single_library = false @library = LibraryVersion.new('foo') @adapter = mock_adapter(:router => MyDocServerSerializerRouter.new) @serializer = YARD::Server::DocServerSerializer.new @object = YARD::Registry.root end def options; OpenStruct.new end end describe YARD::Server::DocServerHelper do before do @helper = MockDocServerHelper.new end describe "#url_for" do it "does not link to /library/ if single_library = true" do @helper.single_library = true expect(@helper.url_for(Registry.root)).to eq "/PREFIX/toplevel" end it "returns /PREFIX/foo/version if foo has a version" do @helper.library = LibraryVersion.new('foo', 'bar') @helper.adapter.router.request.version_supplied = true expect(@helper.url_for(P('A'))).to eq '/PREFIX/foo/bar/A' end end describe "#url_for_file" do it "properly links file objects using file/ prefix" do file = CodeObjects::ExtraFileObject.new('a/b/FooBar.md', '') expect(@helper.url_for_file(file)).to eq '/PREFIX/foo/file/a/b/FooBar.md' end end endyard-master/spec/server/doc_server_serializer_spec.rb000066400000000000000000000035311265676644000235130ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Server::DocServerSerializer do describe "#serialized_path" do before do Registry.clear @serializer = Server::DocServerSerializer.new end after(:all) { Server::Adapter.shutdown } it "returns '/PREFIX/library/toplevel' for root" do expect(@serializer.serialized_path(Registry.root)).to eq "toplevel" end it "returns /PREFIX/library/Object for Object in a library" do expect(@serializer.serialized_path(P('A::B::C'))).to eq 'A/B/C' end it "links to instance method as Class:method" do obj = CodeObjects::MethodObject.new(:root, :method) expect(@serializer.serialized_path(obj)).to eq 'toplevel:method' end it "links to class method as Class.method" do obj = CodeObjects::MethodObject.new(:root, :method, :class) expect(@serializer.serialized_path(obj)).to eq 'toplevel.method' end it "links to anchor for constant" do obj = CodeObjects::ConstantObject.new(:root, :FOO) expect(@serializer.serialized_path(obj)).to eq 'toplevel#FOO-constant' end it "links to anchor for class variable" do obj = CodeObjects::ClassVariableObject.new(:root, :@@foo) expect(@serializer.serialized_path(obj)).to eq 'toplevel#@@foo-classvariable' end it "links files using file/ prefix" do file = CodeObjects::ExtraFileObject.new('a/b/FooBar.md', '') expect(@serializer.serialized_path(file)).to eq 'file/FooBar' end it "handles unicode data" do file = CodeObjects::ExtraFileObject.new("test\u0160", '') if file.name.encoding == Encoding.find("Windows-1252") expect(@serializer.serialized_path(file)).to eq 'file/test_8A' else expect(@serializer.serialized_path(file)).to eq 'file/test_C5A0' end end if defined?(::Encoding) end endyard-master/spec/server/rack_adapter_spec.rb000066400000000000000000000013111265676644000215410ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe "YARD::Server::RackMiddleware" do before do begin; require 'rack'; rescue LoadError; pending "rack required for these tests" end @superapp = double(:superapp) @app = YARD::Server::RackMiddleware.new(@superapp, :libraries => {'foo' => [LibraryVersion.new('foo', nil)]}) end after(:all) { YARD::Server::Adapter.shutdown } it "handles requests" do expect(@app.call(Rack::MockRequest.env_for('/'))[0]).to eq 200 end it "passes up to the next middleware on 404" do expect(@superapp).to receive(:call).and_return([200, {}, ['OK']]) expect(@app.call(Rack::MockRequest.env_for('/INVALID'))).to eq [200, {}, ['OK']] end endyard-master/spec/server/router_spec.rb000066400000000000000000000076251265676644000204570ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' class MyRouterSpecRouter < Router def docs_prefix; 'mydocs/foo' end def list_prefix; 'mylist/foo' end def search_prefix; 'mysearch/foo' end def check_static_cache; nil end end describe YARD::Server::Router do before do @adapter = mock_adapter @projects = @adapter.libraries['project'] @request = mock_request end describe "#parse_library_from_path" do def parse(*args) @request.path = '/' + args.join('/') @router = MyRouterSpecRouter.new(@adapter) @router.request = @request @router.parse_library_from_path(args.flatten) end it "parses library and version name out of path" do expect(parse('project', '1.0.0')).to eq [@projects[0], []] expect(@request.version_supplied).to be true end it "parses library and use latest version if version is not supplied" do expect(parse('project')).to eq [@projects[1], []] expect(@request.version_supplied).to be false end it "parses library and use latest version if next component is not a version" do expect(parse('project', 'notaversion')).to eq [@projects[1], ['notaversion']] expect(@request.version_supplied).to be false end it "returns nil library if no library is found" do expect(parse('notproject')).to eq [nil, ['notproject']] end it "does not parse library or version if single_library == true" do allow(@adapter).to receive(:options).and_return(:single_library => true) expect(parse('notproject')).to eq [@projects[0], ['notproject']] end end describe "#route" do def route_to(route, command, *args) req = mock_request(route) router = MyRouterSpecRouter.new(@adapter) expect(command).to receive(:new) do |*args| @command = command.allocate @command.send(:initialize, *args) class << @command; def call(req); self end end @command end router.call(req) end it "routes /docs/OBJECT to object if single_library = true" do allow(@adapter).to receive(:options).and_return(:single_library => true) route_to('/mydocs/foo/FOO', DisplayObjectCommand) end it "routes /docs" do route_to('/mydocs/foo', LibraryIndexCommand) end it "routes /docs as index for library if single_library == true" do allow(@adapter).to receive(:options).and_return(:single_library => true) route_to('/mydocs/foo/', DisplayObjectCommand) end it "routes /docs/name/version" do route_to('/mydocs/foo/project/1.0.0', DisplayObjectCommand) expect(@command.library).to eq @projects[0] end it "routes /docs/name/ to latest version of library" do route_to('/mydocs/foo/project', DisplayObjectCommand) expect(@command.library).to eq @projects[1] end it "routes /list/name/version/class" do route_to('/mylist/foo/project/1.0.0/class', ListCommand) expect(@command.library).to eq @projects[0] end it "routes /list/name/version/methods" do route_to('/mylist/foo/project/1.0.0/methods', ListCommand) expect(@command.library).to eq @projects[0] end it "routes /list/name/version/files" do route_to('/mylist/foo/project/1.0.0/files', ListCommand) expect(@command.library).to eq @projects[0] end it "routes /list/name to latest version of library" do route_to('/mylist/foo/project/class', ListCommand) expect(@command.library).to eq @projects[1] end it "routes /search/name/version" do route_to('/mysearch/foo/project/1.0.0', SearchCommand) expect(@command.library).to eq @projects[0] end it "routes /search/name to latest version of library" do route_to('/mysearch/foo/project', SearchCommand) expect(@command.library).to eq @projects[1] end it "searches static files for non-existent library" do route_to('/mydocs/foo/notproject', StaticFileCommand) end end endyard-master/spec/server/spec_helper.rb000066400000000000000000000007361265676644000204120ustar00rootroot00000000000000require File.dirname(__FILE__) + "/../spec_helper" require 'ostruct' include Server include Commands def mock_adapter(opts = {}) opts[:libraries] ||= {'project' => [LibraryVersion.new('project', '1.0.0'), LibraryVersion.new('project', '1.0.1')]} opts[:document_root] ||= '/public' opts[:options] ||= {:single_library => false, :caching => false} opts[:server_options] ||= {} OpenStruct.new(opts) end def mock_request(path = '/') OpenStruct.new(:path => path) end yard-master/spec/server/static_caching_spec.rb000066400000000000000000000026051265676644000220730ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Server::StaticCaching do include StaticCaching describe "#check_static_cache" do def adapter; @adapter ||= mock_adapter end def request; @request ||= OpenStruct.new end it "returns nil if document root is not set" do adapter.document_root = nil expect(check_static_cache).to be nil end it "reads a file from document root if path matches file on system" do request.path = '/hello/world.html' expect(File).to receive(:file?).with('/public/hello/world.html').and_return(true) expect(File).to receive(:open).with('/public/hello/world.html', anything).and_return('body') s, h, b = *check_static_cache expect(s).to eq 200 expect(b).to eq ["body"] end it "reads a file if path matches file on system + .html" do request.path = '/hello/world' expect(File).to receive(:file?).with('/public/hello/world.html').and_return(true) expect(File).to receive(:open).with('/public/hello/world.html', anything).and_return('body') s, h, b = *check_static_cache expect(s).to eq 200 expect(b).to eq ["body"] end it "returns nil if no matching file is found" do request.path = '/hello/foo' expect(File).to receive(:file?).with('/public/hello/foo.html').and_return(false) expect(check_static_cache).to eq nil end end endyard-master/spec/server/webrick_servlet_spec.rb000066400000000000000000000011651265676644000223220ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Server::WebrickServlet do describe "#do_GET" do it "performs a GET" do resp = OpenStruct.new class << resp def []=(name, value) (self.headers ||= {})[name] = value end end server = double(:server, :[] => nil) adapter = mock_adapter adapter.router = proc { [200, {'Header' => 'foo'}, ['body']]} WebrickServlet.new(server, adapter).do_GET(mock_request('/foo'), resp) expect(resp.status).to eq 200 expect(resp.headers).to eq({'Header' => 'foo'}) expect(resp.body).to eq 'body' end end endyard-master/spec/server_spec.rb000066400000000000000000000004521265676644000171260ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Server do describe ".register_static_path" do it "registers a static path" do YARD::Server.register_static_path 'foo' expect(YARD::Server::Commands::StaticFileCommand::STATIC_PATHS.last).to eq "foo" end end endyard-master/spec/spec_helper.rb000066400000000000000000000076131265676644000171050ustar00rootroot00000000000000require "rubygems" begin require "rspec" rescue LoadError require "spec" end begin require 'bundler' Bundler.setup rescue LoadError end begin require 'simplecov' SimpleCov.start # TODO: hide some rb files from cov report # hide = '_spec\.rb$,spec_helper\.rb$,ruby_lex\.rb$,autoload\.rb$' # if YARD::Parser::SourceParser.parser_type == :ruby # hide += ',legacy\/.+_handler' # else # hide += ',ruby_parser\.rb$,ast_node\.rb$,handlers\/ruby\/[^\/]+\.rb$' # end rescue LoadError end if ENV['COVERAGE'] require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'yard')) unless defined?(HAVE_RIPPER) begin require 'ripper'; rescue LoadError; end HAVE_RIPPER = defined?(::Ripper) && !ENV['LEGACY'] ? true : false LEGACY_PARSER = !HAVE_RIPPER class YARD::Parser::SourceParser def self.parser_type; @parser_type == :ruby ? :ruby18 : @parser_type end end if ENV['LEGACY'] end NAMED_OPTIONAL_ARGUMENTS = RUBY_VERSION >= '2.1.0' def parse_file(file, thisfile = __FILE__, log_level = log.level, ext = '.rb.txt') Registry.clear path = File.join(File.dirname(thisfile), 'examples', file.to_s + ext) YARD::Parser::SourceParser.parse(path, [], log_level) end def described_in_docs(klass, meth, file = nil) YARD::Tags::Library.define_tag "RSpec Specification", :it, :with_raw_title_and_text # Parse the file (could be multiple files) if file filename = File.join(YARD::ROOT, file) YARD::Parser::SourceParser.new.parse(filename) else underscore = klass.class_name.gsub(/([a-z])([A-Z])/, '\1_\2').downcase.gsub('::', '/') $".find_all {|p| p.include? underscore }.each do |filename| next unless File.exist? filename YARD::Parser::SourceParser.new.parse(filename) end end # Get the object objname = klass.name + (meth[0,1] == '#' ? meth : '::' + meth) obj = Registry.at(objname) raise "Cannot find object #{objname} described by spec." unless obj raise "#{obj.path} has no @it tags to spec." unless obj.has_tag? :it # Run examples describe(klass, meth) do obj.tags(:it).each do |it| path = File.relative_path(YARD::ROOT, obj.file) it(it.name + " (from #{path}:#{obj.line})") do begin eval(it.text) rescue => e e.set_backtrace(["#{path}:#{obj.line}:in @it tag specification"]) raise e end end end end end def docspec(objname = self.class.description, klass = self.class.described_type) # Parse the file (could be multiple files) underscore = klass.class_name.gsub(/([a-z])([A-Z])/, '\1_\2').downcase.gsub('::', '/') $".find_all {|p| p.include? underscore }.each do |filename| filename = File.join(YARD::ROOT, filename) next unless File.exist? filename YARD::Parser::SourceParser.new.parse(filename) end # Get the object objname = klass.name + objname if objname =~ /^[^A-Z]/ obj = Registry.at(objname) raise "Cannot find object #{objname} described by spec." unless obj raise "#{obj.path} has no @example tags to spec." unless obj.has_tag? :example # Run examples obj.tags(:example).each do |exs| exs.text.split(/\n/).each do |ex| begin hash = eval("{ #{ex} }") expect(hash.keys.first).to eq hash.values.first rescue => e raise e, "#{e.message}\nInvalid spec example in #{objname}:\n\n\t#{ex}\n" end end end end module Kernel require 'cgi' def p(*args) puts args.map {|arg| CGI.escapeHTML(arg.inspect) }.join("
    \n") args.first end def puts(str = '') STDOUT.puts str + "
    \n" str end end if ENV['TM_APP_PATH'] RSpec.configure do |config| config.before(:each) { log.io = StringIO.new } # isolate environment of each test # any other global settings which might be modified by a test should also # be saved and restored here config.around(:each) do |example| saved_level = log.level example.run log.level = saved_level end end include YARD yard-master/spec/tags/000077500000000000000000000000001265676644000152165ustar00rootroot00000000000000yard-master/spec/tags/default_factory_spec.rb000066400000000000000000000131571265676644000217370ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Tags::DefaultFactory do before { @f = YARD::Tags::DefaultFactory.new } describe "#parse_tag" do it "does not have trailing whitespace on a regular freeform tag" do expect(@f.parse_tag('api', 'private ').text).to eq "private" end end describe "#extract_types_and_name_from_text" do def parse_types(types) @f.send(:extract_types_and_name_from_text, types) end it "handles one type" do expect(parse_types('[A]')).to eq [nil, ['A'], ""] end it "handles a list of types" do expect(parse_types('[A, B, C]')).to eq [nil, ['A', 'B', 'C'], ""] end it "handles ducktypes" do expect(parse_types('[#foo]')).to eq [nil, ['#foo'], ''] end %w(#foo= #<< #<=> #>> #== #=== Array<#<=>> Array<#==>).each do |meth| it "handles ducktypes with special method name #{meth}" do expect(parse_types("[#{meth}]")).to eq [nil, [meth], ''] end end it "only parses #ducktypes inside brackets" do expect(parse_types("#ducktype")).to eq [nil, nil, '#ducktype'] end it "returns the text before and after the type list" do expect(parse_types(' b description')).to eq ['b', ['String'], 'description'] expect(parse_types('b c description (test)')).to eq [nil, nil, 'b c description (test)'] end it "handles a complex list of types" do v = parse_types(' [Test, Array, String]') expect(v).to include(["Test", "Array", "String"]) end it "handles any of the following start/end delimiting chars: (), <>, {}, []" do a = parse_types('[a,b,c]') b = parse_types('') c = parse_types('(a,b,c)') d = parse_types('{a,b,c}') expect(a).to eq b expect(b).to eq c expect(c).to eq d expect(a).to include(['a','b','c']) end it "returns the text before the type list as the last element" do expect(parse_types('b[x, y, z]')).to eq ['b', ['x', 'y', 'z'], ''] expect(parse_types(' ! ')).to eq ["!", ['x'], ''] end it "returns text unparsed if there is no type list" do expect(parse_types('')).to eq [nil, nil, ''] expect(parse_types('[]')).to eq [nil, nil, '[]'] end it "allows A => B syntax" do v = parse_types(' [Test, Array {B => C}}, C>, String]') expect(v).to include(["Test", "Array {B => C}}, C>", "String"]) end it "handles quoted values" do v = parse_types(' ["foo, bar", \'baz, qux\', in"them,iddle"]') expect(v).to include(["\"foo, bar\"", "'baz, qux'", 'in"them,iddle"']) end end describe "#parse_tag_with_types" do def parse_types(text) @f.send(:parse_tag_with_types, 'test', text) end it "parses given types and description" do expect(YARD::Tags::Tag).to receive(:new).with("test", "description", ["x", "y", "z"]) parse_types(' [x, y, z] description') end it "parses given types only" do expect(YARD::Tags::Tag).to receive(:new).with("test", "", ["x", "y", "z"]) parse_types(' [x, y, z] ') end it "allows type list to be omitted" do expect(YARD::Tags::Tag).to receive(:new).with('test', 'description', nil) parse_types(' description ') end it "raises an error if a name is specified before type list" do expect { parse_types('b desc') }.to raise_error(YARD::Tags::TagFormatError, 'cannot specify a name before type list for \'@test\'') end end describe "#parse_tag_with_types_name_and_default" do def parse_types(text) @f.send(:parse_tag_with_types_name_and_default, 'test', text) end it "parses a standard type list with name before types (no default)" do expect(YARD::Tags::DefaultTag).to receive(:new).with("test", "description", ["x", "y", "z"], 'NAME', nil) parse_types('NAME [x, y, z] description') end it "parses a standard type list with name after types (no default)" do expect(YARD::Tags::DefaultTag).to receive(:new).with("test", "description", ["x", "y", "z"], 'NAME', nil) parse_types(' [x, y, z] NAME description') end it "parses a tag definition with name, typelist and default" do expect(YARD::Tags::DefaultTag).to receive(:new).with("test", "description", ["x", "y", "z"], 'NAME', ['default', 'values']) parse_types(' [x, y, z] NAME (default, values) description') end it "parses a tag definition with name, typelist and default when name is before type list" do expect(YARD::Tags::DefaultTag).to receive(:new).with("test", "description", ["x", "y", "z"], 'NAME', ['default', 'values']) parse_types(' NAME [x, y, z] (default, values) description') end it "allows typelist to be omitted" do expect(YARD::Tags::DefaultTag).to receive(:new).with("test", "description", nil, 'NAME', ['default', 'values']) parse_types(' NAME (default, values) description') end end describe "#parse_tag_with_options" do def parse_options(text) @f.parse_tag_with_options('option', text) end it "has a name before tag info" do t = parse_options("xyz key [Types] (default) description") expect(t.tag_name).to eq 'option' expect(t.name).to eq 'xyz' end it "parses the rest of the tag like DefaultTag" do t = parse_options("xyz key [Types] (default) description") expect(t.pair).to be_instance_of(Tags::DefaultTag) expect(t.pair.types).to eq ["Types"] expect(t.pair.name).to eq "key" expect(t.pair.defaults).to eq ["default"] expect(t.pair.text).to eq "description" end end endyard-master/spec/tags/default_tag_spec.rb000066400000000000000000000005621265676644000210370ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Tags::DefaultTag do it "creates a tag with defaults" do o = YARD::Tags::DefaultTag.new('tagname', 'desc', ['types'], 'name', ['defaults']) expect(o.defaults).to eq ['defaults'] expect(o.tag_name).to eq 'tagname' expect(o.name).to eq 'name' expect(o.types).to eq ['types'] end endyard-master/spec/tags/directives_spec.rb000066400000000000000000000323571265676644000207300ustar00rootroot00000000000000require File.dirname(__FILE__) + "/../spec_helper" def tag_parse(content, object = nil, handler = nil) @parser = DocstringParser.new @parser.parse(content, object, handler) @parser end describe YARD::Tags::ParseDirective do describe "#call" do after { Registry.clear } it "parses if handler=nil but use file=(stdin)" do tag_parse %{@!parse # Docstring here def foo; end } expect(Registry.at('#foo').docstring).to eq "Docstring here" expect(Registry.at('#foo').file).to eq '(stdin)' end it "allows parser type to be specified in type" do tag_parse %{@!parse [c] void Init_Foo() { rb_define_method(rb_cMyClass, "foo", foo, 1); } } expect(Registry.at('MyClass#foo')).not_to be nil end it "parses code in context of current handler" do src = <<-eof class A # @!parse # def foo; end eval "def foo; end" end eof parser = Parser::SourceParser.new parser.file = "myfile.rb" parser.parse(StringIO.new(src)) expect(Registry.at('A#foo').file).to eq 'myfile.rb' end end end describe YARD::Tags::GroupDirective do describe "#call" do it "does nothing if handler=nil" do tag_parse("@!group foo") end it "sets group value in parser state (with handler)" do handler = OpenStruct.new(:extra_state => OpenStruct.new) tag_parse("@!group foo", nil, handler) expect(handler.extra_state.group).to eq 'foo' end end end describe YARD::Tags::EndGroupDirective do describe "#call" do it "does nothing if handler=nil" do tag_parse("@!endgroup foo") end it "sets group value in parser state (with handler)" do handler = OpenStruct.new(:extra_state => OpenStruct.new(:group => "foo")) tag_parse("@!endgroup", nil, handler) expect(handler.extra_state.group).to be nil end end end describe YARD::Tags::MacroDirective do def handler OpenStruct.new(:call_params => %w(a b c), :caller_method => 'foo', :scope => :instance, :visibility => :public, :namespace => P('Foo::Bar'), :statement => OpenStruct.new(:source => 'foo :a, :b, :c')) end after(:all) { Registry.clear } describe "#call" do it "defines new macro when [new] is provided" do tag_parse("@!macro [new] foo\n foo") expect(CodeObjects::MacroObject.find('foo').macro_data).to eq 'foo' end it "defines new macro if text block is provided" do tag_parse("@!macro bar\n bar") expect(CodeObjects::MacroObject.find('bar').macro_data).to eq 'bar' end it "expands macros and return #expanded_text to tag parser" do tag_parse("@!macro [new] foo\n foo") expect(tag_parse("@!macro foo").text).to eq 'foo' end it "does not expand new macro if docstring is unattached" do expect(tag_parse("@!macro [new] foo\n foo").text).not_to eq 'foo' end it "expands new anonymous macro even if docstring is unattached" do expect(tag_parse("@!macro\n foo").text).to eq 'foo' end it "allows multiple macros to be expanded" do tag_parse("@!macro [new] foo\n foo") tag_parse("@!macro bar\n bar") expect(tag_parse("@!macro foo\n@!macro bar").text).to eq "foo\nbar" end it "allows anonymous macros" do tag_parse("@!macro\n a b c", nil, handler) expect(@parser.text).to eq 'a b c' end it "expands call_params and caller_method using $N when handler is provided" do tag_parse("@!macro\n $1 $2 $3", nil, handler) expect(@parser.text).to eq 'a b c' end it "attaches macro to method if one exists" do tag_parse("@!macro [attach] attached\n $1 $2 $3", nil, handler) macro = CodeObjects::MacroObject.find('attached') expect(macro.method_object).to eq P('Foo::Bar.foo') end it "does not expand new attached macro if defined on class method" do baz = CodeObjects::MethodObject.new(P('Foo::Bar'), :baz, :class) expect(baz.visibility).to eq :public tag_parse("@!macro [attach] attached2\n @!visibility private", baz, handler) macro = CodeObjects::MacroObject.find('attached2') expect(macro.method_object).to eq P('Foo::Bar.baz') expect(baz.visibility).to eq :public end it "expands macro if defined on class method and there is no data block" do tag_parse("@!macro [new] attached3\n expanded_data") baz = CodeObjects::MethodObject.new(P('Foo::Bar'), :baz, :class) doc = DocstringParser.new.parse('@!macro attached3', baz, handler).to_docstring expect(doc).to eq 'expanded_data' end it "does not attempt to expand macro values if handler = nil" do tag_parse("@!macro [attach] xyz\n $1 $2 $3") end end end describe YARD::Tags::MethodDirective do describe "#call" do after { Registry.clear } it "uses entire docstring if no indented data is found" do YARD.parse_string <<-eof class Foo # @!method foo # @!method bar # @!scope class end eof expect(Registry.at('Foo.foo')).to be_a(CodeObjects::MethodObject) expect(Registry.at('Foo.bar')).to be_a(CodeObjects::MethodObject) end it "handles indented block text in @!method" do YARD.parse_string <<-eof # @!method foo(a) # Docstring here # @return [String] the foo # Ignore this # @param [String] a eof foo = Registry.at('#foo') expect(foo.docstring).to eq "Docstring here" expect(foo.docstring.tag(:return)).not_to be nil expect(foo.tag(:param)).to be nil end it "executes directives on object in indented block" do YARD.parse_string <<-eof class Foo # @!method foo(a) # @!scope class # @!visibility private # @!method bar # Hello # Ignore this end eof foo = Registry.at('Foo.foo') expect(foo.visibility).to eq :private bar = Registry.at('Foo#bar') expect(bar.visibility).to eq :public end it "is able to define multiple @methods in docstring" do YARD.parse_string <<-eof class Foo # @!method foo1 # Docstring1 # @!method foo2 # Docstring2 # @!method foo3 # @!scope class # Docstring3 end eof foo1 = Registry.at('Foo#foo1') foo2 = Registry.at('Foo#foo2') foo3 = Registry.at('Foo.foo3') expect(foo1.docstring).to eq 'Docstring1' expect(foo2.docstring).to eq 'Docstring2' expect(foo3.docstring).to eq 'Docstring3' end it "defines the method inside namespace if attached to namespace object" do YARD.parse_string <<-eof module Foo # @!method foo # Docstring1 # @!method bar # Docstring2 class Bar end end eof expect(Registry.at('Foo::Bar#foo').docstring).to eq 'Docstring1' expect(Registry.at('Foo::Bar#bar').docstring).to eq 'Docstring2' end it "sets scope to class if signature has 'self.' prefix" do YARD.parse_string <<-eof # @!method self.foo # @!method self. bar # @!method self.baz() class Foo end eof %w(foo bar baz).each do |name| expect(Registry.at("Foo.#{name}")).to be_a(CodeObjects::MethodObject) end end it "defines parameters from signature" do YARD.parse_string <<-eof # @!method foo(a, b, c = nil) eof expect(Registry.at('#foo').parameters).to eq [['a', nil], ['b', nil], ['c', 'nil']] end it "is able to define method with module scope (module function)" do YARD.parse_string <<-eof # @!method foo # @!scope module # This is a docstring # @return [Boolean] whether this is true class Foo end eof foo_c = Registry.at('Foo.foo') foo_i = Registry.at('Foo#foo') expect(foo_c).not_to be nil expect(foo_i).not_to be nil expect(foo_c).to be_module_function expect(foo_c.docstring).to eq foo_i.docstring expect(foo_c.tag(:return).text).to eq foo_i.tag(:return).text end end end describe YARD::Tags::AttributeDirective do describe "#call" do after { Registry.clear } it "uses entire docstring if no indented data is found" do YARD.parse_string <<-eof class Foo # @!attribute foo # @!attribute bar # @!scope class end eof expect(Registry.at('Foo.foo')).to be_reader expect(Registry.at('Foo.bar')).to be_reader end it "handles indented block in @!attribute" do YARD.parse_string <<-eof # @!attribute foo # Docstring here # @return [String] the foo # Ignore this # @param [String] a eof foo = Registry.at('#foo') expect(foo.is_attribute?).to be true expect(foo.docstring).to eq "Docstring here" expect(foo.docstring.tag(:return)).not_to be nil expect(foo.tag(:param)).to be nil end it "is able to define multiple @attributes in docstring" do YARD.parse_string <<-eof class Foo # @!attribute [r] foo1 # Docstring1 # @!attribute [w] foo2 # Docstring2 # @!attribute foo3 # @!scope class # Docstring3 end eof foo1 = Registry.at('Foo#foo1') foo2 = Registry.at('Foo#foo2=') foo3 = Registry.at('Foo.foo3') foo4 = Registry.at('Foo.foo3=') expect(foo1).to be_reader expect(foo2).to be_writer expect(foo3).to be_reader expect(foo1.docstring).to eq 'Docstring1' expect(foo2.docstring).to eq 'Docstring2' expect(foo3.docstring).to eq 'Docstring3' expect(foo4).to be_writer expect(foo1.attr_info[:write]).to be nil expect(foo2.attr_info[:read]).to be nil end it "defines the attr inside namespace if attached to namespace object" do YARD.parse_string <<-eof module Foo # @!attribute [r] foo # @!attribute [r] bar class Bar end end eof expect(Registry.at('Foo::Bar#foo')).to be_reader expect(Registry.at('Foo::Bar#bar')).to be_reader end end it "sets scope to class if signature has 'self.' prefix" do YARD.parse_string <<-eof # @!attribute self.foo # @!attribute self. bar # @!attribute self.baz class Foo end eof %w(foo bar baz).each do |name| expect(Registry.at("Foo.#{name}")).to be_reader end end end describe YARD::Tags::ScopeDirective do describe "#call" do after { Registry.clear } it "sets state on tag parser if object = nil" do tag_parse("@!scope class") expect(@parser.state.scope).to eq :class end it "sets state on tag parser if object is namespace" do object = CodeObjects::ClassObject.new(:root, 'Foo') tag_parse("@!scope class", object) expect(object[:scope]).to be nil expect(@parser.state.scope).to eq :class end it "sets scope on object if object is a method object" do object = CodeObjects::MethodObject.new(:root, 'foo') tag_parse("@!scope class", object) expect(object.scope).to eq :class end %w(class instance module).each do |type| it "allows #{type} as value" do tag_parse("@!scope #{type}") expect(@parser.state.scope).to eq type.to_sym end end %w(invalid foo FOO CLASS INSTANCE).each do |type| it "does not allow #{type} as value" do tag_parse("@!scope #{type}") expect(@parser.state.scope).to be nil end end end end describe YARD::Tags::VisibilityDirective do describe "#call" do after { Registry.clear } it "sets visibility on tag parser if object = nil" do tag_parse("@!visibility private") expect(@parser.state.visibility).to eq :private end it "sets state on tag parser if object is namespace" do object = CodeObjects::ClassObject.new(:root, 'Foo') tag_parse("@!visibility protected", object) expect(object.visibility).to eq :protected expect(@parser.state.visibility).to be nil end it "sets visibility on object if object is a method object" do object = CodeObjects::MethodObject.new(:root, 'foo') tag_parse("@!visibility private", object) expect(object.visibility).to eq :private end %w(public private protected).each do |type| it "allows #{type} as value" do tag_parse("@!visibility #{type}") expect(@parser.state.visibility).to eq type.to_sym end end %w(invalid foo FOO PRIVATE INSTANCE).each do |type| it "does not allow #{type} as value" do tag_parse("@!visibility #{type}") expect(@parser.state.visibility).to be nil end end it "updates visibility on future methods" do Registry.clear YARD.parse_string <<-eof class Foo # @!visibility private def foo; end def bar; end def baz; end end eof %w(foo bar baz).each do |name| expect(Registry.at("Foo##{name}").visibility).to eq :private end end if YARD::Parser::SourceParser.parser_type == :ruby end end yard-master/spec/tags/library_spec.rb000066400000000000000000000021511265676644000202200ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Tags::Library do def tag(docstring) Docstring.new(docstring).tags.first end describe "#see_tag" do it "takes a URL" do expect(tag("@see http://example.com").name).to eq "http://example.com" end it "takes an object path" do expect(tag("@see String#reverse").name).to eq "String#reverse" end it "takes a description after the url/object" do tag = tag("@see http://example.com An Example Site") expect(tag.name).to eq "http://example.com" expect(tag.text).to eq "An Example Site" end end describe ".define_tag" do it "allows defining tags with '.' in the name (x.y.z defines method x_y_z)" do Tags::Library.define_tag("foo", 'x.y.z') Tags::Library.define_tag("foo2", 'x.y.zz', Tags::OverloadTag) expect(Tags::Library.instance.method(:x_y_z_tag)).not_to be nil expect(Tags::Library.instance.method(:x_y_zz_tag)).not_to be nil expect(tag('@x.y.z foo bar').text).to eq 'foo bar' expect(tag('@x.y.zz foo(bar)').signature).to eq 'foo(bar)' end end end yard-master/spec/tags/overload_tag_spec.rb000066400000000000000000000032111265676644000212200ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Tags::OverloadTag do before do @tag = Tags::OverloadTag.new(:overload, <<-'eof') def bar(a, b = 1, &block) Hello world @param a [String] @return [String] eof end it "parses the first line as a method signature" do expect(@tag.signature).to eq "def bar(a, b = 1, &block)" expect(@tag.parameters).to eq [['a', nil], ['b', "1"], ['&block', nil]] end it "parses the rest of the text as a new Docstring" do expect(@tag.docstring).to be_instance_of(Docstring) expect(@tag.docstring).to eq "Hello world" end it "sets Docstring's object after #object= is called" do m = double(:object) @tag.object = m expect(@tag.docstring.object).to eq m end it "responds to #tag, #tags and #has_tag?" do @tag.object = double(:object) expect(@tag.tags.size).to eq 2 expect(@tag.tag(:param).name).to eq "a" expect(@tag.has_tag?(:return)).to be true end it "is not a CodeObjects::Base when not hooked up to an object" do @tag.object = nil expect(@tag.is_a?(CodeObjects::Base)).to be false end it "is a CodeObjects::Base when hooked up to an object" do @tag.object = double(:object) expect(@tag.object).to receive(:is_a?).at_least(3).times.with(CodeObjects::Base).and_return(true) expect(@tag.is_a?(CodeObjects::Base)).to be true expect(@tag.kind_of?(CodeObjects::Base)).to be true expect(CodeObjects::Base === @tag).to be true end it "does not parse 'def' out of method name" do tag = Tags::OverloadTag.new(:overload, "default") expect(tag.signature).to eq "default" end endyard-master/spec/tags/ref_tag_list_spec.rb000066400000000000000000000032621265676644000212220ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Tags::RefTagList do before { YARD::Registry.clear } it "accepts symbol or string as owner's path and convert it into a proxy" do t = Tags::RefTagList.new('author', :String) expect(t.owner).to eq P(:String) end it "accepts proxy object as owner" do t = Tags::RefTagList.new('author', P(:String)) expect(t.owner).to eq P(:String) end it "returns tags from a proxy object" do o = CodeObjects::ClassObject.new(:root, :String) t = Tags::Tag.new(:author, 'foo') o.docstring.add_tag(t) ref = Tags::RefTagList.new('author', :String) expect(ref.tags).to eq [t] expect(ref.tags.first.text).to eq 'foo' end it "returns named tags from a proxy object" do o = CodeObjects::ClassObject.new(:root, :String) p1 = Tags::Tag.new(:param, 'bar1', nil, 'foo') p2 = Tags::Tag.new(:param, 'bar2', nil, 'foo') p3 = Tags::Tag.new(:param, 'bar3', nil, 'bar') t1 = Tags::Tag.new(:return, 'blah') o.docstring.add_tag(p1, t1, p2, p3) ref = Tags::RefTagList.new('param', :String, 'foo') expect(ref.tags).to eq [p1, p2] expect(ref.tags.first.text).to eq 'bar1' end it "all tags should respond to #owner and be a RefTag" do o = CodeObjects::ClassObject.new(:root, :String) p1 = Tags::Tag.new(:param, 'bar1', nil, 'foo') p2 = Tags::Tag.new(:param, 'bar2', nil, 'foo') p3 = Tags::Tag.new(:param, 'bar3', nil, 'bar') t1 = Tags::Tag.new(:return, 'blah') o.docstring.add_tag(p1, t1, p2, p3) ref = Tags::RefTagList.new('param', :String) ref.tags.each do |t| expect(t).to be_kind_of(Tags::RefTag) expect(t.owner).to eq o end end endyard-master/spec/templates/000077500000000000000000000000001265676644000162565ustar00rootroot00000000000000yard-master/spec/templates/class_spec.rb000066400000000000000000000017541265676644000207310ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Templates::Engine.template(:default, :docstring) do before do Registry.clear YARD.parse_string <<-'eof' private # Comments # @abstract override this class # @author Test # @version 1.0 # @see A # @see http://example.com Example class A < B # HI def method_missing(*args) end # @deprecated def a; end # constructor method! def initialize(test) end end class C < A; end class D # @private def initialize; end end eof end it "renders html format correctly" do html_equals(Registry.at('A').format(html_options), :class001) end it "renders text format correctly" do text_equals(Registry.at('A').format, :class001) end it "hides private constructors" do html_equals(Registry.at('D').format(html_options(:verifier => Verifier.new("!@private"))), :class002) end end yard-master/spec/templates/constant_spec.rb000066400000000000000000000026271265676644000214550ustar00rootroot00000000000000require File.dirname(__FILE__) + "/spec_helper" describe YARD::Templates::Engine.template(:default, :constant) do describe "fully dressed constant" do it "renders text format correctly" do YARD.parse_string <<-'eof' class YARD::CLI::YRI # Default search paths that should be loaded dynamically into YRI. These paths # take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems # paths). To add a path, call: # # DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc") # # @return [Array] a list of extra search paths # @since 0.6.0 DEFAULT_SEARCH_PATHS = [] end eof text_equals(Registry.at('YARD::CLI::YRI::DEFAULT_SEARCH_PATHS').format(text_options), :constant001) end end describe "simple constant with no documentation" do it "renders text format correctly" do # Short constant should show on single line YARD.parse_string <<-'eof' MYCONST = 'foo' eof text_equals(Registry.at('MYCONST').format(text_options), :constant002) # Long constant should show on multiple lines, indented YARD.parse_string <<-'eof' MYCONST = [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z] eof text_equals(Registry.at('MYCONST').format(text_options), :constant003) end end endyard-master/spec/templates/engine_spec.rb000066400000000000000000000107231265676644000210650ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Templates::Engine do describe ".register_template_path" do it "registers a String path" do Engine.register_template_path('.') expect(Engine.template_paths.pop).to eq '.' end end describe ".template!" do it "creates a module including Template" do mod = Engine.template!('path/to/template') expect(mod).to include(Template) expect(mod.full_path.to_s).to eq 'path/to/template' end it "creates a module including Template with full_path" do mod = Engine.template!('path/to/template2', '/full/path/to/template2') expect(mod).to include(Template) expect(mod.full_path.to_s).to eq '/full/path/to/template2' end end describe ".template" do it "raises an error if the template is not found" do expect { Engine.template(:a, :b, :c) }.to raise_error(ArgumentError) end it "creates a module including Template" do mock = double(:template) expect(Engine).to receive(:find_template_paths).with(nil, 'template/name').and_return(['/full/path/template/name']) expect(Engine).to receive(:template!).with('template/name', ['/full/path/template/name']).and_return(mock) expect(Engine.template('template/name')).to eq mock end it "creates a Template from a relative Template path" do expect(Engine).to receive(:template_paths).and_return([]) expect(File).to receive(:directory?).with("/full/path/template/notname").and_return(true) start_template = double(:start_template, :full_path => '/full/path/template/name', :full_paths => ['/full/path/template/name']) expect(start_template).to receive(:is_a?).with(Template).and_return(true) mod = Engine.template(start_template, '..', 'notname') expect(mod).to include(Template) expect(mod.full_path.to_s).to eq "/full/path/template/notname" end it "creates a Template including other matching templates in path" do paths = ['/full/path/template/name', '/full/path2/template/name'] expect(Engine).to receive(:find_template_paths).with(nil, 'template').at_least(1).times.and_return([]) expect(Engine).to receive(:find_template_paths).with(nil, 'template/name').and_return(paths) ancestors = Engine.template('template/name').ancestors.map {|m| m.class_name } expect(ancestors).to include("Template__full_path2_template_name") end it "includes parent directories before other template paths" do paths = ['/full/path/template/name', '/full/path2/template/name'] expect(Engine).to receive(:find_template_paths).with(nil, 'template/name').and_return(paths) ancestors = Engine.template('template/name').ancestors.map {|m| m.class_name } expect(ancestors[0, 4]).to eq ["Template__full_path_template_name", "Template__full_path_template", "Template__full_path2_template_name", "Template__full_path2_template"] end end describe ".generate" do it "generates with fulldoc template" do mod = double(:template) options = TemplateOptions.new options.reset_defaults options.objects = [:a, :b, :c] options.object = Registry.root expect(mod).to receive(:run).with(options) expect(Engine).to receive(:template).with(:default, :fulldoc, :text).and_return(mod) Engine.generate([:a, :b, :c]) end end describe ".render" do def loads_template(*args) expect(Engine).to receive(:template).with(*args).and_return(@template) end before(:all) do @object = CodeObjects::MethodObject.new(:root, :method) end before do @options = TemplateOptions.new @options.reset_defaults @options.object = @object @options.type = @object.type @template = double(:template, :include => nil) expect(@template).to receive(:run).with(@options) end it "accepts method call with no parameters" do loads_template(:default, :method, :text) @object.format end it "allows template key to be changed" do loads_template(:javadoc, :method, :text) @options.template = :javadoc @object.format(:template => :javadoc) end it "allows type key to be changed" do loads_template(:default, :fulldoc, :text) @options.type = :fulldoc @object.format(:type => :fulldoc) end it "allows format key to be changed" do loads_template(:default, :method, :html) @options.format = :html @object.format(:format => :html) end end end yard-master/spec/templates/examples/000077500000000000000000000000001265676644000200745ustar00rootroot00000000000000yard-master/spec/templates/examples/class001.html000066400000000000000000000111621265676644000223110ustar00rootroot00000000000000

    Class: A Abstract

    Inherits:
    B
    • Object
    show all
    Defined in:
    (stdin)

    Overview

    This class is abstract.
    override this class
    Comments

    See Also:

    Author:

    • Test

    Version:

    • 1.0

    Direct Known Subclasses

    C

    Instance Method Summary collapse

    Constructor Details

    #initialize(test) ⇒ A

    constructor method!
    
    
    15
    # File '(stdin)', line 15
    
    def initialize(test) end

    Dynamic Method Handling

    This class handles dynamic methods through the method_missing method

    #method_missing(*args)

    HI
    
    
    10
    # File '(stdin)', line 10
    
    def method_missing(*args) end

    Instance Method Details

    #a

    Deprecated.
    
    
    12
    # File '(stdin)', line 12
    
    def a; end
    yard-master/spec/templates/examples/class001.txt000066400000000000000000000007021265676644000221620ustar00rootroot00000000000000----------------------------------------------------------- Class: A < B Abstract. override this class Comments See Also: --------- - A - http://example.com - Example Author: ------- Test Version: -------- 1.0 ------------------------------------------------------------------------ Direct Known Subclasses: ------------------------ C Instance methods: ----------------- a, initialize, method_missing yard-master/spec/templates/examples/class002.html000066400000000000000000000007061265676644000223140ustar00rootroot00000000000000

    Class: D

    Inherits:
    Object
    • Object
    show all
    Defined in:
    (stdin)
    yard-master/spec/templates/examples/constant001.txt000066400000000000000000000011221265676644000227030ustar00rootroot00000000000000------------------------- Constant: YARD::CLI::YRI::DEFAULT_SEARCH_PATHS DEFAULT_SEARCH_PATHS = [] ------------------------------------------------------------------------ Default search paths that should be loaded dynamically into YRI. These paths take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems paths). To add a path, call: DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc") Returns: -------- (Array) - a list of extra search paths Since: ------ 0.6.0 ------------------------------------------------------------------------yard-master/spec/templates/examples/constant002.txt000066400000000000000000000003551265676644000227130ustar00rootroot00000000000000------------------------------------------------------ Constant: MYCONST MYCONST = 'foo' ------------------------------------------------------------------------ ------------------------------------------------------------------------yard-master/spec/templates/examples/constant003.txt000066400000000000000000000005041265676644000227100ustar00rootroot00000000000000------------------------------------------------------ Constant: MYCONST MYCONST = [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z] ------------------------------------------------------------------------ ------------------------------------------------------------------------yard-master/spec/templates/examples/method001.html000066400000000000000000000046751265676644000224770ustar00rootroot00000000000000

    Method: #m

    Defined in:
    (stdin)

    #m(x) ⇒ String (private) Also known as: x

    Deprecated.
    for great justice
    Comments

    Parameters:

    • x (Hash)
      the x argument

    Options Hash (x):

    • :key1 (String) — default: default
      first key
    • :key2 (Symbol)
      second key

    Returns:

    • (String)
      the result

    Raises:

    • (Exception)
      hi!
    
    
    9
    # File '(stdin)', line 9
    
    def m(x) end
    yard-master/spec/templates/examples/method001.txt000066400000000000000000000012031265676644000223320ustar00rootroot00000000000000------------------------------------------------------------- Method: #m (Defined in: (stdin)) (Also known as: #x) root.m(x) -> String (private) ------------------------------------------------------------------------ Deprecated. for great justice Comments Parameters: ----------- (Hash) x - the x argument Options Hash (x): ----------------- (String) :key1 - default: default - first key (Symbol) :key2 - second key Returns: -------- (String) - the result Raises: ------- (Exception) - hi! yard-master/spec/templates/examples/method002.html000066400000000000000000000025151265676644000224670ustar00rootroot00000000000000

    Method: #m

    Defined in:
    (stdin)

    #m(x, y) (private)

    Comments

    Parameters:

    • x (String)
      parameter x
    • y (Boolean)
      parameter y
    
    
    6
    # File '(stdin)', line 6
    
    def m(x) end
    yard-master/spec/templates/examples/method002.txt000066400000000000000000000005461265676644000223440ustar00rootroot00000000000000------------------------------------------------------------- Method: #m (Defined in: (stdin)) root.m(x, y) (private) ------------------------------------------------------------------------ Comments Parameters: ----------- (String) x - parameter x (Boolean) y - parameter y yard-master/spec/templates/examples/method003.html000066400000000000000000000052311265676644000224660ustar00rootroot00000000000000

    Method: #m

    Defined in:
    (stdin)

    #m(x, y) (private) #m(x, y, z) (private)

    Method comments

    Overloads:

    • #m(x, y)
      Overload docstring

      Parameters:

      • x (String)
        parameter x
      • y (Boolean)
        parameter y
    • #m(x, y, z)

      Parameters:

      • x (String)
        parameter x
      • y (Boolean)
        parameter y
      • z (Boolean)
        parameter z
    
    
    11
    # File '(stdin)', line 11
    
    def m(*args) end
    yard-master/spec/templates/examples/method003.txt000066400000000000000000000017551265676644000223500ustar00rootroot00000000000000------------------------------------------------------------- Method: #m (Defined in: (stdin)) root.m(x, y) (private) root.m(x, y, z) (private) ------------------------------------------------------------------------ Method comments Overloads: ---------- ------------------------------------------------------------------------ root.m(x, y) (private) ------------------------------------------------------------------------ Overload docstring Parameters: ----------- (String) x - parameter x (Boolean) y - parameter y ------------------------------------------------------------------------ root.m(x, y, z) (private) ------------------------------------------------------------------------ Parameters: ----------- (String) x - parameter x (Boolean) y - parameter y (Boolean) z - parameter z yard-master/spec/templates/examples/method004.html000066400000000000000000000014351265676644000224710ustar00rootroot00000000000000

    Method: #m

    Defined in:
    (stdin)

    #m(*args) ⇒ void

    This method returns an undefined value.

    
    
    2
    # File '(stdin)', line 2
    
    def m(*args) end
    yard-master/spec/templates/examples/method004.txt000066400000000000000000000004531265676644000223430ustar00rootroot00000000000000------------------------------------------------------------- Method: #m (Defined in: (stdin)) root.m(*args) -> void ------------------------------------------------------------------------ This method returns an undefined value. yard-master/spec/templates/examples/method005.html000066400000000000000000000033151265676644000224710ustar00rootroot00000000000000

    Method: #m

    Defined in:
    (stdin)

    #m(a) ⇒ void #m(b)

    Overloads:

    • #m(a) ⇒ void

      This method returns an undefined value.

    • #m(b)

      Parameters:

      • b (String)
        hi
    
    
    5
    # File '(stdin)', line 5
    
    def m(*args) end
    yard-master/spec/templates/examples/method005.txt000066400000000000000000000014051265676644000223420ustar00rootroot00000000000000------------------------------------------------------------- Method: #m (Defined in: (stdin)) root.m(a) -> void root.m(b) ------------------------------------------------------------------------ Overloads: ---------- ------------------------------------------------------------------------ root.m(a) -> void ------------------------------------------------------------------------ This method returns an undefined value. ------------------------------------------------------------------------ root.m(b) ------------------------------------------------------------------------ Parameters: ----------- (String) b - hi yard-master/spec/templates/examples/module001.dot000066400000000000000000000012731265676644000223150ustar00rootroot00000000000000A [label="{module A|+ \#attr1 [RW]\l+ \#attr2 [R]\l+ \#attr3 [RW]\l+ \#attr4 [W]\l|+ a\l+ \#a\l+ \#test_multi_overload\l+ \#test_overload\l+ \#void_meth\ \:\ void\l}" rank=sink]; A_Y [label="{class Y||}" rank=sink]; subgraph cluster_A_Y { label = "Y"; labelloc=b; } A_Q [label="{class Q||}" rank=sink]; subgraph cluster_A_Q { label = "Q"; labelloc=b; } A_X [label="{class X||}" rank=sink]; subgraph cluster_A_X { label = "X"; labelloc=b; } subgraph cluster_A { label = "A"; labelloc=b; A_Z [label="{module Z||}" rank=sink]; subgraph cluster_A_Z { label = "Z"; labelloc=b; } } A -> B [style=dotted arrowType=none]; A -> BaseMod [style=dotted arrowType=none]; yard-master/spec/templates/examples/module001.html000066400000000000000000000276601265676644000225030ustar00rootroot00000000000000

    Module: A

    Includes:
    B, BaseMod
    Included in:
    TMP, TMP2
    Defined in:
    (stdin)

    Overview

    Comments

    Defined Under Namespace

    Modules: Z Classes: Q, X, Y

    Constant Summary

    CONSTANT =
    A long docstring for the constant. With extra text and newlines.
    'value'
    @@cvar =
    Deprecated.
    'value'

    Instance Attribute Summary collapse

    • #attr1
      Returns the value of attribute attr1.
    • #attr2 readonly
      Returns the value of attribute attr2.
    • #attr3
    • #attr4 writeonly
      Sets the attribute attr4.

    Attributes included from BaseMod

    #base_attr1, #base_attr2, #base_attr3

    Class Method Summary collapse

    Instance Method Summary collapse

    Methods included from B

    #c, #d

    Instance Attribute Details

    #attr1

    Returns the value of attribute attr1
    
    
    17
    18
    19
    # File '(stdin)', line 17
    
    def attr1
      @attr1
    end

    #attr2 (readonly)

    Returns the value of attribute attr2
    
    
    18
    19
    20
    # File '(stdin)', line 18
    
    def attr2
      @attr2
    end

    #attr3String #attr3=(value)

    Overloads:

    • #attr3String
      Returns a string

      Returns:

      • (String)
        a string
    • #attr3=(value)

      This method returns an undefined value.

      Parameters:

      • value (String)
        sets the string
    
    
    25
    26
    27
    # File '(stdin)', line 25
    
    def attr3
      @attr3
    end

    #attr4=(value) (writeonly)

    Sets the attribute attr4

    Parameters:

    • value
      the value to set the attribute attr4 to.
    
    
    27
    28
    29
    # File '(stdin)', line 27
    
    def attr4=(value)
      @attr4 = value
    end

    Class Method Details

    .a

    
    
    29
    # File '(stdin)', line 29
    
    def self.a; end

    Instance Method Details

    #a Also known as: b

    
    
    30
    # File '(stdin)', line 30
    
    def a; end

    #test_multi_overload(a) #test_multi_overload(a, b)

    
    
    40
    # File '(stdin)', line 40
    
    def test_multi_overload(*args) end

    #test_overload(a)

    hello2

    Parameters:

    • a (String)
      hi
    
    
    36
    # File '(stdin)', line 36
    
    def test_overload(*args) end

    #void_meth

    This method returns an undefined value.

    
    
    43
    # File '(stdin)', line 43
    
    def void_meth; end
    yard-master/spec/templates/examples/module001.txt000066400000000000000000000006731265676644000223510ustar00rootroot00000000000000-------------------------------------------------------------- Module: A Comments ------------------------------------------------------------------------ Defined Under Namespace: ------------------------ Z (modules) Q, X, Y (classes) Includes: --------- D, E, F, A::B::C, B, BaseMod Class methods: -------------- a Instance methods: ----------------- a, test_multi_overload, test_overload, void_meth yard-master/spec/templates/examples/module002.html000066400000000000000000000107361265676644000225000ustar00rootroot00000000000000

    Module: A

    Defined in:
    (stdin)

    Foo collapse

    • #foo_attr
      Returns the value of attribute foo_attr.

    Foo collapse

    Bar collapse

    Class Method Summary collapse

    Instance Attribute Details

    #foo_attr

    Returns the value of attribute foo_attr
    
    
    3
    4
    5
    # File '(stdin)', line 3
    
    def foo_attr
      @foo_attr
    end

    Class Method Details

    .bar

    
    
    5
    # File '(stdin)', line 5
    
    def self.bar; end

    .baz

    
    
    12
    # File '(stdin)', line 12
    
    def self.baz; end

    Instance Method Details

    #baz

    
    
    8
    # File '(stdin)', line 8
    
    def baz; end

    #foo

    
    
    4
    # File '(stdin)', line 4
    
    def foo; end
    yard-master/spec/templates/examples/module003.html000066400000000000000000000050441265676644000224750ustar00rootroot00000000000000

    Module: A

    Includes:
    B
    Defined in:
    (stdin)

    Constant Summary

    FOO =
    2

    Instance Attribute Summary collapse

    • #bar readonly
      Returns the value of attribute bar.

    Instance Method Summary collapse

    Instance Attribute Details

    #bar (readonly)

    Returns the value of attribute bar
    
    
    11
    12
    13
    # File '(stdin)', line 11
    
    def bar
      @bar
    end

    Instance Method Details

    #foo

    
    
    10
    # File '(stdin)', line 10
    
    def foo; end
    yard-master/spec/templates/examples/module004.html000066400000000000000000000124651265676644000225030ustar00rootroot00000000000000

    Class: A

    Inherits:
    Object
    • Object
    show all
    Extended by:
    Bar
    Includes:
    BarFooBar, Baz::ABC, Baz::XYZ, Foo
    Defined in:
    (stdin)

    Instance Attribute Summary collapse

    Booya collapse

    • .baz extended from Bar
      Docs for baz in Booya group.
    • #baz_abc included from Baz::ABC

    Instance Method Summary collapse

    • #foo
      This method is in A.
    • #xyz included from Foo
      Docs for xyz.

    Methods included from Baz::XYZ

    #baz_xyz

    Methods included from BarFooBar

    #bar_foo_bar

    Instance Attribute Details

    #bar_attr Originally defined in module Foo

    Docs for bar_attr

    Class Method Details

    .baz Originally defined in module Bar

    Docs for baz in Booya group

    Instance Method Details

    #baz_abc Originally defined in module Baz::ABC

    #foo

    This method is in A
    
    
    3
    # File '(stdin)', line 3
    
    def foo; end

    #xyz Originally defined in module Foo

    Docs for xyz
    yard-master/spec/templates/examples/tag001.txt000066400000000000000000000020351265676644000216310ustar00rootroot00000000000000------------------------------------------------------------- Method: #m (Defined in: (stdin)) root.m(opts = {}) {|a| ... } -> String ------------------------------------------------------------------------ Deprecated. for great justice Abstract. override me Comments Examples: --------- # Wash your car car.wash # To kill a mockingbird a = String.new flip(a.reverse) Parameters: ----------- (Hash) opts - the options Options Hash (opts): -------------------- (Object) :key - default: '' - hello (Object) :key2 - default: X - hello Yields: ------- - a block Yield Parameters: ----------------- (String) a - a value Yield Returns: -------------- (Hash) - a hash Returns: -------- (String) - the result Raises: ------- (Exception) - Exception class See Also: --------- - A - http://url.com - http://url.com - Example Author: ------- Name Since: ------ 1.0 Version: -------- 1.0 yard-master/spec/templates/helpers/000077500000000000000000000000001265676644000177205ustar00rootroot00000000000000yard-master/spec/templates/helpers/base_helper_spec.rb000066400000000000000000000134431265676644000235350ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Templates::Helpers::BaseHelper do include YARD::Templates::Helpers::BaseHelper describe "#run_verifier" do it "runs verifier proc against list if provided" do mock = Verifier.new expect(mock).to receive(:call).with(1) expect(mock).to receive(:call).with(2) expect(mock).to receive(:call).with(3) expect(self).to receive(:options).at_least(1).times.and_return(Options.new.update(:verifier => mock)) run_verifier [1, 2, 3] end it "prunes list if lambda returns false and only false" do mock = Verifier.new expect(self).to receive(:options).at_least(1).times.and_return(Options.new.update(:verifier => mock)) expect(mock).to receive(:call).with(1).and_return(false) expect(mock).to receive(:call).with(2).and_return(true) expect(mock).to receive(:call).with(3).and_return(nil) expect(mock).to receive(:call).with(4).and_return("value") expect(run_verifier([1, 2, 3, 4])).to eq [2, 3, 4] end it "returns list if no verifier exists" do expect(self).to receive(:options).at_least(1).times.and_return(Options.new) expect(run_verifier([1, 2, 3])).to eq [1, 2, 3] end end describe "#h" do it "returns just the text" do expect(h("hello world")).to eq "hello world" expect(h(nil)).to eq nil end end describe "#link_object" do it "returns the title if provided" do expect(link_object(1, "title")).to eq "title" expect(link_object(Registry.root, "title")).to eq "title" end it "returns a path if argument is a Proxy or object" do expect(link_object(Registry.root)).to eq "Top Level Namespace" expect(link_object(P("Array"))).to eq "Array" end it "returns path of Proxified object if argument is a String or Symbol" do expect(link_object("Array")).to eq "Array" expect(link_object(:"A::B")).to eq "A::B" end it "returns the argument if not an object, proxy, String or Symbol" do expect(link_object(1)).to eq 1 end end describe "#link_url" do it "returns the URL" do expect(link_url("http://url")).to eq "http://url" end end describe "#linkify" do let(:object) { Registry.root } # before do # stub!(:object).and_return(Registry.root) # end it "calls #link_url for mailto: links" do expect(self).to receive(:link_url) linkify("mailto:steve@example.com") end it "calls #link_url for URL schemes (http://)" do expect(self).to receive(:link_url) linkify("http://example.com") end it "calls #link_file for file: links" do expect(self).to receive(:link_file).with('Filename', nil, 'anchor') linkify("file:Filename#anchor") end it "passes off to #link_object if argument is an object" do obj = CodeObjects::NamespaceObject.new(nil, :YARD) expect(self).to receive(:link_object).with(obj) linkify obj end it "returns empty string and warn if object does not exist" do expect(log).to receive(:warn).with(/Cannot find object .* for inclusion/) expect(linkify('include:NotExist')).to eq '' end it "passes off to #link_url if argument is recognized as a URL" do url = "http://yardoc.org/" expect(self).to receive(:link_url).with(url, nil, {:target => '_parent'}) linkify url end it "calls #link_include_object for include:ObjectName" do obj = CodeObjects::NamespaceObject.new(:root, :Foo) expect(self).to receive(:link_include_object).with(obj) linkify 'include:Foo' end it "calls #link_include_file for include:file:path/to/file" do expect(File).to receive(:file?).with('path/to/file').and_return(true) expect(File).to receive(:read).with('path/to/file').and_return('FOO') expect(linkify('include:file:path/to/file')).to eq 'FOO' end it "does not allow include:file for path above pwd" do expect(log).to receive(:warn).with("Cannot include file from path `a/b/../../../../file'") expect(linkify('include:file:a/b/../../../../file')).to eq '' end it "warns if include:file:path does not exist" do expect(log).to receive(:warn).with(/Cannot find file .+ for inclusion/) expect(linkify('include:file:notexist')).to eq '' end end describe "#format_types" do it "returns the list of types separated by commas surrounded by brackets" do expect(format_types(['a', 'b', 'c'])).to eq '(a, b, c)' end it "returns the list of types without brackets if brackets=false" do expect(format_types(['a', 'b', 'c'], false)).to eq 'a, b, c' end it "returns an empty string if list is empty or nil" do expect(format_types(nil)).to eq "" expect(format_types([])).to eq "" end end describe "#format_object_type" do it "returns Exception if type is Exception" do obj = double(:object, :is_exception? => true) allow(obj).to receive(:is_a?) { |arg| arg == YARD::CodeObjects::ClassObject } expect(format_object_type(obj)).to eq "Exception" end it "returns Class if type is Class" do obj = double(:object, :is_exception? => false) allow(obj).to receive(:is_a?) { |arg| arg == YARD::CodeObjects::ClassObject } expect(format_object_type(obj)).to eq "Class" end it "returns object type in other cases" do obj = double(:object, :type => "value") expect(format_object_type(obj)).to eq "Value" end end describe "#format_object_title" do it "returns Top Level Namespace for root object" do expect(format_object_title(Registry.root)).to eq "Top Level Namespace" end it "returns 'type: title' in other cases" do obj = double(:object, :type => :class, :title => "A::B::C") expect(format_object_title(obj)).to eq "Class: A::B::C" end end end yard-master/spec/templates/helpers/html_helper_spec.rb000066400000000000000000000623161265676644000235720ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../../spec_helper' require File.dirname(__FILE__) + "/shared_signature_examples" require 'ostruct' describe YARD::Templates::Helpers::HtmlHelper do include YARD::Templates::Helpers::BaseHelper include YARD::Templates::Helpers::HtmlHelper include YARD::Templates::Helpers::MethodHelper def options Templates::TemplateOptions.new.tap do |o| o.reset_defaults o.default_return = nil end end describe "#h" do it "uses #h to escape HTML" do expect(h('Usage: foo "bar" ')).to eq "Usage: foo "bar" <baz>" end end describe "#charset" do it "returns foo if LANG=foo" do expect(ENV).to receive(:[]).with('LANG').and_return('shift_jis') if YARD.ruby18? expect(Encoding.default_external).to receive(:name).and_return('shift_jis') if defined?(Encoding) expect(charset).to eq 'shift_jis' end ['US-ASCII', 'ASCII-7BIT', 'ASCII-8BIT'].each do |type| it "converts #{type} to iso-8859-1" do expect(ENV).to receive(:[]).with('LANG').and_return(type) if YARD.ruby18? expect(Encoding.default_external).to receive(:name).and_return(type) if defined?(Encoding) expect(charset).to eq 'iso-8859-1' end end it "supports utf8 as an encoding value for utf-8" do type = 'utf8' expect(ENV).to receive(:[]).with('LANG').and_return(type) if YARD.ruby18? expect(Encoding.default_external).to receive(:name).and_return(type) if defined?(Encoding) expect(charset).to eq 'utf-8' end it "takes file encoding if there is a file" do @file = OpenStruct.new(:contents => 'foo'.force_encoding('sjis')) # not the correct charset name, but good enough expect(['Shift_JIS', 'Windows-31J']).to include(charset) end if YARD.ruby19? it "takes file encoding if there is a file" do allow(ENV).to receive(:[]).with('LANG').and_return('utf-8') if YARD.ruby18? @file = OpenStruct.new(:contents => 'foo') expect(charset).to eq 'utf-8' end if YARD.ruby18? if YARD.ruby18? it "returns utf-8 if no LANG env is set" do expect(ENV).to receive(:[]).with('LANG').and_return(nil) expect(charset).to eq 'utf-8' end it "only returns charset part of lang" do expect(ENV).to receive(:[]).with('LANG').and_return('en_US.UTF-8') expect(charset).to eq 'utf-8' end end end describe "#format_types" do it "includes brackets by default" do text = ["String"] expect(self).to receive(:linkify).at_least(1).times.with("String", "String").and_return("String") expect(format_types(text)).to eq format_types(text, true) expect(format_types(text)).to eq "(String)" end it "avoids brackets if brackets=false" do expect(self).to receive(:linkify).with("String", "String").and_return("String") expect(self).to receive(:linkify).with("Symbol", "Symbol").and_return("Symbol") expect(format_types(["String", "Symbol"], false)).to eq "String, Symbol" end { "String" => [["String"], "String"], "A::B::C" => [["A::B::C"], "A::B::C"], "Array" => [["Array", "String"], "Array<String>"], "Array" => [["Array", "String", "Symbol"], "Array<String, Symbol>"], "Array<{String => Array}>" => [["Array", "String", "Array", "Symbol"], "Array<{String => " + "Array<Symbol>}>"] }.each do |text, values| it "links all classes in #{text}" do if text.count('<') > 0 expect(self).to receive(:h).with('<').at_least(text.count('<')).times.and_return("<") end if text.count('>') > 0 expect(self).to receive(:h).with('>').at_least(text.count('>')).times.and_return(">") end values[0].each {|v| expect(self).to receive(:linkify).with(v, v).and_return("#{v}") } expect(format_types([text], false)).to eq values[1] end end end describe "#htmlify" do it "does not use hard breaks for textile markup (RedCloth specific)" do begin; require 'redcloth'; rescue LoadError; pending 'test requires redcloth gem' end expect(htmlify("A\nB", :textile)).not_to include("", :pre)).to eq "
    fo\no\n\nbar<>
    " end it "returns regular text with :text markup" do expect(htmlify("fo\no\n\nbar<>", :text)).to eq "fo
    o

    bar<>" end it "returns unmodified text with :none markup" do expect(htmlify("fo\no\n\nbar<>", :none)).to eq "fo\no\n\nbar<>" end it "highlights ruby if markup is :ruby" do expect(htmlify("class Foo; end", :ruby)).to match /\A

    HI

    " end it "autolinks URLs (markdown specific)" do log.enter_level(Logger::FATAL) do unless markup_class(:markdown).to_s == "RedcarpetCompat" pending 'This test depends on a markdown engine that supports autolinking' end end expect(htmlify('http://example.com', :markdown).chomp.gsub('/', '/')).to eq( '

    http://example.com

    ') end it "does not autolink URLs inside of {} (markdown specific)" do log.enter_level(Logger::FATAL) do pending 'This test depends on markdown' unless markup_class(:markdown) end expect(htmlify('{http://example.com Title}', :markdown).chomp).to match( %r{

    Title

    }) expect(htmlify('{http://example.com}', :markdown).chomp).to match( %r{

    http://example.com

    }) end it "creates tables (markdown specific)" do log.enter_level(Logger::FATAL) do unless markup_class(:markdown).to_s == "RedcarpetCompat" skip "This test depends on a markdown engine that supports tables" end end markdown = <<-EOF.strip City | State | Country --------|-------|-------- Raleigh | NC | US Seattle | WA | US EOF html = htmlify(markdown, :markdown) expect(html).to match %r{} expect(html).to match %r{} expect(html).to match %r{} end it "handles fenced code blocks (Redcarpet specific)" do log.enter_level(Logger::FATAL) do unless markup_class(:markdown).to_s == 'RedcarpetCompat' pending 'This test is Redcarpet specific' end end markdown = "Introduction:\n```ruby\nputs\n\nputs\n```" html = htmlify(markdown, :markdown) expect(html).to match %r{^

    Introduction:

    .*}m end end describe "#link_object" do let(:object) { CodeObjects::NamespaceObject.new(nil, :YARD) } it "returns the object path if there's no serializer and no title" do allow(self).to receive(:serializer).and_return(nil) expect(link_object(CodeObjects::NamespaceObject.new(nil, :YARD))).to eq "YARD" end it "returns the title if there's a title but no serializer" do allow(self).to receive(:serializer).and_return(nil) expect(link_object(CodeObjects::NamespaceObject.new(nil, :YARD), 'title')).to eq "title" end it "links objects from overload tag" do YARD.parse_string <<-'eof' module Foo class Bar; def a; end end class Baz # @overload a def a; end end end eof obj = Registry.at('Foo::Baz#a').tag(:overload) foobar = Registry.at('Foo::Bar') foobaz = Registry.at('Foo::Baz') allow(self).to receive(:serializer).and_return(Serializers::FileSystemSerializer.new) allow(self).to receive(:object).and_return(obj) expect(link_object("Bar#a")).to match %r{href="Bar.html#a-instance_method"} end it "uses relative path in title" do CodeObjects::ModuleObject.new(:root, :YARD) CodeObjects::ClassObject.new(P('YARD'), :Bar) allow(self).to receive(:object).and_return(CodeObjects::ModuleObject.new(P('YARD'), :Foo)) allow(self).to receive(:serializer).and_return(Serializers::FileSystemSerializer.new) expect(link_object("Bar")).to match %r{>Bar} end it "uses #title if overridden" do CodeObjects::ModuleObject.new(:root, :YARD) CodeObjects::ClassObject.new(P('YARD'), :Bar) allow(Registry.at('YARD::Bar')).to receive(:title).and_return('TITLE!') allow(self).to receive(:object).and_return(Registry.at('YARD::Bar')) serializer = Serializers::FileSystemSerializer.new allow(self).to receive(:serializer).and_return(Serializers::FileSystemSerializer.new) expect(link_object("Bar")).to match %r{>TITLE!} end it "uses relative path to parent class in title" do root = CodeObjects::ModuleObject.new(:root, :YARD) obj = CodeObjects::ModuleObject.new(root, :SubModule) allow(self).to receive(:object).and_return(obj) allow(self).to receive(:serializer).and_return(Serializers::FileSystemSerializer.new) expect(link_object("YARD")).to match %r{>YARD} end it "uses Klass.foo when linking to class method in current namespace" do root = CodeObjects::ModuleObject.new(:root, :Klass) obj = CodeObjects::MethodObject.new(root, :foo, :class) allow(self).to receive(:object).and_return(root) allow(self).to receive(:serializer).and_return(Serializers::FileSystemSerializer.new) expect(link_object("foo")).to match %r{>Klass.foo} end it "escapes method name in title" do YARD.parse_string <<-'eof' class Array def &(other) end end eof obj = Registry.at('Array#&') allow(self).to receive(:serializer).and_return(Serializers::FileSystemSerializer.new) allow(self).to receive(:object).and_return(obj) expect(link_object("Array#&")).to match %r{title="Array#& \(method\)"} end end describe "#url_for" do before { Registry.clear } it "returns nil if serializer is nil" do allow(self).to receive(:serializer).and_return nil allow(self).to receive(:object).and_return Registry.root expect(url_for(P("Mod::Class#meth"))).to be nil end it "returns nil if object is hidden" do yard = CodeObjects::ModuleObject.new(:root, :YARD) allow(self).to receive(:serializer).and_return(Serializers::FileSystemSerializer.new) allow(self).to receive(:object).and_return Registry.root allow(self).to receive(:options).and_return OpenStruct.new(:verifier => Verifier.new('false')) expect(url_for(yard)).to be nil end it "returns nil if serializer does not implement #serialized_path" do allow(self).to receive(:serializer).and_return Serializers::Base.new allow(self).to receive(:object).and_return Registry.root expect(url_for(P("Mod::Class#meth"))).to be nil end it "links to a path/file for a namespace object" do allow(self).to receive(:serializer).and_return Serializers::FileSystemSerializer.new allow(self).to receive(:object).and_return Registry.root yard = CodeObjects::ModuleObject.new(:root, :YARD) expect(url_for(yard)).to eq 'YARD.html' end it "links to the object's namespace path/file and use the object as the anchor" do allow(self).to receive(:serializer).and_return Serializers::FileSystemSerializer.new allow(self).to receive(:object).and_return Registry.root yard = CodeObjects::ModuleObject.new(:root, :YARD) meth = CodeObjects::MethodObject.new(yard, :meth) expect(url_for(meth)).to eq 'YARD.html#meth-instance_method' end it "properly urlencodes methods with punctuation in links" do obj = CodeObjects::MethodObject.new(nil, :/) serializer = double(:serializer, :serialized_path => "file.html") allow(self).to receive(:serializer).and_return serializer allow(self).to receive(:object).and_return obj expect(url_for(obj)).to eq "#%2F-instance_method" end end describe "#anchor_for" do it "does not urlencode data when called directly" do obj = CodeObjects::MethodObject.new(nil, :/) expect(anchor_for(obj)).to eq "/-instance_method" end end describe "#resolve_links" do def parse_link(link) results = {} link =~ /(.+?)<\/a>/m params, results[:inner_text] = $1, $2 params.scan(/\s*(\S+?)=['"](.+?)['"]\s*/).each do |key, value| results[key.to_sym] = value.gsub(/^["'](.+)["']$/, '\1') end results end it "escapes {} syntax with backslash (\\{foo bar})" do input = '\{foo bar} \{XYZ} \{file:FOO} $\{N-M}' output = '{foo bar} {XYZ} {file:FOO} ${N-M}' expect(resolve_links(input)).to eq output end it "escapes {} syntax with ! (!{foo bar})" do input = '!{foo bar} !{XYZ} !{file:FOO} $!{N-M}' output = '{foo bar} {XYZ} {file:FOO} ${N-M}' expect(resolve_links(input)).to eq output end it "links static files with file: prefix" do allow(self).to receive(:serializer).and_return Serializers::FileSystemSerializer.new allow(self).to receive(:object).and_return Registry.root expect(parse_link(resolve_links("{file:TEST.txt#abc}"))).to eq({ :inner_text => "TEST", :title => "TEST", :href => "file.TEST.html#abc" }) expect(parse_link(resolve_links("{file:TEST.txt title}"))).to eq({ :inner_text => "title", :title => "title", :href => "file.TEST.html" }) end it "creates regular links with http:// or https:// prefixes" do expect(parse_link(resolve_links("{http://example.com}"))).to eq({ :inner_text => "http://example.com", :target => "_parent", :href => "http://example.com", :title => "http://example.com" }) expect(parse_link(resolve_links("{http://example.com title}"))).to eq({ :inner_text => "title", :target => "_parent", :href => "http://example.com", :title => "title" }) end it "creates mailto links with mailto: prefixes" do expect(parse_link(resolve_links('{mailto:joanna@example.com}'))).to eq({ :inner_text => 'mailto:joanna@example.com', :target => '_parent', :href => 'mailto:joanna@example.com', :title => 'mailto:joanna@example.com' }) expect(parse_link(resolve_links('{mailto:steve@example.com Steve}'))).to eq({ :inner_text => 'Steve', :target => '_parent', :href => 'mailto:steve@example.com', :title => 'Steve' }) end it "ignores {links} that begin with |...|" do expect(resolve_links("{|x|x == 1}")).to eq "{|x|x == 1}" end it "gracefully ignores {} in links" do allow(self).to receive(:linkify).with('Foo', 'Foo').and_return('FOO') expect(resolve_links("{} {} {Foo Foo}")).to eq '{} {} FOO' end %w(tt code pre).each do |tag| it "ignores links in <#{tag}>" do text = "<#{tag}>{Foo}" expect(resolve_links(text)).to eq text end end it "resolves {Name}" do expect(self).to receive(:link_file).with('TEST', nil, nil).and_return('') resolve_links("{file:TEST}") end it "resolves ({Name})" do expect(self).to receive(:link_file).with('TEST', nil, nil).and_return('') resolve_links("({file:TEST})") end it "resolves link with newline in title-part" do expect(parse_link(resolve_links("{http://example.com foo\nbar}"))).to eq({ :inner_text => "foo bar", :target => "_parent", :href => "http://example.com", :title => "foo bar" }) end it "resolves links to methods whose names have been escaped" do expect(self).to receive(:linkify).with('Object#<<', nil).and_return('') resolve_links("{Object#<<}") end it "warns about missing reference at right file location for object" do YARD.parse_string <<-eof # Comments here # And a reference to {InvalidObject} class MyObject; end eof logger = double(:log) expect(logger).to receive(:warn).ordered.with("In file `(stdin)':2: Cannot resolve link to InvalidObject from text:") expect(logger).to receive(:warn).ordered.with("...{InvalidObject}") allow(self).to receive(:log).and_return(logger) allow(self).to receive(:object).and_return(Registry.at('MyObject')) resolve_links(object.docstring) end it "shows ellipsis on either side if there is more on the line in a reference warning" do YARD.parse_string <<-eof # {InvalidObject1} beginning of line # end of line {InvalidObject2} # Middle of {InvalidObject3} line # {InvalidObject4} class MyObject; end eof logger = double(:log) expect(logger).to receive(:warn).ordered.with("In file `(stdin)':1: Cannot resolve link to InvalidObject1 from text:") expect(logger).to receive(:warn).ordered.with("{InvalidObject1}...") expect(logger).to receive(:warn).ordered.with("In file `(stdin)':2: Cannot resolve link to InvalidObject2 from text:") expect(logger).to receive(:warn).ordered.with("...{InvalidObject2}") expect(logger).to receive(:warn).ordered.with("In file `(stdin)':3: Cannot resolve link to InvalidObject3 from text:") expect(logger).to receive(:warn).ordered.with("...{InvalidObject3}...") expect(logger).to receive(:warn).ordered.with("In file `(stdin)':4: Cannot resolve link to InvalidObject4 from text:") expect(logger).to receive(:warn).ordered.with("{InvalidObject4}") allow(self).to receive(:log).and_return(logger) allow(self).to receive(:object).and_return(Registry.at('MyObject')) resolve_links(object.docstring) end it "warns about missing reference for file template (no object)" do @file = CodeObjects::ExtraFileObject.new('myfile.txt', '') logger = double(:log) expect(logger).to receive(:warn).ordered.with("In file `myfile.txt':3: Cannot resolve link to InvalidObject from text:") expect(logger).to receive(:warn).ordered.with("...{InvalidObject Some Title}") allow(self).to receive(:log).and_return(logger) allow(self).to receive(:object).and_return(Registry.root) resolve_links(<<-eof) Hello world This is a line And {InvalidObject Some Title} And more. eof end end describe "#signature" do before do arrow = "⇒" @results = { :regular => "#foo #{arrow} Object", :default_return => "#foo #{arrow} Hello", :no_default_return => "#foo", :private_class => ".foo #{arrow} Object (private)", :single => "#foo #{arrow} String", :two_types => "#foo #{arrow} String, Symbol", :two_types_multitag => "#foo #{arrow} String, Symbol", :type_nil => "#foo #{arrow} Type?", :type_array => "#foo #{arrow} Type+", :multitype => "#foo #{arrow} Type, ...", :void => "#foo #{arrow} void", :hide_void => "#foo", :block => "#foo {|a, b, c| ... } #{arrow} Object", :empty_overload => "#foobar #{arrow} String" } end def format_types(types, brackets = false) types.join(", ") end def signature(obj, link = false) super(obj, link).strip end it_should_behave_like "signature" it "links to regular method if overload name does not have the same method name" do YARD.parse_string <<-eof class Foo # @overload bar(a, b, c) def foo; end end eof serializer = double(:serializer) allow(serializer).to receive(:serialized_path).with(Registry.at('Foo')).and_return('') allow(self).to receive(:serializer).and_return(serializer) allow(self).to receive(:object).and_return(Registry.at('Foo')) expect(signature(Registry.at('Foo#foo').tag(:overload), true)).to eq( "#bar(a, b, c) ") end end describe "#html_syntax_highlight" do subject do obj = OpenStruct.new obj.options = options obj.object = Registry.root obj.extend(Templates::Helpers::HtmlHelper) obj end it "returns empty string on nil input" do expect(subject.html_syntax_highlight(nil)).to eq '' end it "calls #html_syntax_highlight_ruby by default" do Registry.root.source_type = nil expect(subject).to receive(:html_syntax_highlight_ruby).with('def x; end') subject.html_syntax_highlight('def x; end') end it "calls #html_syntax_highlight_NAME if there's an object with a #source_type" do subject.object = OpenStruct.new(:source_type => :NAME) expect(subject).to receive(:html_markup_html) { |text| text } expect(subject).to receive(:html_syntax_highlight_NAME).and_return("foobar") expect(subject.htmlify('
    def x; end
    ', :html)).to eq( '
    foobar
    ') end it "adds !!!LANG to className in outputted pre tag" do subject.object = OpenStruct.new(:source_type => :LANG) expect(subject).to receive(:html_markup_html) { |text| text } expect(subject).to receive(:html_syntax_highlight_LANG).and_return("foobar") expect(subject.htmlify("
    !!!LANG\ndef x; end
    ", :html)).to eq( '
    foobar
    ') end it "calls html_syntax_highlight_NAME if source starts with !!!NAME" do expect(subject).to receive(:html_syntax_highlight_NAME).and_return("foobar") expect(subject.html_syntax_highlight(<<-eof !!!NAME def x; end eof )).to eq "foobar" end it "does not highlight if highlight option is false" do subject.options.highlight = false expect(subject).not_to receive(:html_syntax_highlight_ruby) expect(subject.html_syntax_highlight('def x; end')).to eq 'def x; end' end it "does not highlight if there is no highlight method specified by !!!NAME" do def subject.respond_to?(method, include_all=false) return false if method == 'html_syntax_highlight_NAME' super end expect(subject).not_to receive(:html_syntax_highlight_NAME) expect(subject.html_syntax_highlight("!!!NAME\ndef x; end")).to eq "def x; end" end it "highlights as ruby if htmlify(text, :ruby) is called" do expect(subject).to receive(:html_syntax_highlight_ruby).with('def x; end').and_return('x') expect(subject.htmlify('def x; end', :ruby)).to eq '
    x
    ' end it "does not prioritize object source type when called directly" do expect(subject).to receive(:html_syntax_highlight_ruby).with('def x; end').and_return('x') subject.object = OpenStruct.new(:source_type => :c) expect(subject.html_syntax_highlight("def x; end")).to eq "x" end it "doesn't escape code snippets twice" do expect(subject.htmlify('
    {"foo" => 1}
    ', :html)).to eq( '
    {"foo" => 1}
    ') end it "highlights source when matching a pre lang= tag" do expect(subject.htmlify('
    x = 1
    ', :html)).to eq( '
    x = 1
    ') end it "highlights source when matching a code class= tag" do expect(subject.htmlify('
    x = 1
    ', :html)).to eq( '
    x = 1
    ') end end describe "#link_url" do it "adds target if scheme is provided" do expect(link_url("http://url.com")).to include(" target=\"_parent\"") expect(link_url("https://url.com")).to include(" target=\"_parent\"") expect(link_url("irc://url.com")).to include(" target=\"_parent\"") expect(link_url("../not/scheme")).not_to include("target") end end end yard-master/spec/templates/helpers/html_syntax_highlight_helper_spec.rb000066400000000000000000000050561265676644000272250ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' describe YARD::Templates::Helpers::HtmlSyntaxHighlightHelper do include YARD::Templates::Helpers::HtmlHelper include YARD::Templates::Helpers::HtmlSyntaxHighlightHelper describe "#html_syntax_highlight" do let(:object) { Registry.root } before do Registry.root.source_type = :ruby end it "does not highlight source if options.highlight is false" do expect(self).to receive(:options).and_return(Options.new.update(:highlight => false)) expect(html_syntax_highlight("def x\nend")).to eq "def x\nend" end it "highlights source (legacy)" do type = Parser::SourceParser.parser_type Parser::SourceParser.parser_type = :ruby18 expect(self).to receive(:options).and_return(Options.new.update(:highlight => true)) expect = "defx 'x'+ /x/iend" result = html_syntax_highlight("def x\n 'x' + /x/i\nend") html_equals_string(result, expect) Parser::SourceParser.parser_type = type end it "highlights source (ripper)" do expect(self).to receive(:options).and_return(Options.new.update(:highlight => true)) Parser::SourceParser.parser_type = :ruby expect = "def x ' x' + /x /i\nend" result = html_syntax_highlight("def x\n 'x' + /x/i\nend") html_equals_string(result, expect) end if HAVE_RIPPER it "returns escaped unhighlighted source if a syntax error is found (ripper)" do expect(self).to receive(:options).and_return(Options.new.update(:highlight => true)) expect(html_syntax_highlight("def &x; ... end")).to eq "def &x; ... end" end if HAVE_RIPPER it "returns escaped unhighlighted source if a syntax error is found (ripper)" do expect(self).to receive(:options).and_return(Options.new.update(:highlight => true)) expect(html_syntax_highlight("$ git clone http://url")).to eq "$ git clone http://url" end if HAVE_RIPPER end endyard-master/spec/templates/helpers/markup/000077500000000000000000000000001265676644000212175ustar00rootroot00000000000000yard-master/spec/templates/helpers/markup/rdoc_markup_spec.rb000066400000000000000000000056761265676644000251020ustar00rootroot00000000000000require File.dirname(__FILE__) + "/../../spec_helper" describe YARD::Templates::Helpers::Markup::RDocMarkup do describe "loading mechanism" do before { @good_libs = [] } def require(lib) return true if @good_libs.include?(lib) raise LoadError end def load_markup begin require 'rdoc/markup' require 'rdoc/markup/to_html' return :RDoc2 rescue LoadError begin require 'rdoc/markup/simple_markup' require 'rdoc/markup/simple_markup/to_html' return :RDoc1 rescue LoadError raise NameError, "could not load RDocMarkup (rdoc is not installed)" end end end it "loads RDoc2.x if rdoc/markup is present" do @good_libs += ['rdoc/markup', 'rdoc/markup/to_html'] expect(load_markup).to eq :RDoc2 end it "fails on RDoc2.x if rdoc/markup/to_html is not present" do @good_libs += ['rdoc/markup'] expect { load_markup }.to raise_error(NameError) end it "loads RDoc1.x if RDoc2 fails and rdoc/markup/simple_markup is present" do @good_libs += ['rdoc/markup/simple_markup', 'rdoc/markup/simple_markup/to_html'] expect(load_markup).to eq :RDoc1 end it "raises an error on loading if neither lib is present" do expect { load_markup }.to raise_error(NameError) end end describe "#to_html" do def to_html(text) html = YARD::Templates::Helpers::Markup::RDocMarkup.new(text).to_html html.strip.gsub(/\r?\n/, '') end it "handles typewriter text" do expect(to_html('Hello ++')).to eq '

    Hello <code>

    ' end end describe "#fix_typewriter" do def fix_typewriter(text) YARD::Templates::Helpers::Markup::RDocMarkup.new('').send(:fix_typewriter, text) end it "converts +text+ to text" do expect(fix_typewriter("Some +typewriter text <+.")).to eq "Some typewriter text <." expect(fix_typewriter("Not +typewriter text.")).to eq "Not +typewriter text." expect(fix_typewriter("Alternating +type writer+ text +here+.")).to eq "Alternating type writer text here." expect(fix_typewriter("No ++problem.")).to eq "No ++problem." expect(fix_typewriter("Math + stuff +is ok+")).to eq "Math + stuff is ok" expect(fix_typewriter("Hello +{Foo}+ World")).to eq "Hello {Foo} World" end it "does not apply to code blocks" do expect(fix_typewriter("Hello +hello+")).to eq "Hello +hello+" end it "does not apply to HTML tag attributes" do expect(fix_typewriter("A+b+c")).to eq "A+b+c" expect(fix_typewriter("")).to eq "" end it "still applies inside of other tags" do expect(fix_typewriter("

    +foo+

    ")).to eq "

    foo

    " end end endyard-master/spec/templates/helpers/markup_helper_spec.rb000066400000000000000000000124061265676644000241200ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../../spec_helper' module YARD::Templates::Helpers::MarkupHelper public :load_markup_provider, :markup_class, :markup_provider end class GeneratorMock attr_accessor :options include YARD::Templates::Helpers::MarkupHelper def initialize(options = Templates::TemplateOptions.new) self.options = options end end describe YARD::Templates::Helpers::MarkupHelper do before do YARD::Templates::Helpers::MarkupHelper.clear_markup_cache end describe "#load_markup_provider" do before do allow(log).to receive(:error) @gen = GeneratorMock.new @gen.options.reset_defaults end it "exits on an invalid markup type" do @gen.options.markup = :invalid expect(@gen.load_markup_provider).to be false end it "fails when an invalid markup provider is specified" do @gen.options.update(:markup => :markdown, :markup_provider => :invalid) expect(@gen.load_markup_provider).to be false expect(@gen.markup_class).to eq nil end it "loads RDocMarkup if rdoc is specified and it is installed" do @gen.options.markup = :rdoc expect(@gen.load_markup_provider).to be true expect(@gen.markup_class).to eq YARD::Templates::Helpers::Markup::RDocMarkup end it "fails if RDoc cannot be loaded" do @gen.options.markup = :rdoc expect(@gen).to receive(:eval).with('::YARD::Templates::Helpers::Markup::RDocMarkup').and_raise(NameError) expect(@gen.load_markup_provider).to be false expect(@gen.markup_provider).to eq nil end it "searches through available markup providers for the markup type if none is set" do expect(@gen).to receive(:eval).with('::RedcarpetCompat').and_return(double(:bluecloth)) expect(@gen).to receive(:require).with('redcarpet').and_return(true) expect(@gen).not_to receive(:require).with('maruku') @gen.options.markup = :markdown # this only raises an exception because we mock out require to avoid # loading any libraries but our implementation tries to return the library # name as a constant expect(@gen.load_markup_provider).to be true expect(@gen.markup_provider).to eq :redcarpet end it "continues searching if some of the providers are unavailable" do expect(@gen).to receive(:require).with('redcarpet').and_raise(LoadError) expect(@gen).to receive(:require).with('rdiscount').and_raise(LoadError) expect(@gen).to receive(:require).with('kramdown').and_raise(LoadError) expect(@gen).to receive(:require).with('bluecloth').and_raise(LoadError) expect(@gen).to receive(:require).with('maruku').and_raise(LoadError) expect(@gen).to receive(:require).with('rpeg-markdown').and_return(true) expect(@gen).to receive(:eval).with('::PEGMarkdown').and_return(true) @gen.options.markup = :markdown # this only raises an exception because we mock out require to avoid # loading any libraries but our implementation tries to return the library # name as a constant @gen.load_markup_provider expect(@gen.markup_provider).to eq :"rpeg-markdown" end it "overrides the search if `:markup_provider` is set in options" do expect(@gen).to receive(:require).with('rdiscount').and_return(true) expect(@gen).to receive(:eval).with('::RDiscount').and_return(true) @gen.options.update(:markup => :markdown, :markup_provider => :rdiscount) @gen.load_markup_provider expect(@gen.markup_provider).to eq :rdiscount end it "fails if no provider is found" do YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS[:markdown].each do |p| expect(@gen).to receive(:require).with(p[:lib].to_s).and_raise(LoadError) end @gen.options.markup = :markdown expect(@gen.load_markup_provider).to be false expect(@gen.markup_provider).to eq nil end it "fails if overridden provider is not found" do expect(@gen).to receive(:require).with('rdiscount').and_raise(LoadError) @gen.options.update(:markup => :markdown, :markup_provider => :rdiscount) expect(@gen.load_markup_provider).to be false expect(@gen.markup_provider).to eq nil end it "fails if the markup type is not found" do expect(log).to receive(:error).with(/Invalid markup/) @gen.options.markup = :xxx expect(@gen.load_markup_provider).to be false expect(@gen.markup_provider).to eq nil end end describe "#markup_for_file" do include YARD::Templates::Helpers::MarkupHelper it "looks for a shebang line" do expect(markup_for_file("#!text\ntext here", 'file.rdoc')).to eq :text end it "returns the default markup type if no shebang is found or no valid ext is found" do allow(self).to receive(:options).and_return(Options.new.update(:markup => :default_type)) expect(markup_for_file('', 'filename')).to eq :default_type end it "looks for a file extension if no shebang is found" do expect(markup_for_file('', 'filename.MD')).to eq :markdown end Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS.each do |type, exts| exts.each do |ext| it "recognizes .#{ext} as #{type} markup type" do expect(markup_for_file('', "filename.#{ext}")).to eq type end end end end end yard-master/spec/templates/helpers/method_helper_spec.rb000066400000000000000000000045751265676644000241110ustar00rootroot00000000000000require File.dirname(__FILE__) + "/../spec_helper" describe YARD::Templates::Helpers::MethodHelper do include YARD::Templates::Helpers::BaseHelper include YARD::Templates::Helpers::MethodHelper describe "#format_args" do it "displays keyword arguments" do params = [['a:', '1'], ['b:', '2'], ['**kwargs', nil]] YARD.parse_string 'def foo; end' allow(Registry.at('#foo')).to receive(:parameters) { params } expect(format_args(Registry.at('#foo'))).to eq '(a: 1, b: 2, **kwargs)' end it "does not show &blockarg if no @param tag and has @yield" do YARD.parse_string <<-'eof' # @yield blah def foo(&block); end eof expect(format_args(Registry.at('#foo'))).to eq '' end it "does not show &blockarg if no @param tag and has @yieldparam" do YARD.parse_string <<-'eof' # @yieldparam blah test def foo(&block); end eof expect(format_args(Registry.at('#foo'))).to eq '' end it "shows &blockarg if @param block is documented (even with @yield)" do YARD.parse_string <<-'eof' # @yield [a,b] # @yieldparam a test # @param block test def foo(&block) end eof expect(format_args(Registry.at('#foo'))).to eq '(&block)' end end describe "#format_block" do before { YARD::Registry.clear } it "shows block for method with yield" do YARD.parse_string <<-'eof' def foo; yield(a, b, c) end eof expect(format_block(Registry.at('#foo'))).to eq "{|a, b, c| ... }" end it "shows block for method with @yieldparam tags" do YARD.parse_string <<-'eof' # @yieldparam _self me! def foo; end eof expect(format_block(Registry.at('#foo'))).to eq "{|_self| ... }" end it "shows block for method with @yield but no types" do YARD.parse_string <<-'eof' # @yield blah # @yieldparam a def foo; end # @yield blah def foo2; end eof expect(format_block(Registry.at('#foo'))).to eq "{|a| ... }" expect(format_block(Registry.at('#foo2'))).to eq "{ ... }" end it "shows block for method with @yield and types" do YARD.parse_string <<-'eof' # @yield [a, b, c] blah # @yieldparam a def foo; end eof expect(format_block(Registry.at('#foo'))).to eq "{|a, b, c| ... }" end end endyard-master/spec/templates/helpers/shared_signature_examples.rb000066400000000000000000000071651265676644000255030ustar00rootroot00000000000000shared_examples_for "signature" do before do YARD::Registry.clear @options = Templates::TemplateOptions.new @options.reset_defaults allow(self).to receive(:options).and_return(@options) end def trim(sig) sig.gsub(/\s+/, ' ') end it "shows signature for regular instance method" do YARD.parse_string "def foo; end" expect(trim(signature(Registry.at('#foo')))).to eq @results[:regular] end it "allows default return type to be changed" do @options.default_return = "Hello" YARD.parse_string "def foo; end" expect(trim(signature(Registry.at('#foo')))).to eq @results[:default_return] end it "allows default return type to be omitted" do @options.default_return = "" YARD.parse_string "def foo; end" expect(trim(signature(Registry.at('#foo')))).to eq @results[:no_default_return] end it "shows signature for private class method" do YARD.parse_string "class A; private; def self.foo; end end" expect(trim(signature(Registry.at('A.foo')))).to eq @results[:private_class] end it "shows return type for single type" do YARD.parse_string <<-'eof' # @return [String] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:single] end it "shows return type for 2 types" do YARD.parse_string <<-'eof' # @return [String, Symbol] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:two_types] end it "shows return type for 2 types over multiple tags" do YARD.parse_string <<-'eof' # @return [String] # @return [Symbol] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:two_types_multitag] end it "shows 'Type?' if return types are [Type, nil]" do YARD.parse_string <<-'eof' # @return [Type, nil] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:type_nil] end it "shows 'Type?' if return types are [Type, nil, nil] (extra nil)" do YARD.parse_string <<-'eof' # @return [Type, nil] # @return [nil] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:type_nil] end it "shows 'Type+' if return types are [Type, Array]" do YARD.parse_string <<-'eof' # @return [Type, ] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:type_array] end it "shows (Type, ...) for more than 2 return types" do YARD.parse_string <<-'eof' # @return [Type, ] # @return [AnotherType] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:multitype] end it "shows (void) for @return [void] by default" do YARD.parse_string <<-'eof' # @return [void] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:void] end it "does not show return for @return [void] if :hide_void_return is true" do @options.hide_void_return = true YARD.parse_string <<-'eof' # @return [void] def foo; end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:hide_void] end it "shows block for method with yield" do YARD.parse_string <<-'eof' def foo; yield(a, b, c) end eof expect(trim(signature(Registry.at('#foo')))).to eq @results[:block] end it "uses regular return tag if the @overload is empty" do YARD.parse_string <<-'eof' # @overload foobar # Hello world # @return [String] def foo; end eof expect(trim(signature(Registry.at('#foo').tag(:overload)))).to eq @results[:empty_overload] end end yard-master/spec/templates/helpers/text_helper_spec.rb000066400000000000000000000027461265676644000236130ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../../spec_helper' require File.dirname(__FILE__) + "/shared_signature_examples" describe YARD::Templates::Helpers::TextHelper do include YARD::Templates::Helpers::TextHelper include YARD::Templates::Helpers::MethodHelper describe "#signature" do before do @results = { :regular => "root.foo -> Object", :default_return => "root.foo -> Hello", :no_default_return => "root.foo", :private_class => "A.foo -> Object (private)", :single => "root.foo -> String", :two_types => "root.foo -> (String, Symbol)", :two_types_multitag => "root.foo -> (String, Symbol)", :type_nil => "root.foo -> Type?", :type_array => "root.foo -> Type+", :multitype => "root.foo -> (Type, ...)", :void => "root.foo -> void", :hide_void => "root.foo", :block => "root.foo {|a, b, c| ... } -> Object", :empty_overload => 'root.foobar -> String' } end def signature(obj) super(obj).strip end it_should_behave_like "signature" end describe "#align_right" do it "aligns text right" do text = "Method: #some_method (SomeClass)" expect(align_right(text)).to eq ' ' * 40 + text end it "truncates text that is longer than allowed width" do text = "(Defined in: /home/user/.rip/.packages/some_gem-2460672e333ac07b9190ade88ec9a91c/long/path.rb)" expect(align_right(text)).to eq ' ' + text[0,68] + '...' end end endyard-master/spec/templates/method_spec.rb000066400000000000000000000046051265676644000211020ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' # $COPY = :method001 # $COPYT = :html describe YARD::Templates::Engine.template(:default, :method) do before { Registry.clear } shared_examples_for "all formats" do it "renders html format correctly" do html_equals(Registry.at('#m').format(html_options), @template) end it "renders text format correctly" do text_equals(Registry.at('#m').format(text_options), @template) end end describe "regular (deprecated) method" do before do @template = :method001 YARD.parse_string <<-'eof' private # Comments # @param [Hash] x the x argument # @option x [String] :key1 (default) first key # @option x [Symbol] :key2 second key # @return [String] the result # @raise [Exception] hi! # @deprecated for great justice def m(x) end alias x m eof end it_should_behave_like "all formats" end describe "method with 1 overload" do before do @template = :method002 YARD.parse_string <<-'eof' private # Comments # @overload m(x, y) # @param [String] x parameter x # @param [Boolean] y parameter y def m(x) end eof end it_should_behave_like "all formats" end describe "method with 2 overloads" do before do @template = :method003 YARD.parse_string <<-'eof' private # Method comments # @overload m(x, y) # Overload docstring # @param [String] x parameter x # @param [Boolean] y parameter y # @overload m(x, y, z) # @param [String] x parameter x # @param [Boolean] y parameter y # @param [Boolean] z parameter z def m(*args) end eof end it_should_behave_like "all formats" end describe "method void return" do before do @template = :method004 YARD.parse_string <<-'eof' # @return [void] def m(*args) end eof end it_should_behave_like "all formats" end describe "method void return in an overload" do before do @template = :method005 YARD.parse_string <<-'eof' # @overload m(a) # @return [void] # @overload m(b) # @param [String] b hi def m(*args) end eof end it_should_behave_like "all formats" end endyard-master/spec/templates/module_spec.rb000066400000000000000000000076261265676644000211150ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Templates::Engine.template(:default, :module) do before do Registry.clear YARD.parse_string <<-'eof' module B def c; end def d; end private def e; end end module BaseMod attr_reader :base_attr1 attr_writer :base_attr2 attr_accessor :base_attr3 end # Comments module A include BaseMod attr_accessor :attr1 attr_reader :attr2 # @overload attr3 # @return [String] a string # @overload attr3=(value) # @param [String] value sets the string # @return [void] attr_accessor :attr3 attr_writer :attr4 def self.a; end def a; end alias b a # @overload test_overload(a) # hello2 # @param [String] a hi def test_overload(*args) end # @overload test_multi_overload(a) # @overload test_multi_overload(a, b) def test_multi_overload(*args) end # @return [void] def void_meth; end include B class Y; end class Q; end class X; end module Z; end # A long docstring for the constant. With extra text # and newlines. CONSTANT = 'value' @@cvar = 'value' # @deprecated end module TMP; include A end class TMP2; extend A end eof end it "renders html format correctly" do html_equals(Registry.at('A').format(html_options(:hide_void_return => true, :verifier => Verifier.new('object.type != :method || object.visibility == :public'))), :module001) end it "renders text format correctly" do YARD.parse_string <<-'eof' module A include D, E, F, A::B::C end eof text_equals(Registry.at('A').format(text_options), :module001) end it "renders dot format correctly" do expect(Registry.at('A').format(:format => :dot, :dependencies => true, :full => true)).to eq example_contents(:module001, 'dot') end it "renders groups correctly in html" do Registry.clear YARD.parse_string <<-'eof' module A # @group Foo attr_accessor :foo_attr def foo; end def self.bar; end # @group Bar def baz; end # @endgroup def self.baz; end end eof html_equals(Registry.at('A').format(html_options), :module002) end it "ignores overwritten/private attributes/constants from inherited list" do Registry.clear YARD.parse_string <<-'eof' module B attr_reader :foo attr_accessor :bar # @private attr_writer :baz FOO = 1 end module A include B def foo; end attr_reader :bar FOO = 2 end eof html_equals(Registry.at('A').format(html_options( :verifier => Verifier.new('!@private'))), :module003) end it "embeds mixins with :embed_mixins = ['Foo', 'Bar', 'Baz::A*']" do Registry.clear YARD.parse_string <<-'eof' class A # This method is in A def foo; end include Foo extend Bar include BarFooBar include Baz::XYZ include Baz::ABC end module BarFooBar def bar_foo_bar; end end module Foo def self.not_included; end # Docs for xyz def xyz; end # Docs for bar_attr attr_accessor :bar_attr end module Bar def self.not_included; end # @group Booya # Docs for baz in Booya group def baz; end end module Baz module XYZ # listed as inherited def baz_xyz; end end module ABC def baz_abc; end end end eof html_equals(Registry.at('A').format(html_options(:embed_mixins => ['Foo', 'Bar', 'Baz::A*'])), :module004) end end yard-master/spec/templates/onefile_spec.rb000066400000000000000000000032511265676644000212370ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' class StringSerializer < YARD::Serializers::Base attr_accessor :files, :string def initialize(files, string) @files = files @string = string end def serialize(object, data) files << object string << data end end describe YARD::Templates::Engine.template(:default, :onefile) do before do Registry.clear if defined?(::Encoding) @eenc, Encoding.default_external = Encoding.default_external, 'ascii-8bit' @ienc, Encoding.default_internal = Encoding.default_internal, 'ascii-8bit' end end after do if defined?(::Encoding) Encoding.default_internal = @ienc Encoding.default_external = @eenc end end def render @files = [] @output = '' YARD.parse_string <<-eof class A # Foo method # @return [String] def foo; end # Bar method # @return [Numeric] def bar; end end eof readme = CodeObjects::ExtraFileObject.new('README', "# This is a code comment\n\n# Top of file\n\n\nclass C; end") Templates::Engine.generate Registry.all(:class), :serializer => StringSerializer.new(@files, @output), :onefile => true, :format => :html, :readme => readme, :files => [readme, CodeObjects::ExtraFileObject.new('LICENSE', 'This is a license!') ] end it "renders html" do render expect(@files).to eq ['index.html'] expect(@output).to include("This is a code comment") expect(@output).to include("This is a license!") expect(@output).to include("Class: A") expect(@output).to include("Foo method") expect(@output).to include("Bar method") end end yard-master/spec/templates/section_spec.rb000066400000000000000000000103661265676644000212670ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Templates::Section do include YARD::Templates describe "#initialize" do it "converts first argument to splat if it is array" do s = Section.new(:name, [:foo, :bar]) expect(s.name).to eq :name expect(s[0].name).to eq :foo expect(s[1].name).to eq :bar end it "allows initialization with Section objects" do s = Section.new(:name, [:foo, Section.new(:bar)]) expect(s.name).to eq :name expect(s[0]).to eq Section.new(:foo) expect(s[1]).to eq Section.new(:bar) end it "makes a list of sections" do s = Section.new(:name, [:foo, [:bar]]) expect(s).to eq Section.new(:name, Section.new(:foo, Section.new(:bar))) end end describe "#[]" do it "uses Array#[] if argument is integer" do expect(Section.new(:name, [:foo, :bar])[0].name).to eq :foo end it "returns new Section object if more than one argument" do expect(Section.new(:name, :foo, :bar, :baz)[1, 2]).to eq Section.new(:name, :bar, :baz) end it "returns new Section object if arg is Range" do expect(Section.new(:name, :foo, :bar, :baz)[1..2]).to eq Section.new(:name, :bar, :baz) end it "looks for section by name if arg is object" do expect(Section.new(:name, :foo, :bar, [:baz])[:bar][:baz]).to eq Section.new(:baz) end end describe "#eql?" do it "checks for equality of two equal sections" do expect(Section.new(:foo, [:a, :b])).to eql(Section.new(:foo, :a, :b)) expect(Section.new(:foo, [:a, :b])).to eq Section.new(:foo, :a, :b) end it "is not equal if section names are different" do expect(Section.new(:foo, [:a, :b])).not_to eql(Section.new(:bar, :a, :b)) expect(Section.new(:foo, [:a, :b])).not_to eq Section.new(:bar, :a, :b) end end describe "#==" do it "allows comparison to Symbol" do expect(Section.new(:foo, 2, 3)).to eq :foo end it "allows comparison to String" do expect(Section.new("foo", 2, 3)).to eq "foo" end it "allows comparison to Template" do t = YARD::Templates::Engine.template!(:xyzzy, '/full/path/xyzzy') expect(Section.new(t, 2, 3)).to eq t end it "allows comparison to Section" do expect(Section.new(1, [2, 3])).to eq Section.new(1, 2, 3) end it "allows comparison to Object" do expect(Section.new(1, [2, 3])).to eq 1 end it "allows comparison to Array" do expect(Section.new(1, 2, [3])).to eq [1, [2, [3]]] end end describe "#to_a" do it "converts Section to regular Array list" do arr = Section.new(1, 2, [3, [4]]).to_a expect(arr.class).to eq Array expect(arr).to eq [1, [2, [3, [4]]]] end end describe "#place" do it "places objects as Sections" do expect(Section.new(1, 2, 3).place(4).before(3)).to eq [1, [2, 4, 3]] end it "places objects anywhere inside Section with before/after_any" do expect(Section.new(1, 2, [3, [4]]).place(5).after_any(4)).to eq [1, [2, [3, [4, 5]]]] expect(Section.new(1, 2, [3, [4]]).place(5).before_any(4)).to eq [1, [2, [3, [5, 4]]]] end it "allows multiple sections to be placed" do expect(Section.new(1, 2, 3).place(4, 5).after(3).to_a).to eq [1, [2, 3, 4, 5]] expect(Section.new(1, 2, 3).place(4, [5]).after(3).to_a).to eq [1, [2, 3, 4, [5]]] end end describe "#push" do it "pushes objects as Sections" do s = Section.new(:foo) s.push :bar expect(s[0]).to eq Section.new(:bar) end it "is aliased as #<<" do s = Section.new(1) s << :index expect(s[:index]).to be_a(Section) end end describe "#unshift" do it "unshifts objects as Sections" do s = Section.new(:foo) s.unshift :bar expect(s[0]).to eq Section.new(:bar) end end describe "#any" do it "finds item inside sections" do s = Section.new(:foo, Section.new(:bar, Section.new(:bar))) s.any(:bar).push(:baz) expect(s.to_a).to eq [:foo, [:bar, [:bar, :baz]]] end it "finds item in any deeply nested set of sections" do s = Section.new(:foo, Section.new(:bar, Section.new(:baz))) s.any(:baz).push(:qux) expect(s.to_a).to eq [:foo, [:bar, [:baz, [:qux]]]] end end endyard-master/spec/templates/spec_helper.rb000066400000000000000000000033431265676644000210770ustar00rootroot00000000000000require File.dirname(__FILE__) + '/../spec_helper' include YARD::Templates def only_copy?(result, example, type) if $COPY == :all || $COPY == example puts(result) unless $COPYT && $COPYT != type end $COPY ? true : false end def text_equals(result, expected_example) return if only_copy?(result, expected_example, :text) text_equals_string(result, example_contents(expected_example, :txt)) end def text_equals_string(result, expected) expect(result).to eq expected end def html_equals(result, expected_example) return if only_copy?(result, expected_example, :html) html_equals_string(result, example_contents(expected_example)) end def html_equals_string(result, expected) [expected, result].each do |value| value.gsub!(/(>)\s+|\s+(<)/, '\1\2') value.gsub!(/'/, "'") value.strip! end text_equals_string(result, expected) end def example_contents(filename, ext = 'html') File.read(File.join(File.dirname(__FILE__), 'examples', "#{filename}.#{ext}")) end module YARD::Templates::Engine class << self public :find_template_paths end end class TestHtmlTemplateOptions < Templates::TemplateOptions default_attr :markup, :none default_attr :default_return, "" default_attr :format, :html default_attr :highlight, false end class TestTextTemplateOptions < Templates::TemplateOptions default_attr :markup, :none default_attr :default_return, "" default_attr :format, :text default_attr :highlight, false end def html_options(opts = {}) template_options(opts, TestHtmlTemplateOptions) end def text_options(opts = {}) template_options(opts, TestTextTemplateOptions) end def template_options(opts, klass) options = klass.new options.reset_defaults options.update(opts) options end yard-master/spec/templates/tag_spec.rb000066400000000000000000000026131265676644000203720ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Templates::Engine.template(:default, :tags) do before { Registry.clear } describe "all known tags" do before do YARD.parse_string <<-'eof' # Comments # @abstract override me # @param [Hash] opts the options # @option opts :key ('') hello # @option opts :key2 (X) hello # @return [String] the result # @raise [Exception] Exception class # @deprecated for great justice # @see A # @see http://url.com # @see http://url.com Example # @author Name # @since 1.0 # @version 1.0 # @yield a block # @yieldparam [String] a a value # @yieldreturn [Hash] a hash # @example Wash your car # car.wash # @example To kill a mockingbird # a = String.new # flip(a.reverse) def m(opts = {}) end eof end it "renders text format correctly" do text_equals(Registry.at('#m').format(text_options), :tag001) end end describe "param tags on non-methods" do it "does not display @param tags on non-method objects" do YARD.parse_string <<-'eof' # @param [#to_s] name the name module Foo; end eof proc = lambda { Registry.at('Foo').format(html_options) } expect(proc).not_to raise_error end end endyard-master/spec/templates/template_spec.rb000066400000000000000000000317361265676644000214420ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Templates::Template do def template(path) YARD::Templates::Engine.template!(path, '/full/path/' + path.to_s) end before :each do YARD::Templates::ErbCache.clear! end describe ".include_parent" do it "does not include parent directory if parent directory is a template root path" do mod = template('q') expect(mod).not_to include(template('')) end it "includes overridden parent directory" do allow(Engine).to receive(:template_paths).and_return(['/foo', '/bar']) expect(File).to receive(:directory?).with('/foo/a/b').and_return(true) expect(File).to receive(:directory?).with('/bar/a/b').and_return(false) expect(File).to receive(:directory?).with('/foo/a').at_least(1).times.and_return(true) expect(File).to receive(:directory?).with('/bar/a').at_least(1).times.and_return(true) ancestors = Engine.template('a/b').ancestors.map {|c| c.class_name } expect(ancestors[0, 3]).to eq %w( Template__foo_a_b Template__bar_a Template__foo_a ) end it "includes parent directory template if exists" do mod1 = template('x') mod2 = template('x/y') expect(mod2).to include(mod1) end end describe ".full_paths" do it "lists full_path" do mod = template(:a) expect(mod.full_paths).to eq ['/full/path/a'] end it "lists paths of included modules" do mod = template(:a) mod.send(:include, template(:b)) expect(mod.full_paths).to eq ['/full/path/a', '/full/path/b'] end it "lists paths from modules of included modules" do mod = template(:c) mod.send(:include, template(:d)) mod.send(:include, template(:a)) expect(mod.full_paths).to eq ['c', 'a', 'b', 'd'].map {|o| '/full/path/' + o } end it "only lists full paths of modules that respond to full_paths" do mod = template(:d) mod.send(:include, Enumerable) expect(mod.full_paths).to eq ['/full/path/d'] end end describe ".load_setup_rb" do it "loads setup.rb file for module" do expect(File).to receive(:file?).with('/full/path/e/setup.rb').and_return(true) expect(File).to receive(:read).with('/full/path/e/setup.rb').and_return('def success; end') expect(template(:e).new).to respond_to(:success) end end describe ".T" do it "loads template from absolute path" do mod = template(:a) expect(Engine).to receive(:template).with('other') mod.T('other') end end describe ".find_file" do it "finds file in the module's full_path" do expect(File).to receive(:file?).with('/full/path/a/basename').and_return(false) expect(File).to receive(:file?).with('/full/path/b/basename').and_return(true) expect(template(:a).find_file('basename')).to eq '/full/path/b/basename' end it "returns nil if no file is found" do expect(File).to receive(:file?).with('/full/path/a/basename').and_return(false) expect(File).to receive(:file?).with('/full/path/b/basename').and_return(false) expect(template(:a).find_file('basename')).to be nil end end describe ".find_nth_file" do it "finds 2nd existing file in template paths" do expect(File).to receive(:file?).with('/full/path/a/basename').and_return(true) expect(File).to receive(:file?).with('/full/path/b/basename').and_return(true) expect(template(:a).find_nth_file('basename', 2)).to eq '/full/path/b/basename' end it "returns nil if no file is found" do expect(File).to receive(:file?).with('/full/path/a/basename').and_return(true) expect(File).to receive(:file?).with('/full/path/b/basename').and_return(true) expect(template(:a).find_nth_file('basename', 3)).to be nil end end describe ".extra_includes" do it "is included when a module is initialized" do module MyModule; end Template.extra_includes << MyModule expect(template(:e).new).to be_kind_of(MyModule) end it "supports lambdas in list" do module MyModule2; end Template.extra_includes << lambda {|opts| MyModule2 if opts.format == :html } expect(template(:f).new(:format => :html)).to be_kind_of(MyModule2) metaclass = (class << template(:g).new(:format => :text); self end) expect(metaclass.ancestors).not_to include(MyModule2) end end describe ".is_a?" do it "is kind of Template" do expect(template(:e).is_a?(Template)).to be true end end describe "#T" do it "delegates to class method" do expect(template(:e)).to receive(:T).with('test') template(:e).new.T('test') end end describe "#init" do it "is called during initialization" do module YARD::Templates::Engine::Template__full_path_e def init; sections 1, 2, 3 end end expect(template(:e).new.sections).to eq Section.new(nil, 1, 2, 3) end end describe "#file" do it "reads the file if it exists" do expect(File).to receive(:file?).with('/full/path/e/abc').and_return(true) expect(IO).to receive(:read).with('/full/path/e/abc').and_return('hello world') expect(template(:e).new.file('abc')).to eq 'hello world' end it "raises ArgumentError if the file does not exist" do expect(File).to receive(:file?).with('/full/path/e/abc').and_return(false) expect { template(:e).new.file('abc') }.to raise_error(ArgumentError) end it "replaces {{{__super__}}} with inherited template contents if allow_inherited=true" do expect(File).to receive(:file?).with('/full/path/a/abc').twice.and_return(true) expect(File).to receive(:file?).with('/full/path/b/abc').and_return(true) expect(IO).to receive(:read).with('/full/path/a/abc').and_return('foo {{{__super__}}}') expect(IO).to receive(:read).with('/full/path/b/abc').and_return('bar') expect(template(:a).new.file('abc', true)).to eq "foo bar" end it "does not replace {{{__super__}}} with inherited template contents if allow_inherited=false" do expect(File).to receive(:file?).with('/full/path/a/abc').and_return(true) expect(IO).to receive(:read).with('/full/path/a/abc').and_return('foo {{{__super__}}}') expect(template(:a).new.file('abc')).to eq "foo {{{__super__}}}" end end describe "#superb" do it "returns the inherited erb template contents" do expect(File).to receive(:file?).with('/full/path/a/test.erb').and_return(true) expect(File).to receive(:file?).with('/full/path/b/test.erb').and_return(true) expect(IO).to receive(:read).with('/full/path/b/test.erb').and_return('bar') template = template(:a).new template.section = :test expect(template.superb).to eq "bar" end it "works inside an erb template" do expect(File).to receive(:file?).with('/full/path/a/test.erb').twice.and_return(true) expect(File).to receive(:file?).with('/full/path/b/test.erb').and_return(true) expect(IO).to receive(:read).with('/full/path/a/test.erb').and_return('foo<%= superb %>!') expect(IO).to receive(:read).with('/full/path/b/test.erb').and_return('bar') template = template(:a).new template.section = :test expect(template.erb(:test)).to eq "foobar!" end end describe "#sections" do it "allows sections to be set if arguments are provided" do mod = template(:e).new mod.sections 1, 2, [3] expect(mod.sections).to eq Section.new(nil, 1, 2, [3]) end end describe "#run" do it "renders all sections" do mod = template(:e).new allow(mod).to receive(:render_section) { |section| section.name.to_s } mod.sections :a, :b, :c expect(mod.run).to eq 'abc' end it "renders all sections with options" do mod = template(:e).new allow(mod).to receive(:render_section) { |section| section.name.to_s } expect(mod).to receive(:add_options).with(:a => 1).and_yield mod.sections :a expect(mod.run(:a => 1)).to eq 'a' end it "runs section list if provided" do mod = template(:e).new expect(mod).to receive(:render_section).exactly(2).times do |section| expect([:q, :x]).to include(section.name) section.name.to_s end mod.run({}, [:q, :x]) end it "accepts a nil section as empty string" do mod = template(:e).new allow(mod).to receive(:render_section) { nil } mod.sections :a expect(mod.run).to eq "" end end describe "#add_options" do it "sets instance variables in addition to options" do mod = template(:f).new mod.send(:add_options, {:a => 1, :b => 2}) expect(mod.options).to eq({:a => 1, :b => 2}) expect(mod.instance_variable_get("@a")).to eq 1 expect(mod.instance_variable_get("@b")).to eq 2 end it "sets instance variables and options only for the block" do mod = template(:f).new mod.send(:add_options, {:a => 100, :b => 200}) do expect(mod.options).to eq({:a => 100, :b => 200}) end expect(mod.options).not_to eq({:a => 100, :b => 200}) end end describe "#render_section" do it "calls method if method exists by section name as Symbol" do mod = template(:f).new expect(mod).to receive(:respond_to?).with(:a).and_return(true) expect(mod).to receive(:respond_to?).with('a').and_return(true) expect(mod).to receive(:send).with(:a).and_return('a') expect(mod).to receive(:send).with('a').and_return('a') expect(mod.run({}, [:a, 'a'])).to eq 'aa' end it "calls erb if no method exists by section name" do mod = template(:f).new expect(mod).to receive(:respond_to?).with(:a).and_return(false) expect(mod).to receive(:respond_to?).with('a').and_return(false) expect(mod).to receive(:erb).with(:a).and_return('a') expect(mod).to receive(:erb).with('a').and_return('a') expect(mod.run({}, [:a, 'a'])).to eq 'aa' end it "runs a template if section is one" do mod2 = template(:g) expect(mod2).to receive(:run) mod = template(:f).new mod.sections mod2 mod.run end it "runs a template instance if section is one" do mod2 = template(:g).new expect(mod2).to receive(:run) mod = template(:f).new mod.sections mod2 mod.run end end describe "#yield" do it "yields a subsection" do mod = template(:e).new mod.sections :a, [:b, :c] class << mod def a; "(" + yield + ")" end def b; "b" end def c; "c" end end expect(mod.run).to eq "(b)" end it "yields a subsection within a yielded subsection" do mod = template(:e).new mod.sections :a, [:b, [:c]] class << mod def a; "(" + yield + ")" end def b; yield end def c; "c" end end expect(mod.run).to eq "(c)" end it "supports arbitrary nesting" do mod = template(:e).new mod.sections :a, [:b, [:c, [:d, [:e]]]] class << mod def a; "(" + yield + ")" end def b; yield end def c; yield end def d; yield end def e; "e" end end expect(mod.run).to eq "(e)" end it "yields first two elements if yield is called twice" do mod = template(:e).new mod.sections :a, [:b, :c, :d] class << mod def a; "(" + yield + yield + ")" end def b; 'b' end def c; "c" end end expect(mod.run).to eq "(bc)" end it "ignores any subsections inside subsection yields" do mod = template(:e).new mod.sections :a, [:b, [:c], :d] class << mod def a; "(" + yield + yield + ")" end def b; 'b' end def d; "d" end end expect(mod.run).to eq "(bd)" end it "allows extra options passed via yield" do mod = template(:e).new mod.sections :a, [:b] class << mod def a; "(" + yield(:x => "a") + ")" end def b; options.x + @x end end expect(mod.run).to eq "(aa)" end end describe "#yieldall" do it "yields all subsections" do mod = template(:e).new mod.sections :a, [:b, [:d, [:e]], :c] class << mod def a; "(" + yieldall + ")" end def b; "b" + yieldall end def c; "c" end def d; 'd' + yieldall end def e; 'e' end end expect(mod.run).to eq "(bdec)" end it "yields options to all subsections" do mod = template(:e).new mod.sections :a, [:b, :c] class << mod def a; "(" + yieldall(:x => "2") + ")" end def b; @x end def c; @x end end expect(mod.run).to eq "(22)" end it "yields all subsections more than once" do mod = template(:e).new mod.sections :a, [:b] class << mod def a; "(" + yieldall + yieldall + ")" end def b; "b" end end expect(mod.run).to eq "(bb)" end it "does not yield if no yieldall is called" do mod = template(:e).new mod.sections :a, [:b] class << mod def a; "()" end def b; "b" end end expect(mod.run).to eq "()" end end end yard-master/spec/verifier_spec.rb000066400000000000000000000060771265676644000174440ustar00rootroot00000000000000require File.dirname(__FILE__) + '/spec_helper' describe YARD::Verifier do describe "#parse_expressions" do it "creates #__execute method" do v = Verifier.new("expr1") expect(v).to respond_to(:__execute) end it "parses @tagname into tag('tagname')" do obj = double(:object) expect(obj).to receive(:tag).with('return') Verifier.new('@return').call(obj) end it "parses @@tagname into object.tags('tagname')" do obj = double(:object) expect(obj).to receive(:tags).with('return') Verifier.new('@@return').call(obj) end it "allows namespaced tag using @{} syntax" do obj = double(:object) expect(obj).to receive(:tag).with('yard.return') Verifier.new('@{yard.return}').call(obj) end it "allows namespaced tags using @{} syntax" do obj = double(:object) expect(obj).to receive(:tags).with('yard.return') Verifier.new('@@{yard.return}').call(obj) end it "calls methods on tag object" do obj = double(:object) obj2 = double(:tag) expect(obj).to receive(:tag).with('return').and_return obj2 expect(obj2).to receive(:foo) Verifier.new('@return.foo').call(obj) end it "sends any missing methods to object" do obj = double(:object) expect(obj).to receive(:has_tag?).with('return') Verifier.new('has_tag?("return")').call(obj) end it "allows multiple expressions" do obj = double(:object) expect(obj).to receive(:tag).with('return').and_return(true) expect(obj).to receive(:tag).with('param').and_return(false) expect(Verifier.new('@return', '@param').call(obj)).to be false end end describe "#o" do it "aliases object to o" do obj = double(:object) expect(obj).to receive(:a).ordered Verifier.new('o.a').call(obj) end end describe "#call" do it "doubles a nonexistent tag so that exceptions are not raised" do obj = double(:object) expect(obj).to receive(:tag).and_return(nil) expect(Verifier.new('@return.text').call(obj)).to be false end it "does not fail if no expressions were added" do expect { Verifier.new.call(nil) }.not_to raise_error end it "always ignores proxy objects and return true" do v = Verifier.new('tag(:x)') expect { expect(v.call(P('foo'))).to be true }.not_to raise_error end end describe "#expressions" do it "maintains a list of all unparsed expressions" do expect(Verifier.new('@return.text', '@private').expressions).to eq ['@return.text', '@private'] end end describe "#expressions=" do it "recompiles expressions when attribute is modified" do obj = double(:object) expect(obj).to receive(:tag).with('return') v = Verifier.new v.expressions = ['@return'] v.call(obj) end end describe "#add_expressions" do it "adds new expressions and recompile" do obj = double(:object) expect(obj).to receive(:tag).with('return') v = Verifier.new v.add_expressions '@return' v.call(obj) end end endyard-master/templates/000077500000000000000000000000001265676644000153245ustar00rootroot00000000000000yard-master/templates/default/000077500000000000000000000000001265676644000167505ustar00rootroot00000000000000yard-master/templates/default/class/000077500000000000000000000000001265676644000200555ustar00rootroot00000000000000yard-master/templates/default/class/dot/000077500000000000000000000000001265676644000206435ustar00rootroot00000000000000yard-master/templates/default/class/dot/setup.rb000066400000000000000000000001211265676644000223220ustar00rootroot00000000000000include T('default/module/dot') def init super sections.push :superklass endyard-master/templates/default/class/dot/superklass.erb000066400000000000000000000002451265676644000235320ustar00rootroot00000000000000<% if object.superclass.path != "Object" && object.superclass.path != "BasicObject" %> <%= format_path object %> -> <%= format_path object.superclass %>; <% end %>yard-master/templates/default/class/html/000077500000000000000000000000001265676644000210215ustar00rootroot00000000000000yard-master/templates/default/class/html/constructor_details.erb000066400000000000000000000004751265676644000256130ustar00rootroot00000000000000

    Constructor Details

    <% if @ctor.namespace != object %>

    This class inherits a constructor from <%= linkify @ctor, @ctor.namespace.path %>

    <% else %> <%= yieldall :object => @ctor, :index => 0 %> <% end %>
    yard-master/templates/default/class/html/setup.rb000066400000000000000000000000401265676644000225000ustar00rootroot00000000000000include T('default/module/html')yard-master/templates/default/class/html/subclasses.erb000066400000000000000000000002421265676644000236600ustar00rootroot00000000000000

    Direct Known Subclasses

    <%= @subclasses.map {|name, child| linkify(child, name) }.join(", ") %>

    yard-master/templates/default/class/setup.rb000066400000000000000000000017631265676644000215510ustar00rootroot00000000000000include T('default/module') def init super sections.place(:subclasses).before(:children) sections.place(:constructor_details, [T('method_details')]).before(:methodmissing) end def constructor_details ctors = object.meths(:inherited => true, :included => true) return unless @ctor = ctors.find {|o| o.constructor? } return if prune_method_listing([@ctor]).empty? erb(:constructor_details) end def subclasses return if object.path == "Object" # don't show subclasses for Object unless globals.subclasses globals.subclasses = {} list = run_verifier Registry.all(:class) list.each do |o| (globals.subclasses[o.superclass.path] ||= []) << o if o.superclass end end @subclasses = globals.subclasses[object.path] return if @subclasses.nil? || @subclasses.empty? @subclasses = @subclasses.sort_by {|o| o.path }.map do |child| name = child.path if object.namespace name = object.relative_path(child) end [name, child] end erb(:subclasses) endyard-master/templates/default/class/text/000077500000000000000000000000001265676644000210415ustar00rootroot00000000000000yard-master/templates/default/class/text/setup.rb000066400000000000000000000003401265676644000225230ustar00rootroot00000000000000include T('default/module/text') def init super sections.place(:subclasses).before(:children) sections.delete(:children) end def format_object_title(object) "Class: #{object.title} < #{object.superclass.title}" endyard-master/templates/default/class/text/subclasses.erb000066400000000000000000000001721265676644000237020ustar00rootroot00000000000000Direct Known Subclasses: ------------------------ <%= indent(wrap(@subclasses.map {|name, child| name }.join(", "))) %> yard-master/templates/default/constant/000077500000000000000000000000001265676644000206015ustar00rootroot00000000000000yard-master/templates/default/constant/text/000077500000000000000000000000001265676644000215655ustar00rootroot00000000000000yard-master/templates/default/constant/text/header.erb000066400000000000000000000003011265676644000235010ustar00rootroot00000000000000<%= title_align_right format_object_title(object) %> <%= object.name %> = <%= object.value.size > 40 ? "\n\n" + indent(object.value) : object.value %> <%= hr %> <%= yieldall %> <%= hr %> yard-master/templates/default/constant/text/setup.rb000066400000000000000000000000621265676644000232500ustar00rootroot00000000000000def init sections :header, [T('docstring')] end yard-master/templates/default/docstring/000077500000000000000000000000001265676644000207445ustar00rootroot00000000000000yard-master/templates/default/docstring/html/000077500000000000000000000000001265676644000217105ustar00rootroot00000000000000yard-master/templates/default/docstring/html/abstract.erb000066400000000000000000000002141265676644000242020ustar00rootroot00000000000000
    This <%= object.type %> is abstract. <%= htmlify_line object.tag(:abstract).text %>
    yard-master/templates/default/docstring/html/deprecated.erb000066400000000000000000000001611265676644000245000ustar00rootroot00000000000000
    Deprecated. <%= htmlify_line object.tag(:deprecated).text %>
    yard-master/templates/default/docstring/html/index.erb000066400000000000000000000001271265676644000235110ustar00rootroot00000000000000
    <%= yieldall %>
    yard-master/templates/default/docstring/html/note.erb000066400000000000000000000002231265676644000233440ustar00rootroot00000000000000<% object.tags(:note).each do |tag| %>
    Note: <%= htmlify_line tag.text %>
    <% end %> yard-master/templates/default/docstring/html/private.erb000066400000000000000000000003231265676644000240520ustar00rootroot00000000000000

    This <%= object.type %> is part of a private API. You should avoid using this <%= object.type %> if possible, as it may be removed or be changed in the future.

    yard-master/templates/default/docstring/html/returns_void.erb000066400000000000000000000001101265676644000251150ustar00rootroot00000000000000

    This method returns an undefined value.

    yard-master/templates/default/docstring/html/text.erb000066400000000000000000000000371265676644000233660ustar00rootroot00000000000000<%= htmlify(docstring_text) %> yard-master/templates/default/docstring/html/todo.erb000066400000000000000000000002201265676644000233410ustar00rootroot00000000000000<% object.tags(:todo).each do |tag| %>
    TODO: <%= htmlify_line tag.text %>
    <% end %> yard-master/templates/default/docstring/setup.rb000066400000000000000000000023501265676644000224310ustar00rootroot00000000000000def init return if object.docstring.blank? && !object.has_tag?(:api) sections :index, [:private, :deprecated, :abstract, :todo, :note, :returns_void, :text], T('tags') end def private return unless object.has_tag?(:api) && object.tag(:api).text == 'private' erb(:private) end def abstract return unless object.has_tag?(:abstract) erb(:abstract) end def deprecated return unless object.has_tag?(:deprecated) erb(:deprecated) end def todo return unless object.has_tag?(:todo) erb(:todo) end def note return unless object.has_tag?(:note) erb(:note) end def returns_void return unless object.type == :method return if object.name == :initialize && object.scope == :instance return unless object.tags(:return).size == 1 && object.tag(:return).types == ['void'] erb(:returns_void) end def docstring_text text = "" unless object.tags(:overload).size == 1 && object.docstring.empty? text = object.docstring end if text.strip.empty? && object.tags(:return).size == 1 && object.tag(:return).text text = object.tag(:return).text.gsub(/\A([a-z])/) {|x| x.downcase } text = "Returns #{text}" unless text.empty? || text =~ /^\s*return/i text = text.gsub(/\A([a-z])/) {|x| x.upcase } end text.strip endyard-master/templates/default/docstring/text/000077500000000000000000000000001265676644000217305ustar00rootroot00000000000000yard-master/templates/default/docstring/text/abstract.erb000066400000000000000000000001001265676644000242140ustar00rootroot00000000000000<%= indent(wrap("Abstract. #{object.tag(:abstract).text}")) %> yard-master/templates/default/docstring/text/deprecated.erb000066400000000000000000000001041265676644000245150ustar00rootroot00000000000000<%= indent(wrap("Deprecated. #{object.tag(:deprecated).text}")) %> yard-master/templates/default/docstring/text/index.erb000066400000000000000000000000211265676644000235220ustar00rootroot00000000000000 <%= yieldall %> yard-master/templates/default/docstring/text/note.erb000066400000000000000000000001321265676644000233630ustar00rootroot00000000000000<% object.tags(:note).each do |tag| %> <%= indent(wrap("Note: #{tag.text}")) %> <% end %>yard-master/templates/default/docstring/text/private.erb000066400000000000000000000001061265676644000240710ustar00rootroot00000000000000<%= indent(wrap("This #{object.type} is part of a private API.")) %> yard-master/templates/default/docstring/text/returns_void.erb000066400000000000000000000000761265676644000251500ustar00rootroot00000000000000<%= indent(wrap("This method returns an undefined value.")) %>yard-master/templates/default/docstring/text/text.erb000066400000000000000000000000601265676644000234020ustar00rootroot00000000000000<%= indent wrap(h(docstring_text.strip), 68) %> yard-master/templates/default/docstring/text/todo.erb000066400000000000000000000001321265676644000233630ustar00rootroot00000000000000<% object.tags(:todo).each do |tag| %> <%= indent(wrap("TODO: #{tag.text}")) %> <% end %>yard-master/templates/default/fulldoc/000077500000000000000000000000001265676644000204005ustar00rootroot00000000000000yard-master/templates/default/fulldoc/html/000077500000000000000000000000001265676644000213445ustar00rootroot00000000000000yard-master/templates/default/fulldoc/html/css/000077500000000000000000000000001265676644000221345ustar00rootroot00000000000000yard-master/templates/default/fulldoc/html/css/common.css000066400000000000000000000000521265676644000241330ustar00rootroot00000000000000/* Override this file with custom rules */yard-master/templates/default/fulldoc/html/css/full_list.css000066400000000000000000000130041265676644000246410ustar00rootroot00000000000000body { margin: 0; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; font-size: 13px; height: 101%; overflow-x: hidden; background: #fafafa; } h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } .clear { clear: both; } .fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } #search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } #content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } #full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } #full_list ul { padding: 0; } #full_list li { padding: 0; margin: 0; list-style: none; } #full_list li .item { padding: 5px 5px 5px 12px; } #noresults { padding: 7px 12px; background: #fff; } #content.insearch #noresults { margin-left: 7px; } li.collapsed ul { display: none; } li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } li { color: #888; cursor: pointer; } li.deprecated { text-decoration: line-through; font-style: italic; } li.odd { background: #f0f0f0; } li.even { background: #fafafa; } .item:hover { background: #ddd; } li small:before { content: "("; } li small:after { content: ")"; } li small.search_info { display: none; } a, a:visited { text-decoration: none; color: #05a; } li.clicked > .item { background: #05a; color: #ccc; } li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } li.collapsed.clicked a.toggle { background-position: top right; } #search input { border: 1px solid #bbb; border-radius: 3px; } #full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } #full_list_nav a, #nav a:visited { color: #358; } #full_list_nav a:hover { background: transparent; color: #5af; } #full_list_nav span:after { content: ' | '; } #full_list_nav span:last-child:after { content: ''; } #content h1 { margin-top: 0; } li { white-space: nowrap; cursor: normal; } li small { display: block; font-size: 0.8em; } li small:before { content: ""; } li small:after { content: ""; } li small.search_info { display: none; } #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } #content.insearch #search { background-position: center right; } #search input { width: 110px; } #full_list.insearch ul { display: block; } #full_list.insearch .item { display: none; } #full_list.insearch .found { display: block; padding-left: 11px !important; } #full_list.insearch li a.toggle { display: none; } #full_list.insearch li small.search_info { display: block; } yard-master/templates/default/fulldoc/html/css/style.css000066400000000000000000000464631265676644000240230ustar00rootroot00000000000000html { width: 100%; height: 100%; } body { font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; font-size: 13px; width: 100%; margin: 0; padding: 0; display: flex; display: -webkit-flex; display: -ms-flexbox; } #nav { position: relative; width: 100%; height: 100%; border: 0; border-right: 1px dotted #eee; overflow: auto; } .nav_wrap { margin: 0; padding: 0; width: 20%; height: 100%; position: relative; display: flex; display: -webkit-flex; display: -ms-flexbox; flex-shrink: 0; -webkit-flex-shrink: 0; -ms-flex: 1 0; } #resizer { position: absolute; right: -5px; top: 0; width: 10px; height: 100%; cursor: col-resize; z-index: 9999; } #main { flex: 5 1; -webkit-flex: 5 1; -ms-flex: 5 1; outline: none; position: relative; background: #fff; padding: 1.2em; padding-top: 0.2em; } @media (max-width: 920px) { .nav_wrap { display: none; } } @media (min-width: 920px) { body { height: 100%; overflow: hidden; } #main { height: 100%; overflow: auto; } #search { display: none; } #search_frame { display: none; } } #main img { max-width: 100%; } h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } h1.title { margin-bottom: 10px; } h1.alphaindex { margin-top: 0; font-size: 22px; } h2 { padding: 0; padding-bottom: 3px; border-bottom: 1px #aaa solid; font-size: 1.4em; margin: 1.8em 0 0.5em; position: relative; } h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } h2 small a { display: block; height: 20px; border: 1px solid #aaa; border-bottom: 0; border-top-left-radius: 5px; background: #f8f8f8; position: relative; padding: 2px 7px; } .clear { clear: both; } .inline { display: inline; } .inline p:first-child { display: inline; } .docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } .docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; border-radius: 4px; } .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } .docstring h1 { font-size: 1.2em; } .docstring h2 { font-size: 1.1em; } .docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } .summary_desc .object_link a, .docstring .object_link a { font-family: monospace; font-size: 1.05em; color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; border-radius: 4px; } .rdoc-term { padding-right: 25px; font-weight: bold; } .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } /* style for
    CityNC
    */ #filecontents table, .docstring table { border-collapse: collapse; } #filecontents table th, #filecontents table td, .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } #filecontents table tr:nth-child(odd), .docstring table tr:nth-child(odd) { background: #eee; } #filecontents table tr:nth-child(even), .docstring table tr:nth-child(even) { background: #fff; } #filecontents table th, .docstring table th { background: #fff; } /* style for
      */ #filecontents li > p, .docstring li > p { margin: 0px; } #filecontents ul, .docstring ul { padding-left: 20px; } /* style for
      */ #filecontents dl, .docstring dl { border: 1px solid #ccc; } #filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; } #filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; } #filecontents dd > p, .docstring dd > p { margin: 0px; } .note { color: #222; margin: 20px 0; padding: 10px; border: 1px solid #eee; border-radius: 3px; display: block; } .docstring .note { border-left-color: #ccc; border-left-width: 5px; } .note.todo { background: #ffffc5; border-color: #ececaa; } .note.returns_void { background: #efefef; } .note.deprecated { background: #ffe5e5; border-color: #e9dada; } .note.title.deprecated { background: #ffe5e5; border-color: #e9dada; } .note.private { background: #ffffc5; border-color: #ececaa; } .note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; } .summary_signature + .note.title { margin-left: 7px; } h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; } .note.title { background: #efefef; } .note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; } .note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; } .note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; } .note.title.private { background: #d5d5d5; border-color: #c5c5c5; } .note.title.not_defined_here { background: transparent; border: none; font-style: italic; } .discussion .note { margin-top: 6px; } .discussion .note:first-child { margin-top: 0; } h3.inherited { font-style: italic; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; font-weight: normal; padding: 0; margin: 0; margin-top: 12px; margin-bottom: 3px; font-size: 13px; } p.inherited { padding: 0; margin: 0; margin-left: 25px; } .box_info dl { margin: 0; border: 0; width: 100%; font-size: 1em; display: flex; display: -webkit-flex; display: -ms-flexbox; } .box_info dl dt { flex-shrink: 0; -webkit-flex-shrink: 1; -ms-flex-shrink: 1; width: 100px; text-align: right; font-weight: bold; border: 1px solid #aaa; border-width: 1px 0px 0px 1px; padding: 6px 0; padding-right: 10px; } .box_info dl dd { flex-grow: 1; -webkit-flex-grow: 1; -ms-flex: 1; max-width: 420px; padding: 6px 0; padding-right: 20px; border: 1px solid #aaa; border-width: 1px 1px 0 0; overflow: hidden; position: relative; } .box_info dl:last-child > * { border-bottom: 1px solid #aaa; } .box_info dl:nth-child(odd) > * { background: #eee; } .box_info dl:nth-child(even) > * { background: #fff; } .box_info dl > * { margin: 0; } ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; } .index_inline_list { padding-left: 0; font-size: 1.1em; } .index_inline_list li { list-style: none; display: inline; padding: 7px 12px; line-height: 35px; } dl.constants { margin-left: 10px; } dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; } dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; } dl.constants .docstring .note:first-child { margin-top: 5px; } .summary_desc { margin-left: 32px; display: block; font-family: sans-serif; font-size: 1.1em; margin-top: 8px; line-height: 1.5145em; margin-bottom: 0.8em; } .summary_desc tt { font-size: 0.9em; } dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; } dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; } dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; } dl.constants .discussion *:first-child { margin-top: 0; } dl.constants .discussion *:last-child { margin-bottom: 0; } .method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; } .method_details.first { border: 0; margin-top: 5px; } .method_details.first h3.signature { margin-top: 1em; } p.signature, h3.signature { font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace; padding: 6px 10px; margin-top: 1em; background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px; } p.signature tt, h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; } p.signature .overload, h3.signature .overload { display: block; } p.signature .extras, h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; } p.signature .not_defined_here, h3.signature .not_defined_here, p.signature .aliases, h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; } p.signature .aliases .names, h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; } .tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; } .tags .tag_title tt { color: initial; padding: initial; background: initial; } .tags ul { margin-top: 5px; padding-left: 30px; list-style: square; } .tags ul li { margin-bottom: 3px; } .tags ul .name { font-family: monospace; font-weight: bold; } .tags ul .note { padding: 3px 6px; } .tags { margin-bottom: 12px; } .tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; } .tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; } .tags .examples .inline p:before { content: "â–¸"; font-size: 1em; margin-right: 5px; } .tags .overload .overload_item { list-style: none; margin-bottom: 25px; } .tags .overload .overload_item .signature { padding: 2px 8px; background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px; } .tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; } .tags .overload .docstring { margin-top: 15px; } .defines { display: none; } #method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; } .showSource { font-size: 0.9em; } .showSource a, .showSource a:visited { text-decoration: none; color: #666; } #content a, #content a:visited { text-decoration: none; color: #05a; } #content a:hover { background: #ffffa5; } ul.summary { list-style: none; font-family: monospace; font-size: 1em; line-height: 1.5em; padding-left: 0px; } ul.summary a, ul.summary a:visited { text-decoration: none; font-size: 1.1em; } ul.summary li { margin-bottom: 5px; } .summary .summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; } .summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; } ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;} ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; } #content .summary_signature:hover a, #content .summary_signature:hover a:visited { background: transparent; color: #049; } p.inherited a { font-family: monospace; font-size: 0.9em; } p.inherited { word-spacing: 5px; font-size: 1.2em; } p.children { font-size: 1.2em; } p.children a { font-size: 0.9em; } p.children strong { font-size: 0.8em; } p.children strong.modules { padding-left: 5px; } ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; } ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; } ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; } ul.fullTree li:first-child { padding-top: 0; background: transparent; } ul.fullTree li:last-child { padding-bottom: 0; } .showAll ul.fullTree { display: block; } .showAll .inheritName { display: none; } #search { position: absolute; right: 12px; top: 0px; z-index: 9000; } #search a { display: block; float: left; padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a; border: 1px solid #d8d8e5; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; background: #F1F8FF; box-shadow: -1px 1px 3px #ddd; } #search a:hover { background: #f5faff; color: #06b; fill: #06b; } #search a.active { background: #568; padding-bottom: 20px; color: #fff; fill: #fff; border: 1px solid #457; border-top-left-radius: 5px; border-top-right-radius: 5px; } #search a.inactive { color: #999; fill: #999; } .inheritanceTree, .toggleDefines { float: right; border-left: 1px solid #aaa; position: absolute; top: 0; right: 0; height: 100%; background: #f6f6f6; padding: 5px; min-width: 55px; text-align: center; } #menu { font-size: 1.3em; color: #bbb; } #menu .title, #menu a { font-size: 0.7em; } #menu .title a { font-size: 1em; } #menu .title { color: #555; } #menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; } #menu a:hover { color: #05a; } #footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; } #footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; } #footer a:hover { color: #05a; } #listing ul.alpha { font-size: 1.1em; } #listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; } #listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; } #listing ul.alpha ul { margin: 0; padding-left: 15px; } #listing ul small { color: #666; font-size: 0.7em; } li.r1 { background: #f0f0f0; } li.r2 { background: #fafafa; } #search_frame { z-index: 9999; background: #fff; display: none; position: absolute; top: 40px; right: 12px; width: 500px; max-width: 80%; height: 80%; overflow-y: scroll; border: 1px solid #999; border-collapse: collapse; box-shadow: -7px 5px 25px #aaa; border-radius: 2px; } #content ul.summary li.deprecated .summary_signature a, #content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; } #toc { position: relative; float: right; overflow-x: auto; right: -3px; margin-left: 20px; margin-bottom: 20px; padding: 20px; padding-right: 30px; max-width: 300px; z-index: 5000; background: #fefefe; border: 1px solid #ddd; box-shadow: -2px 2px 6px #bbb; } #toc .title { margin: 0; } #toc ol { padding-left: 1.8em; } #toc li { font-size: 1.1em; line-height: 1.7em; } #toc > ol > li { font-size: 1.1em; font-weight: bold; } #toc ol > ol { font-size: 0.9em; } #toc ol ol > ol { padding-left: 2.3em; } #toc ol + li { margin-top: 0.3em; } #toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; } #toc.hidden:hover { background: #fafafa; } #filecontents h1 + #toc.nofloat { margin-top: 0; } @media (max-width: 560px) { #toc { margin-left: 0; margin-top: 16px; float: none; max-width: none; } } /* syntax highlighting */ .source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; } #filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; } #filecontents pre.code, .docstring pre.code { display: block; } .source_code .lines { padding-right: 12px; color: #555; text-align: right; } #filecontents pre.code, .docstring pre.code, .tags pre.example { padding: 9px 14px; margin-top: 4px; border: 1px solid #e1e1e8; background: #f7f7f9; border-radius: 4px; font-size: 1em; overflow-x: auto; line-height: 1.2em; } pre.code { color: #000; tab-size: 2; } pre.code .info.file { color: #555; } pre.code .val { color: #036A07; } pre.code .tstring_content, pre.code .heredoc_beg, pre.code .heredoc_end, pre.code .qwords_beg, pre.code .qwords_end, pre.code .tstring, pre.code .dstring { color: #036A07; } pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s, pre.code .rubyid_to_sym, pre.code .rubyid_to_f, pre.code .dot + pre.code .id, pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; } pre.code .comment { color: #0066FF; } pre.code .const, pre.code .constant { color: #585CF6; } pre.code .label, pre.code .symbol { color: #C5060B; } pre.code .kw, pre.code .rubyid_require, pre.code .rubyid_extend, pre.code .rubyid_include { color: #0000FF; } pre.code .ivar { color: #318495; } pre.code .gvar, pre.code .rubyid_backref, pre.code .rubyid_nth_ref { color: #6D79DE; } pre.code .regexp, .dregexp { color: #036A07; } pre.code a { border-bottom: 1px dotted #bbf; } yard-master/templates/default/fulldoc/html/frames.erb000066400000000000000000000007171265676644000233200ustar00rootroot00000000000000 <%= options.title %> yard-master/templates/default/fulldoc/html/full_list.erb000066400000000000000000000022351265676644000240350ustar00rootroot00000000000000 <% stylesheets_full_list.each do |stylesheet| %> <% end %> <% javascripts_full_list.each do |javascript| %> <% end %> <%= @list_title %>

      <%= @list_title %>

      <% menu_lists.each do |list| %> <%= list[:title] %> <% end %>
        <%= erb "full_list_#{@list_type}" %>
      yard-master/templates/default/fulldoc/html/full_list_class.erb000066400000000000000000000002511265676644000252160ustar00rootroot00000000000000
    • <%= link_object(Registry.root, Registry.root.title, nil, false) %>
    • <%= class_list %> yard-master/templates/default/fulldoc/html/full_list_file.erb000066400000000000000000000004161265676644000250330ustar00rootroot00000000000000<% even_odd = 'odd' %> <% @items.each do |item| %>
    • <%= link_file item %>
    • <% even_odd = (even_odd == 'even' ? 'odd' : 'even') %> <% end %> yard-master/templates/default/fulldoc/html/full_list_method.erb000066400000000000000000000005251265676644000253750ustar00rootroot00000000000000<% even_odd = 'odd' %> <% @items.each do |item| %>
    • <%= linkify item, h(item.name(true)) %> <%= item.namespace.title %>
    • <% even_odd = (even_odd == 'even' ? 'odd' : 'even') %> <% end %> yard-master/templates/default/fulldoc/html/js/000077500000000000000000000000001265676644000217605ustar00rootroot00000000000000yard-master/templates/default/fulldoc/html/js/app.js000066400000000000000000000162461265676644000231070ustar00rootroot00000000000000(function() { var localStorage = {}, sessionStorage = {}; try { localStorage = window.localStorage; } catch (e) { } try { sessionStorage = window.sessionStorage; } catch (e) { } function createSourceLinks() { $('.method_details_list .source_code'). before("[View source]"); $('.toggleSource').toggle(function() { $(this).parent().nextAll('.source_code').slideDown(100); $(this).text("Hide source"); }, function() { $(this).parent().nextAll('.source_code').slideUp(100); $(this).text("View source"); }); } function createDefineLinks() { var tHeight = 0; $('.defines').after(" more..."); $('.toggleDefines').toggle(function() { tHeight = $(this).parent().prev().height(); $(this).prev().css('display', 'inline'); $(this).parent().prev().height($(this).parent().height()); $(this).text("(less)"); }, function() { $(this).prev().hide(); $(this).parent().prev().height(tHeight); $(this).text("more..."); }); } function createFullTreeLinks() { var tHeight = 0; $('.inheritanceTree').toggle(function() { tHeight = $(this).parent().prev().height(); $(this).parent().toggleClass('showAll'); $(this).text("(hide)"); $(this).parent().prev().height($(this).parent().height()); }, function() { $(this).parent().toggleClass('showAll'); $(this).parent().prev().height(tHeight); $(this).text("show all"); }); } function searchFrameButtons() { $('.full_list_link').click(function() { toggleSearchFrame(this, $(this).attr('href')); return false; }); window.addEventListener('message', function(e) { if (e.data === 'navEscape') { $('#search_frame').slideUp(100); $('#search a').removeClass('active inactive'); $(window).focus(); } }); $(window).resize(function() { if ($('#search:visible').length === 0) { $('#search_frame').slideUp(100); $('#search a').removeClass('active inactive'); $(window).focus(); } }); } function toggleSearchFrame(id, link) { var frame = $('#search_frame'); $('#search a').removeClass('active').addClass('inactive'); if (frame.attr('src') === link && frame.css('display') !== "none") { frame.slideUp(100); $('#search a').removeClass('active inactive'); } else { $(id).addClass('active').removeClass('inactive'); if (frame.attr('src') !== link) frame.attr('src', link); frame.slideDown(100); } } function linkSummaries() { $('.summary_signature').click(function() { document.location = $(this).find('a').attr('href'); }); } function summaryToggle() { $('.summary_toggle').click(function(e) { e.preventDefault(); localStorage.summaryCollapsed = $(this).text(); $('.summary_toggle').each(function() { $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); var next = $(this).parent().parent().nextAll('ul.summary').first(); if (next.hasClass('compact')) { next.toggle(); next.nextAll('ul.summary').first().toggle(); } else if (next.hasClass('summary')) { var list = $('
        '); list.html(next.html()); list.find('.summary_desc, .note').remove(); list.find('a').each(function() { $(this).html($(this).find('strong').html()); $(this).parent().html($(this)[0].outerHTML); }); next.before(list); next.toggle(); } }); return false; }); if (localStorage.summaryCollapsed == "collapse") { $('.summary_toggle').first().click(); } else { localStorage.summaryCollapsed = "expand"; } } function generateTOC() { if ($('#filecontents').length === 0) return; var _toc = $('
          '); var show = false; var toc = _toc; var counter = 0; var tags = ['h2', 'h3', 'h4', 'h5', 'h6']; var i; if ($('#filecontents h1').length > 1) tags.unshift('h1'); for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; } var lastTag = parseInt(tags[0][1], 10); $(tags.join(', ')).each(function() { if ($(this).parents('.method_details .docstring').length != 0) return; if (this.id == "filecontents") return; show = true; var thisTag = parseInt(this.tagName[1], 10); if (this.id.length === 0) { var proposedId = $(this).attr('toc-id'); if (typeof(proposedId) != "undefined") this.id = proposedId; else { var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_'); if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; } this.id = proposedId; } } if (thisTag > lastTag) { for (i = 0; i < thisTag - lastTag; i++) { var tmp = $('
            '); toc.append(tmp); toc = tmp; } } if (thisTag < lastTag) { for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent(); } var title = $(this).attr('toc-title'); if (typeof(title) == "undefined") title = $(this).text(); toc.append('
          1. ' + title + '
          2. '); lastTag = thisTag; }); if (!show) return; html = ''; $('#content').prepend(html); $('#toc').append(_toc); $('#toc .hide_toc').toggle(function() { $('#toc .top').slideUp('fast'); $('#toc').toggleClass('hidden'); $('#toc .title small').toggle(); }, function() { $('#toc .top').slideDown('fast'); $('#toc').toggleClass('hidden'); $('#toc .title small').toggle(); }); } function navResizeFn(e) { if (e.which !== 1) { navResizeFnStop(); return; } sessionStorage.navWidth = e.pageX.toString(); $('.nav_wrap').css('width', e.pageX); $('.nav_wrap').css('-ms-flex', 'inherit'); } function navResizeFnStop() { $(window).unbind('mousemove', navResizeFn); window.removeEventListener('message', navMessageFn, false); } function navMessageFn(e) { if (e.data.action === 'mousemove') navResizeFn(e.data.event); if (e.data.action === 'mouseup') navResizeFnStop(); } function navResizer() { $('#resizer').mousedown(function(e) { e.preventDefault(); $(window).mousemove(navResizeFn); window.addEventListener('message', navMessageFn, false); }); $(window).mouseup(navResizeFnStop); if (sessionStorage.navWidth) { navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)}); } } function navExpander() { var done = false, timer = setTimeout(postMessage, 500); function postMessage() { if (done) return; clearTimeout(timer); var opts = { action: 'expand', path: pathId }; document.getElementById('nav').contentWindow.postMessage(opts, '*'); done = true; } window.addEventListener('message', function(event) { if (event.data === 'navReady') postMessage(); return false; }, false); } function mainFocus() { $('#main')[0].focus(); } $(document).ready(function() { navResizer(); navExpander(); createSourceLinks(); createDefineLinks(); createFullTreeLinks(); searchFrameButtons(); linkSummaries(); summaryToggle(); generateTOC(); mainFocus(); }); })(); yard-master/templates/default/fulldoc/html/js/full_list.js000066400000000000000000000131621265676644000243160ustar00rootroot00000000000000(function() { var $clicked = $(null); var searchTimeout = null; var searchCache = []; var caseSensitiveMatch = false; var ignoreKeyCodeMin = 8; var ignoreKeyCodeMax = 46; var commandKey = 91; RegExp.escape = function(text) { return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } function escapeShortcut() { $(document).keydown(function(evt) { if (evt.which == 27) { window.parent.postMessage('navEscape', '*'); } }); } function navResizer() { $(window).mousemove(function(e) { window.parent.postMessage({ action: 'mousemove', event: {pageX: e.pageX, which: e.which} }, '*'); }).mouseup(function(e) { window.parent.postMessage({action: 'mouseup'}, '*'); }); window.parent.postMessage("navReady", "*"); } function clearSearchTimeout() { clearTimeout(searchTimeout); searchTimeout = null; } function enableLinks() { // load the target page in the parent window $('#full_list li').on('click', function(evt) { $('#full_list li').removeClass('clicked'); $clicked = $(this); $clicked.addClass('clicked'); evt.stopPropagation(); if (evt.target.tagName === 'A') return true; var elem = $clicked.find('> .item .object_link a')[0]; var e = evt.originalEvent; var newEvent = new MouseEvent(evt.originalEvent.type); newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget); elem.dispatchEvent(newEvent); evt.preventDefault(); return false; }); } function enableToggles() { // show/hide nested classes on toggle click $('#full_list a.toggle').on('click', function(evt) { evt.stopPropagation(); evt.preventDefault(); $(this).parent().parent().toggleClass('collapsed'); highlight(); }); } function populateSearchCache() { $('#full_list li .item').each(function() { var $node = $(this); var $link = $node.find('.object_link a'); if ($link.length > 0) { searchCache.push({ node: $node, link: $link, name: $link.text(), fullName: $link.attr('title').split(' ')[0] }); } }); } function enableSearch() { $('#search input').keyup(function(event) { if (ignoredKeyPress(event)) return; if (this.value === "") { clearSearch(); } else { performSearch(this.value); } }); $('#full_list').after(""); } function ignoredKeyPress(event) { if ( (event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) || (event.keyCode == commandKey) ) { return true; } else { return false; } } function clearSearch() { clearSearchTimeout(); $('#full_list .found').removeClass('found').each(function() { var $link = $(this).find('.object_link a'); $link.text($link.text()); }); $('#full_list, #content').removeClass('insearch'); $clicked.parents().removeClass('collapsed'); highlight(); } function performSearch(searchString) { clearSearchTimeout(); $('#full_list, #content').addClass('insearch'); $('#noresults').text('').hide(); partialSearch(searchString, 0); } function partialSearch(searchString, offset) { var lastRowClass = ''; var i = null; for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) { var item = searchCache[i]; var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name); var matchString = buildMatchString(searchString); var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i"); if (searchName.match(matchRegexp) == null) { item.node.removeClass('found'); item.link.text(item.link.text()); } else { item.node.addClass('found'); item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1'); lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2'; item.link.html(item.name.replace(matchRegexp, "$&")); } } if(i == searchCache.length) { searchDone(); } else { searchTimeout = setTimeout(function() { partialSearch(searchString, i); }, 0); } } function searchDone() { searchTimeout = null; highlight(); if ($('#full_list li:visible').size() === 0) { $('#noresults').text('No results were found.').hide().fadeIn(); } else { $('#noresults').text('').hide(); } $('#content').removeClass('insearch'); } function buildMatchString(searchString, event) { caseSensitiveMatch = searchString.match(/[A-Z]/) != null; var regexSearchString = RegExp.escape(searchString); if (caseSensitiveMatch) { regexSearchString += "|" + $.map(searchString.split(''), function(e) { return RegExp.escape(e); }). join('.+?'); } return regexSearchString; } function highlight() { $('#full_list li:visible').each(function(n) { $(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even'); }); } /** * Expands the tree to the target element and its immediate * children. */ function expandTo(path) { var $target = $(document.getElementById('object_' + path)); $target.addClass('clicked'); $target.removeClass('collapsed'); $target.parentsUntil('#full_list', 'li').removeClass('collapsed'); if($target[0]) { window.scrollTo(window.scrollX, $target.offset().top - 250); highlight(); } } function windowEvents(event) { var msg = event.data; if (msg.action === "expand") { expandTo(msg.path); } return false; } window.addEventListener("message", windowEvents, false); $(document).ready(function() { escapeShortcut(); navResizer(); enableLinks(); enableToggles(); populateSearchCache(); enableSearch(); }); })(); yard-master/templates/default/fulldoc/html/js/jquery.js000066400000000000000000002672541265676644000236550ustar00rootroot00000000000000/*! jQuery v1.7.1 jquery.com | jquery.org/license */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
      a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
      "+""+"
      ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
      t
      ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
      ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

      ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
      ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
      ","
      "],thead:[1,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],col:[2,"","
      "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
      ","
      "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
      ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);yard-master/templates/default/fulldoc/html/setup.rb000066400000000000000000000154211265676644000230340ustar00rootroot00000000000000include Helpers::ModuleHelper def init options.objects = objects = run_verifier(options.objects) return serialize_onefile if options.onefile generate_assets serialize('_index.html') options.files.each_with_index do |file, i| serialize_file(file, file.title) end options.delete(:objects) options.delete(:files) objects.each do |object| begin serialize(object) rescue => e path = options.serializer.serialized_path(object) log.error "Exception occurred while generating '#{path}'" log.backtrace(e) end end end # Generate an HTML document for the specified object. This method is used by # most of the objects found in the Registry. # @param [CodeObject] object to be saved to HTML def serialize(object) options.object = object serialize_index(options) if object == '_index.html' && options.files.empty? Templates::Engine.with_serializer(object, options.serializer) do T('layout').run(options) end end # Generate the documentation output in one file (--one-file) which will load the # contents of all the javascript and css and output the entire contents without # depending on any additional files def serialize_onefile Templates::Engine.with_serializer('index.html', options.serializer) do T('onefile').run(options) end end # Generate the index document for the output # @params [Hash] options contains data and flags that influence the output def serialize_index(options) Templates::Engine.with_serializer('index.html', options.serializer) do T('layout').run(options.merge(:index => true)) end end # Generate a single HTML file with the layout template applied. This is generally # the README file or files specified on the command-line. # # @param [File] file object to be saved to the output # @param [String] title currently unused # # @see layout#diskfile def serialize_file(file, title = nil) options.object = Registry.root options.file = file outfile = 'file.' + file.name + '.html' serialize_index(options) if file == options.readme Templates::Engine.with_serializer(outfile, options.serializer) do T('layout').run(options) end options.delete(:file) end # # Generates a file to the output with the specified contents. # # @example saving a custom html file to the documenation root # # asset('my_custom.html','Custom File') # # @param [String] path relative to the document output where the file will be # created. # @param [String] content the contents that are saved to the file. def asset(path, content) if options.serializer log.capture("Generating asset #{path}") do options.serializer.serialize(path, content) end end end # @return [Array] Stylesheet files that are additionally loaded for the # searchable full lists, e.g., Class List, Method List, File List # @since 0.7.0 def stylesheets_full_list %w(css/full_list.css css/common.css) end # @return [Array] Javascript files that are additionally loaded for the # searchable full lists, e.g., Class List, Method List, File List. # @since 0.7.0 def javascripts_full_list %w(js/jquery.js js/full_list.js) end def menu_lists Object.new.extend(T('layout')).menu_lists end # Generates all the javascript files, stylesheet files, menu lists # (i.e. class, method, and file) based on the the values returned from the # layout's menu_list method, and the frameset in the documentation output # def generate_assets @object = Registry.root layout = Object.new.extend(T('layout')) (layout.javascripts + javascripts_full_list + layout.stylesheets + stylesheets_full_list).uniq.each do |file| asset(file, file(file, true)) end layout.menu_lists.each do |list| list_generator_method = "generate_#{list[:type]}_list" if respond_to?(list_generator_method) send(list_generator_method) else log.error "Unable to generate '#{list[:title]}' list because no method " + "'#{list_generator_method}' exists" end end generate_frameset end # Generate a searchable method list in the output # @see ModuleHelper#prune_method_listing def generate_method_list @items = prune_method_listing(Registry.all(:method), false) @items = @items.reject {|m| m.name.to_s =~ /=$/ && m.is_attribute? } @items = @items.sort_by {|m| m.name.to_s } @list_title = "Method List" @list_type = "method" generate_list_contents end # Generate a searchable class list in the output def generate_class_list @items = options.objects if options.objects @list_title = "Class List" @list_type = "class" generate_list_contents end # Generate a searchable file list in the output def generate_file_list @file_list = true @items = options.files @list_title = "File List" @list_type = "file" generate_list_contents @file_list = nil end def generate_list_contents asset(url_for_list(@list_type), erb(:full_list)) end # Generate the frame documentation in the output def generate_frameset @javascripts = javascripts_full_list @stylesheets = stylesheets_full_list asset(url_for_frameset, erb(:frames)) end # @api private class TreeContext def initialize @depth = 0 @even_odd = Alternator.new(:even, :odd) end def nest @depth += 1 yield @depth -= 1 end # @return [String] Returns a css pixel offset, e.g. "30px" def indent "#{(@depth + 2) * 15}px" end def classes classes = [] classes << 'collapsed' if @depth > 0 classes << @even_odd.next if @depth < 2 classes end class Alternator def initialize(first, second) @next = first @after = second end def next @next, @after = @after, @next @after end end end # @return [String] HTML output of the classes to be displayed in the # full_list_class template. def class_list(root = Registry.root, tree = TreeContext.new) out = "" children = run_verifier(root.children) if root == Registry.root children += @items.select {|o| o.namespace.is_a?(CodeObjects::Proxy) } end children.compact.sort_by(&:path).each do |child| if child.is_a?(CodeObjects::NamespaceObject) name = child.namespace.is_a?(CodeObjects::Proxy) ? child.path : child.name has_children = run_verifier(child.children).any? {|o| o.is_a?(CodeObjects::NamespaceObject) } out << "
    • " out << "
      " out << " " if has_children out << linkify(child, name) out << " < #{child.superclass.name}" if child.is_a?(CodeObjects::ClassObject) && child.superclass out << "" out << child.namespace.title out << "" out << "
      " tree.nest do out << "
        #{class_list(child, tree)}
      " if has_children end out << "
    • " end end out end yard-master/templates/default/layout/000077500000000000000000000000001265676644000202655ustar00rootroot00000000000000yard-master/templates/default/layout/dot/000077500000000000000000000000001265676644000210535ustar00rootroot00000000000000yard-master/templates/default/layout/dot/header.erb000066400000000000000000000002461265676644000227770ustar00rootroot00000000000000digraph yard { graph [rankdir=BT rank=sink outputMode=nodesfirst packMode="graph" splines=true]; node [shape=record rank=sink rankType=sink]; <%= yieldall %> }yard-master/templates/default/layout/dot/setup.rb000066400000000000000000000003231265676644000225360ustar00rootroot00000000000000attr_reader :contents def init if object type = object.root? ? :module : object.type sections :header, [T(type)] else sections :header, [:contents] end end def header tidy erb(:header) end yard-master/templates/default/layout/html/000077500000000000000000000000001265676644000212315ustar00rootroot00000000000000yard-master/templates/default/layout/html/breadcrumb.erb000066400000000000000000000012451265676644000240330ustar00rootroot00000000000000 yard-master/templates/default/layout/html/files.erb000066400000000000000000000004541265676644000230300ustar00rootroot00000000000000<% if @files && @files.size > 0 %>

      File Listing

        <% n = 1 %> <% @files.each_with_index do |file, i| %>
      • <%= link_file(file) %>
      • <% n = n == 2 ? 1 : 2 %> <% end %>
      <% end %>
      yard-master/templates/default/layout/html/footer.erb000066400000000000000000000003341265676644000232210ustar00rootroot00000000000000 yard-master/templates/default/layout/html/headers.erb000066400000000000000000000010541265676644000233360ustar00rootroot00000000000000 <%= h @page_title %> <% if options.title && @page_title != options.title %> — <%= h options.title %> <% end %> <% stylesheets.each do |stylesheet| %> <% end %> <%= erb :script_setup %> <% javascripts.each do |javascript| %> <% end %> yard-master/templates/default/layout/html/index.erb000066400000000000000000000001051265676644000230260ustar00rootroot00000000000000

      <%= options.title %>

      <%= yieldall %> yard-master/templates/default/layout/html/layout.erb000066400000000000000000000010251265676644000232360ustar00rootroot00000000000000 <%= erb(:headers) %>
      <%= yieldall %>
      <%= erb(:footer) %>
      yard-master/templates/default/layout/html/listing.erb000066400000000000000000000001331265676644000233710ustar00rootroot00000000000000

      Alphabetic Index

      <%= yieldall %>
      yard-master/templates/default/layout/html/objects.erb000066400000000000000000000016011265676644000233520ustar00rootroot00000000000000

      Namespace Listing A-Z

      <% if Registry.root.meths(:included => false).size > 0 %>
      • <%= linkify(Registry.root) %>
      <% end %> <% i = 0 %>
      <% @objects_by_letter.sort_by {|l,o| l.to_s }.each do |letter, objects| %> <% if (i += 1) % 8 == 0 %> <% i = 0 %> <% end %>
      • <%= letter %>
        • <% objects.each do |obj| %>
        • <%= linkify obj, obj.name %> <% if !obj.namespace.root? %> (<%= obj.namespace.path %>) <% end %>
        • <% end %>
      <% end %>
      yard-master/templates/default/layout/html/script_setup.erb000066400000000000000000000002541265676644000244500ustar00rootroot00000000000000 yard-master/templates/default/layout/html/search.erb000066400000000000000000000007321265676644000231720ustar00rootroot00000000000000yard-master/templates/default/layout/html/setup.rb000066400000000000000000000043151265676644000227210ustar00rootroot00000000000000def init @breadcrumb = [] if @onefile sections :layout elsif @file if @file.attributes[:namespace] @object = options.object = Registry.at(@file.attributes[:namespace]) || Registry.root end @breadcrumb_title = "File: " + @file.title @page_title = @breadcrumb_title sections :layout, [:diskfile] elsif @contents sections :layout, [:contents] else case object when '_index.html' @page_title = options.title sections :layout, [:index, [:listing, [:files, :objects]]] when CodeObjects::Base unless object.root? cur = object.namespace while !cur.root? @breadcrumb.unshift(cur) cur = cur.namespace end end @page_title = format_object_title(object) type = object.root? ? :module : object.type sections :layout, [T(type)] end end end def contents @contents end def index @objects_by_letter = {} objects = Registry.all(:class, :module).sort_by {|o| o.name.to_s } objects = run_verifier(objects) objects.each {|o| (@objects_by_letter[o.name.to_s[0,1].upcase] ||= []) << o } erb(:index) end def layout @nav_url = url_for_list(!@file || options.index ? 'class' : 'file') if !object || object.is_a?(String) @path = nil elsif @file @path = @file.path elsif !object.is_a?(YARD::CodeObjects::NamespaceObject) @path = object.parent.path else @path = object.path end erb(:layout) end def diskfile @file.attributes[:markup] ||= markup_for_file('', @file.filename) data = htmlify(@file.contents, @file.attributes[:markup]) "
      " + data + "
      " end # @return [Array] core javascript files for layout # @since 0.7.0 def javascripts %w(js/jquery.js js/app.js) end # @return [Array] core stylesheets for the layout # @since 0.7.0 def stylesheets %w(css/style.css css/common.css) end # @return [ArrayString}>] the list of search links and drop-down menus # @since 0.7.0 def menu_lists [ { :type => 'class', :title => 'Classes', :search_title => 'Class List' }, { :type => 'method', :title => 'Methods', :search_title => 'Method List' }, { :type => 'file', :title => 'Files', :search_title => 'File List' } ] end yard-master/templates/default/method/000077500000000000000000000000001265676644000202305ustar00rootroot00000000000000yard-master/templates/default/method/html/000077500000000000000000000000001265676644000211745ustar00rootroot00000000000000yard-master/templates/default/method/html/header.erb000066400000000000000000000006501265676644000231170ustar00rootroot00000000000000

      Method: <%= object.path %>

      Defined in:
      <%= object.file %><% if object.files.size > 1 %>,
      <%= object.files[1..-1].map {|f| f.first }.join(",
      ") %>
      <% end %>
      <%= yieldall :index => 0 %>
      yard-master/templates/default/method/setup.rb000066400000000000000000000000661265676644000217170ustar00rootroot00000000000000def init sections :header, [T('method_details')] endyard-master/templates/default/method/text/000077500000000000000000000000001265676644000212145ustar00rootroot00000000000000yard-master/templates/default/method/text/header.erb000066400000000000000000000000171265676644000231340ustar00rootroot00000000000000<%= yieldall %>yard-master/templates/default/method_details/000077500000000000000000000000001265676644000217355ustar00rootroot00000000000000yard-master/templates/default/method_details/html/000077500000000000000000000000001265676644000227015ustar00rootroot00000000000000yard-master/templates/default/method_details/html/header.erb000066400000000000000000000001271265676644000246230ustar00rootroot00000000000000
      <%= yieldall %>
      yard-master/templates/default/method_details/html/method_signature.erb000066400000000000000000000015751265676644000267440ustar00rootroot00000000000000

      <% if object.tags(:overload).size == 1 %> <%= signature(object.tag(:overload), false) %> <% elsif object.tags(:overload).size > 1 %> <% object.tags(:overload).each do |overload| %> <%= signature(overload, false) %> <% end %> <% else %> <%= signature(object, false) %> <% end %> <% if object.aliases.size > 0 %> Also known as: <%= object.aliases.map {|o| "" + h(o.name.to_s) + "" }.join(", ") %> <% end %> <% if owner != object.namespace %> Originally defined in <%= object.namespace.type %> <%= linkify object, owner.relative_path(object.namespace) %> <% end %>

      yard-master/templates/default/method_details/html/source.erb000066400000000000000000000005551265676644000247000ustar00rootroot00000000000000
      <%= "\n\n\n" %><%= h format_lines(object) %>
      # File '<%= h object.file %>'<% if object.line %>, line <%= object.line %><% end %><%= "\n\n" %><%= html_syntax_highlight object.source %>
      yard-master/templates/default/method_details/setup.rb000066400000000000000000000003331265676644000234210ustar00rootroot00000000000000def init sections :header, [:method_signature, T('docstring'), :source] end def source return if owner != object.namespace return if Tags::OverloadTag === object return if object.source.nil? erb(:source) end yard-master/templates/default/method_details/text/000077500000000000000000000000001265676644000227215ustar00rootroot00000000000000yard-master/templates/default/method_details/text/header.erb000066400000000000000000000004051265676644000246420ustar00rootroot00000000000000<%= title_align_right format_object_title(object) %> <%= align_right "(Defined in: #{object.file})" %> <% if object.aliases.size > 0 %> <%= align_right "(Also known as: #{object.aliases.map {|o| o.name(true).to_s }.join(',')})" %> <% end %> <%= yieldall %> yard-master/templates/default/method_details/text/method_signature.erb000066400000000000000000000004641265676644000267600ustar00rootroot00000000000000 <% if object.tags(:overload).size == 1 %> <%= indent wrap(signature(object.tag(:overload))) %> <% elsif object.tags(:overload).size > 1 %> <% object.tags(:overload).each do |overload| %> <%= indent wrap(signature(overload)) %> <% end %> <% else %> <%= indent wrap(signature(object)) %> <% end %> <%= hr %> yard-master/templates/default/method_details/text/setup.rb000066400000000000000000000002751265676644000244120ustar00rootroot00000000000000def init super sections.last.pop end def format_object_title(object) title = "Method: #{object.name(true)}" title += " (#{object.namespace})" if !object.namespace.root? title endyard-master/templates/default/module/000077500000000000000000000000001265676644000202355ustar00rootroot00000000000000yard-master/templates/default/module/dot/000077500000000000000000000000001265676644000210235ustar00rootroot00000000000000yard-master/templates/default/module/dot/child.erb000066400000000000000000000001201265676644000225710ustar00rootroot00000000000000<%= format_path object %> [label="{<%= yieldall.gsub("\n", '') %>}" rank=sink]; yard-master/templates/default/module/dot/dependencies.erb000066400000000000000000000002131265676644000241370ustar00rootroot00000000000000<% object.mixins(:instance).each do |obj| %> <%= format_path object %> -> <%= format_path obj %> [style=dotted arrowType=none]; <% end %>yard-master/templates/default/module/dot/header.erb000066400000000000000000000003021265676644000227400ustar00rootroot00000000000000subgraph cluster_<%= format_path object %> { label = "<%= h(object.name) unless object.path == "" %>"; labelloc=b; <% for obj in @modules %> <%= yieldall :object => obj %> <% end %> } yard-master/templates/default/module/dot/info.erb000066400000000000000000000011161265676644000224470ustar00rootroot00000000000000<%= object.type %> <%= h object.name %> <% if options.full %> | <% object.attributes.each do |scope, list| %> <% list.sort_by {|name, rw| name.to_s }.each do |name, rw| %> <%= uml_visibility(rw.values.compact.first) %> <%= h (rw[:read]||rw[:write]).name(true).gsub(/=$/,'') %> [<%= 'R' if rw[:read] %><%= 'W' if rw[:write] %>]\l <% end %> <% end %> | <% method_listing.each do |obj| %> <%= uml_visibility obj %> <%= h obj.name(true) %> <%= h(" : #{obj.tag(:return).types.first}") if obj.has_tag?(:return) && obj.tag(:return).types && obj.tag(:return).types.size > 0 %>\l <% end %> <% end %>yard-master/templates/default/module/dot/setup.rb000066400000000000000000000005671265676644000225200ustar00rootroot00000000000000def init @modules = object.children.select {|o| o.type == :module } @classes = object.children.select {|o| o.type == :class } sections :child, [:info], :classes, [T('class')], :header, [T('module')], :dependencies end def dependencies return unless options.dependencies erb(:dependencies) end def classes @classes.map {|k| yieldall :object => k }.join("\n") endyard-master/templates/default/module/html/000077500000000000000000000000001265676644000212015ustar00rootroot00000000000000yard-master/templates/default/module/html/attribute_details.erb000066400000000000000000000006441265676644000254070ustar00rootroot00000000000000<% scopes(attr_listing) do |list, scope| %>

      <%= scope.to_s.capitalize %> Attribute Details

      <% list.each_with_index do |meth, i| %> <% rw = meth.attr_info %> <%= yieldall :object => meth, :owner => object, :index => i %> <% end %>
      <% end %> yard-master/templates/default/module/html/attribute_summary.erb000066400000000000000000000004071265676644000254540ustar00rootroot00000000000000<% groups(attr_listing, "Attribute") do |list, name| %>

      <%= name %> collapse

        <% list.each do |meth| %> <%= yieldall :item => meth %> <% end %>
      <% end %> yard-master/templates/default/module/html/box_info.erb000066400000000000000000000023231265676644000234760ustar00rootroot00000000000000
      <% if CodeObjects::ClassObject === object && object.superclass %>
      Inherits:
      <%= linkify object.superclass %> <% if object.superclass.name != :BasicObject %>
      • <%= linkify P(:Object) %>
      • <% object.inheritance_tree.reverse.each_with_index do |obj, i| %> <% end %>
      show all <% end %>
      <% end %> <% [[:class, "Extended by"], [:instance, "Includes"]].each do |scope, name| %> <% if (mix = run_verifier(object.mixins(scope))).size > 0 %>
      <%= name %>:
      <%= mix.sort_by {|o| o.path }.map {|o| linkify(o) }.join(", ") %>
      <% end %> <% end %> <% if (mixed_into = mixed_into(object)).size > 0 %>
      Included in:
      <%= mixed_into.sort_by {|o| o.path }.map {|o| linkify(o) }.join(", ") %>
      <% end %> <% unless object.root? %>
      Defined in:
      <%= erb(:defines) %>
      <% end %>
      yard-master/templates/default/module/html/children.erb000066400000000000000000000004431265676644000234640ustar00rootroot00000000000000

      Defined Under Namespace

      <% @inner.each do |name, list| %> <% if list.size > 0 %> <%= name.to_s.capitalize %>: <%= list.map {|child| linkify(child, child.name(true)) }.join(", ") %> <% end %> <% end %>

      yard-master/templates/default/module/html/constant_summary.erb000066400000000000000000000007651265676644000253110ustar00rootroot00000000000000<% if constant_listing.size > 0 || object.constants.size > 0 %>

      Constant Summary

      <% if constant_listing.size > 0 %>
      <% constant_listing.each do |cnst| %>
      <%= cnst.name %> = <%= yieldall :object => cnst %>
      <%= format_constant cnst.value %>
      <% end %>
      <% end %> <% end %> yard-master/templates/default/module/html/defines.erb000066400000000000000000000002731265676644000233120ustar00rootroot00000000000000<%= object.file ? object.file : '(unknown)' %><% if object.files.size > 1 %>,
      <%= object.files[1..-1].map {|f| f.first }.join(",
      ") %>
      <% end %>yard-master/templates/default/module/html/header.erb000066400000000000000000000005621265676644000231260ustar00rootroot00000000000000

      <%= format_object_title(object) %> <% if object.has_tag?(:abstract) %>Abstract<% end %> <% if object.has_tag?(:deprecated) %>Deprecated<% end %> <% if object.has_tag?(:api) && object.tag(:api).text == 'private' %>Private<% end %>

      yard-master/templates/default/module/html/inherited_attributes.erb000066400000000000000000000011721265676644000261150ustar00rootroot00000000000000<% found_method = false %> <% inherited_attr_list do |superclass, attribs| %> <% if attr_listing.size == 0 && !found_method %>

      Instance Attribute Summary

      <% end %> <% found_method = true %>

      Attributes <%= superclass.type == :class ? 'inherited' : 'included' %> from <%= linkify superclass %>

      <%= attribs.map do |method| name = method.name(true).gsub(/=$/, '') if superclass.type == :module && object.instance_mixins.include?(superclass) name = "##{name}" unless name =~ /^#/ end linkify(method, name) end.join(", ") %>

      <% end %> yard-master/templates/default/module/html/inherited_constants.erb000066400000000000000000000006351265676644000257460ustar00rootroot00000000000000<% found_const = false %> <% inherited_constant_list do |superclass, consts| %> <% if constant_listing.size == 0 && !found_const %>

      Constant Summary

      <% end %> <% found_const = true %>

      Constants <%= superclass.type == :class ? 'inherited' : 'included' %> from <%= linkify superclass %>

      <%= consts.map {|c| linkify c }.join(", ") %>

      <% end %> yard-master/templates/default/module/html/inherited_methods.erb000066400000000000000000000020051265676644000253660ustar00rootroot00000000000000<% found_method = false %> <% object.inheritance_tree(true)[1..-1].each do |superclass| %> <% next if superclass.is_a?(YARD::CodeObjects::Proxy) %> <% next if options.embed_mixins.size > 0 && options.embed_mixins_match?(superclass) != false %> <% meths = prune_method_listing(superclass.meths(:included => false, :inherited => false)) %> <% meths.reject! {|m| object.child(:scope => m.scope, :name => m.name) != nil } %> <% meths.reject! {|m| m.is_alias? || m.is_attribute? } %> <% next if meths.size == 0 %> <% if method_listing.size == 0 && !found_method %>

      Method Summary

      <% end %> <% found_method = true %>

      Methods <%= superclass.type == :class ? 'inherited' : 'included' %> from <%= linkify superclass %>

      <%= meths.sort_by {|o| o.name.to_s }.map do |m| name = m.name(true) name = name.gsub(/^#/,'') if superclass.type == :module && object.class_mixins.include?(superclass) linkify(m, name) end.join(", ") %>

      <% end %>yard-master/templates/default/module/html/item_summary.erb000066400000000000000000000036471265676644000244200ustar00rootroot00000000000000
    • <% if @item.tags(:overload).size == 1 %> <%= signature(@item.tag(:overload), true, !@item.attr_info) %> <% else %> <%= signature(@item, true, false, !@item.attr_info) %> <% end %> <% if @item.aliases.size > 0 %> (also: <%= @item.aliases.map {|o| h(o.name(true)) }.join(", ") %>) <% end %> <% if object != @item.namespace %> <%= @item.namespace.type == :class ? 'inherited' : (@item.scope == :class ? 'extended' : 'included') %> from <%= linkify @item, object.relative_path(@item.namespace) %> <% end %> <% if @item.constructor? %> constructor <% end %> <% if rw = @item.attr_info %> <% if !run_verifier([rw[:read]].compact).empty? && run_verifier([rw[:write]].compact).empty? %> readonly <% end %> <% if !run_verifier([rw[:write]].compact).empty? && run_verifier([rw[:read]].compact).empty? %> writeonly <% end %> <% end %> <% if @item.visibility != :public %><%= @item.visibility %><% end %> <% if @item.has_tag?(:abstract) %>abstract<% end %> <% if @item.has_tag?(:deprecated) %>deprecated<% end %> <% if @item.has_tag?(:api) && @item.tag(:api).text == 'private' %>private<% end %> <% if @item.has_tag?(:deprecated) %> Deprecated. <%= htmlify_line @item.tag(:deprecated).text %> <% else %> <%= htmlify_line docstring_summary(@item) %> <% end %>
    • yard-master/templates/default/module/html/method_details_list.erb000066400000000000000000000005061265676644000257140ustar00rootroot00000000000000<% scopes(method_listing(false)) do |list, scope| %>

      <%= scope.to_s.capitalize %> Method Details

      <% list.each_with_index do |meth, i| %> <%= yieldall :object => meth, :owner => object, :index => i %> <% end %>
      <% end %> yard-master/templates/default/module/html/method_summary.erb000066400000000000000000000005111265676644000247250ustar00rootroot00000000000000<% if method_listing.size > 0 %> <% groups(method_listing) do |list, name| %>

      <%= name %> collapse

        <% list.each do |meth| %> <%= yieldall :item => meth %> <% end %>
      <% end %> <% end %>yard-master/templates/default/module/html/methodmissing.erb000066400000000000000000000007241265676644000245500ustar00rootroot00000000000000

      Dynamic Method Handling

      This class handles dynamic methods through the method_missing method <% if @mm.namespace != object %> in the class <%= linkify @mm, @mm.namespace.path %> <% end %>

      <% if @mm.namespace == object %> <%= yieldall :object => @mm, :index => 0 %> <% end %>
      yard-master/templates/default/module/html/pre_docstring.erb000066400000000000000000000000211265676644000245260ustar00rootroot00000000000000

      Overview

      yard-master/templates/default/module/setup.rb000066400000000000000000000122301265676644000217200ustar00rootroot00000000000000include Helpers::ModuleHelper def init sections :header, :box_info, :pre_docstring, T('docstring'), :children, :constant_summary, [T('docstring')], :inherited_constants, :attribute_summary, [:item_summary], :inherited_attributes, :method_summary, [:item_summary], :inherited_methods, :methodmissing, [T('method_details')], :attribute_details, [T('method_details')], :method_details_list, [T('method_details')] end def pre_docstring return if object.docstring.blank? erb(:pre_docstring) end def children @inner = [[:modules, []], [:classes, []]] object.children.each do |child| @inner[0][1] << child if child.type == :module @inner[1][1] << child if child.type == :class end @inner.map! {|v| [v[0], run_verifier(v[1].sort_by {|o| o.name.to_s })] } return if (@inner[0][1].size + @inner[1][1].size) == 0 erb(:children) end def methodmissing mms = object.meths(:inherited => true, :included => true) return unless @mm = mms.find {|o| o.name == :method_missing && o.scope == :instance } erb(:methodmissing) end def method_listing(include_specials = true) return @smeths ||= method_listing.reject {|o| special_method?(o) } unless include_specials return @meths if @meths @meths = object.meths(:inherited => false, :included => !options.embed_mixins.empty?) if options.embed_mixins.size > 0 @meths = @meths.reject {|m| options.embed_mixins_match?(m.namespace) == false } end @meths = sort_listing(prune_method_listing(@meths)) @meths end def special_method?(meth) return true if meth.name(true) == '#method_missing' return true if meth.constructor? false end def attr_listing return @attrs if @attrs @attrs = [] object.inheritance_tree(true).each do |superclass| next if superclass.is_a?(CodeObjects::Proxy) next if options.embed_mixins.size > 0 && options.embed_mixins_match?(superclass) == false [:class, :instance].each do |scope| superclass.attributes[scope].each do |name, rw| attr = prune_method_listing([rw[:read], rw[:write]].compact, false).first @attrs << attr if attr end end break if options.embed_mixins.empty? end @attrs = sort_listing(@attrs) end def constant_listing return @constants if @constants @constants = object.constants(:included => false, :inherited => false) @constants += object.cvars @constants = run_verifier(@constants) @constants end def sort_listing(list) list.sort_by {|o| [o.scope.to_s, o.name.to_s.downcase] } end def inherited_attr_list(&block) object.inheritance_tree(true)[1..-1].each do |superclass| next if superclass.is_a?(YARD::CodeObjects::Proxy) next if options.embed_mixins.size > 0 && options.embed_mixins_match?(superclass) != false attribs = superclass.attributes[:instance] attribs = attribs.reject {|name, rw| object.child(:scope => :instance, :name => name) != nil } attribs = attribs.sort_by {|args| args.first.to_s }.map {|n, m| m[:read] || m[:write] } attribs = prune_method_listing(attribs, false) yield superclass, attribs if attribs.size > 0 end end def inherited_constant_list(&block) object.inheritance_tree(true)[1..-1].each do |superclass| next if superclass.is_a?(YARD::CodeObjects::Proxy) next if options.embed_mixins.size > 0 && options.embed_mixins_match?(superclass) != false consts = superclass.constants(:included => false, :inherited => false) consts = consts.reject {|const| object.child(:type => :constant, :name => const.name) != nil } consts = consts.sort_by {|const| const.name.to_s } consts = run_verifier(consts) yield superclass, consts if consts.size > 0 end end def docstring_full(obj) docstring = "" if obj.tags(:overload).size == 1 && obj.docstring.empty? docstring = obj.tag(:overload).docstring else docstring = obj.docstring end if docstring.summary.empty? && obj.tags(:return).size == 1 && obj.tag(:return).text docstring = Docstring.new(obj.tag(:return).text.gsub(/\A([a-z])/) {|x| x.upcase }.strip) end docstring end def docstring_summary(obj) docstring_full(obj).summary end def groups(list, type = "Method") if groups_data = object.groups list.each {|m| groups_data |= [m.group] if m.group && owner != m.namespace } others = list.select {|m| !m.group || !groups_data.include?(m.group) } groups_data.each do |name| items = list.select {|m| m.group == name } yield(items, name) unless items.empty? end else others = [] group_data = {} list.each do |meth| if meth.group (group_data[meth.group] ||= []) << meth else others << meth end end group_data.each {|group, items| yield(items, group) unless items.empty? } end scopes(others) {|items, scope| yield(items, "#{scope.to_s.capitalize} #{type} Summary") } end def scopes(list) [:class, :instance].each do |scope| items = list.select {|m| m.scope == scope } yield(items, scope) unless items.empty? end end def mixed_into(object) unless globals.mixed_into globals.mixed_into = {} list = run_verifier Registry.all(:class, :module) list.each {|o| o.mixins.each {|m| (globals.mixed_into[m.path] ||= []) << o } } end globals.mixed_into[object.path] || [] end yard-master/templates/default/module/text/000077500000000000000000000000001265676644000212215ustar00rootroot00000000000000yard-master/templates/default/module/text/children.erb000066400000000000000000000003301265676644000234770ustar00rootroot00000000000000Defined Under Namespace: ------------------------ <% @inner.each do |name, list| %> <% if list.size > 0 %> <% text = list.map {|c| c.name }.join(", ") + " (#{name})" %> <%= indent(wrap(text)) %> <% end %> <% end %>yard-master/templates/default/module/text/class_meths_list.erb000066400000000000000000000002161265676644000252520ustar00rootroot00000000000000<% if class_meths.size > 0 %> Class methods: -------------- <%= indent wrap(class_meths.map {|o| o.name.to_s }.join(", "), 68) %> <% end %>yard-master/templates/default/module/text/extends.erb000066400000000000000000000002071265676644000233640ustar00rootroot00000000000000<% if object.mixins(:class).size > 0 %> Extended by: ------------ <%= indent wrap(object.mixins(:class).join(", "), 68) %> <% end %>yard-master/templates/default/module/text/header.erb000066400000000000000000000001231265676644000231370ustar00rootroot00000000000000<%= title_align_right format_object_title(object) %> <%= yieldall %> <%= hr %> yard-master/templates/default/module/text/includes.erb000066400000000000000000000002071265676644000235200ustar00rootroot00000000000000<% if object.mixins(:instance).size > 0 %> Includes: --------- <%= indent wrap(object.mixins(:instance).join(", "), 68) %> <% end %>yard-master/templates/default/module/text/instance_meths_list.erb000066400000000000000000000002321265676644000257470ustar00rootroot00000000000000<% if instance_meths.size > 0 %> Instance methods: ----------------- <%= indent wrap(instance_meths.map {|o| o.name.to_s }.join(", "), 68) %> <% end %>yard-master/templates/default/module/text/setup.rb000066400000000000000000000004571265676644000227140ustar00rootroot00000000000000def init sections :header, [T('docstring')], :children, :includes, :extends, :class_meths_list, :instance_meths_list end def class_meths @classmeths ||= method_listing.select {|o| o.scope == :class } end def instance_meths @instmeths ||= method_listing.select {|o| o.scope == :instance } endyard-master/templates/default/onefile/000077500000000000000000000000001265676644000203715ustar00rootroot00000000000000yard-master/templates/default/onefile/html/000077500000000000000000000000001265676644000213355ustar00rootroot00000000000000yard-master/templates/default/onefile/html/files.erb000066400000000000000000000001511265676644000231260ustar00rootroot00000000000000<% @files.each do |file| %> <% @file = file %>

      <%= file.title %>

      <%= diskfile %> <% end %>yard-master/templates/default/onefile/html/headers.erb000066400000000000000000000002001265676644000234320ustar00rootroot00000000000000 yard-master/templates/default/onefile/html/layout.erb000066400000000000000000000007501265676644000233460ustar00rootroot00000000000000 <%= @title %> <%= erb(:headers) %>

      <%= @title %>

      <%= yieldall %>
      <%= erb(:footer) %> yard-master/templates/default/onefile/html/readme.erb000066400000000000000000000001071265676644000232620ustar00rootroot00000000000000
      <%= htmlify(parse_top_comments_from_file) %>
      yard-master/templates/default/onefile/html/setup.rb000066400000000000000000000030001265676644000230130ustar00rootroot00000000000000include T('default/layout/html') include YARD::Parser::Ruby::Legacy def init override_serializer @object = YARD::Registry.root @files.shift @objects.delete(YARD::Registry.root) @objects.unshift(YARD::Registry.root) sections :layout, [:readme, :files, :all_objects] end def all_objects @objects.map {|obj| obj.format(options) }.join("\n") end def layout fulldoc = Object.new.extend(T('fulldoc')) layout = Object.new.extend(T('layout')) @css_data = layout.stylesheets.map {|sheet| read_asset(sheet) }.join("\n") @js_data = layout.javascripts.map {|script| read_asset(script) }.join("") erb(:layout) end def read_asset(file) return unless file = T('fulldoc').find_file(file) data = File.read(file) superfile = self.class.find_nth_file('fulldoc', 2) data.gsub!('{{{__super__}}}', superfile ? IO.read(superfile) : "") data end private def parse_top_comments_from_file return unless @readme return @readme.contents unless @readme.filename =~ /\.rb$/ data = "" tokens = TokenList.new(@readme.contents) tokens.each do |token| break unless token.is_a?(RubyToken::TkCOMMENT) || token.is_a?(RubyToken::TkNL) data << (token.text[/\A#\s{0,1}(.*)/, 1] || "\n") end YARD::Docstring.new(data) end def override_serializer return if @serializer.nil? class << @serializer def serialize(object, data) return unless object == 'index.html' super end def serialized_path(object) return object if object.is_a?(String) return 'index.html' end end endyard-master/templates/default/root/000077500000000000000000000000001265676644000177335ustar00rootroot00000000000000yard-master/templates/default/root/dot/000077500000000000000000000000001265676644000205215ustar00rootroot00000000000000yard-master/templates/default/root/dot/child.erb000066400000000000000000000001331265676644000222730ustar00rootroot00000000000000<% if inner = yieldall.gsub("\n", '') %> Root [label="{<%= inner %>}" rank=sink]; <% end %>yard-master/templates/default/root/dot/setup.rb000066400000000000000000000001011265676644000221760ustar00rootroot00000000000000include T('default/module/dot') def format_path(object) "" endyard-master/templates/default/root/html/000077500000000000000000000000001265676644000206775ustar00rootroot00000000000000yard-master/templates/default/root/html/setup.rb000066400000000000000000000000401265676644000223560ustar00rootroot00000000000000include T('default/module/html')yard-master/templates/default/tags/000077500000000000000000000000001265676644000177065ustar00rootroot00000000000000yard-master/templates/default/tags/html/000077500000000000000000000000001265676644000206525ustar00rootroot00000000000000yard-master/templates/default/tags/html/example.erb000066400000000000000000000006011265676644000227740ustar00rootroot00000000000000<% if object.has_tag?(:example) %>

      Examples:

      <% object.tags(:example).each do |tag| %> <% unless tag.name.empty? %>

      <%= htmlify_line(tag.name) %>

      <% end %>
      <%= html_syntax_highlight(tag.text) %>
      <% end %>
      <% end %>yard-master/templates/default/tags/html/index.erb000066400000000000000000000000531265676644000224510ustar00rootroot00000000000000
      <%= yieldall %>
      yard-master/templates/default/tags/html/option.erb000066400000000000000000000016051265676644000226560ustar00rootroot00000000000000<% if object.has_tag?(:option) %> <% object.parameters.each do |param, default| %> <% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s.sub(/^\*+/, '') } %> <% next if tags.empty? %>

      Options Hash (<%= param %>):

        <% for tag in tags %>
      • <%= tag.pair.name %> <%= format_types(tag.pair.types || ['Object']) %> <% if tag.pair.defaults %> — default: <%= tag.pair.defaults.map {|t| "#{h t}" }.join(", ") %> <% end %> <% if tag.pair.text && tag.pair.text =~ /\S/ %> — <%= htmlify_line(tag.pair.text) %> <% end %>
      • <% end %>
      <% end %> <% end %> yard-master/templates/default/tags/html/overload.erb000066400000000000000000000010461265676644000231600ustar00rootroot00000000000000<% if object.tags(:overload).size == 1 %> <%= yieldall :object => object.tag(:overload) %> <% elsif object.has_tag?(:overload) && object.tags(:overload).any? {|o| !o.docstring.blank? } %>

      Overloads:

        <% object.tags(:overload).each do |overload| %> <% next if overload.docstring.blank? %>
      • <%= signature(overload, false, false) %> <%= yieldall :object => overload %>
      • <% end %>
      <% end %>yard-master/templates/default/tags/html/see.erb000066400000000000000000000003171265676644000221210ustar00rootroot00000000000000<% if object.has_tag?(:see) %>

      See Also:

        <% for tag in object.tags(:see) %>
      • <%= linkify(tag.name, tag.text) %>
      • <% end %>
      <% end %>yard-master/templates/default/tags/html/tag.erb000066400000000000000000000013761265676644000221260ustar00rootroot00000000000000

      <%= @label ? @label : YARD::Tags::Library.labels[@name] %>:

        <% object.tags(@name).each do |tag| %>
      • <% unless @no_names %> <%= h tag.name %> <% end %> <% unless @no_types %> <%= format_types(tag.types) %> <% end %> <% if @name == :param && (o=object.parameters.assoc(tag.name.to_s)) && o[1] %> (defaults to: <%= h o[1] %>) <% end %> <% if tag.text && !tag.text.empty? %> <% unless (@no_types || tag.types.nil? || tag.types.empty?) && @no_names %>—<% end %> <%= htmlify_line(tag.text) %> <% end %>
      • <% end %>
      yard-master/templates/default/tags/setup.rb000066400000000000000000000024501265676644000213740ustar00rootroot00000000000000def init tags = Tags::Library.visible_tags - [:abstract, :deprecated, :note, :todo] create_tag_methods(tags - [:example, :option, :overload, :see]) sections :index, tags.map {|t| t.to_s.gsub('.', '_').to_sym } sections.any(:overload).push(T('docstring')) end def return if object.type == :method return if object.constructor? return if object.tags(:return).size == 1 && object.tag(:return).types == ['void'] end tag(:return) end def param tag(:param) if object.type == :method end private def tag(name, opts = nil) return unless object.has_tag?(name) opts ||= options_for_tag(name) @no_names = true if opts[:no_names] @no_types = true if opts[:no_types] @name = name out = erb('tag') @no_names, @no_types = nil, nil out end def create_tag_methods(tags) tags.each do |tag| tag_meth = tag.to_s.gsub('.', '_') next if respond_to?(tag_meth) instance_eval(<<-eof, __FILE__, __LINE__ + 1) def #{tag_meth}; tag(#{tag.inspect}) end eof end end def options_for_tag(tag) opts = {:no_types => true, :no_names => true} case Tags::Library.factory_method_for(tag) when :with_types opts[:no_types] = false when :with_types_and_name opts[:no_types] = false opts[:no_names] = false when :with_name opts[:no_names] = false end opts end yard-master/templates/default/tags/text/000077500000000000000000000000001265676644000206725ustar00rootroot00000000000000yard-master/templates/default/tags/text/example.erb000066400000000000000000000004301265676644000230140ustar00rootroot00000000000000<% if object.has_tag?(:example) %> Examples: --------- <% object.tags(:example).each_with_index do |tag, i| %> <%= indent("# " + tag.name + "\n") if tag.name %> <%= indent(format_source(tag.text)) + "\n" %> <%= "\n" if i < object.tags(:example).size - 1 %> <% end %> <% end %> yard-master/templates/default/tags/text/index.erb000066400000000000000000000000201265676644000224630ustar00rootroot00000000000000<%= yieldall %> yard-master/templates/default/tags/text/option.erb000066400000000000000000000011271265676644000226750ustar00rootroot00000000000000<% if object.has_tag?(:option) %> <% object.parameters.each do |param, default| %> <% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s } %> <% next if tags.empty? %> Options Hash (<%= param %>): --------------<%= hr(param.to_s.length) %>-- <% for tag in tags %> <% text = "" %> <% text += format_types(tag.pair.types || ['Object']) %> <% text += " " + tag.pair.name.to_s %> <% if tag.pair.defaults %> <% text += " - default: " + tag.pair.defaults.join(", ") %> <% end %> <% text += " - " + tag.pair.text if tag.pair.text %> <%= indent(wrap(text)) %> <% end %> <% end %> <% end %> yard-master/templates/default/tags/text/overload.erb000066400000000000000000000005731265676644000232040ustar00rootroot00000000000000<% if object.tags(:overload).size == 1 %> <%= wrap(yieldall(:object => object.tag(:overload))) %> <% elsif object.has_tag?(:overload) %> Overloads: ---------- <% object.tags(:overload).each do |overload| %> <% if overload.tags.size > 0 %> <%= hr %> <%= indent signature(overload) %> <%= hr %> <%= indent(wrap(yieldall(:object => overload))) %> <% end %> <% end %> <% end %> yard-master/templates/default/tags/text/see.erb000066400000000000000000000003421265676644000221370ustar00rootroot00000000000000<% if object.has_tag?(:see) %> See Also: --------- <% for tag in object.tags(:see) %> <% text = "- " + tag.name %> <% text += " - " + tag.text if tag.text && !tag.text.empty? %> <%= indent(wrap(text)) %> <% end %> <% end %> yard-master/templates/default/tags/text/tag.erb000066400000000000000000000006561265676644000221460ustar00rootroot00000000000000<% title = @label ? @label : YARD::Tags::Library.labels[@name] %> <%= title %>: <%= hr(title.length) %>- <% object.tags(@name).each do |tag| %> <% text = "" %> <% text += format_types(tag.types) + " " unless @no_types || tag.types.nil? %> <% text += tag.name.to_s + " " unless @no_names %> <% text += "- " unless @no_names && @no_types %> <% text += tag.text if tag.text && !tag.text.empty? %> <%= indent wrap(text) %> <% end %>yard-master/templates/guide/000077500000000000000000000000001265676644000164215ustar00rootroot00000000000000yard-master/templates/guide/class/000077500000000000000000000000001265676644000175265ustar00rootroot00000000000000yard-master/templates/guide/class/html/000077500000000000000000000000001265676644000204725ustar00rootroot00000000000000yard-master/templates/guide/class/html/setup.rb000066400000000000000000000000371265676644000221570ustar00rootroot00000000000000include T('guide/module/html') yard-master/templates/guide/docstring/000077500000000000000000000000001265676644000204155ustar00rootroot00000000000000yard-master/templates/guide/docstring/html/000077500000000000000000000000001265676644000213615ustar00rootroot00000000000000yard-master/templates/guide/docstring/html/setup.rb000066400000000000000000000000441265676644000230440ustar00rootroot00000000000000include T('default/docstring/html') yard-master/templates/guide/fulldoc/000077500000000000000000000000001265676644000200515ustar00rootroot00000000000000yard-master/templates/guide/fulldoc/html/000077500000000000000000000000001265676644000210155ustar00rootroot00000000000000yard-master/templates/guide/fulldoc/html/css/000077500000000000000000000000001265676644000216055ustar00rootroot00000000000000yard-master/templates/guide/fulldoc/html/css/style.css000066400000000000000000000122311265676644000234560ustar00rootroot00000000000000body { color: #3e4349; font-family: Georgia, serif; font-size: 17px; margin: 0; } h1, h2, h3, h4, h5, h6 { font-weight: normal; color: #000; font-family: Georgia, serif; } h1 { color: #040; } h2 { color: #060; } h3 { color: #070; } h4 { color: #080; } h5 { color: #090; } #sidebar h2 { color: #2f2; } strong { color: #000; } .object_link, tt, code { font-family: 'Consolas', 'BitStream Vera Sans Mono', monospace; font-size: 14px; } .method_header .path, .module_header .path { font-family: 'Consolas', 'BitStream Vera Sans Mono', monospace; } .method_header .path.space, .module_header .path.space { padding-left: 5px; } .method_header { font-size: 0.95em; } .method_body { margin-left: 2em; } .tags h3, .tags h4 { font-size: 0.9em; font-weight: bold; color: #3e4349; } .tags .param .name { font-style: italic; } .tags .option .name { font-family: monospace; color: #000; font-size: 0.8em; } .tags .option .type, .tags .param .type { font-size: 10px; vertical-align: super; } .tags .option .type tt, .tags .param .type tt, .tags .option .type tt .object_link, .tags .param .type tt .object_link { font-size: 10px; } .module_methods { margin-left: 2em; } .method_header .since, .module_header .since { font-size: 0.75em; color: #888; vertical-align: super; } ul { list-style: square; } .inline { display: inline; } .inline p:first-child { display: inline; } .inline p { font-family: Georgia, serif; font-size: 16px; color: #3e4349; } #filecontents table, .docstring table { border-collapse: collapse; } #filecontents table th, #filecontents table td, .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } #filecontents table tr:nth-child(odd), .docstring table tr:nth-child(odd) { background: #eee; } #filecontents table tr:nth-child(even), .docstring table tr:nth-child(even) { background: #fff; } #filecontents table th, .docstring table th { background: #fff; } .docstring .note { margin: 1em 0; } .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } .docstring h1 { font-size: 1.2em; } .docstring h2 { font-size: 1.1em; } .docstring h3 { font-size: 1.1em; } .docstring h4 { font-size: 1.0em; font-weight: bold; } .docstring h5 { font-size: 1.0em; font-weight: bold; } .docstring h6 { font-size: 1.0em; font-weight: bold; } #filecontents strong { font-weight: normal; color: #000; } .readonly { font-size: 0.75em; color: #888; vertical-align: super; } .rdoc-term { padding-right: 25px; font-weight: bold; } .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } #page { width: 940px; margin: 0px auto; } #top_nav { background: #7d0; padding: 8px 12px; } #inner_nav { width: 940px; margin: 0px auto; } #inner_nav a { border: 0; text-decoration: none; color: #777; } #inner_nav a:hover { color: #222; } #top_nav .links { display: block; float: right; } #content { margin-left: 30px; width: 660px; float: left; } #sidebar { float: left; width: 200px; float: left; padding: 18px 10px; padding-top: 0; } #sidebar h2 { font-weight: 100; color: #3e4349; font-size: 1.45em; } #sidebar ol { padding-left: 16px; margin-left: 0; list-style: square; } #sidebar a { color: #468; text-decoration: none; } #sidebar a:hover { color: #000; background: #8e0; padding: 4px; } #sidebar ol.top { padding-left: 0; margin-left: 0; list-style: none; } #sidebar a { font-size: 0.9em; } #footer { margin: 0 auto; width: 940px; text-align: center; margin-top: 30px; padding: 20px 0; color: #888; font-size: 0.8em; border-top: 1px dotted #bbb; } #footer a { color: #444; } #links strong { font-size: 0.95em; font-weight: normal; color: #000; } a { color: #268; text-decoration: none; } a:hover { color: #6ae; } /* syntax highlighting */ .source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; } #filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; } #filecontents pre.code, .docstring pre.code { display: block; } .source_code .lines { padding-right: 12px; color: #555; text-align: right; } #filecontents pre.code, .docstring pre.code, .tags pre.example { font-size: 0.9em; padding: 7px 30px; margin: 15px -30px; margin-left: -30px; background: #eee; line-height: 1.3em; font-family: 'Consolas', 'BitStream Vera Sans Mono', monospace; } pre.code { color: #3e4349; } pre.code .info.file { color: #555; } pre.code .val { color: #036A07; } pre.code .tstring_content, pre.code .heredoc_beg, pre.code .heredoc_end, pre.code .qwords_beg, pre.code .qwords_end, pre.code .tstring, pre.code .dstring { color: #036A07; } pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s, pre.code .rubyid_to_sym, pre.code .rubyid_to_f, pre.code .dot + pre.code .id, pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; } pre.code .comment { color: #0066FF; } pre.code .const, pre.code .constant { color: #585CF6; } pre.code .symbol { color: #C5060B; } pre.code .kw, pre.code .label, pre.code .rubyid_require, pre.code .rubyid_extend, pre.code .rubyid_include { color: #0000FF; } pre.code .ivar { color: #318495; } pre.code .gvar, pre.code .rubyid_backref, pre.code .rubyid_nth_ref { color: #6D79DE; } pre.code .regexp, .dregexp { color: #036A07; } pre.code a { border-bottom: 1px dotted #bbf; } yard-master/templates/guide/fulldoc/html/js/000077500000000000000000000000001265676644000214315ustar00rootroot00000000000000yard-master/templates/guide/fulldoc/html/js/app.js000066400000000000000000000021161265676644000225470ustar00rootroot00000000000000function generateTOC() { if ($('#filecontents').length == 0) return; var _toc = $('
        '); var show = false; var toc = _toc; var counter = 0; var tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']; for (i in tags) { tags[i] = '#filecontents > ' + tags[i] } var lastTag = parseInt(tags[0][1]); $(tags.join(', ')).each(function() { if (this.id == "filecontents") return; show = true; var thisTag = parseInt(this.tagName[1]); if (this.id.length == 0) { var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_'); if ($('#' + proposedId).length > 0) proposedId += counter++; this.id = proposedId; } if (thisTag > lastTag) { for (var i = 0; i < thisTag - lastTag; i++) { var tmp = $('
          '); toc.append(tmp); toc = tmp; } } if (thisTag < lastTag) { for (var i = 0; i < lastTag - thisTag; i++) toc = toc.parent(); } toc.append('
        1. ' + $(this).text() + '
        2. '); lastTag = thisTag; }); if (!show) return; $('#toc').append() $('#toc').append(_toc); } yard-master/templates/guide/fulldoc/html/setup.rb000066400000000000000000000034261265676644000225070ustar00rootroot00000000000000include T('default/fulldoc/html') module OverrideFileLinks def resolve_links(text) result = '' log.enter_level(Logger::ERROR) { result = super } result end def url_for(object, *args) if CodeObjects::ExtraFileObject === object && object == options.readme 'index.html' else super end end end Template.extra_includes << OverrideFileLinks def init class << options.serializer def serialized_path(object) if CodeObjects::ExtraFileObject === object super.sub(/^file\./, '').downcase else super end end end if options.serializer return serialize_onefile if options.onefile generate_assets options.delete(:objects) options.files.each {|file| serialize_file(file) } serialize_file(options.readme) end def generate_assets %w( js/jquery.js js/app.js css/style.css css/common.css ).each do |file| asset(file, file(file, true)) end end def serialize_file(file) index = options.files.index(file) outfile = file.name.downcase + '.html' options.file = file if file.attributes[:namespace] options.object = Registry.at(file.attributes[:namespace]) end options.object ||= Registry.root if file == options.readme serialize_index(options) else serialize_index(options) if !options.readme && index == 0 Templates::Engine.with_serializer(outfile, options.serializer) do T('layout').run(options) end end options.delete(:file) end def serialize_onefile layout = Object.new.extend(T('layout')) options.css_data = layout.stylesheets.map {|sheet| file(sheet,true) }.join("\n") options.js_data = layout.javascripts.map {|script| file(script,true) }.join("") Templates::Engine.with_serializer('onefile.html', options.serializer) do T('onefile').run(options) end end yard-master/templates/guide/layout/000077500000000000000000000000001265676644000177365ustar00rootroot00000000000000yard-master/templates/guide/layout/html/000077500000000000000000000000001265676644000207025ustar00rootroot00000000000000yard-master/templates/guide/layout/html/layout.erb000066400000000000000000000041541265676644000227150ustar00rootroot00000000000000 <%= erb(:headers) %>
          <% if options.readme != options.file && options.title %> <%= options.title %>: <%= @page_title %> <% links = [@prevfile ? link_file(@prevfile, '←') : nil, link_file('index.html', '↑'), @nextfile ? link_file(@nextfile, '→') : nil].compact %> <%= links.join(" ") %> <% end %>
          <%= yieldall %>
          <%= erb(:footer) %> yard-master/templates/guide/layout/html/setup.rb000066400000000000000000000010711265676644000223660ustar00rootroot00000000000000include T('default/layout/html') def init super @topfile = options.readme if options.files if @topfile @toptitle = @topfile.attributes[:title] || "Documentation Overview" end if @file == options.readme @page_title = options.title else @page_title = @file.title end index = options.files.index(@file) if index @prevfile = index > 0 ? (options.files[index - 1] || options.readme) : nil @nextfile = options.files[index + 1] end end end def diskfile options.including_object = @object super end yard-master/templates/guide/method/000077500000000000000000000000001265676644000177015ustar00rootroot00000000000000yard-master/templates/guide/method/html/000077500000000000000000000000001265676644000206455ustar00rootroot00000000000000yard-master/templates/guide/method/html/header.erb000066400000000000000000000024331265676644000225710ustar00rootroot00000000000000
          <% if options.in_module %> <% if object.constructor? %> self.new(<%= format_args(object) %>) <%= format_block(object) %> <% else %> <%= object.scope == :class ? 'self.' : '' %><%= object.is_attribute? ? object.name.to_s.sub(/=$/, '') : object.name %><% if object.is_attribute? %> <% rw = object.attr_info %> <% if rw && rw[:read] && !rw[:write] %>readonly <% elsif rw && !rw[:read] && rw[:write] %>writeonly <% end %> <% else %>(<%= format_args(object) %>) <%= format_block(object) %><% end %> <% end %> <% else %> def <%= options.including_object.relative_path(object.namespace) %><%= object.send(:sep) %><%= object.name %>(<%= format_args(object) %>) <%= format_block(object) %> <% end %> <% if object.has_tag?(:since) && object.namespace.tag(:since) != object.tag(:since) %>since <%= object.tag(:since).text %><% end %>
          <%= yieldall %>
          yard-master/templates/guide/method/html/setup.rb000066400000000000000000000007711265676644000223370ustar00rootroot00000000000000def init sections :header, [T('docstring')] end def format_args(object) return if object.parameters.nil? params = object.parameters if object.has_tag?(:yield) || object.has_tag?(:yieldparam) params.reject! do |param| param[0].to_s[0,1] == "&" && !object.tags(:param).any? {|t| t.name == param[0][1..-1] } end end unless params.empty? args = params.map {|n, v| v ? "#{h n} = #{h v}" : "" + n.to_s + "" }.join(", ") args else "" end end yard-master/templates/guide/module/000077500000000000000000000000001265676644000177065ustar00rootroot00000000000000yard-master/templates/guide/module/html/000077500000000000000000000000001265676644000206525ustar00rootroot00000000000000yard-master/templates/guide/module/html/header.erb000066400000000000000000000005531265676644000225770ustar00rootroot00000000000000
          <%= object.type %> <%= object.namespace == Registry.root ? '' : object.namespace.path + '::' %><%= object.name %> <% if object.has_tag?(:since) %>since <%= object.tag(:since).text %><% end %>
          <%= yieldall %>
          yard-master/templates/guide/module/html/method_list.erb000066400000000000000000000002411265676644000236540ustar00rootroot00000000000000
          <% @meths.each_with_index do |meth, i| %> <%= yieldall(:object => meth, :index => i, :in_module => true) %> <% end %>
          yard-master/templates/guide/module/html/setup.rb000066400000000000000000000013261265676644000223410ustar00rootroot00000000000000include Helpers::ModuleHelper def init sections :header, [T('docstring')], :method_list, [T('method')] end def method_list @meths = object.meths(:inherited => false, :included => false) cons = @meths.find {|meth| meth.constructor? } @meths = @meths.reject {|meth| special_method?(meth) } @meths = sort_listing(prune_method_listing(@meths, false)) @meths.unshift(cons) if cons erb(:method_list) end def sort_listing(list) list.sort_by {|o| [o.scope.to_s, o.name.to_s.downcase] } end def special_method?(meth) return true if meth.writer? && meth.attr_info[:read] return true if meth.name(true) == 'new' return true if meth.name(true) == '#method_missing' return true if meth.constructor? false end yard-master/templates/guide/onefile/000077500000000000000000000000001265676644000200425ustar00rootroot00000000000000yard-master/templates/guide/onefile/html/000077500000000000000000000000001265676644000210065ustar00rootroot00000000000000yard-master/templates/guide/onefile/html/files.erb000066400000000000000000000001151265676644000225770ustar00rootroot00000000000000<% @files.each do |file| %> <% @file = file %> <%= diskfile %> <% end %> yard-master/templates/guide/onefile/html/setup.rb000066400000000000000000000001231265676644000224670ustar00rootroot00000000000000include T('default/onefile/html') def init sections :layout, [:toc, :files] end yard-master/templates/guide/onefile/html/toc.erb000066400000000000000000000001301265676644000222570ustar00rootroot00000000000000

          <%= @title %>

          Table of Contents

          yard-master/templates/guide/tags/000077500000000000000000000000001265676644000173575ustar00rootroot00000000000000yard-master/templates/guide/tags/html/000077500000000000000000000000001265676644000203235ustar00rootroot00000000000000yard-master/templates/guide/tags/html/setup.rb000066400000000000000000000002141265676644000220050ustar00rootroot00000000000000include T('default/tags/html') def init super [:since, :see, :return].each do |section| sections[:index].delete(section) end end yard-master/yard.gemspec000066400000000000000000000021201265676644000156250ustar00rootroot00000000000000require File.expand_path('../lib/yard/version', __FILE__) Gem::Specification.new do |s| s.name = "yard" s.summary = "Documentation tool for consistent and usable documentation in Ruby." s.description = <<-eof YARD is a documentation generation tool for the Ruby programming language. It enables the user to generate consistent, usable documentation that can be exported to a number of formats very easily, and also supports extending for custom Ruby constructs such as custom class level definitions. eof s.version = YARD::VERSION s.date = Time.now.strftime('%Y-%m-%d') s.author = "Loren Segal" s.email = "lsegal@soen.ca" s.homepage = "http://yardoc.org" s.platform = Gem::Platform::RUBY s.files = Dir.glob("{docs,bin,lib,spec,templates,benchmarks}/**/*") + ['CHANGELOG.md', 'LICENSE', 'LEGAL', 'README.md', 'Rakefile', '.yardopts', __FILE__] s.require_paths = ['lib'] s.executables = ['yard', 'yardoc', 'yri'] s.has_rdoc = 'yard' s.license = 'MIT' if s.respond_to?(:license=) end