Class: SuperFormatter::Row

Inherits:
Struct
  • Object
show all
Defined in:
lib/super_formatter/row.rb

Direct Known Subclasses

Ecan::Row, Hct::Row, Shopline::Row, Tcat::Row

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m) ⇒ Object



3
4
5
# File 'lib/super_formatter/row.rb', line 3

def method_missing(m)
  find(m)
end

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



2
3
4
# File 'lib/super_formatter/row.rb', line 2

def data
  @data
end

#indexesObject

Returns the value of attribute indexes

Returns:

  • (Object)

    the current value of indexes



2
3
4
# File 'lib/super_formatter/row.rb', line 2

def indexes
  @indexes
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
# File 'lib/super_formatter/row.rb', line 7

def complete?
  indexes.keys.each do |k, i|
    return false if send(k).nil?
  end
  true
end