Sha256: c4edde1109d72ec9ab35ef831a9449e994a39ea8c61c8d895c113ce0bc4436af

Contents?: true

Size: 302 Bytes

Versions: 3

Compression:

Stored size: 302 Bytes

Contents

class Rubotnik::User
  attr_reader :id
  attr_accessor :session

  def initialize(id)
    @id = id
    @commands = []
    @session = {}
  end

  def current_command
    @commands.last
  end

  def assign_command(command)
    @commands << command
  end

  def reset_command
    @commands = []
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubotnik-0.2.3 lib/rubotnik/user.rb
rubotnik-0.2.2 lib/rubotnik/user.rb
rubotnik-0.2.1 lib/rubotnik/user.rb