Class: GraphQL::Flamegraph::Result
- Inherits:
-
Object
- Object
- GraphQL::Flamegraph::Result
- Defined in:
- lib/graphql/flamegraph/result.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(raw) ⇒ Result
constructor
A new instance of Result.
- #serialize ⇒ Object (also: #to_s)
Constructor Details
#initialize(raw) ⇒ Result
Returns a new instance of Result.
6 7 8 |
# File 'lib/graphql/flamegraph/result.rb', line 6 def initialize(raw) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
4 5 6 |
# File 'lib/graphql/flamegraph/result.rb', line 4 def raw @raw end |
Instance Method Details
#serialize ⇒ Object Also known as: to_s
10 11 12 |
# File 'lib/graphql/flamegraph/result.rb', line 10 def serialize raw.map { |k, v| "#{k.join(';')} #{v.to_i}\n" }.join end |