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.
95 96 97 98 99 |
# File 'lib/ab_admin/config/base.rb', line 95 def initialize(name, ={}, &block) @name = name @options = @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
93 94 95 |
# File 'lib/ab_admin/config/base.rb', line 93 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
93 94 95 |
# File 'lib/ab_admin/config/base.rb', line 93 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
93 94 95 |
# File 'lib/ab_admin/config/base.rb', line 93 def @options end |
Instance Method Details
#data ⇒ Object
101 102 103 |
# File 'lib/ab_admin/config/base.rb', line 101 def data @block || name.to_sym end |
#group? ⇒ Boolean
105 106 107 |
# File 'lib/ab_admin/config/base.rb', line 105 def group? false end |