class RepomdParser::Reference

repomd_parser – Ruby gem to parse RPM repository metadata Copyright (C) 2018 Ivan Kapelyukhin, SUSE Linux GmbH

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Attributes

arch[RW]
build_time[RW]
checksum[RW]
checksum_type[RW]
description[RW]
license[RW]
location[RW]
name[RW]
release[RW]
size[RW]
summary[RW]
type[RW]
version[RW]

Public Class Methods

new(location:, checksum_type:, checksum:, type:, size:, arch: nil, version: nil, release: nil, name: nil, summary: nil, description: nil, license: nil, build_time: nil) click to toggle source
# File lib/repomd_parser/reference.rb, line 33
def initialize(location:,
               checksum_type:,
               checksum:,
               type:,
               size:,
               arch: nil,
               version: nil,
               release: nil,
               name: nil,
               summary: nil,
               description: nil,
               license: nil,
               build_time: nil)
  local_variables.each do |local_var|
    method = "#{local_var}="
    send(method, binding.local_variable_get(local_var)) if (respond_to?(method))
  end
end

Public Instance Methods

==(obj) click to toggle source

Overloaded comparator for specs

# File lib/repomd_parser/reference.rb, line 53
def ==(obj)
  result = true
  instance_variables.each do |instance_var|
    result &&= (instance_variable_get(instance_var) == obj.instance_variable_get(instance_var))
  end
  result
end