background preloader

RUBY

Facebook Twitter

5.  More About Methods. So far we've seen a number of different methods, puts and gets and so on (Pop Quiz: List all of the methods we have seen so far! There are ten of them; the answer is below.), but we haven't really talked about what methods are. We know what they do, but we don't know what they are. But really, that is what they are: things that do stuff. If objects (like strings, integers, and floats) are the nouns in the Ruby language, then methods are like the verbs. And, just like in English, you can't have a verb without a noun to do the verb. For example, ticking isn't something that just happens; a clock (or a watch or something) has to do it. In English we would say, "The clock ticks. " So, did you take the quiz? So as I was saying, just as every verb needs a noun, so every method needs an object.

Puts 'hello '.+ 'world' puts (10.* 9).+ 9 hello world 99 It isn't very pretty, so we won't ever write it like that; however, it's important to understand what is really happening. Warning pots desserts ? And.

Banque de plugins

D. Bur : plugins de cet auteur. Banque de données. What is ruby? 0.  Getting Started. When you program a computer, you have to "speak" in a language your computer understands: a programming language. There are lots and lots of different languages out there, and many of them are excellent. In this tutorial I chose to use my favorite programming language, Ruby.

Aside from being my favorite, Ruby is also the easiest programming language I have seen (and I've seen quite a few). In fact, that's the real reason I'm writing this tutorial: I didn't decide to write a tutorial, and then choose Ruby because it's my favorite; instead, I found Ruby to be so easy that I decided there really ought to be a good beginner's tutorial which uses it. When you write something in a human language, what is written is called text. Code . If you come across something you don't understand, or you have a question which wasn't answered, write it down and keep reading! But first we need to download and install Ruby onto your computer. Windows Installation The Windows installation of Ruby is a breeze. Ruby 2.1.1 Standard Library Documentation. RubyLibs on Phrogz. Programming Ruby: The Pragmatic Programmer's Guide.

Apprendre

Apprenez Ruby. Introduction to Ruby. Decryptage. Base64 Decode and Encode - Online.