Class: SimpleReport::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_report/field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, field, format: nil, width: 10, value: nil, force: nil, &block) ⇒ Field

Returns a new instance of Field.



5
6
7
8
9
10
11
12
13
# File 'lib/simple_report/field.rb', line 5

def initialize(name, field, format: nil, width: 10, value: nil, force: nil, &block)
  @name = name
  @field = field
  @width = width
  @value = value
  @block = block
  @format = format
  @force = force
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



3
4
5
# File 'lib/simple_report/field.rb', line 3

def block
  @block
end

#fieldObject (readonly)

Returns the value of attribute field.



3
4
5
# File 'lib/simple_report/field.rb', line 3

def field
  @field
end

#forceObject (readonly)

Returns the value of attribute force.



3
4
5
# File 'lib/simple_report/field.rb', line 3

def force
  @force
end

#formatObject (readonly)

Returns the value of attribute format.



3
4
5
# File 'lib/simple_report/field.rb', line 3

def format
  @format
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/simple_report/field.rb', line 3

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/simple_report/field.rb', line 3

def value
  @value
end

#widthObject (readonly)

Returns the value of attribute width.



3
4
5
# File 'lib/simple_report/field.rb', line 3

def width
  @width
end