Class: NoraMark::PreformattedBlock

Inherits:
Node
  • Object
show all
Defined in:
lib/nora_mark/node.rb,
lib/nora_mark/parser.kpeg.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#attrs, #body_empty, #first_child, #holders, #last_child, #next, #no_tag, #parent, #prev, #raw_content

Instance Method Summary collapse

Methods inherited from Node

#_find_node, #_match?, #_remove_internal, #add_attr, #after, #all_nodes, #ancestors, #append_child, #before, #build_selector, #children, #children=, #children_empty?, #children_replaced, #clone, #each, #find_node, #match?, #modify_selector, #named_params=, #params=, #prepend_child, #rebuild_children, #remove, #remove_following, #reparent, #replace, #unlink, #wrap

Constructor Details

#initialize(name, ids, classes, params, named_params, codelanguage, content, line_no) ⇒ PreformattedBlock

Returns a new instance of PreformattedBlock.



216
217
218
219
220
221
222
223
224
225
# File 'lib/nora_mark/parser.kpeg.rb', line 216

def initialize(name, ids, classes, params, named_params, codelanguage, content, line_no)
  @name = name
  @ids = ids
  @classes = classes
  @params = params
  @named_params = named_params
  @codelanguage = codelanguage
  @content = content
  @line_no = line_no
end

Instance Attribute Details

#classesObject (readonly)

Returns the value of attribute classes.



228
229
230
# File 'lib/nora_mark/parser.kpeg.rb', line 228

def classes
  @classes
end

#codelanguageObject (readonly)

Returns the value of attribute codelanguage.



231
232
233
# File 'lib/nora_mark/parser.kpeg.rb', line 231

def codelanguage
  @codelanguage
end

#contentObject (readonly)

Returns the value of attribute content.



232
233
234
# File 'lib/nora_mark/parser.kpeg.rb', line 232

def content
  @content
end

#idsObject (readonly)

Returns the value of attribute ids.



227
228
229
# File 'lib/nora_mark/parser.kpeg.rb', line 227

def ids
  @ids
end

#line_noObject (readonly)

Returns the value of attribute line_no.



233
234
235
# File 'lib/nora_mark/parser.kpeg.rb', line 233

def line_no
  @line_no
end

#nameObject (readonly)

Returns the value of attribute name.



226
227
228
# File 'lib/nora_mark/parser.kpeg.rb', line 226

def name
  @name
end

#named_paramsObject (readonly)

Returns the value of attribute named_params.



230
231
232
# File 'lib/nora_mark/parser.kpeg.rb', line 230

def named_params
  @named_params
end

#paramsObject (readonly)

Returns the value of attribute params.



229
230
231
# File 'lib/nora_mark/parser.kpeg.rb', line 229

def params
  @params
end

Instance Method Details

#raw_textObject



399
400
401
# File 'lib/nora_mark/node.rb', line 399

def raw_text
  true
end

#raw_text?Boolean

Returns:

  • (Boolean)


403
404
405
# File 'lib/nora_mark/node.rb', line 403

def raw_text?
  true
end

#textObject



407
408
409
# File 'lib/nora_mark/node.rb', line 407

def text
  @content.join "\n"
end