Module: Language

Included in:
Base
Defined in:
lib/skeleton/languages.rb

Constant Summary collapse

JAVA =
'java'
RUBY =
'rb'
PYTHON =
'py'

Instance Method Summary collapse

Instance Method Details

#java(method_name, locator_type, value) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/skeleton/languages.rb', line 6

def java(method_name, locator_type, value)
  <<~JAVA
    By #{camel_style(method_name)}() {
      return MobileBy.#{locator_type[:java]}("#{value}");
    }

  JAVA
end

#ruby(method_name, locator_type, value) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/skeleton/languages.rb', line 15

def ruby(method_name, locator_type, value)
  <<~RUBY
    def #{snake_style(method_name)}
      return :#{locator_type[:ruby]}, "#{value}"
    end

  RUBY
end