Class: Avm::Ruby::Gems::Generator::VersionBuilder
- Defined in:
- lib/avm/ruby/gems/generator.rb
Instance Method Summary collapse
Instance Method Details
#three_segments ⇒ Object
141 142 143 |
# File 'lib/avm/ruby/gems/generator.rb', line 141 def three_segments segments.first(3).join('.') end |
#to_s ⇒ Object
126 127 128 129 130 |
# File 'lib/avm/ruby/gems/generator.rb', line 126 def to_s r = "'~> #{two_segments}'" r += ", '>= #{three_segments}'" if segments.count >= 3 && segments[2].positive? r end |
#two_segments ⇒ Object
137 138 139 |
# File 'lib/avm/ruby/gems/generator.rb', line 137 def two_segments segments.first(2).join('.') end |
#version ⇒ Gem::Version
133 134 135 |
# File 'lib/avm/ruby/gems/generator.rb', line 133 def version ( || default_version) end |