Class: AbAdmin::Config::Field
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #data ⇒ Object
- #group? ⇒ Boolean
-
#initialize(name, options = {}, &block) ⇒ Field
constructor
A new instance of Field.
Constructor Details
#initialize(name, options = {}, &block) ⇒ Field
Returns a new instance of Field.
114 115 116 117 118 |
# File 'lib/ab_admin/config/base.rb', line 114 def initialize(name, ={}, &block) @name = name @options = @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
112 113 114 |
# File 'lib/ab_admin/config/base.rb', line 112 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
112 113 114 |
# File 'lib/ab_admin/config/base.rb', line 112 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
112 113 114 |
# File 'lib/ab_admin/config/base.rb', line 112 def @options end |
Instance Method Details
#data ⇒ Object
120 121 122 |
# File 'lib/ab_admin/config/base.rb', line 120 def data @block || name.to_sym end |
#group? ⇒ Boolean
124 125 126 |
# File 'lib/ab_admin/config/base.rb', line 124 def group? false end |