Class: React::Component::Styles
- Inherits:
-
Object
- Object
- React::Component::Styles
- Defined in:
- lib/react/component/styles.rb
Instance Method Summary collapse
-
#initialize(native) ⇒ Styles
constructor
A new instance of Styles.
- #method_missing(prop, *args, &block) ⇒ Object
- #to_n ⇒ Object
Constructor Details
#initialize(native) ⇒ Styles
Returns a new instance of Styles.
4 5 6 |
# File 'lib/react/component/styles.rb', line 4 def initialize(native) @native = native end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(prop, *args, &block) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/react/component/styles.rb', line 8 def method_missing(prop, *args, &block) %x{ if (typeof #@native[prop] === 'undefined') { return #{nil}; } return #@native[prop]; } end |
Instance Method Details
#to_n ⇒ Object
15 16 17 |
# File 'lib/react/component/styles.rb', line 15 def to_n @native end |