Class: RgGen::Core::InputBase::Property
- Defined in:
- lib/rggen/core/input_base/property.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #evaluate(feature) ⇒ Object
-
#initialize(name, **options) ⇒ Property
constructor
A new instance of Property.
Constructor Details
#initialize(name, **options) ⇒ Property
Returns a new instance of Property.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rggen/core/input_base/property.rb', line 7 def initialize(name, **, &) @name = name @options = @costom_property = if [:body] create_costom_property(&[:body]) elsif block_given? create_costom_property(&) end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/rggen/core/input_base/property.rb', line 18 def name @name end |
Instance Method Details
#evaluate(feature) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/rggen/core/input_base/property.rb', line 20 def evaluate(feature, ...) feature.verify(@options[:verify]) if @options.key?(:verify) if proxy_property? proxy_property(feature, ...) else default_property(feature) end end |