lib/glimmer/swt/custom/shape.rb in glimmer-dsl-opal-0.28.3 vs lib/glimmer/swt/custom/shape.rb in glimmer-dsl-opal-0.29.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2007-2021 Andy Maleh +# Copyright (c) 2007-2022 Andy Maleh # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, @@ -38,13 +38,13 @@ class << self def create(parent, keyword, args, &property_block) potential_shape_class_name = keyword.to_s.camelcase(:upper).to_sym if constants.include?(potential_shape_class_name) - const_get(potential_shape_class_name).new(parent, args, &property_block) + const_get(potential_shape_class_name).new(parent, args, property_block) else - new(parent, args, &property_block) + new(parent, args, property_block) end end def valid?(parent, keyword, args, &block) return true if keyword.to_s == 'shape' @@ -161,10 +161,10 @@ options = args.last if args.last.is_a?(Hash) super_invocation = options && options[:super] if !super_invocation && has_attribute?(method_name) true else - super(method_name, *args, &block) + super(method_name, (args.first if args.first == true), &block) end end def attach(the_parent_dom_element) the_parent_dom_element.html("#{the_parent_dom_element.html()}\n#{@dom}")