Class: TimePoint::Classification

Inherits:
Object
  • Object
show all
Defined in:
lib/time_point.rb

Direct Known Subclasses

Month, WDay

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.orderObject (readonly)

Returns the value of attribute order.



73
74
75
# File 'lib/time_point.rb', line 73

def order
  @order
end

.translationsObject (readonly)

Returns the value of attribute translations.



73
74
75
# File 'lib/time_point.rb', line 73

def translations
  @translations
end

Class Method Details

.abbreviationsObject



75
76
77
78
79
80
# File 'lib/time_point.rb', line 75

def abbreviations
  @abbreviations ||= translations.inject({}) do |h,(k,v)|
    h[v] = k unless h.has_key?(v) && h[v].length < k.length
    h
  end
end