Class: Slackware::ChangeLog::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/slackware/changelog.rb

Overview

The class for each item in a change set

Instance Method Summary collapse

Constructor Details

#initialize(package = nil, section = nil, action = nil, notes = "", security = false, update = nil) ⇒ Entry

Returns a new instance of Entry.



98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/slackware/changelog.rb', line 98

def initialize(package = nil,
               section = nil,
               action = nil,
               notes = "",
               security = false,
               update = nil)
  @package  = package
  @section  = section
  @action   = action
  @notes = notes.is_a?(String) ? notes : ""
  @security = security == true
  @update = update
end

Instance Method Details

#actionObject



114
# File 'lib/slackware/changelog.rb', line 114

def action; @action; end

#action=(action_name) ⇒ Object



121
# File 'lib/slackware/changelog.rb', line 121

def action=(action_name); @action = action_name ; end

#dateObject



117
# File 'lib/slackware/changelog.rb', line 117

def date; @update ? @update.date: nil;end

#notesObject



115
# File 'lib/slackware/changelog.rb', line 115

def notes; @notes; end

#notes=(notes_txt) ⇒ Object



123
124
125
# File 'lib/slackware/changelog.rb', line 123

def notes=(notes_txt)
  @notes = notes_txt.is_a?(String) ? notes_txt : ""
end

#packageObject



112
# File 'lib/slackware/changelog.rb', line 112

def package; @package; end

#package=(package_name) ⇒ Object



119
# File 'lib/slackware/changelog.rb', line 119

def package=(package_name); @package = package_name ; end

#sectionObject



113
# File 'lib/slackware/changelog.rb', line 113

def section; @section; end

#section=(section_name) ⇒ Object



120
# File 'lib/slackware/changelog.rb', line 120

def section=(section_name); @section = section_name ; end

#securityObject



116
# File 'lib/slackware/changelog.rb', line 116

def security; @security; end

#security=(bool) ⇒ Object



126
127
128
# File 'lib/slackware/changelog.rb', line 126

def security=(bool)
  @security = bool == true
end

#update=(update) ⇒ Object



122
# File 'lib/slackware/changelog.rb', line 122

def update=(update); @update = update if update.is_a?(Slackware::ChangeLog::Update) ; end