Method: Architect::Class#initialize
- Defined in:
- lib/architect/class.rb
#initialize(markup) ⇒ Class
Returns a new instance of Class.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/architect/class.rb', line 9 def initialize(markup) if markup.index("|").nil? @name = markup else tokens = /^(?<name>.+?)\|/.match(markup) @name = tokens[:name] end @markup = format(markup) @style = {shape: "record"} end |