Class: ReaPack::Index::Changelog

Inherits:
Object
  • Object
show all
Defined in:
lib/reapack/index/version.rb

Constant Summary collapse

TAG =
'changelog'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ Changelog

Returns a new instance of Changelog.



85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/reapack/index/version.rb', line 85

def initialize(parent)
  @parent = parent

  @node = parent.element_children.find {|node| node.name == TAG }

  if @node
    cdata = @node.children.first
    @text = cdata.content
  else
    @text = String.new
  end
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



102
103
104
# File 'lib/reapack/index/version.rb', line 102

def text
  @text
end

Instance Method Details

#modified?Boolean

Returns:

  • (Boolean)


98
99
100
# File 'lib/reapack/index/version.rb', line 98

def modified?
  !!@dirty
end