Skip to content

Commit fea97fc

Browse files
committed
rename all component class instance variables to begin with __...
1 parent a07734a commit fea97fc

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ruby/hyper-component/lib/hyperstack/internal/component/class_methods.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ def hyper_component?
1313
end
1414

1515
def backtrace(*args)
16-
@dont_catch_exceptions = (args[0] == :none)
17-
@backtrace_off = @dont_catch_exceptions || (args[0] == :off)
16+
@__hyperstack_component_dont_catch_exceptions = (args[0] == :none)
17+
@__hyperstack_component_backtrace_off = @__hyperstack_component_dont_catch_exceptions || (args[0] == :off)
1818
end
1919

2020
def append_backtrace(message_array, backtrace)
@@ -52,11 +52,11 @@ def method_missing(name, *args, &children)
5252
end
5353

5454
def validator
55-
return @validator if @validator
55+
return @__hyperstack_component_validator if @__hyperstack_component_validator
5656
if superclass.respond_to?(:validator)
57-
@validator = superclass.validator.copy(props_wrapper)
57+
@__hyperstack_component_validator = superclass.validator.copy(props_wrapper)
5858
else
59-
@validator = Validator.new(props_wrapper)
59+
@__hyperstack_component_validator = Validator.new(props_wrapper)
6060
end
6161
end
6262

@@ -84,11 +84,11 @@ def params(&block)
8484
end
8585

8686
def props_wrapper
87-
return @props_wrapper if @props_wrapper
87+
return @__hyperstack_component_props_wrapper if @__hyperstack_component_props_wrapper
8888
if superclass.respond_to? :props_wrapper
89-
@props_wrapper = Class.new(superclass.props_wrapper)
89+
@__hyperstack_component_props_wrapper = Class.new(superclass.props_wrapper)
9090
else
91-
@props_wrapper ||= Class.new(PropsWrapper)
91+
@__hyperstack_component_props_wrapper ||= Class.new(PropsWrapper)
9292
end
9393
end
9494

@@ -147,15 +147,15 @@ def native_mixin(item)
147147
end
148148

149149
def native_mixins
150-
@native_mixins ||= []
150+
@__hyperstack_component_native_mixins ||= []
151151
end
152152

153153
def static_call_back(name, &block)
154154
static_call_backs[name] = block
155155
end
156156

157157
def static_call_backs
158-
@static_call_backs ||= {}
158+
@__hyperstack_component_static_call_backs ||= {}
159159
end
160160

161161
def export_component(opts = {})

0 commit comments

Comments
 (0)