Class: Steam::Id::Steam2Printer
- Inherits:
-
Object
- Object
- Steam::Id::Steam2Printer
- Defined in:
- lib/steam/id/steam2_printer.rb
Overview
Prints a given Steam::Id in the Steam2 format
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
Instance Method Summary collapse
-
#initialize(base) ⇒ Steam2Printer
constructor
Creates a new instance of the Steam2Printer.
-
#print ⇒ String
Prints the String.
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
#base ⇒ Object (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
#print ⇒ String
Prints the String
15 16 17 |
# File 'lib/steam/id/steam2_printer.rb', line 15 def print "STEAM_#{universe_digit}:#{account_id & 1}:#{account_id >> 1}" end |