Class: RepomdParser::Reference
- Inherits:
-
Object
- Object
- RepomdParser::Reference
- Defined in:
- lib/repomd_parser/reference.rb
Overview
repomd_parser – Ruby gem to parse RPM repository metadata Copyright © 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.
Instance Attribute Summary collapse
-
#arch ⇒ Object
Returns the value of attribute arch.
-
#build_time ⇒ Object
Returns the value of attribute build_time.
-
#checksum ⇒ Object
Returns the value of attribute checksum.
-
#checksum_type ⇒ Object
Returns the value of attribute checksum_type.
-
#description ⇒ Object
Returns the value of attribute description.
-
#license ⇒ Object
Returns the value of attribute license.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#release ⇒ Object
Returns the value of attribute release.
-
#size ⇒ Object
Returns the value of attribute size.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#type ⇒ Object
Returns the value of attribute type.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Overloaded comparator for specs.
-
#initialize(location:, checksum_type:, checksum:, type:, size:, arch: nil, version: nil, release: nil, name: nil, summary: nil, description: nil, license: nil, build_time: nil) ⇒ Reference
constructor
A new instance of Reference.
Constructor Details
#initialize(location:, checksum_type:, checksum:, type:, size:, arch: nil, version: nil, release: nil, name: nil, summary: nil, description: nil, license: nil, build_time: nil) ⇒ Reference
Returns a new instance of Reference.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# 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 |
Instance Attribute Details
#arch ⇒ Object
Returns the value of attribute arch.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def arch @arch end |
#build_time ⇒ Object
Returns the value of attribute build_time.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def build_time @build_time end |
#checksum ⇒ Object
Returns the value of attribute checksum.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def checksum @checksum end |
#checksum_type ⇒ Object
Returns the value of attribute checksum_type.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def checksum_type @checksum_type end |
#description ⇒ Object
Returns the value of attribute description.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def description @description end |
#license ⇒ Object
Returns the value of attribute license.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def license @license end |
#location ⇒ Object
Returns the value of attribute location.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def name @name end |
#release ⇒ Object
Returns the value of attribute release.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def release @release end |
#size ⇒ Object
Returns the value of attribute size.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def size @size end |
#summary ⇒ Object
Returns the value of attribute summary.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def summary @summary end |
#type ⇒ Object
Returns the value of attribute type.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def type @type end |
#version ⇒ Object
Returns the value of attribute version.
19 20 21 |
# File 'lib/repomd_parser/reference.rb', line 19 def version @version end |
Instance Method Details
#==(other) ⇒ Object
Overloaded comparator for specs
53 54 55 56 57 58 59 |
# File 'lib/repomd_parser/reference.rb', line 53 def ==(other) result = true instance_variables.each do |instance_var| result &&= (instance_variable_get(instance_var) == other.instance_variable_get(instance_var)) end result end |