<commit_before># ProMotion [![Build Status](https://travis-ci.org/clearsightstudio/ProMotion.png)](https://travis-ci.org/clearsightstudio/ProMotion)

## A new way to easily build RubyMotion apps.

ProMotion is a RubyMotion gem that makes iOS development more like Ruby and less like Objective-C.

Featured on the RubyMotion blog: [http://blog.rubymotion.com/post/50523137515/introducing-promotion-a-full-featured-rubymotion](http://blog.rubymotion.com/post/50523137515/introducing-promotion-a-full-featured-rubymotion)

**Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*

- [ProMotion ](#promotion-)
  - [A new way to easily build RubyMotion apps.](#a-new-way-to-easily-build-rubymotion-apps)<commit_msg>Adding a small example to show ProMotion benefits<commit_after># ProMotion [![Build Status](https://travis-ci.org/clearsightstudio/ProMotion.png)](https://travis-ci.org/clearsightstudio/ProMotion) [![Code Climate](https://codeclimate.com/github/clearsightstudio/ProMotion.png)](https://codeclimate.com/github/clearsightstudio/ProMotion)

## A new way to easily build RubyMotion apps.

ProMotion is a RubyMotion gem that makes iOS development more like Ruby and less like Objective-C.

Turning this:

```ruby
class AppDelegate
  attr_accessor :window
  
  def application(application, didFinishLaunchingWithOptions: options)
    rootView = RootViewController.alloc.initWithNibName:nil, bundle:nil)
    @navController = UINavigationController.alloc.initWithRootViewController(rootView)
    self.window.setRootViewController(@navController)
    self.window.makeKeyAndVisible
    true
  end
end

class RootViewController < UIViewController
  # ...
  def push_new_view_controller
    newViewController = NewViewController.alloc.initWithNibName(nil, bundle:nil)
    self.navigationController.pushViewController(newViewController, animated:true)
  end
end
```

...into this:

```ruby
class AppDelegate < PM::Delegate
  def on_load
    open RootScreen.new(nav_bar: true)
  end
end

class RootScreen < PM::Screen
  # ...
  def push_new_screen
    open NewScreen
  end
end
```

Featured on the RubyMotion blog: [http://blog.rubymotion.com/post/50523137515/introducing-promotion-a-full-featured-rubymotion](http://blog.rubymotion.com/post/50523137515/introducing-promotion-a-full-featured-rubymotion)

**Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*

- [ProMotion ](#promotion-)
  - [A new way to easily build RubyMotion apps.](#a-new-way-to-easily-build-rubymotion-apps)
{'fraction_non_alphanumeric': 0.11890606420927467, 'fraction_numerical': 0.01743955608402695, 'mean_word_length': 5.141119221411192, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1477148', 'n_tokens_mistral': 883, 'n_tokens_neox': 805, 'n_words': 163}