Module: YUML
- Extended by:
- YUML
- Included in:
- YUML
- Defined in:
- lib/yuml.rb,
lib/yuml/class.rb,
lib/yuml/relationship.rb
Overview
A module to create a DSL for yuml.me
Defined Under Namespace
Modules: Relationship Classes: Class
Constant Summary collapse
- ESCAPE_CHARACTERS =
{ '{' => "\u23A8", '}' => "\u23AC", ',' => "\u201A" }
Instance Method Summary collapse
Instance Method Details
#class(&block) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/yuml.rb', line 23 def class(&block) yuml_class = YUML::Class.new block.arity < 1 ? yuml_class.instance_eval(&block) : block.call(yuml_class) classes << yuml_class yuml_class end |
#generate(options) {|_self| ... } ⇒ Object
16 17 18 19 20 21 |
# File 'lib/yuml.rb', line 16 def generate() = { file: '/tmp/yuml.pdf' }.merge() classes.clear yield self fetch_uml [:file] end |