Sha256: 0f6406a17392188741cdc52065f9dc64971e3181ddfb2d087d4e21d2c95ad69d

Contents?: true

Size: 408 Bytes

Versions: 23

Compression:

Stored size: 408 Bytes

Contents

module MotionKit
  module_function

  def objective_c_method_name(str)
    str.split('_').inject([]) { |buffer,e| buffer.push(buffer.empty? ? e : e.capitalize) }.join
  end

  def camel_case(str)
    str.split('_').map(&:capitalize).join
  end

  def setter(method_name)
    "set#{method_name[0].capitalize}#{method_name[1..-1]}:"
  end

  def appearance_class
    @appearance_class ||= Class.new
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
motion-kit-0.13.0 lib/motion-kit/util.rb
motion-kit-0.12.0 lib/motion-kit/util.rb
motion-kit-0.11.2 lib/motion-kit/util.rb
motion-kit-0.11.1 lib/motion-kit/util.rb
motion-kit-0.11.0 lib/motion-kit/util.rb
motion-kit-0.10.11 lib/motion-kit/util.rb
motion-kit-0.10.10 lib/motion-kit/util.rb
motion-kit-0.10.9 lib/motion-kit/util.rb
motion-kit-0.10.8 lib/motion-kit/util.rb
motion-kit-0.10.7 lib/motion-kit/util.rb
motion-kit-0.10.6 lib/motion-kit/util.rb
motion-kit-0.10.5 lib/motion-kit/util.rb
motion-kit-0.10.4 lib/motion-kit/util.rb
motion-kit-0.10.3 lib/motion-kit/util.rb
motion-kit-0.10.2 lib/motion-kit/util.rb
motion-kit-0.10.1 lib/motion-kit/util.rb
motion-kit-0.10.0 lib/motion-kit/util.rb
motion-kit-0.9.6 lib/motion-kit/util.rb
motion-kit-0.9.4 lib/motion-kit/util.rb
motion-kit-0.9.3 lib/motion-kit/util.rb