class AutomationObject::Dsl::ModalProxy
Public Class Methods
@param [AutomationObject::BluePrint::Composite::Modal] blue_prints @param [AutomationObject::State::Screen] state @param [Symbol] name
AutomationObject::Dsl::Proxy::new
# File lib/automation_object/dsl/modal.rb, line 25 def initialize(blue_prints, state, name) super Modal, blue_prints, state, name end
Public Instance Methods
@return [Boolean]
# File lib/automation_object/dsl/modal.rb, line 42 def active? @state.active? end
Retrieve element from composite @param name [String, Symbol] name of element @raise [AutomationObject::Dsl::Error::ElementDoesNotExistError] @return [AutomationObject::Dsl::ElementProxy]
# File lib/automation_object/dsl/modal.rb, line 58 def element(name) name = name.to_sym raise AutomationObject::Dsl::Error::ElementDoesNotExistError, name unless @subject.to_h.include?(name) @state.utilize @subject.send(name) end
Retrieve element array from composite @param name [String, Symbol] name of element array @raise [AutomationObject::Dsl::Error::ElementArrayDoesNotExistError] @return [AutomationObject::Dsl::ElementArrayProxy]
# File lib/automation_object/dsl/modal.rb, line 70 def element_array(name) name = name.to_sym raise AutomationObject::Dsl::Error::ElementArrayDoesNotExistError, name unless @subject.to_h.include?(name) @state.utilize @subject.send(name) end
Retrieve element hash from composite @param name [String, Symbol] name of element hash @raise [AutomationObject::Dsl::Error::ElementHashDoesNotExistError] @return [AutomationObject::Dsl::ElementHashProxy]
# File lib/automation_object/dsl/modal.rb, line 82 def element_hash(name) name = name.to_sym raise AutomationObject::Dsl::Error::ElementHashDoesNotExistError, name unless @subject.to_h.include?(name) @state.utilize @subject.send(name) end
Go to this modal Will try to automatically reach it, will throw error if it cannot @raise [AutomationObject::Dsl::Error::AutoReachModalError] @return [Boolean]
# File lib/automation_object/dsl/modal.rb, line 50 def go @state.go end
@param [Symbol] method @param [Array, nil] args @param [Proc] block
AutomationObject::Proxy::Proxy#method_missing
# File lib/automation_object/dsl/modal.rb, line 32 def method_missing(method, *args, &block) return super if Modal.methods.include?(method) # Attempt to load modal if composite object contains that child @state.utilize if @subject.to_h.include?(method) super end