Class: Gametel::Views::View
- Inherits:
-
Object
- Object
- Gametel::Views::View
- Defined in:
- lib/gametel/views/view.rb
Direct Known Subclasses
Button, CheckBox, Image, ListItem, Progress, RadioButton, Spinner, Text, WebView
Instance Attribute Summary collapse
-
#locator ⇒ Object
readonly
Returns the value of attribute locator.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
Instance Method Summary collapse
-
#initialize(platform, locator) ⇒ View
constructor
A new instance of View.
- #raw_view(&block) ⇒ Object
- #view_class ⇒ Object
Constructor Details
#initialize(platform, locator) ⇒ View
Returns a new instance of View.
6 7 8 9 10 |
# File 'lib/gametel/views/view.rb', line 6 def initialize(platform, locator) @platform = platform @locator = locator build_property_methods end |
Instance Attribute Details
#locator ⇒ Object (readonly)
Returns the value of attribute locator.
4 5 6 |
# File 'lib/gametel/views/view.rb', line 4 def locator @locator end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
4 5 6 |
# File 'lib/gametel/views/view.rb', line 4 def platform @platform end |
Instance Method Details
#raw_view(&block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/gametel/views/view.rb', line 16 def raw_view(&block) get_view_by_id(locator[:id], &block) if locator[:id] get_view_by_index(view_class, locator[:index], &block) if locator[:index] get_view_by_index(locator[:class], locator[:index] || 0, &block) if locator[:class] get_view_by_text(locator[:text], &block) if locator[:text] end |
#view_class ⇒ Object
12 13 14 |
# File 'lib/gametel/views/view.rb', line 12 def view_class 'android.view.View' end |