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-react-0.10.0 lib/react/object.rb
reactrb-0.9.0 lib/react/object.rb