Class: EasyInstaller::Sandbox::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_installer/sandbox.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw_result, modules) ⇒ Result

Returns a new instance of Result.



79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/easy_installer/sandbox.rb', line 79

def initialize(raw_result, modules)
  @data = {}
  @raw_result = raw_result
  modules.each do |single_module|
    @raw_result.each do |result|
      data = single_module.result_analize(result)
      unless data == false
        @data[single_module.name] = [] unless @data[single_module.name]
        @data[single_module.name] << data
      end
    end
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object



93
94
95
96
# File 'lib/easy_installer/sandbox.rb', line 93

def method_missing(method_name, *args)
  @data[method_name.to_s] ||= []
  @data[method_name.to_s]
end