Class: Rose::Attribute::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/rose/attribute.rb

Overview

Defines a collection of attributes

Instance Method Summary collapse

Instance Method Details

#column_namesObject



58
59
60
# File 'lib/rose/attribute.rb', line 58

def column_names
  map(&:column_name)
end

#rowObject



51
52
53
54
55
56
# File 'lib/rose/attribute.rb', line 51

def row
  inject({}) do |row, attribute|
    row[attribute.column_name] = yield(attribute) if block_given?
    row
  end
end