Class: Freshmeat::PartialProject

Inherits:
Data
  • Object
show all
Defined in:
lib/freshmeat/data.rb

Direct Known Subclasses

Project

Instance Attribute Summary

Attributes inherited from Data

#data

Instance Method Summary collapse

Methods inherited from Data

#fid, #method_missing

Constructor Details

#initialize(data) ⇒ PartialProject

Returns a new instance of PartialProject.



50
51
52
53
54
55
56
# File 'lib/freshmeat/data.rb', line 50

def initialize(data)
  @data = data
  @data["user"] = User.new(@data["user"])
  @data["approved_screenshots"] = @data["approved_screenshots"] ? @data["approved_screenshots"].map { |t| Screenshot.new(t) } : Array.[]
  @data["approved_urls"] = @data["approved_urls"] ? @data["approved_urls"].map { |t| URL.new(t) } : Array.[]
  @data["recent_releases"] = @data["recent_releases"] ? @data["recent_releases"].map { |t| Release.new(t) } : Array.[]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Freshmeat::Data