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

Already on GitHub? Sign in to your account

Fix some minor YARD issues #2

Merged
merged 2 commits into from Mar 18, 2013
Jump to file or symbol
Failed to load files and symbols.
+28 −0
Split
View
@@ -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
@@ -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
@@ -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
@@ -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)