Sha256: 9e50c09e866af587c871b05badbd7aae02e56f79de9b0ca83e7748c45b10893f

Contents?: true

Size: 431 Bytes

Versions: 2

Compression:

Stored size: 431 Bytes

Contents

module Xcode
  class Project
    class Build < PlistChanger
      attr_reader :number

      KEY = 'CFBundleVersion'

      def to_s
        number.to_s
      end

      def set(string)
        if /^(\d+)/ =~ string
          @number = $1.to_i
          self
        else
          raise "Can't parse build #{string.inspect}"
        end
      end

      def increment
        @number += 1
        self
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xcode-0.1.2 lib/xcode/project/build.rb
xcode-0.1.1 lib/xcode/project/build.rb