Class: LedgerWeb::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/ledger_web/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, value_type, span_class) ⇒ Field

Returns a new instance of Field.



6
7
8
9
10
# File 'lib/ledger_web/report.rb', line 6

def initialize(title, value_type, span_class)
  @title = title
  @value_type = value_type
  @span_class = span_class
end

Instance Attribute Details

#span_classObject (readonly)

Returns the value of attribute span_class.



4
5
6
# File 'lib/ledger_web/report.rb', line 4

def span_class
  @span_class
end

#titleObject (readonly)

Returns the value of attribute title.



4
5
6
# File 'lib/ledger_web/report.rb', line 4

def title
  @title
end

#value_typeObject (readonly)

Returns the value of attribute value_type.



4
5
6
# File 'lib/ledger_web/report.rb', line 4

def value_type
  @value_type
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
16
# File 'lib/ledger_web/report.rb', line 12

def ==(other)
  self.title == other.title && \
  self.value_type == other.value_type && \
  self.span_class == other.span_class
end