Sha256: 64899e7abfbfc83e5de2ded21086379511d1182ad1dc9baebfd0cb296ff61168

Contents?: true

Size: 529 Bytes

Versions: 2

Compression:

Stored size: 529 Bytes

Contents

# All code in the gem is namespaced under this module.
module CoderWally
    # Stores Badge properties
    class Badge 
        # Object properties 
        attr_reader :name, :badge, :description, :created
        
        # Initialise object with a hash of values
        def initialize(hashed_badge)
          @name = hashed_badge.fetch("name")
          @badge = hashed_badge.fetch("badge")
          @description = hashed_badge.fetch("description") 
          @created = hashed_badge.fetch("created")
        end
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
coder_wally-0.0.6 lib/coder_wally/badge.rb
coder_wally-0.0.5 lib/coder_wally/badge.rb