Class: Brock::StringField
- Defined in:
- lib/brock/fields/string_field.rb
Instance Attribute Summary
Attributes inherited from Field
#default, #description, #label, #name, #type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Field
#initialize, new_from_params, #to_html
Constructor Details
This class inherits a constructor from Brock::Field
Class Method Details
.detect(field) ⇒ Object
10 11 12 |
# File 'lib/brock/fields/string_field.rb', line 10 def self.detect(field) super(field) or not field.has_key?('type') end |
.type ⇒ Object
6 7 8 |
# File 'lib/brock/fields/string_field.rb', line 6 def self.type :string end |
Instance Method Details
#parse_param(value) ⇒ Object
14 15 16 |
# File 'lib/brock/fields/string_field.rb', line 14 def parse_param(value) value.to_s end |