Class: Ladybug::ScriptRepository

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeScriptRepository

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

#allObject



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