This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Model < ParentModel | |
| include Foo::Bar | |
| extend Bar::Baz | |
| acts_as_authentic | |
| dsl_specific_flags | |
| module InternalModule | |
| ... | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [:last, :this, :next].each do |week| | |
| define_method("#{week}_week") { schedule(week) } | |
| end | |
| def schedule(week) | |
| @schedule ||= YAML.load_file('schedule.yml')["schedule"] | |
| @schedule.select {|d| date_range(week.to_sym).include?(d)} | |
| end | |
| def date_range(week) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.generate_planned_simulation(model_package_id, start_date, finish_date, increment) | |
| start_date = Date.strptime(start_date,'%B %d, %Y') | |
| finish_date = Date.strptime(finish_date, '%B %d, %Y') | |
| dates = get_dates_with_interval(start_date, finish_date, increment) | |
| activities = Activity.all( | |
| :conditions => [ | |
| '(start_date <= :finish_date OR finish_date <= :finish_date) AND model_package_id = :model_package_id', | |
| { :finish_date => finish_date, :model_package_id => model_package_id } | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test1 = [1,2,3] | |
| test2 = [2,3,4,5,6,7,8] | |
| unknown, known = *[test1 - test2, test1 & test2] | |
| #=> [[1],[2,3]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta name="generator" content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org" /> | |
| <title></title> | |
| <meta http-equiv="Content-Type" | |
| content="text/html; charset=us-ascii" /> | |
| <link href="main.css" rel="stylesheet" type="text/css" /> | |
| <!--[if lte IE 6]> |
NewerOlder