Class: Ferret::Exemplar

Inherits:
Object
  • Object
show all
Defined in:
lib/sql-ferret.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column, interpretation) ⇒ Exemplar

Returns a new instance of Exemplar.



1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
# File 'lib/sql-ferret.rb', line 1659

def initialize column, interpretation
  raise 'type mismatch' unless column.is_a? Ferret::Field
  raise 'assertion failed' unless column.column?
  raise 'type mismatch' \
      unless interpretation.nil? \
          or interpretation.is_a? Symbol
  super()
  @column = column
  @interpretation = interpretation
  return
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



1656
1657
1658
# File 'lib/sql-ferret.rb', line 1656

def column
  @column
end

#interpretationObject (readonly)

Returns the value of attribute interpretation.



1657
1658
1659
# File 'lib/sql-ferret.rb', line 1657

def interpretation
  @interpretation
end