Class Cabar::Renderer
In: lib/ruby/cabar/renderer.rb
lib/ruby/cabar/renderer/dot.rb
lib/ruby/cabar/renderer/env_var.rb
lib/ruby/cabar/renderer/yaml.rb
Parent: Base
Base Selection Loader Facet RunTime Relationship Renderer Main Context Configuration Command Constraint Component Plugin Comparable Version ::Exception Error InvalidCommand Manager NameVersion ClassMethods Observed Observer Test Sort Error Cabar dot/f_8.png

Base class for rendering methods of Components and Facets.

Methods

new   puts   render   render_Array  

Classes and Modules

Class Cabar::Renderer::Dot
Class Cabar::Renderer::EnvVar
Class Cabar::Renderer::InMemory
Class Cabar::Renderer::RubyScript
Class Cabar::Renderer::ShellScript
Class Cabar::Renderer::Yaml

Attributes

output  [RW]  The IO object for puts, defaults to $stdout.
verbose  [RW]  Controlls how verbose output should be.

Public Class methods

Public Instance methods

Same as output.puts *args.

Multimethod dispatching based on first argument‘s ancestors.

For example:

  renderer.render 4, :xyz

Would attempt to send:

  renderer.render_Fixnum 4, :xyz
  renderer.render_Integer 4, :xyz
  renderer.render_Precision 4, :xyz
  renderer.render_Numeric 4, :xyz
  renderer.render_Comparable 4, :xyz
  renderer.render_Object 4, :xyz

Kernel is avoided and namespaces are removed from ancestor names.

Multimethod dispatching based on common ancestors of all elements in the Array.

For example:

  x = [ 4, 4.5 ]
  renderer.render x, :xyz

Would attempt to send:

  renderer.render_Array_Precision x, :xyz
  renderer.render_Array_Numeric x, :xyz
  renderer.render_Array_Comparable x, :xyz
  renderer.render_Array_Object x, :xyz

Kernel is avoided and namespaces are removed from ancestor names.

[Validate]