Class: RETerm::Components::Entry

Inherits:
RETerm::Component show all
Includes:
RETerm::CDKComponent
Defined in:
lib/reterm/components/entry.rb

Overview

CDK Entry Component

Instance Attribute Summary

Attributes inherited from RETerm::Component

#window

Instance Method Summary collapse

Methods included from RETerm::CDKComponent

#activatable?, #activate!, #colors=, #component, #draw!, #value

Methods inherited from RETerm::Component

#activatable?, #activate!, #colored?, #colors=, #finalize!

Constructor Details

#initialize(args = {}) ⇒ Entry

Initialize the Entry component

Parameters:

  • args (Hash) (defaults to: {})

    entry params

Options Hash (args):

  • :title (String)

    title to assign to entry

  • :label (String)

    label to assign to entry

  • :min (Integer)

    min entry length

  • :max (Integer)

    max entry length



16
17
18
19
20
21
# File 'lib/reterm/components/entry.rb', line 16

def initialize(args={})
  @title   = args[:title] || ""
  @label   = args[:label] || ""
  @min_len = args[:min]   || 0
  @max_len = args[:max]   || 100
end