Class: Buttons::Javascript::JsVar
- Inherits:
-
Object
- Object
- Buttons::Javascript::JsVar
- Defined in:
- lib/buttons/javascript/js_var.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ruby_name ⇒ Object
readonly
Returns the value of attribute ruby_name.
Instance Method Summary collapse
-
#initialize(name) ⇒ JsVar
constructor
A new instance of JsVar.
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ JsVar
Returns a new instance of JsVar.
6 7 8 9 |
# File 'lib/buttons/javascript/js_var.rb', line 6 def initialize(name) @ruby_name = name = name.to_s.gsub(/^\*/, '') @name = name.camelcase end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/buttons/javascript/js_var.rb', line 4 def name @name end |
#ruby_name ⇒ Object (readonly)
Returns the value of attribute ruby_name.
4 5 6 |
# File 'lib/buttons/javascript/js_var.rb', line 4 def ruby_name @ruby_name end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/buttons/javascript/js_var.rb', line 11 def to_s @name end |