14 Mar '14, 10pm

Back to Basics: Polymorphism and Ruby

Back to Basics: Polymorphism and Ruby Britt Ballard March 14, 2014 ruby Polymorphism - the provision of a single interface to entities of different types Polymorphism is one of the fundamental features of object oriented programming, but what exactly does it mean? At its core, in Ruby, it means being able to send the same message to different objects and get different results. Let's look at a few different ways to achieve this. Inheritance One way we can achieve polymorphism is through inheritance. Let's use the template method to create a simple file parser. First let's create a GenericParser class that has a parse method. Since this is a template the only thing this method will do is raise an exception: class GenericParser def parse raise NotImplementedError, 'You must implement the parse method' end end Now we need to make a JsonParser class that inherits from GenericPa...

Full article: http://robots.thoughtbot.com/back-to-basics-polymorphism-...

Tweets

Back to Basics: Polymorphism and Ruby

rubyflow.com 14 Mar '14, 10pm

Polymorphism is one of the fundamental features of object oriented programming, but what exactly does it mean? At its core...

Why do you like Ruby?

rubyflow.com 17 Mar '14, 5pm

Why do you like Ruby? Posted by timmillwood on March 17, 2014 — 0 comments While we work on client projects, personal proj...

Reasons to learn Ruby on Rails "1: Why You Shou...

buildingwebapps.com 14 Mar '14, 11pm

Based on the professional and balanced commentary in the first episode, I'm looking forward to the rest. One tip: your les...

@timbray Perhaps you would like this better?

intertwingly.net 14 Mar '14, 12pm

Angular.rb example Fri 14 Mar 2014 at 12:49 Tim Bray : If hating this is wrong, I don’t want to be right. Perhaps you woul...

Has anyone archived yet?

onestepback.org 18 Mar '14, 10pm

“Have I mentioned today how much git rocks?” — One of my office mates I hear that spontaneous outpouring of appreciation f...

How Rails 3 Makes Your Life Better #Ruby #Rails...

railsdispatch.com 16 Mar '14, 2pm

Rails 3 introduces a series of brand new features that will make your Rails applications better and your experience more p...

@steipete that almost looks like Ruby

apidock.com 18 Mar '14, 12pm

Defines a named attribute for this module, where the name is symbol. id2name, creating an instance variable (@name ) and a...

nice @alex_peachey made @envylabs’ Ruby 5! cc: ...

ruby5.envylabs.com 14 Mar '14, 3pm

Episode #447 – March 11th, 2014 Google's Summer of Code, Test-Driven Rails Part 2, putting the Can in CanCan, building you...

@einFluff Use this:

ruby.railstutorial.org 15 Mar '14, 5pm

It’s worth emphasizing that the goal of this book is not merely to teach Rails, but rather to teach web development with R...

The Air Jordan 14 is back #SPORTBLUE

twitter.com 18 Mar '14, 5am

To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content,...

#RubyFlow The GC in Ruby 2.1: understand it, se...

rubyflow.com 14 Mar '14, 9pm

The GC in Ruby 2.1: understand it, see it at work and tune it Posted by thorstenball on March 13, 2014 — 0 comments I wrot...

二十分鐘 Ruby 體驗:

ruby-lang.org 13 Mar '14, 4pm

下載安裝 文件 函式庫 社群 新聞 安全 關於 Ruby This site in other languages: Български , Deutsch , English , Español , Français , Bahasa Ind...

Try Ruby: learn the basics of the Ruby language...

tryruby.org 21 Mar '14, 2pm

JavaScript Not Detected TryRuby requires JavaScript to be enabled (it's an editor thing).

ruby-jmeter (2.11.3): This is a Ruby based DSL ...

rubygems.org 13 Mar '14, 9pm

This is a Ruby based DSL for writing JMeter test plans

.@TWC_Help Can I get an explanation as to how r...

intertwingly.net 13 Mar '14, 11pm

Time Warner Rate Hike Thu 13 Mar 2014 at 23:48 Backdrop: Google Fiber announces it is considering new cities, including Ra...