Class: UnderOs::UI::View
- Includes:
- Animation, Commons, Dimensions, Events, Manipulation, Styles, Traversing, Wrap
- Defined in:
- lib/under_os/ui/view.rb
Direct Known Subclasses
Collection, Collection::Item, Div, Form, Icon, Image, Input, Label, Locker, Progress, Scroll, Sidebar, Spinner
Constant Summary
Constants included from Wrap
Wrap::INSTANCES_CACHE, Wrap::RAW_WRAPS_MAP, Wrap::WRAPS_TAGS_MAP
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ View
constructor
A new instance of View.
- #inspect ⇒ Object
Methods included from Manipulation
#append, #clear, #insert, #insertTo, #prepend, #remove
Methods included from Traversing
#children, #empty?, #find, #first, #matches, #parent, #siblings
Methods included from Dimensions
#position, #position=, #size, #size=
Methods included from Animation
#animate, #fade_in, #fade_out, #highlight
Methods included from Commons
#data, #data=, #hidden, #hide, #id, #id=, #page, #show, #tagName, #toggle, #visible
Methods included from Styles
#addClass, #className, #className=, #classNames, #classNames=, #hasClass, #radioClass, #removeClass, #repaint, #style, #style=, #toggleClass
Methods included from Events
Methods included from Wrap
Constructor Details
#initialize(options = {}) ⇒ View
Returns a new instance of View.
13 14 15 16 17 18 19 |
# File 'lib/under_os/ui/view.rb', line 13 def initialize(={}) self.id = .delete(:id) if .has_key?(:id) self.className = .delete(:class) if .has_key?(:class) self.style = .delete(:style) if .has_key?(:style) self.on = .delete(:on) if .has_key?(:on) self.data = .delete(:data) if .has_key?(:data) end |
Instance Method Details
#inspect ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/under_os/ui/view.rb', line 21 def inspect params = {tag: tagName} params[:id] = id if id params[:class] = className unless classNames.empty? params = params.map do |key, value| "#{key}=\"#{value}\"" end "#<#{self.class.name} #{params.join(" ")}>" end |