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 => ' ' }.freeze
- SUFFIXES =
{ month: ' ', wday: ', ' }.freeze
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
132 133 134 |
# File 'app/helpers/calagator/time_range_helper.rb', line 132 def format @format end |
#part ⇒ Object
Returns the value of attribute part
132 133 134 |
# File 'app/helpers/calagator/time_range_helper.rb', line 132 def part @part end |
#which ⇒ Object
Returns the value of attribute which
132 133 134 |
# File 'app/helpers/calagator/time_range_helper.rb', line 132 def which @which end |
Instance Method Details
#to_s ⇒ Object
146 147 148 149 150 151 152 |
# File 'app/helpers/calagator/time_range_helper.rb', line 146 def to_s if format == :hcal wrap_in_hcal(text, which) else text end end |