Class: ModelFormatting::CodePart
- Defined in:
- lib/model_formatting.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
Attributes inherited from Part
Instance Method Summary collapse
- #<<(s) ⇒ Object
-
#initialize(format, class_name, *args) ⇒ CodePart
constructor
A new instance of CodePart.
Methods inherited from Part
#==, #compact!, #formatted_string, #inspect, #simple_string
Constructor Details
#initialize(format, class_name, *args) ⇒ CodePart
Returns a new instance of CodePart.
49 50 51 52 |
# File 'lib/model_formatting.rb', line 49 def initialize(format, class_name, *args) @class_name = class_name super(format, *args) end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
47 48 49 |
# File 'lib/model_formatting.rb', line 47 def class_name @class_name end |
Instance Method Details
#<<(s) ⇒ Object
54 55 56 |
# File 'lib/model_formatting.rb', line 54 def <<(s) super CGI.escapeHTML(s) end |