Class: JsGenerator::JsForView
- Inherits:
-
Object
- Object
- JsGenerator::JsForView
- Defined in:
- lib/js_generator/js_for_view.rb
Instance Attribute Summary collapse
-
#action_name ⇒ Object
readonly
Returns the value of attribute action_name.
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Instance Method Summary collapse
- #create_file ⇒ Object
-
#initialize(setup_js) ⇒ JsForView
constructor
A new instance of JsForView.
Constructor Details
#initialize(setup_js) ⇒ JsForView
Returns a new instance of JsForView.
5 6 7 8 9 |
# File 'lib/js_generator/js_for_view.rb', line 5 def initialize(setup_js) @namespace = setup_js.namespace @model_name = setup_js.model_name @action_name = setup_js.action_name end |
Instance Attribute Details
#action_name ⇒ Object (readonly)
Returns the value of attribute action_name.
3 4 5 |
# File 'lib/js_generator/js_for_view.rb', line 3 def action_name @action_name end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
3 4 5 |
# File 'lib/js_generator/js_for_view.rb', line 3 def model_name @model_name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
3 4 5 |
# File 'lib/js_generator/js_for_view.rb', line 3 def namespace @namespace end |
Instance Method Details
#create_file ⇒ Object
11 12 13 14 15 16 |
# File 'lib/js_generator/js_for_view.rb', line 11 def create_file make_view_dir make_namespace_dir make_model_dir touch_file end |