Class: FormatFeature
- Inherits:
-
Object
- Object
- FormatFeature
- Defined in:
- lib/petro/format_feature.rb
Defined Under Namespace
Classes: Feature
Instance Attribute Summary collapse
-
#features ⇒ Object
readonly
Returns the value of attribute features.
Instance Method Summary collapse
-
#build_features(options) ⇒ Object
What do you want??.
-
#initialize(options) ⇒ FormatFeature
constructor
A new instance of FormatFeature.
Constructor Details
#initialize(options) ⇒ FormatFeature
Returns a new instance of FormatFeature.
5 6 7 |
# File 'lib/petro/format_feature.rb', line 5 def initialize() @features = build_features() end |
Instance Attribute Details
#features ⇒ Object (readonly)
Returns the value of attribute features.
3 4 5 |
# File 'lib/petro/format_feature.rb', line 3 def features @features end |
Instance Method Details
#build_features(options) ⇒ Object
What do you want??
* All I care about is the code to generate controllers
and models.
* A feature is both a controller and model, if they both
exist.
19 20 21 22 23 |
# File 'lib/petro/format_feature.rb', line 19 def build_features() ['features'].map do |f| Feature.new(f['name'], f) end end |