Module: Ziya::YamlHelpers::Base
Instance Method Summary collapse
-
#clazz(class_name, module_name = nil) ⇒ Object
generates a yaml class declaration.
-
#indent(multiple = 1) ⇒ Object
indent yaml content vy multiples of 2 spaces.
Instance Method Details
#clazz(class_name, module_name = nil) ⇒ Object
generates a yaml class declaration
12 13 14 15 16 17 |
# File 'lib/ziya/yaml_helpers/base.rb', line 12 def clazz( class_name, module_name=nil ) #:nodoc: buff = "!ruby/object:Ziya::" buff << "#{module_name}::" unless module_name.nil? buff << class_name.to_s.ziya_camelize buff end |
#indent(multiple = 1) ⇒ Object
indent yaml content vy multiples of 2 spaces
7 8 9 |
# File 'lib/ziya/yaml_helpers/base.rb', line 7 def indent( multiple= 1 ) " " * multiple end |