Sha256: 5a5730a4ce25dfef94dae95eb65b62197f645622afaa35d56edc3f66b2c78780

Contents?: true

Size: 488 Bytes

Versions: 13

Compression:

Stored size: 488 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)
    setter = "set#{method_name[0].capitalize}#{method_name[1..-1]}"
    unless setter.end_with?(':')
      setter << ':'
    end
    setter
  end

  def appearance_class
    @appearance_class ||= Class.new
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
motion-kit-1.1.1 lib/motion-kit/util.rb
motion-kit-1.1.0 lib/motion-kit/util.rb
motion-kit-1.0.3 lib/motion-kit/util.rb
motion-kit-1.0.2 lib/motion-kit/util.rb
motion-kit-1.0.1 lib/motion-kit/util.rb
motion-kit-1.0.0 lib/motion-kit/util.rb
motion-kit-0.18.0 lib/motion-kit/util.rb
motion-kit-0.17.0 lib/motion-kit/util.rb
motion-kit-0.16.0 lib/motion-kit/util.rb
motion-kit-0.15.0 lib/motion-kit/util.rb
motion-kit-0.14.2 lib/motion-kit/util.rb
motion-kit-0.14.1 lib/motion-kit/util.rb
motion-kit-0.14.0 lib/motion-kit/util.rb