PATH:
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Module
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Evaluates the string or block in the context of <em>mod</em>. This can be used to add methods to a class. <tt>module_eval</tt> returns the result of evaluating its argument. The optional <em>filename</em> and <em>lineno</em> parameters set the text for error messages. - !ruby/struct:SM::Flow::VERB body: " class Thing\n end\n a = %q{def hello() "Hello there!" end}\n Thing.module_eval(a)\n puts Thing.new.hello()\n Thing.module_eval("invalid code", "dummy", 123)\n" - !ruby/struct:SM::Flow::P body: <em>produces:</em> - !ruby/struct:SM::Flow::VERB body: " Hello there!\n dummy:123:in `module_eval': undefined local variable\n or method `code' for Thing:Class\n" full_name: Module#module_eval is_singleton: false name: module_eval params: | mod.class_eval(string [, filename [, lineno]]) => obj mod.module_eval {|| block } => obj visibility: public
[-] method_removed-i.yaml
[edit]
[-] class_variable_defined%3f-i.yaml
[edit]
[-] %3c%3d%3e-i.yaml
[edit]
[-] undef_method-i.yaml
[edit]
[-] autoload-i.yaml
[edit]
[-] included-i.yaml
[edit]
[-] instance_methods-i.yaml
[edit]
[-] private_class_method-i.yaml
[edit]
[-] attr_accessor-i.yaml
[edit]
[-] private_instance_methods-i.yaml
[edit]
[-] autoload%3f-i.yaml
[edit]
[-] define_method-i.yaml
[edit]
[-] constants-i.yaml
[edit]
[-] protected-i.yaml
[edit]
[-] class_variables-i.yaml
[edit]
[-] class_eval-i.yaml
[edit]
[-] protected_instance_methods-i.yaml
[edit]
[-] include-i.yaml
[edit]
[-] name-i.yaml
[edit]
[-] method_added-i.yaml
[edit]
[-] module_eval-i.yaml
[edit]
[-] ancestors-i.yaml
[edit]
[-] method_undefined-i.yaml
[edit]
[-] const_set-i.yaml
[edit]
[-] const_missing-i.yaml
[edit]
[-] method_defined%3f-i.yaml
[edit]
[-] class_exec-i.yaml
[edit]
[-] %3d%3d%3d-i.yaml
[edit]
[-] attr-i.yaml
[edit]
[-] %3c-i.yaml
[edit]
[-] attr_reader-i.yaml
[edit]
[-] extend_object-i.yaml
[edit]
[-] alias_method-i.yaml
[edit]
[-] class_variable_set-i.yaml
[edit]
[-] private-i.yaml
[edit]
[-] include%3f-i.yaml
[edit]
[-] module_function-i.yaml
[edit]
[-] public-i.yaml
[edit]
[-] %3e-i.yaml
[edit]
[-] const_get-i.yaml
[edit]
[-] private_method_defined%3f-i.yaml
[edit]
[-] attr_writer-i.yaml
[edit]
[-] cdesc-Module.yaml
[edit]
[-] %3c%3d-i.yaml
[edit]
[-] public_class_method-i.yaml
[edit]
[-] append_features-i.yaml
[edit]
[-] %3d%3d-i.yaml
[edit]
[-] constants-c.yaml
[edit]
[-] extended-i.yaml
[edit]
[-] protected_method_defined%3f-i.yaml
[edit]
[+]
..
[-] remove_class_variable-i.yaml
[edit]
[-] module_exec-i.yaml
[edit]
[-] public_instance_methods-i.yaml
[edit]
[-] included_modules-i.yaml
[edit]
[-] %3e%3d-i.yaml
[edit]
[-] new-c.yaml
[edit]
[-] instance_method-i.yaml
[edit]
[-] remove_const-i.yaml
[edit]
[-] class_variable_get-i.yaml
[edit]
[-] remove_method-i.yaml
[edit]
[-] const_defined%3f-i.yaml
[edit]
[-] nesting-c.yaml
[edit]
[-] public_method_defined%3f-i.yaml
[edit]
[-] freeze-i.yaml
[edit]
[-] to_s-i.yaml
[edit]