Class: OffGithub::GemList

Inherits:
Object
  • Object
show all
Defined in:
lib/off_github.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source = nil) ⇒ GemList

Returns a new instance of GemList.



40
41
42
43
44
45
46
47
48
# File 'lib/off_github.rb', line 40

def initialize(source = nil)
  if source.class == Array
    @source = nil
    @list = source
  else
    @source = source
    fetch_gem_list
  end
end

Instance Attribute Details

#gemsObject (readonly)

Returns the value of attribute gems.



38
39
40
# File 'lib/off_github.rb', line 38

def gems
  @gems
end

#listObject (readonly)

Returns the value of attribute list.



38
39
40
# File 'lib/off_github.rb', line 38

def list
  @list
end

#sourceObject (readonly)

Returns the value of attribute source.



38
39
40
# File 'lib/off_github.rb', line 38

def source
  @source
end

Instance Method Details

#versions(gem_name) ⇒ Object



50
51
52
# File 'lib/off_github.rb', line 50

def versions(gem_name)
  @gems[gem_name]
end