class SyntaxTree::Formatter::SemanticVersion

Unfortunately, Gem::Version.new is not ractor-safe because it performs global caching using a class variable. This works around that by just setting the instance variables directly.

Public Class Methods

new(version) click to toggle source
# File lib/syntax_tree/formatter.rb, line 11
def initialize(version)
  @version = version
  @segments = nil
end