Class: IRuby::Display::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/iruby/display.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(match, mime, render, priority) ⇒ Renderer

Returns a new instance of Renderer.



96
97
98
# File 'lib/iruby/display.rb', line 96

def initialize(match, mime, render, priority)
  @match, @mime, @render, @priority = match, mime, render, priority
end

Instance Attribute Details

#matchObject (readonly)

Returns the value of attribute match.



94
95
96
# File 'lib/iruby/display.rb', line 94

def match
  @match
end

#mimeObject (readonly)

Returns the value of attribute mime.



94
95
96
# File 'lib/iruby/display.rb', line 94

def mime
  @mime
end

#priorityObject (readonly)

Returns the value of attribute priority.



94
95
96
# File 'lib/iruby/display.rb', line 94

def priority
  @priority
end

#render(obj) ⇒ Object (readonly)

Returns the value of attribute render.



94
95
96
# File 'lib/iruby/display.rb', line 94

def render
  @render
end

Instance Method Details

#match?(obj) ⇒ Boolean

Returns:

  • (Boolean)


100
101
102
# File 'lib/iruby/display.rb', line 100

def match?(obj)
  @match.call(obj)
end