Class: Ladybug::ScriptRepository
- Inherits:
-
Object
- Object
- Ladybug::ScriptRepository
- Defined in:
- lib/ladybug/script_repository.rb
Constant Summary collapse
- ROOT_URL =
todo: would be nice to dynamically set this to the server name
"http://localhost"
Instance Method Summary collapse
- #all ⇒ Object
- #find(args) ⇒ Object
-
#initialize ⇒ ScriptRepository
constructor
todo: accept path as param?.
Constructor Details
#initialize ⇒ ScriptRepository
todo: accept path as param?
12 13 14 |
# File 'lib/ladybug/script_repository.rb', line 12 def initialize @scripts = enumerate_scripts end |
Instance Method Details
#all ⇒ Object
16 17 18 |
# File 'lib/ladybug/script_repository.rb', line 16 def all @scripts end |
#find(args) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/ladybug/script_repository.rb', line 20 def find(args) @scripts.find do |script| args.all? do |key, value| script[key] == value end end end |