Class: AMI::Core
- Inherits:
-
Object
- Object
- AMI::Core
- Defined in:
- lib/ami/core.rb
Class Method Summary collapse
- .all_amis ⇒ Object
- .ami(name) ⇒ Object
- .load_amis ⇒ Object
- .register_ami(subclass) ⇒ Object
- .valid_ami?(name) ⇒ Boolean
Class Method Details
.all_amis ⇒ Object
21 22 23 |
# File 'lib/ami/core.rb', line 21 def self.all_amis @amis end |
.ami(name) ⇒ Object
17 18 19 |
# File 'lib/ami/core.rb', line 17 def self.ami(name) @amis[name] end |
.load_amis ⇒ Object
5 6 7 |
# File 'lib/ami/core.rb', line 5 def self.load_amis Dir[Dir.pwd + '/ami/*.rb'].each { |file| require file } end |
.register_ami(subclass) ⇒ Object
9 10 11 |
# File 'lib/ami/core.rb', line 9 def self.register_ami(subclass) @amis[subclass.name] = subclass end |
.valid_ami?(name) ⇒ Boolean
13 14 15 |
# File 'lib/ami/core.rb', line 13 def self.valid_ami?(name) !!@amis[name] end |