Class: OrgParse::LinkNode
Overview
Link保持
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
Attributes inherited from Node
#children, #kind, #parent, #value
Instance Method Summary collapse
-
#initialize(uri, children = [], vars = []) ⇒ LinkNode
constructor
A new instance of LinkNode.
-
#uri ⇒ Object
href.
Methods inherited from Node
#done, #done?, #example?, #html?, #inspect, #is_leaf?, #section_no_array, #set_example, #set_html, #set_src, #set_to_descendant, #set_verse, #src?, #verse?
Constructor Details
#initialize(uri, children = [], vars = []) ⇒ LinkNode
Returns a new instance of LinkNode.
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/org-parse/node.rb', line 307 def initialize(uri, children = [], vars = []) @html_options = {} @caption = nil vars.each do |v| if v =~ /^CAPTION:(.+)$/ @caption = $1.chomp else while v =~ /([^ =]+)=("[^"]+")/ @html_options[$1] = $2 v = $' end end end super(:LINK, children, uri) end |
Instance Attribute Details
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
305 306 307 |
# File 'lib/org-parse/node.rb', line 305 def @caption end |
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
305 306 307 |
# File 'lib/org-parse/node.rb', line 305 def @html_options end |
Instance Method Details
#uri ⇒ Object
href
324 325 326 |
# File 'lib/org-parse/node.rb', line 324 def uri @value end |