Module: Plist4r::Script::ScriptModuleMethods

Defined in:
lib/plist4r/mixin/script.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#__script_scopeObject (readonly)

Returns the value of attribute __script_scope.



118
119
120
# File 'lib/plist4r/mixin/script.rb', line 118

def __script_scope
  @__script_scope
end

Instance Method Details

#__local_variable_get(name) ⇒ Object

Gets value of local var in the script. Does not see local vars in files loaded or required by that script.



128
129
130
# File 'lib/plist4r/mixin/script.rb', line 128

def __local_variable_get(name)
  eval(name.to_s, __script_scope)
end

#__local_variablesObject

Gets list of local vars in the script. Does not see local vars in files loaded or required by that script.



122
123
124
# File 'lib/plist4r/mixin/script.rb', line 122

def __local_variables
  eval("local_variables", __script_scope)
end

#method_added(name) ⇒ Object

This is so that def meth... behaves like in Ruby’s top-level context. The implementation simply calls Module#module_function(name).



114
115
116
# File 'lib/plist4r/mixin/script.rb', line 114

def method_added(name) # :nodoc:
  module_function(name)
end