Class: GraphQL::Define::InstanceDefinable::AssignMetadataKey
- Inherits:
-
Object
- Object
- GraphQL::Define::InstanceDefinable::AssignMetadataKey
- Defined in:
- lib/graphql/define/instance_definable.rb
Instance Method Summary collapse
-
#call(defn, value = true) ⇒ Object
-
#initialize(key) ⇒ AssignMetadataKey
constructor
A new instance of AssignMetadataKey.
Constructor Details
#initialize(key) ⇒ AssignMetadataKey
Returns a new instance of AssignMetadataKey.
184 185 186 |
# File 'lib/graphql/define/instance_definable.rb', line 184 def initialize(key) @key = key end |
Instance Method Details
#call(defn, value = true) ⇒ Object
188 189 190 |
# File 'lib/graphql/define/instance_definable.rb', line 188 def call(defn, value = true) defn.[@key] = value end |