Class: Roger::Release::Scm::Fixed

Inherits:
Base
  • Object
show all
Defined in:
lib/roger/release/scm/fixed.rb

Overview

The Fixed SCM implementation for Roger release Here you define everything in the config or set it later with the different accessors.

Instance Attribute Summary collapse

Attributes inherited from Base

#config

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Fixed

Returns a new instance of Fixed.

Parameters:

  • config (Hash) (defaults to: {})

    a customizable set of options

Options Hash (config):

  • :version (String)

    Version to use (default “0.0.0”)

  • :date (Time)

    Date to use (default Time.now)

  • :previous (String)

    Previous version to use (default “0.0.0”)



12
13
14
15
16
17
18
# File 'lib/roger/release/scm/fixed.rb', line 12

def initialize(config = {})
  super(config)

  self.version = config[:version] || "0.0.0"
  self.date = config[:date] || Time.now
  self.previous = config[:previous] || "0.0.0"
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



7
8
9
# File 'lib/roger/release/scm/fixed.rb', line 7

def date
  @date
end

#previousObject

Returns the value of attribute previous.



7
8
9
# File 'lib/roger/release/scm/fixed.rb', line 7

def previous
  @previous
end

#versionObject

Returns the value of attribute version.



7
8
9
# File 'lib/roger/release/scm/fixed.rb', line 7

def version
  @version
end