Class: RegularExpression::Compiler::Ruby::Compiled

Inherits:
Object
  • Object
show all
Defined in:
lib/regular_expression/compiler/ruby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ Compiled

Returns a new instance of Compiled.



9
10
11
# File 'lib/regular_expression/compiler/ruby.rb', line 9

def initialize(source)
  @source = source
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



7
8
9
# File 'lib/regular_expression/compiler/ruby.rb', line 7

def source
  @source
end

Instance Method Details

#to_procObject



13
14
15
# File 'lib/regular_expression/compiler/ruby.rb', line 13

def to_proc
  eval(source) # rubocop:disable Security/Eval
end