Class: Halite::Dependencies::Dependency

Inherits:
Struct
  • Object
show all
Defined in:
lib/halite/dependencies.rb

Overview

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



30
31
32
# File 'lib/halite/dependencies.rb', line 30

def name
  @name
end

#requirementObject

Returns the value of attribute requirement

Returns:

  • (Object)

    the current value of requirement



30
31
32
# File 'lib/halite/dependencies.rb', line 30

def requirement
  @requirement
end

#specObject

Returns the value of attribute spec

Returns:

  • (Object)

    the current value of spec



30
31
32
# File 'lib/halite/dependencies.rb', line 30

def spec
  @spec
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



30
31
32
# File 'lib/halite/dependencies.rb', line 30

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object

Since:

  • 1.0.0



31
32
33
34
35
# File 'lib/halite/dependencies.rb', line 31

def ==(other)
  self.name == other.name && \
  self.requirement == other.requirement && \
  self.type == other.type
end

#cookbookObject

Since:

  • 1.0.0



37
38
39
# File 'lib/halite/dependencies.rb', line 37

def cookbook
  Gem.new(spec) if spec
end