Class: HelloText
- Inherits:
-
Object
- Object
- HelloText
- Includes:
- Glimmer::UI::CustomShell
- Defined in:
- lib/glimmer-dsl-opal/samples/hello/hello_text.rb
Overview
Copyright © 2020-2022 Andy Maleh
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Instance Attribute Summary collapse
-
#center ⇒ Object
Returns the value of attribute center.
-
#default ⇒ Object
Returns the value of attribute default.
-
#left ⇒ Object
Returns the value of attribute left.
-
#multi ⇒ Object
Returns the value of attribute multi.
-
#no_border ⇒ Object
Returns the value of attribute no_border.
-
#password ⇒ Object
Returns the value of attribute password.
-
#read_only ⇒ Object
Returns the value of attribute read_only.
-
#right ⇒ Object
Returns the value of attribute right.
-
#telephone ⇒ Object
Returns the value of attribute telephone.
-
#wrap ⇒ Object
Returns the value of attribute wrap.
Attributes included from Glimmer::UI::CustomWidget
#body_root, #options, #parent, #swt_style
Instance Method Summary collapse
Methods included from Glimmer::UI::CustomShell
#close, encoded_request_parameter_string, #hide, included, #initialize, #open, request_parameter_string, requested?, requested_and_not_handled?, #show, #start_event_loop, #visible?
Methods included from Glimmer::UI::CustomWidget
add_custom_widget_namespaces_for, #add_observer, #async_exec, #attribute_setter, #can_add_observer?, #can_handle_observation_request?, #content, custom_widget_namespaces, for, #get_attribute, #handle_observation_request, #has_attribute?, #has_instance_method?, #has_style?, included, #initialize, #local_respond_to?, #method_missing, namespaces_for_class, #post_initialize_child, reset_custom_widget_namespaces, #respond_to?, #set_attribute, #sync_exec
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer::UI::CustomWidget
Instance Attribute Details
#center ⇒ Object
Returns the value of attribute center.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def center @center end |
#default ⇒ Object
Returns the value of attribute default.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def default @default end |
#left ⇒ Object
Returns the value of attribute left.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def left @left end |
#multi ⇒ Object
Returns the value of attribute multi.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def multi @multi end |
#no_border ⇒ Object
Returns the value of attribute no_border.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def no_border @no_border end |
#password ⇒ Object
Returns the value of attribute password.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def password @password end |
#read_only ⇒ Object
Returns the value of attribute read_only.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def read_only @read_only end |
#right ⇒ Object
Returns the value of attribute right.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def right @right end |
#telephone ⇒ Object
Returns the value of attribute telephone.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def telephone @telephone end |
#wrap ⇒ Object
Returns the value of attribute wrap.
25 26 27 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 25 def wrap @wrap end |
Instance Method Details
#telephone?(text) ⇒ Boolean
144 145 146 |
# File 'lib/glimmer-dsl-opal/samples/hello/hello_text.rb', line 144 def telephone?(text) !!text.match(/^\d{0,3}[-.\/]?\d{0,3}[-.\/]?\d{0,4}$/) end |