Class: RSpec::GraphQLResponse::DigDug
- Inherits:
-
Object
- Object
- RSpec::GraphQLResponse::DigDug
- Defined in:
- lib/rspec/graphql_response/dig_dug/dig_dug.rb
Instance Attribute Summary collapse
-
#dig_pattern ⇒ Object
readonly
Returns the value of attribute dig_pattern.
Instance Method Summary collapse
- #dig(data) ⇒ Object
-
#initialize(*dig_pattern) ⇒ DigDug
constructor
A new instance of DigDug.
Constructor Details
#initialize(*dig_pattern) ⇒ DigDug
Returns a new instance of DigDug.
6 7 8 |
# File 'lib/rspec/graphql_response/dig_dug/dig_dug.rb', line 6 def initialize(*dig_pattern) @dig_pattern = parse_dig_pattern(*dig_pattern) end |
Instance Attribute Details
#dig_pattern ⇒ Object (readonly)
Returns the value of attribute dig_pattern.
4 5 6 |
# File 'lib/rspec/graphql_response/dig_dug/dig_dug.rb', line 4 def dig_pattern @dig_pattern end |
Instance Method Details
#dig(data) ⇒ Object
10 11 12 |
# File 'lib/rspec/graphql_response/dig_dug/dig_dug.rb', line 10 def dig(data) dig_data(data, dig_pattern) end |