Class: RgGen::Core::Builder::FeatureEntryBase
- Defined in:
- lib/rggen/core/builder/feature_entry_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
Instance Method Summary collapse
- #build_factory(targets) ⇒ Object
-
#initialize(registry, name) ⇒ FeatureEntryBase
constructor
A new instance of FeatureEntryBase.
- #match_entry_type?(entry_type) ⇒ Boolean
- #modify(&body) ⇒ Object
Constructor Details
#initialize(registry, name) ⇒ FeatureEntryBase
Returns a new instance of FeatureEntryBase.
7 8 9 10 |
# File 'lib/rggen/core/builder/feature_entry_base.rb', line 7 def initialize(registry, name) @registry = registry @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/rggen/core/builder/feature_entry_base.rb', line 13 def name @name end |
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
12 13 14 |
# File 'lib/rggen/core/builder/feature_entry_base.rb', line 12 def registry @registry end |
Instance Method Details
#build_factory(targets) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/rggen/core/builder/feature_entry_base.rb', line 23 def build_factory(targets) @factory.new(name) do |f| f.target_features(target_features(targets)) f.target_feature(target_feature) end end |
#match_entry_type?(entry_type) ⇒ Boolean
19 20 21 |
# File 'lib/rggen/core/builder/feature_entry_base.rb', line 19 def match_entry_type?(entry_type) entry_type == entry_type_name end |
#modify(&body) ⇒ Object
15 16 17 |
# File 'lib/rggen/core/builder/feature_entry_base.rb', line 15 def modify(&body) eval_body(&body) end |