Class: Dbee::Providers::ActiveRecordProvider::ObfuscatedAliasMaker
- Inherits:
-
Object
- Object
- Dbee::Providers::ActiveRecordProvider::ObfuscatedAliasMaker
- Defined in:
- lib/dbee/providers/active_record_provider/obfuscated_alias_maker.rb
Overview
Derives new alias names and keeps count of ones already generated in order to avoid collision.
Instance Attribute Summary collapse
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#initialize(prefix = '') ⇒ ObfuscatedAliasMaker
constructor
A new instance of ObfuscatedAliasMaker.
- #make(_name) ⇒ Object
Constructor Details
#initialize(prefix = '') ⇒ ObfuscatedAliasMaker
Returns a new instance of ObfuscatedAliasMaker.
18 19 20 21 |
# File 'lib/dbee/providers/active_record_provider/obfuscated_alias_maker.rb', line 18 def initialize(prefix = '') @counter = -1 @prefix = prefix end |
Instance Attribute Details
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
16 17 18 |
# File 'lib/dbee/providers/active_record_provider/obfuscated_alias_maker.rb', line 16 def prefix @prefix end |
Instance Method Details
#make(_name) ⇒ Object
23 24 25 26 |
# File 'lib/dbee/providers/active_record_provider/obfuscated_alias_maker.rb', line 23 def make(_name) increment current end |