Class: Clot::SelectMinute
Constant Summary
Constants inherited
from ClotTag
ClotTag::Syntax
Instance Method Summary
collapse
Methods inherited from NumberedTag
#default_end, #default_start, #get_options, #id_string, #name_string, #render_string, #set_primary_attributes, #value_string
Methods inherited from ClotTag
#initialize, #render
Methods included from TagHelper
#resolve_value, #split_params
#set_attributes, #set_primary_attributes
Constructor Details
This class inherits a constructor from Clot::ClotTag
Instance Method Details
#can_show(val) ⇒ Object
106
107
108
|
# File 'lib/clot/date_tags.rb', line 106
def can_show(val)
@minute_step.nil? || (val % @minute_step) == 0
end
|
#default_field_name ⇒ Object
102
103
104
|
# File 'lib/clot/date_tags.rb', line 102
def default_field_name
"minute"
end
|
#personal_attributes(name, value) ⇒ Object
110
111
112
113
114
115
|
# File 'lib/clot/date_tags.rb', line 110
def personal_attributes(name,value)
case name
when "minute_step" then
@minute_step = value
end || super(name, value)
end
|
#time_method ⇒ Object
99
100
101
|
# File 'lib/clot/date_tags.rb', line 99
def time_method
:min
end
|