<commit_before><commit_msg>Creating the common abstract bicycle class: 1st iteration<commit_after>class Bicycle {
}

export class RoadBike extends Bicycle {
    constructor(options = {}) {
        super(options);
        ({
            style: this.style,
            size: this.size,
            tape_color: this.tape_color,
            front_shock: this.front_shock,
            rear_shock: this.rear_shock
        } = options);
    }

    spares() {
        return {
            chain: '10-speed',
            tire_size: '23',
            tape_color: this.tape_color
        };
    }
}

export class MountainBike extends Bicycle {
    constructor(options = {}) {
        super(options);
        ({
            front_shock: this.front_shock,
            rear_shock: this.rear_shock
        } = options);
    }

    spares() {
        let result = super.spares();
        result.rear_shock = this.rear_shock;

        return result;
    }
}

if (require.main == module) {
    const road_bike = new RoadBike({
        size: 'M',
        tape_color: 'red'
    });
    console.log(road_bike.size);

    const mountain_bike = new MountainBike({
        size: 'S',
        front_shock: 'Manitou',
        rear_shock: 'Fox'
    });

    console.log(mountain_bike.size);
}
{'fraction_non_alphanumeric': 0.11304347826086956, 'fraction_numerical': 0.003952569169960474, 'mean_word_length': 1.8642533936651584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '63112', 'n_tokens_mistral': 413, 'n_tokens_neox': 398, 'n_words': 78}