Module: Octoball::CurrentShardTracker
- Defined in:
- lib/octoball/current_shard_tracker.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#current_shard ⇒ Object
readonly
Returns the value of attribute current_shard.
Instance Method Summary collapse
Instance Attribute Details
#current_shard ⇒ Object (readonly)
Returns the value of attribute current_shard.
5 6 7 |
# File 'lib/octoball/current_shard_tracker.rb', line 5 def current_shard @current_shard end |
Instance Method Details
#==(other) ⇒ Object
13 14 15 |
# File 'lib/octoball/current_shard_tracker.rb', line 13 def ==(other) super && current_shard == other.current_shard end |
#becomes(klass) ⇒ Object
7 8 9 10 11 |
# File 'lib/octoball/current_shard_tracker.rb', line 7 def becomes(klass) became = super became.instance_variable_set(:@current_shard, current_shard) became end |