Class | AutomateIt::FieldManager::Struct |
In: |
lib/automateit/field_manager.rb
|
Parent: | AutomateIt::FieldManager::BaseDriver |
A FileManager driver that queries a data structure.
# File lib/automateit/field_manager.rb, line 61 def lookup(search=nil) return @struct if search.nil? or search == "*" ref = @struct for key in search.to_s.split("#") ref = ref[key] end if ref return ref else raise IndexError.new("can't find value for: #{search}") end end