Class: Kodo::Algorithms::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kodo/algorithms/base.rb

Direct Known Subclasses

Base64, Md5, Random, Sha1, Uuid

Constant Summary collapse

DEFAULT_SEED_LIBRARY =
SecureRandom

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count, max_length) ⇒ Base

Returns a new instance of Base.



8
9
10
11
# File 'lib/kodo/algorithms/base.rb', line 8

def initialize(count, max_length)
  self.count = count
  self.max_length = max_length
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



4
5
6
# File 'lib/kodo/algorithms/base.rb', line 4

def count
  @count
end

#max_lengthObject

Returns the value of attribute max_length.



4
5
6
# File 'lib/kodo/algorithms/base.rb', line 4

def max_length
  @max_length
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/kodo/algorithms/base.rb', line 4

def name
  @name
end

#seedObject

Returns the value of attribute seed.



4
5
6
# File 'lib/kodo/algorithms/base.rb', line 4

def seed
  @seed
end