Class: Olelo::Attributes::Attribute::Integer Private

Inherits:
Olelo::Attributes::Attribute show all
Defined in:
lib/olelo/attributes.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from Olelo::Attributes::Attribute

#key, #name

Instance Method Summary collapse

Methods inherited from Olelo::Attributes::Attribute

#build_form, #initialize, #label, #label_tag

Methods included from Util

#check, #decode64, #deep_copy, #encode64, #escape, #escape_html, #escape_javascript, included, #md5, #no_cache?, #sha256, #titlecase, #truncate, #unescape, #unescape_backslash, #unescape_html, #valid_xml_chars?

Constructor Details

This class inherits a constructor from Olelo::Attributes::Attribute

Instance Method Details

#field_tag(attr) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



58
59
60
# File 'lib/olelo/attributes.rb', line 58

def field_tag(attr)
  %{<input class="observe" type="text" id="#{key}" name="#{key}" value="#{escape_html attr}"/>}
end

#parse(params) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



62
63
64
65
# File 'lib/olelo/attributes.rb', line 62

def parse(params)
  value = params[key]
  value.to_i if !value.blank?
end