Class: Calagator::TimeRangeHelper::TimePartRenderer
- Inherits:
-
Struct
- Object
- Struct
- Calagator::TimeRangeHelper::TimePartRenderer
- Defined in:
- app/helpers/calagator/time_range_helper.rb
Constant Summary collapse
- PREFIXES =
{ :hour => " ", [nil, :hour] => "", :year => ", ", :end_hour => " ", :end_year => ", ", :at => " ", }
- SUFFIXES =
{ :month => " ", :wday => ", ", }
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#part ⇒ Object
Returns the value of attribute part.
-
#which ⇒ Object
Returns the value of attribute which.
Instance Method Summary collapse
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format
125 126 127 |
# File 'app/helpers/calagator/time_range_helper.rb', line 125 def format @format end |
#part ⇒ Object
Returns the value of attribute part
125 126 127 |
# File 'app/helpers/calagator/time_range_helper.rb', line 125 def part @part end |
#which ⇒ Object
Returns the value of attribute which
125 126 127 |
# File 'app/helpers/calagator/time_range_helper.rb', line 125 def which @which end |
Instance Method Details
#to_s ⇒ Object
139 140 141 142 143 144 145 |
# File 'app/helpers/calagator/time_range_helper.rb', line 139 def to_s if format == :hcal wrap_in_hcal(text, which) else text end end |