Class: Rdv::Object::Base
- Inherits:
-
Object
- Object
- Rdv::Object::Base
- Defined in:
- lib/rdv/object/base.rb
Instance Method Summary collapse
Instance Method Details
#capitalize(str) ⇒ Object
8 9 10 |
# File 'lib/rdv/object/base.rb', line 8 def capitalize str str.strip.split(" ").map(&:capitalize).join(" ") end |
#clean(str) ⇒ Object
4 5 6 |
# File 'lib/rdv/object/base.rb', line 4 def clean str str.gsub(/^\->?\s+/, "").gsub(/(\s*\:)??$/, "").strip end |
#trim_indentation(str) ⇒ Object
12 13 14 |
# File 'lib/rdv/object/base.rb', line 12 def trim_indentation str str.gsub(/^\s{2}/, "") end |