Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix some minor YARD issues #2

Merged
merged 2 commits into from about 1 year ago

2 participants

Markus Schirp Dan Kubb
Markus Schirp
Collaborator
mbj commented March 18, 2013

No description provided.

lib/support/options.rb
@@ -4,6 +4,12 @@ module Coercible
4 4
   module Options
5 5
     Undefined = Class.new.freeze
6 6
 
  7
+    # Hook called when descendant was extended
  8
+    #
  9
+    # @param [Class|Module] descendant
2
Dan Kubb Collaborator
dkubb added a note March 18, 2013

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.

Markus Schirp Collaborator
mbj added a note March 18, 2013

@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
Dan Kubb dkubb merged commit ae26d67 into from March 18, 2013
Dan Kubb dkubb closed this March 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Mar 18, 2013
Markus Schirp Bring back YARD coverage to 100% 05af5a5
Markus Schirp Fix yard type syntax 61615cb
This page is out of date. Refresh to see the latest.
9  lib/coercible.rb
@@ -3,6 +3,15 @@ module Coercible
3 3
 
4 4
   UnsupportedCoercion = Class.new(StandardError)
5 5
 
  6
+  # Test for rubinius platform
  7
+  #
  8
+  # @return [true]
  9
+  #   if running under rubinius
  10
+  #
  11
+  # @return [false]
  12
+  #   otherwise
  13
+  #
  14
+  # @api private
6 15
   def self.rbx?
7 16
     @is_rbx ||= defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
8 17
   end
4  lib/coercible/coercer/configurable.rb
@@ -48,6 +48,10 @@ def config_name
48 48
         name.downcase.split('::').last.to_sym
49 49
       end
50 50
 
  51
+      # Return configuration class
  52
+      #
  53
+      # @return [Class:Configuration]
  54
+      #
51 55
       # @api private
52 56
       def configuration_class
53 57
         Configuration
9  lib/coercible/coercer/object.rb
@@ -31,6 +31,9 @@ def initialize(coercers = Coercer.new)
31 31
 
32 32
       # Inspect the coercer object
33 33
       #
  34
+      # @example 
  35
+      #   coercer[Object].inspect # => "<Coercer::Object primitive=Object>"
  36
+      #
34 37
       # @return [String]
35 38
       #
36 39
       # @api public
@@ -121,6 +124,12 @@ def to_integer(value)
121 124
 
122 125
       # Return if the value was successfuly coerced
123 126
       #
  127
+      # @example when coercion was successful
  128
+      #   coercer[String].coerced?(1) # => true
  129
+      #
  130
+      # @example when coercion was NOT successful
  131
+      #   coercer[String].coerced?("foo") # => false
  132
+      #
124 133
       # @return [TrueClass,FalseClass]
125 134
       #
126 135
       # @api public
6  lib/support/options.rb
@@ -4,6 +4,12 @@ module Coercible
4 4
   module Options
5 5
     Undefined = Class.new.freeze
6 6
 
  7
+    # Hook called when descendant was extended
  8
+    #
  9
+    # @param [Class,Module] descendant
  10
+    #
  11
+    # @return [undefined]
  12
+    #
7 13
     # @api private
8 14
     def self.extended(descendant)
9 15
       descendant.extend(DescendantsTracker)
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.