Class: Ima
- Inherits:
-
Object
- Object
- Ima
- Defined in:
- lib/ima/_lib.rb
Constant Summary collapse
- VERSION =
'0.4.2'
Class Method Summary collapse
- .dependencies ⇒ Object
- .description ⇒ Object
- .libdir(*args, &block) ⇒ Object
- .libs ⇒ Object
- .load(*libs) ⇒ Object
- .load_dependencies! ⇒ Object
- .repo ⇒ Object
- .summary ⇒ Object
- .version ⇒ Object
Class Method Details
.dependencies ⇒ Object
32 33 34 35 |
# File 'lib/ima/_lib.rb', line 32 def dependencies { } end |
.description ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/ima/_lib.rb', line 19 def description " ima is a a library, framework, and set of tools that allow\n non-technical users to manage and deploy complex ai agenic frameworks\n in seconds for free at best, and cheap at worst.\n ____\nend\n" |
.libdir(*args, &block) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ima/_lib.rb', line 37 def libdir(*args, &block) @libdir ||= File.dirname(File.(__FILE__)) args.empty? ? @libdir : File.join(@libdir, *args) ensure if block begin $LOAD_PATH.unshift(@libdir) block.call ensure $LOAD_PATH.shift end end end |
.libs ⇒ Object
27 28 29 30 |
# File 'lib/ima/_lib.rb', line 27 def libs %w[ ] end |
.load(*libs) ⇒ Object
51 52 53 54 |
# File 'lib/ima/_lib.rb', line 51 def load(*libs) libs = libs.join(' ').scan(/[^\s+]+/) libdir { libs.each { |lib| Kernel.load(lib) } } end |
.load_dependencies! ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/ima/_lib.rb', line 56 def load_dependencies! libs.each do |lib| require lib end begin require 'rubygems' rescue LoadError nil end has_rubygems = defined?(gem) dependencies.each do |lib, dependency| gem(*dependency) if has_rubygems require(lib) end end |
.repo ⇒ Object
9 10 11 |
# File 'lib/ima/_lib.rb', line 9 def repo 'https://github.com/ahoward/ima' end |
.summary ⇒ Object
13 14 15 16 17 |
# File 'lib/ima/_lib.rb', line 13 def summary " ima is the ai agenic framework for super monkeys\n ____\nend\n" |
.version ⇒ Object
5 6 7 |
# File 'lib/ima/_lib.rb', line 5 def version VERSION end |