Sha256: 2d205bf8da33d3a568f6a2fca211f12a5533fe76e7955da7579df86fb2fe1657

Contents?: true

Size: 337 Bytes

Versions: 13

Compression:

Stored size: 337 Bytes

Contents

class Miam::Utils
  class << self
    def unbrace(str)
      str.sub(/\A\s*\{/, '').sub(/\}\s*\z/, '')
    end

    def camelize(str)
      str.slice(0, 1).upcase + str.slice(1..-1).downcase
    end

    def bytesize(str)
      if str.respond_to?(:bytesize)
        str.bytesize
      else
        str.length
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
miam-0.2.1 lib/miam/utils.rb
miam-0.2.1.beta2 lib/miam/utils.rb
miam-0.2.1.beta lib/miam/utils.rb
miam-0.2.0 lib/miam/utils.rb
miam-0.2.0.beta3 lib/miam/utils.rb
miam-0.2.0.beta2 lib/miam/utils.rb
miam-0.2.0.beta lib/miam/utils.rb
miam-0.1.4 lib/miam/utils.rb
miam-0.1.3 lib/miam/utils.rb
miam-0.1.2 lib/miam/utils.rb
miam-0.1.1 lib/miam/utils.rb
miam-0.1.0 lib/miam/utils.rb
miam-0.1.0.beta lib/miam/utils.rb