Class: GeoConcerns::TimePeriod

Inherits:
Object
  • Object
show all
Defined in:
app/values/geo_concerns/time_period.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(initial_value, doc) ⇒ TimePeriod

Returns a new instance of TimePeriod.



4
5
6
7
# File 'app/values/geo_concerns/time_period.rb', line 4

def initialize(initial_value, doc)
  @initial_value = initial_value || []
  @doc = doc
end

Instance Attribute Details

#docObject

Returns the value of attribute doc.



3
4
5
# File 'app/values/geo_concerns/time_period.rb', line 3

def doc
  @doc
end

#initial_valueObject

Returns the value of attribute initial_value.



3
4
5
# File 'app/values/geo_concerns/time_period.rb', line 3

def initial_value
  @initial_value
end

Instance Method Details

#valueObject



9
10
11
12
13
14
# File 'app/values/geo_concerns/time_period.rb', line 9

def value
  append_caldate
  append_begdate
  initial_value.uniq!
  initial_value
end