Class: Baza::Index

Inherits:
Object
  • Object
show all
Includes:
DatabaseModelFunctionality
Defined in:
lib/baza/index.rb

Instance Method Summary collapse

Methods included from DatabaseModelFunctionality

#model_name, #to_model

Instance Method Details

#dataObject



8
9
10
11
12
13
# File 'lib/baza/index.rb', line 8

def data
  {
    name: name,
    columns: columns
  }
end

#inspectObject



15
16
17
# File 'lib/baza/index.rb', line 15

def inspect
  to_s
end

#to_paramObject



19
20
21
# File 'lib/baza/index.rb', line 19

def to_param
  name
end

#to_sObject



4
5
6
# File 'lib/baza/index.rb', line 4

def to_s
  "#<#{self.class.name} name: \"#{name}\" unique=\"#{unique?}\" columns: #{@columns}>"
end