Skip to content

Commit

Permalink
Update some documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Feb 1, 2012
1 parent fbf2506 commit d4ee444
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--no-private
--exclude features
--markup markdown
--hide-void-return
17 changes: 11 additions & 6 deletions lib/vcr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def current_cassette
end

# Inserts the named cassette using the given cassette options.
# New HTTP interactions, if allowed by the cassette's :record option, will
# New HTTP interactions, if allowed by the cassette's `:record` option, will
# be recorded to the cassette. The cassette's existing HTTP interactions
# will be used to stub requests, unless prevented by the cassete's
# :record option.
# `:record` option.
#
# @example
# VCR.insert_cassette('twitter', :record => :new_episodes)
Expand Down Expand Up @@ -88,10 +88,10 @@ def current_cassette
# @raise [ArgumentError] when the given cassette is already being used.
# @raise [VCR::Errors::TurnedOffError] when VCR has been turned off
# without using the :ignore_cassettes option.
# @raise [VCR::Errors::MissingERBVariableError] when the +:erb+ option
# @raise [VCR::Errors::MissingERBVariableError] when the `:erb` option
# is used and the ERB template requires variables that you did not provide.
#
# @note If you use this method you _must_ call eject_cassette when you
# @note If you use this method you _must_ call `eject_cassette` when you
# are done. It is generally recommended that you use {#use_cassette}
# unless your code-under-test cannot be run as a block.
#
Expand Down Expand Up @@ -135,7 +135,7 @@ def eject_cassette
# @yieldparam cassette [(optional) VCR::Cassette] the cassette that has
# been inserted.
# @raise (see #insert_cassette)
# @return [nil]
# @return [void]
# @see #insert_cassette
# @see #eject_cassette
def use_cassette(*args, &block)
Expand Down Expand Up @@ -194,11 +194,12 @@ def configuration
#
# @yield the configuration block
# @yieldparam config [VCR::Configuration] the configuration object
# @return [void]
def configure
yield configuration
end

# Sets up +Before+ and +After+ cucumber hooks in order to
# Sets up `Before` and `After` cucumber hooks in order to
# use VCR with particular cucumber tags.
#
# @example
Expand All @@ -209,6 +210,7 @@ def configure
#
# @yield the cucumber tags configuration block
# @yieldparam t [VCR::CucumberTags] Cucumber tags config object
# @return [void]
# @see VCR::CucumberTags#tags
def cucumber_tags(&block)
main_object = eval('self', block.binding)
Expand All @@ -226,6 +228,7 @@ def record_http_interaction(interaction)
# Turns VCR off for the duration of a block.
#
# @param (see #turn_off!)
# @return [void]
# @raise (see #turn_off!)
# @see #turn_off!
# @see #turn_on!
Expand All @@ -247,6 +250,7 @@ def turned_off(options = {})
# inserted while VCR is turned off. If +true+ is passed, the cassette insertion
# will be ignored; otherwise a {VCR::Errors::TurnedOffError} will be raised.
#
# @return [void]
# @raise [VCR::Errors::CassetteInUseError] if there is currently a cassette in use
# @raise [ArgumentError] if you pass an invalid option
def turn_off!(options = {})
Expand All @@ -264,6 +268,7 @@ def turn_off!(options = {})
end

# Turns on VCR, if it has previously been turned off.
# @return [void]
# @see #turn_off!
# @see #turned_off
# @see #turned_on?
Expand Down
8 changes: 4 additions & 4 deletions lib/vcr/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module VCR

# @return [String] the current VCR version.
# @note This string also has singleton methods:
# * +major+ [Integer] The major version.
# * +minor+ [Integer] The minor version.
# * +patch+ [Integer] The patch version.
# * +parts+ [Array<Integer>] List of the version parts.
# * `major` [Integer] The major version.
# * `minor` [Integer] The minor version.
# * `patch` [Integer] The patch version.
# * `parts` [Array<Integer>] List of the version parts.
def version
@version ||= begin
string = '2.0.0.rc1'
Expand Down

0 comments on commit d4ee444

Please sign in to comment.