🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • gene c
    gene c
    13,630 Points

    Why are all instances declared and assigned to the same name 'shirt' or 'pant' instead of 'shirt1', 'shirt2' etcetc?

    Posted December 12, 2019 8:13am by gene c
    gene c
    13,630 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Creating an In Stock Report

    1 Answer

  • anthonybrackner
    anthonybrackner
    17,776 Points

    What is wrong with the following code? I keep getting an end of input error for line 26 but everything looks correct.

    Posted January 28, 2019 1:54am by anthonybrackner
    anthonybrackner
    17,776 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    2 Answers

  • anthonybrackner
    anthonybrackner
    17,776 Points

    Why is the "||" symbol required in stock_count method? Why isn't it simply "@stock_count = 0?"

    Posted January 28, 2019 1:39am by anthonybrackner
    anthonybrackner
    17,776 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    2 Answers

  • Joseph Park
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Joseph Park
    Front End Web Development Techdegree Student 6,746 Points

    Why have the ClassMethod?

    Posted October 23, 2018 4:05am by Joseph Park
    .a{fill-rule:evenodd;}techdegree
    Joseph Park
    Front End Web Development Techdegree Student 6,746 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Extend and Include

    1 Answer

  • Vitaliy Vynarchyk
    Vitaliy Vynarchyk
    4,962 Points

    What is wrong with my code?

    Posted September 22, 2017 11:34am by Vitaliy Vynarchyk
    Vitaliy Vynarchyk
    4,962 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Namespacing

    1 Answer

  • Mateusz LeÅ›niak
    Mateusz Leśniak
    4,762 Points

    Creating instances array

    Posted June 27, 2017 7:29pm by Mateusz Leśniak
    Mateusz Leśniak
    4,762 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Extend and Include

    0 Answers

  • sir a
    PLUS
    sir a
    Courses Plus Student 3,692 Points

    where the name and the size comes from? we just initialize the attribute "attributes"

    Posted April 6, 2017 1:35pm by sir a
    sir a
    Courses Plus Student 3,692 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Class Set Up

    1 Answer

  • M. Brown
    M. Brown
    29,923 Points

    Huh?

    Posted March 31, 2017 4:05pm by M. Brown
    M. Brown
    29,923 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Namespacing

    1 Answer

  • Clay Turner
    Clay Turner
    3,941 Points

    def stock_count=(number)

    Posted December 5, 2016 9:31pm by Clay Turner
    Clay Turner
    3,941 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    1 Answer

  • MICHAEL P
    MICHAEL P
    5,191 Points

    Got store.rb: 100: syntax error , unexpected keyword_end , expecting end of input . Not sure how to fix this Ruby error.

    Posted August 1, 2016 8:21pm by MICHAEL P
    MICHAEL P
    5,191 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Refactoring and Namespaces

    1 Answer

  • MICHAEL P
    MICHAEL P
    5,191 Points

    Not Sure How To Do Ruby Challenge. Please Help!

    Posted August 1, 2016 1:07am by MICHAEL P
    MICHAEL P
    5,191 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Extend an Include

    2 Answers

  • MICHAEL P
    MICHAEL P
    5,191 Points

    I don't know how to solve this Ruby challenge. Please help

    Posted July 30, 2016 1:14am by MICHAEL P
    MICHAEL P
    5,191 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    2 Answers

  • MICHAEL P
    MICHAEL P
    5,191 Points

    Need Help With Ruby Stock Check?

    Posted July 30, 2016 1:12am by MICHAEL P
    MICHAEL P
    5,191 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    0 Answers

  • Yan Kozlovskiy
    Yan Kozlovskiy
    30,427 Points

    Something is wrong with our self.included method and it isn't functioning correctly.

    Posted June 19, 2016 8:33am by Yan Kozlovskiy
    Yan Kozlovskiy
    30,427 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Debugging Errors

    1 Answer

  • Yan Kozlovskiy
    Yan Kozlovskiy
    30,427 Points

    How do you create a blank module in Ruby?

    Posted June 18, 2016 6:41pm by Yan Kozlovskiy
    Yan Kozlovskiy
    30,427 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Class Set Up

    1 Answer

  • Sergio Cruz
    Sergio Cruz
    15,550 Points

    Why is it that in the in_stock? method the stock_count is defined without an @?

    Posted April 4, 2016 10:13pm by Sergio Cruz
    Sergio Cruz
    15,550 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Creating an In Stock Report

    3 Answers

  • Erik Nuber
    Erik Nuber
    20,629 Points

    Just offering link to help understand better Getters/Setters and Virtual Attributes.

    Posted April 1, 2016 6:47pm by Erik Nuber
    Erik Nuber
    20,629 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    1 Answer

  • Jasmine Frantz
    Jasmine Frantz
    8,299 Points

    puts "Shirt 1 in stock?: %s" % shirt1.in_stock?

    Posted March 7, 2016 9:31pm by Jasmine Frantz
    Jasmine Frantz
    8,299 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    1 Answer

  • Daniel Lieberman
    Daniel Lieberman
    7,813 Points

    Why do we need to extend Enumerable from the Inventoryable module in the store project?

    Posted February 9, 2016 7:55pm by Daniel Lieberman
    Daniel Lieberman
    7,813 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Creating an In Stock Report

    6 Answers

  • simon lavery
    simon lavery
    17,485 Points

    Any idea why this isnt working?

    Posted December 18, 2015 4:04pm by simon lavery
    simon lavery
    17,485 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Extend and Include

    3 Answers

  • brendan1701
    brendan1701
    11,913 Points

    What is the function/origin of the word "new" in "object = new(attributes)" in the ClassMethods module?

    Posted November 6, 2015 10:05pm by brendan1701
    brendan1701
    11,913 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Extend and Include

    5 Answers

  • Kristoffer Hess
    Kristoffer Hess
    13,426 Points

    How do you indent highlighted text in Workspace?

    Posted September 14, 2015 6:48am by Kristoffer Hess
    Kristoffer Hess
    13,426 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Refactoring and Namespaces

    1 Answer

  • kabir k
    PLUS
    kabir k
    Courses Plus Student 18,036 Points

    The @ symbol in the Inventoryable module

    Posted August 12, 2015 5:22pm by kabir k
    kabir k
    Courses Plus Student 18,036 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    1 Answer

  • Grace Kelly
    Grace Kelly
    33,990 Points

    Why does the stock_count method require a "="?

    Posted August 3, 2015 3:02pm by Grace Kelly
    Grace Kelly
    33,990 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    1 Answer

  • Kevin Naegele
    Kevin Naegele
    10,868 Points

    Stock count module is not working

    Posted July 13, 2015 12:16pm by Kevin Naegele
    Kevin Naegele
    10,868 Points
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Stock Counts

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.