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

🤑 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

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

  • 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
    • Showing results for:
    • Ruby
    • Ruby Modules
    • Store Inventory Using Modules
    • Close
  • 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 on Dec 12, 2019 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 on Jan 28, 2019 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 on Jan 28, 2019 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 on Oct 23, 2018 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 on Sep 22, 2017 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 on Jun 27, 2017 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 on Apr 6, 2017 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 on Mar 31, 2017 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 on Dec 5, 2016 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 on Aug 1, 2016 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 on Aug 1, 2016 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 on Jul 30, 2016 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 on Jul 30, 2016 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 on Jun 19, 2016 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 on Jun 18, 2016 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 on Apr 4, 2016 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 on Apr 1, 2016 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 on Mar 7, 2016 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 on Feb 9, 2016 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 on Dec 18, 2015 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 on Nov 6, 2015 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 on Sep 14, 2015 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 on Aug 12, 2015 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 on Aug 3, 2015 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 on Jul 13, 2015 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.