Class: ResponseMatcher::ParseSchema
- Inherits:
-
Object
- Object
- ResponseMatcher::ParseSchema
- Defined in:
- lib/response_matcher/parse_schema.rb
Instance Attribute Summary collapse
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#schema_path ⇒ Object
readonly
Returns the value of attribute schema_path.
Class Method Summary collapse
Instance Method Summary collapse
- #call(schema_path, objects = {}) ⇒ Object
-
#initialize(schema_path, objects) ⇒ ParseSchema
constructor
A new instance of ParseSchema.
Constructor Details
#initialize(schema_path, objects) ⇒ ParseSchema
Returns a new instance of ParseSchema.
12 13 14 15 16 17 18 |
# File 'lib/response_matcher/parse_schema.rb', line 12 def initialize(schema_path, objects) @schema_path = schema_path @objects = objects initialize_objects render_schema end |
Instance Attribute Details
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
10 11 12 |
# File 'lib/response_matcher/parse_schema.rb', line 10 def objects @objects end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/response_matcher/parse_schema.rb', line 10 def response @response end |
#schema_path ⇒ Object (readonly)
Returns the value of attribute schema_path.
10 11 12 |
# File 'lib/response_matcher/parse_schema.rb', line 10 def schema_path @schema_path end |
Class Method Details
.new(schema_path, objects = {}) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/response_matcher/parse_schema.rb', line 3 def self.new(schema_path, objects = {}) Settings.config.helpers.each { |helper| include helper } attr_accessor(*objects.keys) super(schema_path, objects) end |
Instance Method Details
#call(schema_path, objects = {}) ⇒ Object
20 21 22 |
# File 'lib/response_matcher/parse_schema.rb', line 20 def call(schema_path, objects = {}) self.class.new(schema_path, objects).response end |