Module: ExpirationDate

Defined in:
lib/expiration-date.rb

Defined Under Namespace

Modules: ClassMethods Classes: ExpirationLabel

Constant Summary collapse

VERSION =

:stopdoc:

'1.1.0'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(other) ⇒ Object

This method is called whenever this module is included by another module. It is used to add class methods to the other module.



20
21
22
# File 'lib/expiration-date.rb', line 20

def self.included( other )
  other.extend ClassMethods
end

.versionObject

Returns the version string for the library.



13
14
15
# File 'lib/expiration-date.rb', line 13

def self.version
  VERSION
end

Instance Method Details

#_expiration_labelsObject

Accessor that returns the hash of ExpirationLabel objects.



185
186
187
188
189
# File 'lib/expiration-date.rb', line 185

def _expiration_labels
  @_expiration_labels ||= Hash.new do |h,k|
    h[k] = ExpirationLabel.new(Mutex.new)
  end
end