Class: Rid::Commands::Fn::Generator
- Inherits:
-
Object
- Object
- Rid::Commands::Fn::Generator
- Includes:
- Filander
- Defined in:
- lib/rid-fn.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options) ⇒ Generator
constructor
A new instance of Generator.
- #invoke ⇒ Object
Constructor Details
#initialize(options) ⇒ Generator
Returns a new instance of Generator.
13 14 15 16 |
# File 'lib/rid-fn.rb', line 13 def initialize() @type, @doc, @name = .type, .doc, .name self.class.source_root File.('../templates', __FILE__) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/rid-fn.rb', line 11 def name @name end |
Instance Method Details
#invoke ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rid-fn.rb', line 18 def invoke inside '.', @doc do inside '.', @type.pluralize do template @type + '.js', @name + '.js' end end end |