Method: Beaker::DSL::InstallUtils#split_author_modulename

Defined in:
lib/beaker/dsl/install_utils.rb

#split_author_modulename(author_module_attr) ⇒ Hash<Symbol,String>?

Split the Author-Name into a hash

Parameters:

  • author_module_attr (String)

Returns:

  • (Hash<Symbol,String>, nil)

    :author and :module symbols will be returned



1551
1552
1553
1554
1555
1556
1557
1558
# File 'lib/beaker/dsl/install_utils.rb', line 1551

def split_author_modulename(author_module_attr)
  result = /(\w+)-(\w+)/.match(author_module_attr)
  if result
    {:author => result[1], :module => result[2]}
  else
    nil
  end
end