Class: RealDataTests::RSpecHelper::SqlBlock
- Inherits:
-
Object
- Object
- RealDataTests::RSpecHelper::SqlBlock
- Defined in:
- lib/real_data_tests/rspec_helper.rb,
lib/real_data_tests/rspec_helper.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(content) ⇒ SqlBlock
constructor
A new instance of SqlBlock.
Constructor Details
#initialize(content) ⇒ SqlBlock
Returns a new instance of SqlBlock.
6 7 8 9 10 |
# File 'lib/real_data_tests/rspec_helper.rb', line 6 def initialize(content) @content = content.strip @type = determine_block_type @table_name = extract_table_name if @type == :insert end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/real_data_tests/rspec_helper.rb', line 4 def content @content end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
4 5 6 |
# File 'lib/real_data_tests/rspec_helper.rb', line 4 def table_name @table_name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/real_data_tests/rspec_helper.rb', line 4 def type @type end |