Class: Frigate::Form::Property

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/frigate/form/property.rb

Overview

Uses to define a form property

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, root, parent, options) ⇒ Property

Returns a new instance of Property.

Parameters:

  • name (Symbol)
  • options (Hash)


11
12
13
14
15
16
# File 'lib/frigate/form/property.rb', line 11

def initialize(name, root, parent, options)
	@name, @root, @parent, @options = name, root, parent, options

	set_validations
	set_custom_validations
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/frigate/form/property.rb', line 5

def name
  @name
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/frigate/form/property.rb', line 5

def options
  @options
end

#parentObject

Returns the value of attribute parent.



5
6
7
# File 'lib/frigate/form/property.rb', line 5

def parent
  @parent
end

#rootObject

Returns the value of attribute root.



5
6
7
# File 'lib/frigate/form/property.rb', line 5

def root
  @root
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/frigate/form/property.rb', line 5

def value
  @value
end