Class: GraphQL::Define::InstanceDefinable::AssignMetadataKey

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/define/instance_definable.rb

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ AssignMetadataKey

Returns a new instance of AssignMetadataKey.



214
215
216
# File 'lib/graphql/define/instance_definable.rb', line 214

def initialize(key)
  @key = key
end

Instance Method Details

#call(defn, value = true) ⇒ Object



218
219
220
# File 'lib/graphql/define/instance_definable.rb', line 218

def call(defn, value = true)
  defn.[@key] = value
end