Class: CsvBlueprints::Column

Inherits:
Struct
  • Object
show all
Defined in:
lib/csv_blueprints/blueprint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/csv_blueprints/blueprint.rb', line 2

def name
  @name
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



2
3
4
# File 'lib/csv_blueprints/blueprint.rb', line 2

def value
  @value
end

Instance Method Details

#value_for(i) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/csv_blueprints/blueprint.rb', line 3

def value_for(i)
  if value.respond_to?(:call)
    value.call(i)
  else
    value
  end
end