Class: Debsacker::Options::VersionFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/debsacker/options/version_factory.rb

Class Method Summary collapse

Class Method Details

.build(options) ⇒ Object



6
7
8
9
10
11
# File 'lib/debsacker/options/version_factory.rb', line 6

def self.build(options)
  Debsacker::Package::Version.new(options[:version]).tap do |version|
    version.add_distro = options[:distro].nil? ? true : !!options[:distro]
    version.add_branch = !!options[:branch]
  end
end