Git Product home page Git Product logo

fakehash-pca-000's Introduction

Fake Hashes

Objective

In this lab you will make a class that behaves like a hash.

Overview

  • You should be able to set values in our fake hash.
  • You should be able to find all values that have keys beginning with the letter a.
  • You should be able to get all the keys in the hash in a descending alphabetized array.

For instance, you should be able to call on the following methods:

fall_television = FakeHashWrapper.new

fall_television[:abc] = "How to Get Away with Murder"
fall_television[:nbc] = "Selfie"
fall_television[:amc] = "Walking Dead"
fall_television[:cbs] = "Scorpion"

fall_television[:nbc]
# => "Selfie"

fall_televison.keys
# => [:nbc, :cbs, :amc, :abc]

fall_televison.first_letter("a")
# => ["How to Get Away with Murder", "Walking Dead"]
  • Finally, you should be able to find keys in the hash regardless of whether they are strings or symbols.

For example:

fall_televison = FakeHashWrapper.new

fall_televison[:abc] = "black-ish"
fall_televison["cwtv"] = "The Flash"

fall_televison["abc"] 
# => "black-ish"

fall_televison[:cwtv]
# => "The Flash"

Instructions

This is a test-driven lab so run rspec to get started.

Resources

View Fake Hashes on Learn.co and start learning to code for free.

fakehash-pca-000's People

Contributors

kthffmn avatar blake41 avatar fislabstest avatar ahimmelstoss avatar fs-lms-test-bot avatar gillianwenhold avatar sarogers avatar

Watchers

James Cloos 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.