Class: Izzle::HasEasy::Definition
- Inherits:
-
Object
- Object
- Izzle::HasEasy::Definition
- Defined in:
- lib/has_easy/definition.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#default_dynamic ⇒ Object
Returns the value of attribute default_dynamic.
-
#default_through ⇒ Object
Returns the value of attribute default_through.
-
#has_default ⇒ Object
Returns the value of attribute has_default.
-
#has_default_dynamic ⇒ Object
Returns the value of attribute has_default_dynamic.
-
#has_default_through ⇒ Object
Returns the value of attribute has_default_through.
-
#has_postprocess ⇒ Object
Returns the value of attribute has_postprocess.
-
#has_preprocess ⇒ Object
Returns the value of attribute has_preprocess.
-
#has_type_check ⇒ Object
Returns the value of attribute has_type_check.
-
#has_validate ⇒ Object
Returns the value of attribute has_validate.
-
#name ⇒ Object
Returns the value of attribute name.
-
#postprocess ⇒ Object
Returns the value of attribute postprocess.
-
#preprocess ⇒ Object
Returns the value of attribute preprocess.
-
#type_check ⇒ Object
Returns the value of attribute type_check.
-
#validate ⇒ Object
Returns the value of attribute validate.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(name, options = {}) ⇒ Definition
Returns a new instance of Definition.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/has_easy/definition.rb', line 14 def initialize(name, = {}) @name = name if .has_key?(:type_check) @has_type_check = true @type_check = [:type_check].instance_of?(Array) ? [:type_check] : [[:type_check]] end if .has_key?(:validate) @has_validate = true @validate = [:validate] end if .has_key?(:default) @has_default = true @default = [:default] end if .has_key?(:default_through) @has_default_through = true @default_through = [:default_through] end if .has_key?(:default_dynamic) @has_default_dynamic = true @default_dynamic = [:default_dynamic] end if .has_key?(:preprocess) @has_preprocess = true @preprocess = [:preprocess] end if .has_key?(:postprocess) @has_postprocess = true @postprocess = [:postprocess] end end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
8 9 10 |
# File 'lib/has_easy/definition.rb', line 8 def default @default end |
#default_dynamic ⇒ Object
Returns the value of attribute default_dynamic.
10 11 12 |
# File 'lib/has_easy/definition.rb', line 10 def default_dynamic @default_dynamic end |
#default_through ⇒ Object
Returns the value of attribute default_through.
9 10 11 |
# File 'lib/has_easy/definition.rb', line 9 def default_through @default_through end |
#has_default ⇒ Object
Returns the value of attribute has_default.
8 9 10 |
# File 'lib/has_easy/definition.rb', line 8 def has_default @has_default end |
#has_default_dynamic ⇒ Object
Returns the value of attribute has_default_dynamic.
10 11 12 |
# File 'lib/has_easy/definition.rb', line 10 def has_default_dynamic @has_default_dynamic end |
#has_default_through ⇒ Object
Returns the value of attribute has_default_through.
9 10 11 |
# File 'lib/has_easy/definition.rb', line 9 def has_default_through @has_default_through end |
#has_postprocess ⇒ Object
Returns the value of attribute has_postprocess.
12 13 14 |
# File 'lib/has_easy/definition.rb', line 12 def has_postprocess @has_postprocess end |
#has_preprocess ⇒ Object
Returns the value of attribute has_preprocess.
11 12 13 |
# File 'lib/has_easy/definition.rb', line 11 def has_preprocess @has_preprocess end |
#has_type_check ⇒ Object
Returns the value of attribute has_type_check.
6 7 8 |
# File 'lib/has_easy/definition.rb', line 6 def has_type_check @has_type_check end |
#has_validate ⇒ Object
Returns the value of attribute has_validate.
7 8 9 |
# File 'lib/has_easy/definition.rb', line 7 def has_validate @has_validate end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/has_easy/definition.rb', line 5 def name @name end |
#postprocess ⇒ Object
Returns the value of attribute postprocess.
12 13 14 |
# File 'lib/has_easy/definition.rb', line 12 def postprocess @postprocess end |
#preprocess ⇒ Object
Returns the value of attribute preprocess.
11 12 13 |
# File 'lib/has_easy/definition.rb', line 11 def preprocess @preprocess end |
#type_check ⇒ Object
Returns the value of attribute type_check.
6 7 8 |
# File 'lib/has_easy/definition.rb', line 6 def type_check @type_check end |
#validate ⇒ Object
Returns the value of attribute validate.
7 8 9 |
# File 'lib/has_easy/definition.rb', line 7 def validate @validate end |