Sha256: 1337bb22f8953742307f14ffebc98bda8dd0a4ca093b0da89b826b30bf1a1145

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 Bytes

Contents

require 'pry'

class CoffeeBreak::Beans 

    # Display collection of coffee with corresponding attributes
     
    attr_accessor :name, :label, :price, :details, :link

    # Stores every instance of Beans and anything collected from scrape methods will display in CLI.

    @@all = [] 

        def initialize(name, label, price, link, details=nil) 
            @name = name
            @label = label 
            @price = price
            @details = details
            @link = link
            @@all << self 
        end 

        def self.all
            @@all
        end

end 

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coffeebreak-0.2.0 lib/beans.rb