Class: GraphQL::Decorate::Metadata
- Inherits:
-
Object
- Object
- GraphQL::Decorate::Metadata
- Defined in:
- lib/graphql/decorate/metadata.rb
Overview
Contains methods to evaluate different types of metadata
Instance Attribute Summary collapse
- #scoped_proc ⇒ Proc readonly
- #unscoped_proc ⇒ Proc readonly
Instance Method Summary collapse
-
#initialize ⇒ Metadata
constructor
A new instance of Metadata.
- #scoped {|object, graphql_context| ... } ⇒ Object
- #unscoped {|object, graphql_context| ... } ⇒ Object
Constructor Details
#initialize ⇒ Metadata
Returns a new instance of Metadata.
13 14 15 16 |
# File 'lib/graphql/decorate/metadata.rb', line 13 def initialize @unscoped_proc = nil @scoped_proc = nil end |
Instance Attribute Details
#scoped_proc ⇒ Proc (readonly)
11 12 13 |
# File 'lib/graphql/decorate/metadata.rb', line 11 def scoped_proc @scoped_proc end |
#unscoped_proc ⇒ Proc (readonly)
8 9 10 |
# File 'lib/graphql/decorate/metadata.rb', line 8 def unscoped_proc @unscoped_proc end |
Instance Method Details
#scoped {|object, graphql_context| ... } ⇒ Object
24 25 26 |
# File 'lib/graphql/decorate/metadata.rb', line 24 def scoped(&block) @scoped_proc = block end |
#unscoped {|object, graphql_context| ... } ⇒ Object
19 20 21 |
# File 'lib/graphql/decorate/metadata.rb', line 19 def unscoped(&block) @unscoped_proc = block end |