Class: Mockolate::Request::Parser
- Inherits:
-
Object
- Object
- Mockolate::Request::Parser
- Defined in:
- lib/mockolate/request/parser.rb
Instance Attribute Summary collapse
-
#_attr_arr ⇒ Object
readonly
Returns the value of attribute _attr_arr.
-
#_export_key ⇒ Object
readonly
Returns the value of attribute _export_key.
Instance Method Summary collapse
-
#initialize(attr_arr, options = {}) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(attr_arr, options = {}) ⇒ Parser
Returns a new instance of Parser.
7 8 9 10 |
# File 'lib/mockolate/request/parser.rb', line 7 def initialize(attr_arr, = {}) @_attr_arr = attr_arr @_export_key = [:export_with] end |
Instance Attribute Details
#_attr_arr ⇒ Object (readonly)
Returns the value of attribute _attr_arr.
4 5 6 |
# File 'lib/mockolate/request/parser.rb', line 4 def _attr_arr @_attr_arr end |
#_export_key ⇒ Object (readonly)
Returns the value of attribute _export_key.
5 6 7 |
# File 'lib/mockolate/request/parser.rb', line 5 def _export_key @_export_key end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 |
# File 'lib/mockolate/request/parser.rb', line 12 def parse return _parse_to_hash if _export_key _parse_to_array end |