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.
105 106 107 108 109 |
# File 'lib/ab_admin/config/base.rb', line 105 def initialize(name, ={}, &block) @name = name @options = @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
103 104 105 |
# File 'lib/ab_admin/config/base.rb', line 103 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
103 104 105 |
# File 'lib/ab_admin/config/base.rb', line 103 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
103 104 105 |
# File 'lib/ab_admin/config/base.rb', line 103 def @options end |
Instance Method Details
#data ⇒ Object
111 112 113 |
# File 'lib/ab_admin/config/base.rb', line 111 def data @block || name.to_sym end |
#group? ⇒ Boolean
115 116 117 |
# File 'lib/ab_admin/config/base.rb', line 115 def group? false end |