Class: RMQStylesheet
- Defined in:
- lib/project/ruby_motion_query/rmq_stylesheet.rb
Class Attribute Summary collapse
-
.application_was_setup ⇒ Object
Returns the value of attribute application_was_setup.
Instance Method Summary collapse
- #application_setup ⇒ Object
- #color(*params) ⇒ Object
-
#controller ⇒ Object
@ deprecated.
-
#controller=(value) ⇒ Object
@ deprecated.
-
#find(*working_selectors) ⇒ Object
Not calling rmq below for performance reasons (one less method invocation).
- #font ⇒ Object
- #image ⇒ Object
-
#initialize(parent_screen) ⇒ RMQStylesheet
constructor
A new instance of RMQStylesheet.
- #rmq(*working_selectors) ⇒ Object
- #screen ⇒ Object
- #setup ⇒ Object
Constructor Details
#initialize(parent_screen) ⇒ RMQStylesheet
Returns a new instance of RMQStylesheet.
2 3 4 5 6 7 8 9 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 2 def initialize(parent_screen) unless RMQStylesheet.application_was_setup RMQStylesheet.application_was_setup = true application_setup end @screen = parent_screen setup end |
Class Attribute Details
.application_was_setup ⇒ Object
Returns the value of attribute application_was_setup.
62 63 64 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 62 def application_was_setup @application_was_setup end |
Instance Method Details
#application_setup ⇒ Object
39 40 41 42 43 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 39 def application_setup # Override to do your overall setup for your applications. This # is where you want to add your custom fonts and colors # This only gets called once end |
#color(*params) ⇒ Object
49 50 51 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 49 def color(*params) RMQ.color(*params) end |
#controller ⇒ Object
@ deprecated
16 17 18 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 16 def controller @screen end |
#controller=(value) ⇒ Object
@ deprecated
12 13 14 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 12 def controller=(value) @screen = value end |
#find(*working_selectors) ⇒ Object
Not calling rmq below for performance reasons (one less method invocation)
24 25 26 27 28 29 30 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 24 def find(*working_selectors) # Not calling rmq below for performance reasons (one less method invocation) if @screen @screen.rmq(working_selectors) else super end end |
#font ⇒ Object
53 54 55 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 53 def font rmq.font end |
#image ⇒ Object
57 58 59 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 57 def image rmq.image end |
#rmq(*working_selectors) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 31 def rmq(*working_selectors) if @screen @screen.rmq(working_selectors) else super end end |
#screen ⇒ Object
20 21 22 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 20 def screen @screen end |
#setup ⇒ Object
45 46 47 |
# File 'lib/project/ruby_motion_query/rmq_stylesheet.rb', line 45 def setup # Override if you need to do setup in your specific stylesheet end |