Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor YARD issues #2

Merged
merged 2 commits into from Mar 18, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/coercible.rb
Expand Up @@ -3,6 +3,15 @@ module Coercible

UnsupportedCoercion = Class.new(StandardError)

# Test for rubinius platform
#
# @return [true]
# if running under rubinius
#
# @return [false]
# otherwise
#
# @api private
def self.rbx?
@is_rbx ||= defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
end
Expand Down
4 changes: 4 additions & 0 deletions lib/coercible/coercer/configurable.rb
Expand Up @@ -48,6 +48,10 @@ def config_name
name.downcase.split('::').last.to_sym
end

# Return configuration class
#
# @return [Class:Configuration]
#
# @api private
def configuration_class
Configuration
Expand Down
9 changes: 9 additions & 0 deletions lib/coercible/coercer/object.rb
Expand Up @@ -31,6 +31,9 @@ def initialize(coercers = Coercer.new)

# Inspect the coercer object
#
# @example
# coercer[Object].inspect # => "<Coercer::Object primitive=Object>"
#
# @return [String]
#
# @api public
Expand Down Expand Up @@ -121,6 +124,12 @@ def to_integer(value)

# Return if the value was successfuly coerced
#
# @example when coercion was successful
# coercer[String].coerced?(1) # => true
#
# @example when coercion was NOT successful
# coercer[String].coerced?("foo") # => false
#
# @return [TrueClass,FalseClass]
#
# @api public
Expand Down
6 changes: 6 additions & 0 deletions lib/support/options.rb
Expand Up @@ -4,6 +4,12 @@ module Coercible
module Options
Undefined = Class.new.freeze

# Hook called when descendant was extended
#
# @param [Class|Module] descendant
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want:

@param [Class,Module] descendant

When in doubt, you can paste the type signature into the form at http://yardoc.org/types.html to see how YARD interprets it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkubb Thx I always forget this. No doubt involved ;)

#
# @return [undefined]
#
# @api private
def self.extended(descendant)
descendant.extend(DescendantsTracker)
Expand Down