Class: Super::Form::SchemaTypes::Direct

Inherits:
Object
  • Object
show all
Defined in:
lib/super/form/schema_types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(super_builder:, method_name:, args:, kwargs:) ⇒ Direct

Returns a new instance of Direct.



7
8
9
10
11
12
# File 'lib/super/form/schema_types.rb', line 7

def initialize(super_builder:, method_name:, args:, kwargs:)
  @super_builder = super_builder
  @method_name = method_name
  @args = args
  @kwargs = kwargs
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



16
17
18
# File 'lib/super/form/schema_types.rb', line 16

def args
  @args
end

#kwargsObject (readonly)

Returns the value of attribute kwargs.



17
18
19
# File 'lib/super/form/schema_types.rb', line 17

def kwargs
  @kwargs
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



15
16
17
# File 'lib/super/form/schema_types.rb', line 15

def method_name
  @method_name
end

#super_builderObject (readonly)

Returns the value of attribute super_builder.



14
15
16
# File 'lib/super/form/schema_types.rb', line 14

def super_builder
  @super_builder
end

Instance Method Details

#==(other) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/super/form/schema_types.rb', line 27

def ==(other)
  return false if other.class != self.class
  return false if other.super_builder != super_builder
  return false if other.method_name != method_name
  return false if other.args != args
  return false if other.kwargs != kwargs

  true
end

#nested_fieldsObject



19
20
21
# File 'lib/super/form/schema_types.rb', line 19

def nested_fields
  {}
end

#to_partial_pathObject



23
24
25
# File 'lib/super/form/schema_types.rb', line 23

def to_partial_path
  "form_field"
end