Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support generating documentation using YARD.

  • Loading branch information...
commit 8543a15d2ea6c68eb5f037990a8469c992c4f057 1 parent e29254f
@philr philr authored
View
5 .gitignore
@@ -1,4 +1,5 @@
-.rbx
doc
-pkg
Gemfile.lock
+pkg
+.rbx
+.yardoc
View
6 .yardopts
@@ -0,0 +1,6 @@
+--no-private
+lib/**/*.rb
+-
+CHANGES
+LICENSE
+README
View
4 lib/tzinfo/country.rb
@@ -43,9 +43,13 @@ class Country
include Comparable
# Defined countries.
+ #
+ # @!visibility private
@@countries = nil
# Whether the countries index has been loaded yet.
+ #
+ # @!visibility private
@@index_loaded = false
# Gets a Country by its ISO 3166-1 alpha-2 code. Raises an
View
7 lib/tzinfo/country_index_definition.rb
@@ -1,5 +1,5 @@
#--
-# Copyright (c) 2006-2010 Philip Ross
+# Copyright (c) 2006-2013 Philip Ross
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -23,6 +23,8 @@
module TZInfo
# The country index file includes CountryIndexDefinition which provides
# a country method used to define each country in the index.
+ #
+ # @private
module CountryIndexDefinition #:nodoc:
def self.append_features(base)
super
@@ -30,6 +32,9 @@ def self.append_features(base)
base.instance_eval { @countries = {} }
end
+ # Class methods for inclusion.
+ #
+ # @private
module ClassMethods #:nodoc:
# Defines a country with an ISO 3166 country code, name and block. The
# block will be evaluated to obtain all the timezones for the country.
View
2  lib/tzinfo/data_timezone.rb
@@ -23,6 +23,8 @@
module TZInfo
# A Timezone based on a DataTimezoneInfo.
+ #
+ # @private
class DataTimezone < InfoTimezone #:nodoc:
# Returns the TimezonePeriod for the given UTC time. utc can either be
View
4 lib/tzinfo/info_timezone.rb
@@ -1,5 +1,5 @@
#--
-# Copyright (c) 2006-2010 Philip Ross
+# Copyright (c) 2006-2013 Philip Ross
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -23,6 +23,8 @@
module TZInfo
# A Timezone based on a TimezoneInfo.
+ #
+ # @private
class InfoTimezone < Timezone #:nodoc:
# Constructs a new InfoTimezone with a TimezoneInfo instance.
View
3  lib/tzinfo/linked_timezone.rb
@@ -22,6 +22,9 @@
module TZInfo
+ # A Timezone based on a LinkedTimezoneInfo.
+ #
+ # @private
class LinkedTimezone < InfoTimezone #:nodoc:
# Returns the TimezonePeriod for the given UTC time. utc can either be
# a DateTime, Time or integer timestamp (Time.to_i). Any timezone
View
4 lib/tzinfo/offset_rationals.rb
@@ -26,7 +26,9 @@ module TZInfo
# Provides a method for getting Rationals for a timezone offset in seconds.
# Pre-reduced rationals are returned for all the half-hour intervals between
- # -14 and +14 hours to avoid having to call gcd at runtime.
+ # -14 and +14 hours to avoid having to call gcd at runtime.
+ #
+ # @private
module OffsetRationals #:nodoc:
@@rational_cache = {
-50400 => RubyCoreSupport.rational_new!(-7,12),
View
2  lib/tzinfo/ruby_core_support.rb
@@ -26,6 +26,8 @@
module TZInfo
# Methods to support different versions of Ruby.
+ #
+ # @private
module RubyCoreSupport #:nodoc:
# Use Rational.new! for performance reasons in Ruby 1.8.
View
4 lib/tzinfo/ruby_country_info.rb
@@ -22,6 +22,8 @@
module TZInfo
# Represents information about a country returned by RubyDataSource.
+ #
+ # @private
class RubyCountryInfo < CountryInfo #:nodoc:
# Constructs a new CountryInfo with an ISO 3166 country code, name and
# block. The block will be evaluated to obtain the timezones for the
@@ -69,6 +71,8 @@ def zones
# An instance of the Zones class is passed to the block used to define
# timezones.
+ #
+ # @private
class Zones #:nodoc:
attr_reader :list
View
4 lib/tzinfo/timezone.rb
@@ -66,10 +66,14 @@ class Timezone
# Cache of loaded zones by identifier to avoid using require if a zone
# has already been loaded.
+ #
+ # @!visibility private
@@loaded_zones = nil
# Default value of the dst parameter of the local_to_utc and
# period_for_local methods.
+ #
+ # @!visibility private
@@default_dst = nil
# Sets the default value of the optional dst parameter of the
View
6 lib/tzinfo/timezone_definition.rb
@@ -1,5 +1,5 @@
#--
-# Copyright (c) 2006-2010 Philip Ross
+# Copyright (c) 2006-2013 Philip Ross
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -24,6 +24,8 @@ module TZInfo
# TimezoneDefinition is included into Timezone definition modules.
# TimezoneDefinition provides the methods for defining timezones.
+ #
+ # @private
module TimezoneDefinition #:nodoc:
# Add class methods to the includee.
def self.append_features(base)
@@ -32,6 +34,8 @@ def self.append_features(base)
end
# Class methods for inclusion.
+ #
+ # @private
module ClassMethods #:nodoc:
# Returns and yields a TransitionDataTimezoneInfo object to define a
# timezone.
View
8 lib/tzinfo/timezone_index_definition.rb
@@ -1,5 +1,5 @@
#--
-# Copyright (c) 2006 Philip Ross
+# Copyright (c) 2006-2013 Philip Ross
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -23,7 +23,10 @@
module TZInfo
# The timezone index file includes TimezoneIndexDefinition which provides
# methods used to define timezones in the index.
+ #
+ # @private
module TimezoneIndexDefinition #:nodoc:
+ # Add class methods to the includee and initialize class instance variables.
def self.append_features(base)
super
base.extend(ClassMethods)
@@ -34,6 +37,9 @@ def self.append_features(base)
end
end
+ # Class methods for inclusion.
+ #
+ # @private
module ClassMethods #:nodoc:
# Defines a timezone based on data.
def timezone(identifier)
View
4 lib/tzinfo/timezone_transition_definition.rb
@@ -21,6 +21,10 @@
#++
module TZInfo
+ # A TimezoneTransition defined by as integer timestamp, as a rational to
+ # create a DateTime or as both.
+ #
+ # @private
class TimezoneTransitionDefinition < TimezoneTransition #:nodoc:
# The numerator of the DateTime if the transition time is defined as a
# DateTime, otherwise the transition time as a timestamp.
View
4 lib/tzinfo/transition_data_timezone_info.rb
@@ -27,7 +27,9 @@ class NoOffsetsDefined < StandardError
end
# Represents a data timezone defined by a set of offsets and a set
- # of transitions
+ # of transitions.
+ #
+ # @private
class TransitionDataTimezoneInfo < DataTimezoneInfo #:nodoc:
# Constructs a new TransitionDataTimezoneInfo with its identifier.
View
2  lib/tzinfo/zoneinfo_country_info.rb
@@ -22,6 +22,8 @@
module TZInfo
# Represents information about a country returned by ZoneinfoDataSource.
+ #
+ # @private
class ZoneinfoCountryInfo < CountryInfo #:nodoc:
# Constructs a new CountryInfo with an ISO 3166 country code, name and
# an array of CountryTimezones.
View
2  lib/tzinfo/zoneinfo_timezone_info.rb
@@ -27,6 +27,8 @@ class InvalidZoneinfoFile < StandardError
end
# Represents a timezone defined by a compiled zoneinfo TZif (\0 or 2) file.
+ #
+ # @private
class ZoneinfoTimezoneInfo < TransitionDataTimezoneInfo #:nodoc:
# Constructs the new ZoneinfoTimezoneInfo with an identifier and path
Please sign in to comment.
Something went wrong with that request. Please try again.