Module: Sevgi::Graphics::Profile::DSL
- Included in:
- Document::Proto
- Defined in:
- lib/sevgi/graphics/auxilary/profile.rb
Instance Attribute Summary collapse
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
Instance Method Summary collapse
Instance Attribute Details
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
29 30 31 |
# File 'lib/sevgi/graphics/auxilary/profile.rb', line 29 def profile @profile end |
Instance Method Details
#document(name, attributes: {}, preambles: nil) ⇒ Object
31 32 33 34 35 |
# File 'lib/sevgi/graphics/auxilary/profile.rb', line 31 def document(name, attributes: {}, preambles: nil) @profile = Profile.new(name, attributes:, preambles:).tap do Profile.register(name, self) end end |
#mixture(*modules) ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/sevgi/graphics/auxilary/profile.rb', line 37 def mixture(*modules) modules.each do |mod| if defined?(mod::InstanceMethods) || defined?(mod::ClassMethods) include(mod::InstanceMethods) if defined?(mod::InstanceMethods) extend(mod::ClassMethods) if defined?(mod::ClassMethods) else include(mod) end end end |