Giter Club home page Giter Club logo

slsw_ruby's Introduction

Seven Languages in Seven Weeks - Ruby

Day 1: Findning a Nanny (2019-07-10)

To remember

  • 0 is logical true.
  • all parts of logical expression with | and & are evaluated.

Created code

guessnumber.rb: game where player have to guess a number from 1 to 10.

Day 2: Floating Down from the Sky (2019-07-11)

To remember

  • yeld in caller calls the code block.

Created code

  • fourperline.rb: print content of an array of sixteen numbers, four numbers at a time, using just each. Than do the same with each_slice in Enumerable.
  • hashtotree.rb: a Tree class with initializer accepting nested structure with hashes and arrays like this: { 'grandpa' => { 'dad' => { 'child 1' => {}, 'child 2' => {} }, 'uncle' => { 'child 3' => {}, 'child 4' => {} } } }.
  • simplegrep.rb: a simple grep that prints lines of file containing a phrase in that line using a regex match, include line numbers. Example of usage: ./simplegrep.rb loremipsum.txt "int[a-z]ger"

Day 3: Serious Change (2019-07-12)

To remember

  • n/a

Created code

  • csvrow.rb: modified csv sample application to support an each method to return CsvRow object using methon_missing at CsvRow to return the value for column for a given heading.

(eof)

slsw_ruby's People

Contributors

aexg 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.