Class: Research

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/research.rb

Overview

This class describes a research.

Instance Method Summary (collapse)

Instance Method Details

- (String) complete_date_txt

Return the complete date of queue item.

Returns:

  • (String)


18
19
20
21
22
23
# File 'app/models/research.rb', line 18

def complete_date_txt
  return nil if allotment == 0
  rq_prod_point = (level + 1) * Params::RESEARCH_COST_BASE
  complete_date = ((rq_prod_point - invested_point) / allotment).ceil
  return complete_date.to_s + I18n.t('activerecord.attributes.rq_days_suffix')
end

- (String) name

Return the description of research.

Returns:

  • (String)


12
13
14
# File 'app/models/research.rb', line 12

def name
  return I18n.t('activerecord.attributes.research.' + symbol)
end