Module: GraphQL::Define::InstanceDefinable
Defined Under Namespace
Modules: ClassMethods, DeprecatedDefine
Classes: AssignAttribute, AssignMetadataKey, Definition
Instance Method Summary
collapse
Instance Method Details
#define(**kwargs, &block) ⇒ Object
43
44
45
|
# File 'lib/graphql/define/instance_definable.rb', line 43
def define(**kwargs, &block)
deprecated_define(**kwargs, &block)
end
|
#deprecated_define(**kwargs, &block) ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/graphql/define/instance_definable.rb', line 34
def deprecated_define(**kwargs, &block)
ensure_defined
stash_dependent_methods
@pending_definition = Definition.new(kwargs, block)
nil
end
|
#initialize_copy(other) ⇒ Object
55
56
57
58
|
# File 'lib/graphql/define/instance_definable.rb', line 55
def initialize_copy(other)
super
@metadata = other.metadata.dup
end
|
29
30
31
|
# File 'lib/graphql/define/instance_definable.rb', line 29
def metadata
@metadata ||= {}
end
|
#redefine(**kwargs, &block) ⇒ Object
48
49
50
51
52
53
|
# File 'lib/graphql/define/instance_definable.rb', line 48
def redefine(**kwargs, &block)
ensure_defined
new_inst = self.dup
new_inst.deprecated_define(**kwargs, &block)
new_inst
end
|