Module: DirModel::Model::Files::ClassMethods

Defined in:
lib/dir_model/model/files.rb

Instance Method Summary collapse

Instance Method Details

#file_nameArray<Symbol>

Returns file names for the row model.

Returns:

  • (Array<Symbol>)

    file names for the row model



13
14
15
# File 'lib/dir_model/model/files.rb', line 13

def file_name
  files.keys.first
end

#index(file_name) ⇒ Integer

Returns index of the file_name.

Parameters:

  • file_name (Symbol)

    name of file to find index

Returns:

  • (Integer)

    index of the file_name



25
26
27
# File 'lib/dir_model/model/files.rb', line 25

def index(file_name)
  0
end

#optionsHash

Returns options for the file_name.

Parameters:

  • file_name (Symbol)

    name of file to find option

Returns:

  • (Hash)

    options for the file_name



19
20
21
# File 'lib/dir_model/model/files.rb', line 19

def options
  files[file_name]
end