Module: Testable::Ready::ReadyAttributes
- Defined in:
- lib/testable/ready.rb
Overview
The ReadyAttributes contains methods that can be called directly on the interface class definition. These are very much like the attributes that are used for defining aspects of the pages, such as ‘url_is` or `title_is`. These attributes are included separately so as to maintain more modularity.
Instance Method Summary collapse
-
#page_ready(&block) ⇒ Object
(also: #page_ready_when)
When this attribute method is specified on an interface, it will append the validation provided by the block.
-
#ready_validations ⇒ Object
This method will provide a list of the ready_validations that have been defined.
Instance Method Details
#page_ready(&block) ⇒ Object Also known as: page_ready_when
When this attribute method is specified on an interface, it will append the validation provided by the block.
26 27 28 |
# File 'lib/testable/ready.rb', line 26 def page_ready(&block) _ready_validations << block end |
#ready_validations ⇒ Object
This method will provide a list of the ready_validations that have been defined. This list will contain the list in the order that the validations were defined in.
16 17 18 19 20 21 22 |
# File 'lib/testable/ready.rb', line 16 def ready_validations if superclass.respond_to?(:ready_validations) superclass.ready_validations + _ready_validations else _ready_validations end end |