Method: QB::Role#requirements

Defined in:
lib/qb/role.rb

#requirementsHash

Parsed tree structure of version requirements of the role from the requirements value in the QB meta data.

Returns:

  • (Hash)

    Tree where the leaves are Gem::Requirement.



508
509
510
511
512
513
514
# File 'lib/qb/role.rb', line 508

def requirements
  @requirements ||= NRSER.map_leaves(
    meta_or 'requirements', {'gems' => {}}
  ) { |key_path, req_str|
    Gem::Requirement.new req_str
  }
end