<commit_before>
require 'page-object/version'
require 'page-object/accessors'

#
# Module that when included adds functionality to a page object.  This module
# will add numerous class and instance methods that you use to define and
# interact with web pages.
#
# If we have a login page with a username and password textfield and a login
# button we might define our page like this:
#
# @example Login page example 
#   class LoginPage
#     include PageObject
#
#     text_field(:username, :id => 'user')
#     text_field(:password, :id => 'pass')
#     button(:login, :value => 'Login')
#   end
#
#
# We can then interact with this class by calling the generated methods.
#
# @example Interacting with our Login page example
#   browser = Watir::Browser.new :firefox
#   login_page = LoginPage.new(browser)
#   login_page.username = 'cheezy'
#   login_page.password = '<PASSWORD>'
#   login_page.login
#
module PageObject
  attr_reader :platform

  # Construct a new page object.  The browser parameter must be either a
  # Watir::Browser or Selenium::WebDriver::Driver.
  def initialize(browser)
    include_platform_driver(browser)
  end

  def self.included(cls)
    cls.extend PageObject::Accessors<commit_msg>trying to get the example formatting working<commit_after>
require 'page-object/version'
require 'page-object/accessors'

#
# Module that when included adds functionality to a page object.  This module
# will add numerous class and instance methods that you use to define and
# interact with web pages.
#
# If we have a login page with a username and password textfield and a login
# button we might define our page like the one below.  We can then interact with
# the object using the generated methods.
#
# @example Login page example 
#   class LoginPage
#     include PageObject
#
#     text_field(:username, :id => 'user')
#     text_field(:password, :id => '<PASSWORD>')
#     button(:login, :value => 'Login')
#   end
#
#   ...
#
#   browser = Watir::Browser.new :firefox
#   login_page = LoginPage.new(browser)
#   login_page.username = 'cheezy'
#   login_page.password = '<PASSWORD>'
#   login_page.login
#
module PageObject
  attr_reader :platform

  # Construct a new page object.  The browser parameter must be either a
  # Watir::Browser or Selenium::WebDriver::Driver.
  def initialize(browser)
    include_platform_driver(browser)
  end

  def self.included(cls)
    cls.extend PageObject::Accessors
{'fraction_non_alphanumeric': 0.09337721102426985, 'fraction_numerical': 0.0, 'mean_word_length': 4.024793388429752, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1955592', 'n_tokens_mistral': 713, 'n_tokens_neox': 702, 'n_words': 261}