Class: Devist::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/devist/models/version.rb

Overview

version.rb This file is a part of the devist package. Halis Duraki <duraki.halis@nsoft.ba>

Model class `version` is dynamic object that creates a new changelog version instance with appropriate tag(s) data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version, date) ⇒ Version

Returns a new instance of Version



12
13
14
15
16
# File 'lib/devist/models/version.rb', line 12

def initialize(version, date)
  @version = version
  @date = date
  @tags = Devist::Tag.new
end

Instance Attribute Details

#dateObject

Returns the value of attribute date



10
11
12
# File 'lib/devist/models/version.rb', line 10

def date
  @date
end

#tagsObject

Returns the value of attribute tags



10
11
12
# File 'lib/devist/models/version.rb', line 10

def tags
  @tags
end

#versionObject

Returns the value of attribute version



10
11
12
# File 'lib/devist/models/version.rb', line 10

def version
  @version
end

Instance Method Details

#tag(type, change) ⇒ Object

Create a new tag.



19
20
21
# File 'lib/devist/models/version.rb', line 19

def tag (type, change)
  @tags.add(type, change)
end