Module: Cabal::Util

Defined in:
lib/cabal/util.rb,
lib/cabal/util/version.rb

Overview

Basic utility methods for Cabal

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



7
8
9
# File 'lib/cabal/util.rb', line 7

def self.included(klass)
  klass.extend(self)
end

.normalize(string) ⇒ String

Noralizes a string

Parameters:

  • string (String)

    the string to normalize

Returns:

  • (String)

    the normalized string



14
15
16
# File 'lib/cabal/util.rb', line 14

def self.normalize(string)
  string.to_s.downcase.gsub(/\s+/, '')
end

Instance Method Details

#normalize(string) ⇒ Object

Normalizes a string

See Also:



20
21
22
# File 'lib/cabal/util.rb', line 20

def normalize(string)
  Cabal::Util.normalize(string)
end