Class: Kanji::Type::AttributeDefiner
- Inherits:
-
Object
- Object
- Kanji::Type::AttributeDefiner
- Extended by:
- InstanceDefine
- Defined in:
- lib/kanji/type/attribute_definer.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name, type = nil, description = nil, **kwargs, &block) ⇒ AttributeDefiner
constructor
A new instance of AttributeDefiner.
Methods included from InstanceDefine
Constructor Details
#initialize(name, type = nil, description = nil, **kwargs, &block) ⇒ AttributeDefiner
Returns a new instance of AttributeDefiner.
12 13 14 15 16 17 18 19 20 |
# File 'lib/kanji/type/attribute_definer.rb', line 12 def initialize(name, type = nil, description = nil, **kwargs, &block) @_name = name @_type = type @_description = description @_options = kwargs self.instance_eval &block if block_given? raise AttributeError unless @_type end |