ruby-ulid 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e2d0489b211160618fc0ae6ecd30cbbbbaa411683162def97930ca95a860696
4
- data.tar.gz: 0063c982795d2a42e2f6bac7b236d831753c685b36f4d047e2999dbe7368c6de
3
+ metadata.gz: fa89ecbb2a09940666b57e690d43a985872bb85f40b2b1175c79a762d79c8e45
4
+ data.tar.gz: 2404fe5e1efa77899262fbf8979529fc474e44ffa0a8572ee3cf71eb1caf941a
5
5
  SHA512:
6
- metadata.gz: 825dab6b7e01f4e1dee5fcd03031ef27645de6a1b56e8392fd784a55c860268af5b84ae4ac3697cdf3eba630dbae197da28cde4b8fbef043c8d0ff48b587f992
7
- data.tar.gz: f2039e401c77cf15bda81d10587085b7fa167c253a19a66bc0b14ee5fda71162325b7a278f2ebb185d53cbb3fd01563ccb4c6875ffbaebf7fc676a2a24c73767
6
+ metadata.gz: 1a86224846b27985d641bf485f952583c73dafc87a0ca8f65744cfdfa35371a6f5cfedb4246e7839da6e51fdcfd53632f20057c399038f3399f2986a9bf20085
7
+ data.tar.gz: 24daff089a2b0564a2e7a93c34fef4d44420d1e0bbc6a054c5bcdfac02986c66204515bc085a7dc6499257692682217a888d8a04e04a7ae8de36e884cc182965
data/lib/ulid.rb CHANGED
@@ -261,10 +261,9 @@ class ULID
261
261
  end
262
262
 
263
263
  # @return [String]
264
- def to_str
264
+ def to_s
265
265
  @string ||= Integer::Base.string_for(to_i, ENCODING_CHARS).rjust(ENCODED_ID_LENGTH, '0').upcase.freeze
266
266
  end
267
- alias_method :to_s, :to_str
268
267
 
269
268
  # @return [Integer]
270
269
  def to_i
@@ -279,7 +278,7 @@ class ULID
279
278
 
280
279
  # @return [String]
281
280
  def inspect
282
- @inspect ||= "ULID(#{to_time.strftime(TIME_FORMAT_IN_INSPECT)}: #{to_str})".freeze
281
+ @inspect ||= "ULID(#{to_time.strftime(TIME_FORMAT_IN_INSPECT)}: #{to_s})".freeze
283
282
  end
284
283
 
285
284
  # @return [Boolean]
@@ -381,7 +380,7 @@ class ULID
381
380
 
382
381
  # @return [MatchData]
383
382
  def matchdata
384
- @matchdata ||= STRICT_PATTERN.match(to_str).freeze
383
+ @matchdata ||= STRICT_PATTERN.match(to_s).freeze
385
384
  end
386
385
  end
387
386
 
data/lib/ulid/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class ULID
5
- VERSION = '0.0.13'
5
+ VERSION = '0.0.14'
6
6
  end
data/sig/ulid.rbs CHANGED
@@ -79,8 +79,7 @@ class ULID
79
79
  attr_reader milliseconds: Integer
80
80
  attr_reader entropy: Integer
81
81
  def initialize: (milliseconds: Integer, entropy: Integer) -> void
82
- def to_str: -> String
83
- alias to_s to_str
82
+ def to_s: -> String
84
83
  def to_i: -> Integer
85
84
  alias hash to_i
86
85
  def <=>: (ULID other) -> Integer
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ulid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichi Kamiya