Class: React::Component::Location

Inherits:
Object
  • Object
show all
Includes:
Native::Wrapper
Defined in:
lib/react/component/location.rb

Instance Method Summary collapse

Constructor Details

#initialize(native) ⇒ Location

Returns a new instance of Location.



6
7
8
# File 'lib/react/component/location.rb', line 6

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



10
11
12
# File 'lib/react/component/location.rb', line 10

def method_missing(prop, *args, &block)
  @native.JS[:props].JS[:location].JS[prop]
end

Instance Method Details

#to_nObject



14
15
16
# File 'lib/react/component/location.rb', line 14

def to_n
  @native
end