Class: Sequel::Fixture::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/sequel-fixture/table.rb

Overview

Description

Class which represents the actual fixture data in a table

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Table

Returns a new instance of Table.



9
10
11
# File 'lib/sequel-fixture/table.rb', line 9

def initialize(data)
  @data = data
end

Instance Method Details

#[](row) ⇒ Object



13
14
15
# File 'lib/sequel-fixture/table.rb', line 13

def [](row)
  Sequel::Fixture::Row.new(@data[row])
end

#rowsObject



17
18
19
# File 'lib/sequel-fixture/table.rb', line 17

def rows
  @data
end