Class: Chekku::DefinitionsService

Inherits:
Object
  • Object
show all
Defined in:
lib/chekku/definitions_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#definitionsObject

Returns the value of attribute definitions.



5
6
7
# File 'lib/chekku/definitions_service.rb', line 5

def definitions
  @definitions
end

Instance Method Details

#definition_for(definition_name) ⇒ Definition

Retrieve one Definition from the list

Parameters:

  • definition_name (String)

    The needed Definition name

Returns:



18
19
20
# File 'lib/chekku/definitions_service.rb', line 18

def definition_for(definition_name)
  @definitions.detect{ |definition| definition.name == definition_name } if @definitions
end

#load_definitions_for(file_path) ⇒ Object

load the Definition list for the needed dependencies

Parameters:

  • file_path (String)

    Path to Chekkufile



10
11
12
# File 'lib/chekku/definitions_service.rb', line 10

def load_definitions_for(file_path)
  @definitions = Chekku::Fetcher.fetch_for_chekkufile file_path
end