Class: RealDataTests::RSpecHelper::SqlBlock

Inherits:
Object
  • Object
show all
Defined in:
lib/real_data_tests/rspec_helper.rb,
lib/real_data_tests/rspec_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (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_nameObject (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

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/real_data_tests/rspec_helper.rb', line 4

def type
  @type
end