<commit_before># TE3270

This gem can be used to drive a 3270 terminal emulator.  You have to have a supported emulator installed on the
machines on which you use the gem.  Currently the only supported emulators are
[EXTRA! X-treme](http://www.attachmate.com/Products/Terminal+Emulation/Extra/xtreme/extra-x-treme.htm) by
Attachmate and [Quick3270](http://www.dn-computing.com/Quick3270.htm) by DN-Computing.  These are commercial
products and you will need to purchase one of them in order to use this gem.  We do plan to support other
emulators as time permits.

## Installation

Add this line to your application's Gemfile:

    gem 'te3270'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install te3270

## Usage

    class MainframeScreen
      include TE3270

      text_field(:userid, 10, 30, 20, true)
      text_field(:password, <PASSWORD>, 20, true)
    end

    emulator = TN3270.emulator_for :extra
    my_screen = MainframeScreen.new(emulator)
    my_screen.userid = 'the_id'
    my_screen.password = '<PASSWORD>'


## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
<commit_msg>more documentation<commit_after># TE3270

This gem can be used to drive a 3270 terminal emulator.  You have to have a supported emulator installed on the
machines on which you use the gem.  Currently the only supported emulators are
[EXTRA! X-treme](http://www.attachmate.com/Products/Terminal+Emulation/Extra/xtreme/extra-x-treme.htm) by
Attachmate and [Quick3270](http://www.dn-computing.com/Quick3270.htm) by DN-Computing.  These are commercial
products and you will need to purchase one of them in order to use this gem.  We do plan to support other
emulators as time permits.

## Installation

Add this line to your application's Gemfile:

    gem 'te3270'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install te3270

## Usage

You can create classes that a similar to page-object classes.  In these classes you can define
the various fields that you wish to interact with on the screen.

    class MainframeScreen
      include TE3270

      text_field(:userid, 10, 30, 20)
      text_field(:password, 12, 30, 20)
    end

    emulator = TE3270.emulator_for :extra do |platform|
      platform.session_file = 'sessionfile.edp'
    end
    my_screen = MainframeScreen.new(emulator)
    my_screen.userid = 'the_id'
    my_screen.password = '<PASSWORD>'

If you are using this gem with cucumber then you can register the ScreenFactory module with the
cucumber World like this:

    World(TE3270::ScreenFactory)

You also need to setup some hooks to start and stop the emulator:

    Begin do
      @emulator = TE3270.emulator_for :extra do |platform|
        platform.session_file = 'sessionfile.edp'
      end
    end

    After do
      TE3270.disconnect(@emulator)
    end

This allows you to use the `on` method in your step definitions like this:

    on(MainframeScreen) do |screen|
      screen.userid = 'the_id'
      screen.password = '<PASSWORD>'
    end

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

{'fraction_non_alphanumeric': 0.07882489819662594, 'fraction_numerical': 0.030831878999418267, 'mean_word_length': 3.50130890052356, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3558971', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1034, 'n_words': 417}