Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix some minor YARD issues #2

Merged
merged 2 commits into from

2 participants

@mbj
Collaborator

No description provided.

lib/support/options.rb
@@ -4,6 +4,12 @@ module Coercible
module Options
Undefined = Class.new.freeze
+ # Hook called when descendant was extended
+ #
+ # @param [Class|Module] descendant
@dkubb Collaborator
dkubb added a note

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.

@mbj Collaborator
mbj added a note

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dkubb dkubb merged commit ae26d67 into solnic:master

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 18, 2013
  1. @mbj

    Bring back YARD coverage to 100%

    mbj authored
  2. @mbj

    Fix yard type syntax

    mbj authored
This page is out of date. Refresh to see the latest.
View
9 lib/coercible.rb
@@ -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
View
4 lib/coercible/coercer/configurable.rb
@@ -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
View
9 lib/coercible/coercer/object.rb
@@ -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
@@ -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
View
6 lib/support/options.rb
@@ -4,6 +4,12 @@ module Coercible
module Options
Undefined = Class.new.freeze
+ # Hook called when descendant was extended
+ #
+ # @param [Class,Module] descendant
+ #
+ # @return [undefined]
+ #
# @api private
def self.extended(descendant)
descendant.extend(DescendantsTracker)
Something went wrong with that request. Please try again.