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
129 130 131 |
# File 'app/helpers/calagator/time_range_helper.rb', line 129 def format @format end |
#part ⇒ Object
Returns the value of attribute part
129 130 131 |
# File 'app/helpers/calagator/time_range_helper.rb', line 129 def part @part end |
#which ⇒ Object
Returns the value of attribute which
129 130 131 |
# File 'app/helpers/calagator/time_range_helper.rb', line 129 def which @which end |
Instance Method Details
#to_s ⇒ Object
143 144 145 146 147 148 149 |
# File 'app/helpers/calagator/time_range_helper.rb', line 143 def to_s if format == :hcal wrap_in_hcal(text, which) else text end end |