Sha256: 270ccf7ef19dfe13cd7a19491f89cd5c2532b93581ca8cc609fb1c03ad9a4e26

Contents?: true

Size: 419 Bytes

Versions: 124

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

class ReeDatetime::FindTzinfo
  include Ree::FnDSL

  fn :find_tzinfo do
    link 'ree_datetime/functions/constants', -> { ZONE_HUMAN_NAMES }
  end

  doc("Returns an individual time zone accroding to the +name+ parameter")
  contract(String => TZInfo::Timezone).throws(TZInfo::InvalidTimezoneIdentifier)
  def call(name)
    TZInfo::Timezone.get(ZONE_HUMAN_NAMES[name] || name)
  end
end

Version data entries

124 entries across 124 versions & 1 rubygems

Version Path
ree_lib-1.0.124 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.123 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.122 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.121 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.120 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.119 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.118 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.117 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.116 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.115 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.114 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.113 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.112 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.111 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.110 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.109 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.108 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.107 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.106 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb
ree_lib-1.0.105 lib/ree_lib/packages/ree_datetime/package/ree_datetime/functions/find_tzinfo.rb