Class: Steam::Id::Steam2Printer

Inherits:
Object
  • Object
show all
Defined in:
lib/steam/id/steam2_printer.rb

Overview

Prints a given Steam::Id in the Steam2 format

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ Steam2Printer

Creates a new instance of the Steam2Printer



8
9
10
# File 'lib/steam/id/steam2_printer.rb', line 8

def initialize(base)
  @base = base
end

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



5
6
7
# File 'lib/steam/id/steam2_printer.rb', line 5

def base
  @base
end

Instance Method Details

Prints the String

Returns:

  • (String)


15
16
17
# File 'lib/steam/id/steam2_printer.rb', line 15

def print
  "STEAM_#{universe_digit}:#{ & 1}:#{ >> 1}"
end