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


178
179
180
# File 'lib/graphql/define/instance_definable.rb', line 178

def initialize(key)
  @key = key
end

Instance Method Details

#call(defn, value) ⇒ Object


182
183
184
# File 'lib/graphql/define/instance_definable.rb', line 182

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