Class: RgGen::Core::InputBase::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/rggen/core/input_base/property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, **options, &)
  @name = name
  @options = options
  @costom_property =
    if options[:body]
      create_costom_property(&options[:body])
    elsif block_given?
      create_costom_property(&)
    end
end

Instance Attribute Details

#nameObject (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