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


207
208
209
# File 'lib/graphql/define/instance_definable.rb', line 207

def initialize(key)
  @key = key
end

Instance Method Details

#call(defn, value) ⇒ Object


211
212
213
# File 'lib/graphql/define/instance_definable.rb', line 211

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