Sha256: 4754fa7bc74006a32e0c465fa01ae3fd81b2b3b94a8a6e7fdb06c59f352d76c0

Contents?: true

Size: 550 Bytes

Versions: 22

Compression:

Stored size: 550 Bytes

Contents

# Lazy load HTML tag constants in the form DIV or A
# This is needed to allow for a HAML expression like this DIV.my_class
class Object
  class << self
    alias _reactrb_tag_original_const_missing const_missing

    def const_missing(const_name)
      # Opal uses const_missing to initially define things,
      # so we always call the original, and respond to the exception
      _reactrb_tag_original_const_missing(const_name)
    rescue StandardError => e
      React::Component::Tags.html_tag_class_for(const_name) || raise(e)
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
hyper-component-0.99.6 lib/react/object.rb
hyper-component-0.99.5 lib/react/object.rb
hyper-component-0.99.4 lib/react/object.rb
hyper-component-0.99.3 lib/react/object.rb
hyper-component-0.99.2 lib/react/object.rb
hyper-component-0.99.1 lib/react/object.rb
hyper-component-0.99.0 lib/react/object.rb
hyper-react-1.0.0.lap28 lib/react/object.rb
hyper-react-1.0.0.lap23 lib/react/object.rb
hyper-react-1.0.0.lap22 lib/react/object.rb
hyper-react-1.0.0.lap21 lib/react/object.rb
hyper-react-0.12.7 lib/react/object.rb
hyper-react-0.12.6 lib/react/object.rb
hyper-react-0.12.5 lib/react/object.rb
hyper-react-0.12.4 lib/react/object.rb
hyper-react-0.12.3 lib/react/object.rb
hyper-react-0.12.2 lib/react/object.rb
hyper-react-0.12.1 lib/react/object.rb
hyper-react-0.12.0 lib/react/object.rb
hyper-react-0.11.0 lib/react/object.rb