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.
48 49 50 51 |
# File 'lib/model_formatting.rb', line 48 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.
46 47 48 |
# File 'lib/model_formatting.rb', line 46 def class_name @class_name end |
Instance Method Details
#<<(s) ⇒ Object
53 54 55 |
# File 'lib/model_formatting.rb', line 53 def <<(s) super CGI.escapeHTML(s) end |