Class: GemGuard::Dependency
- Inherits:
-
Object
- Object
- GemGuard::Dependency
- Defined in:
- lib/gem_guard/parser.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, version:, source:, dependencies: []) ⇒ Dependency
constructor
A new instance of Dependency.
Constructor Details
#initialize(name:, version:, source:, dependencies: []) ⇒ Dependency
Returns a new instance of Dependency.
92 93 94 95 96 97 |
# File 'lib/gem_guard/parser.rb', line 92 def initialize(name:, version:, source:, dependencies: []) @name = name @version = version @source = source @dependencies = dependencies end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
90 91 92 |
# File 'lib/gem_guard/parser.rb', line 90 def dependencies @dependencies end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
90 91 92 |
# File 'lib/gem_guard/parser.rb', line 90 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
90 91 92 |
# File 'lib/gem_guard/parser.rb', line 90 def source @source end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
90 91 92 |
# File 'lib/gem_guard/parser.rb', line 90 def version @version end |
Instance Method Details
#==(other) ⇒ Object
99 100 101 102 103 104 |
# File 'lib/gem_guard/parser.rb', line 99 def ==(other) other.is_a?(Dependency) && name == other.name && version == other.version && source == other.source end |