class ASF::Petri

Attributes

description[R]
id[R]
issues[R]
licensing[R]
mailinglists[R]
mentors[R]
name[R]
release[R]
repository[R]
status[R]
website[R]
wiki[R]

Public Class Methods

list() click to toggle source

Array of all Petri culture entries

# File lib/whimsy/asf/petri.rb, line 34
def self.list
  @list = []
  response = Net::HTTP.get_response(URI(PETRI_INFO))
  response.value() # Raises error if not OK
  yaml = YAML.safe_load(response.body, [Symbol])
  # @mentors = yaml['mentors']
  yaml['cultures'].each do |proj|
    @list << new(proj)
  end
  @list
end
new(entry) click to toggle source
# File lib/whimsy/asf/petri.rb, line 27
def initialize(entry)
  key, hash = entry
  @id = key
  hash.each { |name, value| instance_variable_set("@#{name}", value) }
end