Class: Embargo
Class Method Summary collapse
- .action(&block) ⇒ Object
- .actions ⇒ Object
- .app_directory ⇒ Object
- .application ⇒ Object
- .directory ⇒ Object
- .first_load? ⇒ Boolean
- .require_file(file_name) ⇒ Object
Class Method Details
.action(&block) ⇒ Object
43 44 45 46 |
# File 'lib/embargo.rb', line 43 def self.action(&block) @@actions ||= Array.new @@actions.push(block) end |
.actions ⇒ Object
47 48 49 |
# File 'lib/embargo.rb', line 47 def self.actions $actions ||= @@actions end |
.app_directory ⇒ Object
20 21 22 |
# File 'lib/embargo.rb', line 20 def self.app_directory @@magis_working_directory ||= Dir.pwd end |
.directory ⇒ Object
24 25 26 |
# File 'lib/embargo.rb', line 24 def self.directory @@magis_directory ||= __FILE__ end |
.first_load? ⇒ Boolean
50 51 52 |
# File 'lib/embargo.rb', line 50 def self.first_load? !$actions end |
.require_file(file_name) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/embargo.rb', line 28 def self.require_file(file_name) project_file_name = Embargo.app_directory + "/" + file_name project_file_exists = File.exist?(project_file_name) if project_file_exists require project_file_name else = Embargo.directory + "/" + file_name = File.exist?() if require end end end |