File tree Expand file tree Collapse file tree 2 files changed +16
-30
lines changed Expand file tree Collapse file tree 2 files changed +16
-30
lines changed Original file line number Diff line number Diff line change 3434# It automatically sets the label, value, and disabled properties from the
3535# setting name and its definition attributes.
3636module Settings
37- class FormObjectDecorator
37+ class FormObjectDecorator < SimpleDelegator
3838 include ::ApplicationHelper
3939 include InputMethods
4040
41- attr_reader :object
41+ # @!attribute [r] object
42+ # @return [Primer::Forms::Dsl::FormObject] the original form object
43+ alias object __getobj__
4244
43- # Initializes a new Settings::FormObjectDecorator
45+ # @!method initialize(object)
46+ # Initializes a new {Settings::FormObjectDecorator}
4447 #
45- # @param object [Primer::Forms::Dsl::FormObject] The form object to be decorated
46- def initialize ( object )
47- @object = object
48- end
49-
50- def method_missing ( method , ...)
51- object . send ( method , ...)
52- end
53-
54- def respond_to_missing? ( method , include_private = false )
55- object . respond_to? ( method , include_private )
56- end
48+ # @param object [Primer::Forms::Dsl::FormObject] The form object to be decorated
49+ # @return [FormObjectDecorator]
5750
5851 # Creates a group for a setting
5952 #
Original file line number Diff line number Diff line change 3434# It automatically sets the label, value, and disabled properties from the
3535# setting name and its definition attributes.
3636module Settings
37- class InputGroupDecorator
37+ class InputGroupDecorator < SimpleDelegator
3838 include ::ApplicationHelper
3939 include InputMethods
4040
41- attr_reader :object
41+ # @!attribute [r] object
42+ # @return [Primer::Forms::Dsl::InputGroup] the original input group
43+ alias object __getobj__
4244
43- # Initializes a new Settings::InputGroupDecorator
45+ # @!method initialize(object)
46+ # Initializes a new {Settings::InputGroupDecorator}
4447 #
45- # @param object [Primer::Forms::Dsl::InputGroup] The input group to be decorated
46- def initialize ( object )
47- @object = object
48- end
49-
50- def method_missing ( method , ...)
51- object . send ( method , ...)
52- end
53-
54- def respond_to_missing? ( method , include_private = false )
55- object . respond_to? ( method , include_private )
56- end
48+ # @param object [Primer::Forms::Dsl::InputGroup] The input group to be decorated
49+ # @return [InputGroupDecorator]
5750 end
5851end
You can’t perform that action at this time.
0 commit comments