class PMLCode::Content::Line
Attributes
text[R]
Public Class Methods
new(text, parts = [], highlighted = false)
click to toggle source
# File lib/pmlcode/content.rb, line 29 def initialize(text, parts = [], highlighted = false) @text = text @parts = parts @highlighted = highlighted end
Public Instance Methods
highlighted?()
click to toggle source
# File lib/pmlcode/content.rb, line 43 def highlighted? @highlighted end
in_part?(part = nil)
click to toggle source
# File lib/pmlcode/content.rb, line 35 def in_part?(part = nil) if part @parts.include?(part) else !@parts.empty? end end