Class: Aurita::GUI::Submit_Button
- Defined in:
- lib/aurita-gui/button.rb
Overview
Specialization of Aurita::GUI::Element for submit buttons. Set @tag to :input, @type to :submit. Block argument will be used as button label (:value) Example:
b = Submit_Button.new(:class => :css_class) { 'click me' }
Instance Attribute Summary
Attributes inherited from Element
#attrib, #content, #parent, #tag, #type
Instance Method Summary collapse
-
#initialize(params, &block) ⇒ Submit_Button
constructor
A new instance of Submit_Button.
Methods inherited from Element
#+, #[], #[]=, #clear_floating, #dom_id, #dom_id=, #each, #empty?, #id, #id=, #length, #method_missing, #string, #to_ary
Constructor Details
#initialize(params, &block) ⇒ Submit_Button
Returns a new instance of Submit_Button.
54 55 56 57 58 59 60 61 |
# File 'lib/aurita-gui/button.rb', line 54 def initialize(params, &block) params[:tag] = :input params[:type] = :submit unless params[:type] if block_given? then params[:value] = yield end super(params) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Aurita::GUI::Element