Class: Globs
- Inherits:
-
Object
- Object
- Globs
- Defined in:
- lib/pry-globs/globs.rb
Class Method Summary collapse
Class Method Details
.find(global_var) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/pry-globs/globs.rb', line 6 def find(global_var) ruby_globals = load_yaml return "Unexisting identifier." unless ruby_globals.key?(global_var) ruby_globals.fetch(global_var) end |
.load_yaml ⇒ Object
14 15 16 17 |
# File 'lib/pry-globs/globs.rb', line 14 def load_yaml global_variables_path = File.('../global_variables.yaml', __FILE__) @ruby_variables ||= YAML.load_file(global_variables_path) end |