Class: PrimalInstinct::Generator::RubyPrime
- Inherits:
-
Object
- Object
- PrimalInstinct::Generator::RubyPrime
- Defined in:
- lib/primal_instinct/generator/ruby_prime.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(length) ⇒ RubyPrime
constructor
A new instance of RubyPrime.
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
#length ⇒ Object (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
#call ⇒ Object
11 12 13 |
# File 'lib/primal_instinct/generator/ruby_prime.rb', line 11 def call Prime.first(length) end |