Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bring back YARD coverage to 100%

  • Loading branch information...
commit 05af5a5aab6f3433de315a112052d0cff94530c7 1 parent b1f4d8b
@mbj authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.