Class: Capybarista::Session
- Inherits:
-
Object
- Object
- Capybarista::Session
- Includes:
- Extensions::Session, Finders
- Defined in:
- lib/capybarista.rb
Instance Attribute Summary collapse
-
#basis ⇒ Object
readonly
Returns the value of attribute basis.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capybara_session) ⇒ Session
constructor
A new instance of Session.
- #method_missing(name, *args, &block) ⇒ Object
- #within(input, *args, &block) ⇒ Object
Methods included from Extensions::Session
Methods included from Extensions::Base
Methods included from Finders
#all, #find, #find_button, #find_by_id, #find_field, #find_link, #first
Constructor Details
#initialize(capybara_session) ⇒ Session
Returns a new instance of Session.
46 47 48 |
# File 'lib/capybarista.rb', line 46 def initialize() @basis = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
66 67 68 |
# File 'lib/capybarista.rb', line 66 def method_missing(name, *args, &block) @basis.public_send(name, *args, &block) end |
Instance Attribute Details
#basis ⇒ Object (readonly)
Returns the value of attribute basis.
44 45 46 |
# File 'lib/capybarista.rb', line 44 def basis @basis end |
Class Method Details
.for(input) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/capybarista.rb', line 50 def self.for(input) if input.is_a? Capybarista::Session return input else return Capybarista::Session.new input end end |
Instance Method Details
#within(input, *args, &block) ⇒ Object
59 60 61 62 |
# File 'lib/capybarista.rb', line 59 def within(input, *args, &block) input = Capybarista::Element.unwrap(input) @basis.within(input, *args, &block) end |