Sha256: 3edb801a9219906a8d4f4c0071cda056fd2d4b68166bcc9483cb80a90288968b
Contents?: true
Size: 792 Bytes
Versions: 3
Compression:
Stored size: 792 Bytes
Contents
module MasterView module Directives class Text_field < MasterView::DirectiveBase def stag(dcs) #eat end def etag(dcs) args = parse_attr_value obj = args[0] method = args[1] obj = quote_if(obj) method = quote_if(method) options = {} options[:size] = attrs_lck['size'].to_i if attrs_lck['size'] options[:maxlength] = attrs_lck['maxlength'].to_i if attrs_lck['maxlength'] options.merge! common_html_options(attrs_lck) remove_strings_from_attr_value! merge_hash_attr_value!(0, options) a = [] a << 'text_field '+ obj a << method a << attr_value unless attr_value.strip.empty? erb_content(a.join(', ')) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
masterview-0.2.3 | lib/masterview/directives/text_field.rb |
masterview-0.2.4 | lib/masterview/directives/text_field.rb |
masterview-0.2.5 | lib/masterview/directives/text_field.rb |