Class: Lafcadio::StateField

Inherits:
EnumField show all
Defined in:
lib/lafcadio/objectField.rb

Overview

A StateField is a specialized subclass of EnumField; its possible value are any of the 50 states of the United States, stored as each state’s two-letter postal code.

Instance Attribute Summary

Attributes inherited from EnumField

#enums

Attributes inherited from ObjectField

#db_field_name, #domain_class, #mock_value, #name, #not_nil

Instance Method Summary collapse

Methods inherited from EnumField

create_with_args, creation_parameters, enum_queue_hash, #value_for_sql, #verify_non_nil_value

Methods inherited from StringField

mock_value, #value_for_sql

Methods inherited from ObjectField

#<=>, #bind_write?, create_from_xml, create_with_args, creation_parameters, #db_column, #db_will_automatically_write?, #default_mock_value, #prev_value, #process_before_verify, #value_for_sql, #value_from_sql, value_type, #verify, #verify_non_nil_value

Constructor Details

#initialize(domain_class, name = "state") ⇒ StateField

Returns a new instance of StateField.



522
523
524
# File 'lib/lafcadio/objectField.rb', line 522

def initialize( domain_class, name = "state" )
	super( domain_class, name, USCommerce::UsStates.states )
end