Class: Rbnotes::Statistics::StatisticValue

Inherits:
Object
  • Object
show all
Defined in:
lib/rbnotes/statistics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timestamp, text) ⇒ StatisticValue

Returns a new instance of StatisticValue.



86
87
88
89
# File 'lib/rbnotes/statistics.rb', line 86

def initialize(timestamp, text)
  @timestamp = timestamp
  @lines = text.size
end

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines.



84
85
86
# File 'lib/rbnotes/statistics.rb', line 84

def lines
  @lines
end

Instance Method Details

#monObject



95
96
97
# File 'lib/rbnotes/statistics.rb', line 95

def mon
  @timestamp[:mon]
end

#yearObject



91
92
93
# File 'lib/rbnotes/statistics.rb', line 91

def year
  @timestamp[:year]
end