Class: GemWhy::Dependent

Inherits:
Data
  • Object
show all
Defined in:
lib/gem_why/dependent.rb

Overview

Represents a gem that depends on a target gem

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#name ⇒ Object (readonly)

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



5
6
7
# File 'lib/gem_why/dependent.rb', line 5

def name
  @name
end

#requirement ⇒ Object (readonly)

Returns the value of attribute requirement

Returns:

  • (Object) —

    the current value of requirement



5
6
7
# File 'lib/gem_why/dependent.rb', line 5

def requirement
  @requirement
end

#version ⇒ Object (readonly)

Returns the value of attribute version

Returns:

  • (Object) —

    the current value of version



5
6
7
# File 'lib/gem_why/dependent.rb', line 5

def version
  @version
end

Instance Method Details

#to_h ⇒ Hash

Returns the dependent as a hash

Returns:

  • (Hash) —

    hash representation



8
9
10
# File 'lib/gem_why/dependent.rb', line 8

def to_h
  { name:, version:, requirement: }
end