Coder Social home page Coder Social logo

conventionalc's Introduction

#ConventionalC

Cocoapod and static library to provide defaults, configurability, and convenience methods for terse Objective-C.

  • Rubyish categories approximate methods of Ruby objects.
  • Conventions for initializers and other methods reduce obvious and nil arguments.
  • Xib configuration is enabled for properties that usually require coding.
  • Terse alternatives for common operations are provided.

Build Status Pod Version Pod Platform

develop Build Status

##Installation The recommended approach for installing ConventionalC is via the CocoaPods package manager. It may also be installed as a subproject, preferably from a git submodule, and built as standard static library.

##Rubyish Categories Objective-C equivalents are provided for many ruby methods. Methods are based off of Ruby 2.0. Objective-C conventions are followed; For example, boolean returning methods start with verbs like 'is'. Methods with mutable versions like collect! are named with a noun like collected for the immutable version and with a verb like collect for the mutable. Where typing is important, multiple methods may be provided where only one is needed for Ruby.

Examples:

  • Array.new(10, 'A') -> [NSArray newWithSize:10 object:@"A"]
  • Array.new[a, b, c] -> [NSArray new:a, b, c, nil]
  • array.empty? -> array.isEmpty
  • array.map(...) -> [array mapped:...]
  • array.map!(...) -> [mutableArray map:...]
  • string.start_with('prefix') -> [string startsWith:@"prefix"]
  • string.start_with('prefix1', 'prefix2') -> [string startsWithAny:@[@"prefix1", @"prefix2"]]

conventionalc's People

Contributors

peterdeweese avatar alistra avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.