Class: StormForge::Dsl::TestCase::DataSource::FileFixture::ItemProxy
- Inherits:
-
Object
- Object
- StormForge::Dsl::TestCase::DataSource::FileFixture::ItemProxy
- Defined in:
- lib/stormforge/dsl/test_case/data_source/file_fixture.rb
Instance Attribute Summary collapse
-
#base_args ⇒ Object
readonly
Returns the value of attribute base_args.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Instance Method Summary collapse
-
#initialize(base_args, fields) ⇒ ItemProxy
constructor
A new instance of ItemProxy.
- #method_missing(meth, *args, &blk) ⇒ Object
- #respond_to_missing?(meth, include_private = false) ⇒ Boolean
Constructor Details
#initialize(base_args, fields) ⇒ ItemProxy
Returns a new instance of ItemProxy.
6 7 8 9 |
# File 'lib/stormforge/dsl/test_case/data_source/file_fixture.rb', line 6 def initialize(base_args, fields) @base_args = base_args @fields = fields end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/stormforge/dsl/test_case/data_source/file_fixture.rb', line 11 def method_missing(meth, *args, &blk) if fields.include? meth StormForge::Dsl::TestCase::DataSource.build_marker("FILEFIXTURE", { f: meth }.merge(base_args)) else super end end |
Instance Attribute Details
#base_args ⇒ Object (readonly)
Returns the value of attribute base_args.
4 5 6 |
# File 'lib/stormforge/dsl/test_case/data_source/file_fixture.rb', line 4 def base_args @base_args end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
4 5 6 |
# File 'lib/stormforge/dsl/test_case/data_source/file_fixture.rb', line 4 def fields @fields end |
Instance Method Details
#respond_to_missing?(meth, include_private = false) ⇒ Boolean
21 22 23 |
# File 'lib/stormforge/dsl/test_case/data_source/file_fixture.rb', line 21 def respond_to_missing?(meth, include_private = false) fields.include?(meth) || super end |