Class: EasyJSONMatcher::ContentWrapper
- Inherits:
-
Object
- Object
- EasyJSONMatcher::ContentWrapper
- Defined in:
- lib/easy_json_matcher/content_wrapper.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(content) ⇒ ContentWrapper
constructor
A new instance of ContentWrapper.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(content) ⇒ ContentWrapper
Returns a new instance of ContentWrapper.
6 7 8 |
# File 'lib/easy_json_matcher/content_wrapper.rb', line 6 def initialize(content) @content = content end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
14 15 16 |
# File 'lib/easy_json_matcher/content_wrapper.rb', line 14 def method_missing(method, *args) content.send(method, *args) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/easy_json_matcher/content_wrapper.rb', line 4 def content @content end |
Instance Method Details
#[](key) ⇒ Object
10 11 12 |
# File 'lib/easy_json_matcher/content_wrapper.rb', line 10 def [](key) content[key.to_s] end |