Class: PrimalInstinct::Generator::RubyPrime

Inherits:
Object
  • Object
show all
Defined in:
lib/primal_instinct/generator/ruby_prime.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(length) ⇒ RubyPrime

Returns a new instance of RubyPrime.



7
8
9
# File 'lib/primal_instinct/generator/ruby_prime.rb', line 7

def initialize(length)
  @length = length
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



5
6
7
# File 'lib/primal_instinct/generator/ruby_prime.rb', line 5

def length
  @length
end

Instance Method Details

#callObject



11
12
13
# File 'lib/primal_instinct/generator/ruby_prime.rb', line 11

def call
  Prime.first(length)
end