Class: Devist::Tag

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

Overview

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

Model class `tags` is dynamic object that have parent `version` and is made of version tag info.

Instance Method Summary collapse

Constructor Details

#initializeTag

Returns a new instance of Tag



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

def initialize
  @list = %w[added fixed removed improved]
  @change = Marray.new(@list.count)
end

Instance Method Details

#add(type, change) ⇒ Object



24
25
26
# File 'lib/devist/models/tags.rb', line 24

def add (type, change)
  @change[@list.index(type)][@change[@list.index(type)].count] = change
end

#getObject



28
29
30
# File 'lib/devist/models/tags.rb', line 28

def get
  @change
end