Coder Social home page Coder Social logo

phase-3-oo-ruby-video-review-object-models's Introduction

Video: Object Model Review

This video gives an overview of object models and how to make our classes more powerful.

Learning Goals

  • Create a class and add reader and writer methods
  • Define class methods with an explicit self receiver
  • Capture new instances of self in the initialize method
  • Use a class variable or constant to hold the instances of the class
  • Explain why we avoid using the return keyword from within a loop
  • Define a find_by_location method to find a particular instance of a class
  • Abstract the logic of the find_by_location method to a detect enumerable method
  • Define a class method find_all_by_location to find all instances with that location using the select enumerable method
  • Define a custom constructor method to create instances from attributes scraped from a website
<iframe width="100%" height="720" src="https://www.youtube.com/embed/vENMFapLonA?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>

Resources

Additional Video on Object Models

  • This video also covers many of the above topics in the main lesson video. Feel free to use this as another refresher on object models.

phase-3-oo-ruby-video-review-object-models's People

Contributors

annjohn avatar ihollander avatar lizbur10 avatar maxwellbenton avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phase-3-oo-ruby-video-review-object-models's Issues

The video doesnt load on canvas or on youtube

Thanks for raising this issue! Future learners thank you for your diligence. In
order to help the curriculum team address the problem, please use this template
to submit your feedback. We'll work on addressing the issue as soon as we can.

Please fill out as much of the information below as you can (it's ok if you
don't fill out every section). The more context we have, the easier it will be
to fix your issue!

Note: you should only raise issues related to the contents of this lesson.
If you have questions about your code or need help troubleshooting, reach out to
an instructor/your peers.


Link to Canvas

Add a link to the assignment in Canvas here.

Describe the bug

Write a clear and concise description of what the bug is. Include the file and
line number(s) if possible.

What is the expected behavior?

Write a clear and concise description of what you expected to happen.

Screenshots

If applicable, attach screenshots to help explain your problem.

What OS are you using?

  • OS X
  • WSL
  • Linux

Any additional context?

Add any other context about the problem here.

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.