Class: AlButton

Inherits:
AlWidget show all
Defined in:
lib/al_form.rb

Overview

ボタンウィジェット

Direct Known Subclasses

AlSubmit

Instance Attribute Summary

Attributes inherited from AlWidget

#filter, #foreign, #hidden, #label, #message, #name, #required, #tag_attr, #tag_type, #value

Instance Method Summary collapse

Methods inherited from AlWidget

#make_tag, #set_attr

Constructor Details

#initialize(name, arg = {}) ⇒ AlButton

(AlButton) constructor

Parameters:

  • name (String)

    ウィジェット識別名 英文字を推奨

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

    引数ハッシュ

See Also:



1266
1267
1268
1269
1270
1271
# File 'lib/al_form.rb', line 1266

def initialize( name, arg = {} )
  @tag_type ||= "button"
  super( name, arg )
  @label = arg[:label] || ""
  @value ||= name
end

Instance Method Details

#make_value(*arg) ⇒ String

(AlButton) HTML値の生成

Returns:

  • (String)

    表示しないため、ヌルストリングを返す



1300
1301
1302
# File 'lib/al_form.rb', line 1300

def make_value( *arg )
  return ""
end

#set_value(v) ⇒ Object Also known as: value=

Note:

なにもしない。

(AlButton) 値のセット

Parameters:

  • v

    セットする値



1280
1281
# File 'lib/al_form.rb', line 1280

def set_value( v )
end

#validateBoolean

(AlButton) バリデート

Returns:

  • (Boolean)

    always true



1290
1291
1292
# File 'lib/al_form.rb', line 1290

def validate()
  return true
end