Class: Bluepine::Attributes::StringAttribute
- Defined in:
- lib/bluepine/attributes/string_attribute.rb
Direct Known Subclasses
CurrencyAttribute, DateAttribute, IPAddressAttribute, TimeAttribute, URIAttribute
Constant Summary collapse
- RULES =
{ match: { group: :format, name: :with, }, min: { group: :length, name: :minimum, }, max: { group: :length, name: :maximum, }, range: { group: :length, name: :in, }, }.freeze
Constants included from Bluepine::Assertions
Bluepine::Assertions::Error, Bluepine::Assertions::KeyError, Bluepine::Assertions::SubsetError
Instance Attribute Summary
Attributes inherited from Attribute
Instance Method Summary collapse
Methods inherited from Attribute
#attributes, #default, #deprecated, #description, #format, #if, #initialize, #match, #method, #null, #of, #options, #private, #required, #serializable?, #spec, #spec_uri, #type, #unless, #value
Methods included from Validators::Validatable
Methods included from Support
Methods included from Validators::Normalizable
Methods included from Serializers::Serializable
Methods included from Bluepine::Assertions
#assert, #assert_in, #assert_kind_of, #assert_not, #assert_subset_of, included
Constructor Details
This class inherits a constructor from Bluepine::Attributes::Attribute
Instance Method Details
#in ⇒ Object
31 32 33 |
# File 'lib/bluepine/attributes/string_attribute.rb', line 31 def in super&.map(&:to_s) end |
#native_type ⇒ Object
27 28 29 |
# File 'lib/bluepine/attributes/string_attribute.rb', line 27 def native_type "string" end |