另外,「self.send attr
」是做什麼的? attr
是否被認爲是ActiveEngineer類的私有實例變量?在Ruby邏輯方面,這段代碼是否還有其他問題?如果申請人課程「要求'mad_skills'」或「包含'mad_skills'」?
class Applicant < ActiveEngineer
require 'ruby'
require 'mad_skills'
require 'oo_design'
require 'mysql'
validates :bachelors_degree
def qualified?
[:smart, :highly_productive, :curious, :driven, :team_player ].all? do
|attr|
self.send attr
end
end
end
class Employer
include TopTalent
has_millions :subscribers, :include=>:mostly_women
has_many :profits, :revenue
has_many :recent_press, :through=>[:today_show, :good_morning_america,
:new_york_times, :oprah_magazine]
belongs_to :south_park_sf
has_many :employees, :limit=>10
def apply(you)
unless you.build_successful_startups
raise "Not wanted"
end
unless you.enjoy_working_at_scale
raise "Don't bother"
end
end
def work
with small_team do
our_offerings.extend you
subscribers.send :thrill
[:scaling, :recommendation_engines, : ].each do |challenge|
assert intellectual_challenges.include? challenge
end
%w(analytics ui collaborative_filtering scraping).each{|task|
task.build }
end
end
end
def to_apply
include CoverLetter
include Resume
end
任何認爲學位是必不可少的潛在僱主可能都不值得爲之工作。 「代碼」在幾個地方有嫌疑,足以再次表明他們沒有得到它。極客們對這樣的事情有幽默感,但這並沒有打到它。究竟是什麼「:包括=>:mostly_women」應該試圖說,我想知道? – 2009-09-10 16:06:15
我認爲「:include =>:mostly_women」意思是說,無論這個僱主做什麼產品都有數百萬訂閱者,其中大多數是女性。 – uzo 2009-09-10 16:23:15