class App42::Shopping::Category

Attributes

description[RW]
itemList[RW]
name[RW]

Public Class Methods

new(catalogue) click to toggle source

This is a constructor that takes no parameter

# File lib/shopping/Catalogue.rb, line 35
def initialize(catalogue)
  catalogue.categoryList.push(self)
end

Public Instance Methods

to_s() click to toggle source

Returns the Cart Response in JSON format.

@return the response in JSON format.

# File lib/shopping/Catalogue.rb, line 45
def to_s
  return "name : #{@name}" + "description : #{@description}";
end