Class: PnoteClient::Documents::Hml::Char

Inherits:
Object
  • Object
show all
Defined in:
lib/pnote_client/documents/hml/char.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Char

Returns a new instance of Char.



13
14
15
# File 'lib/pnote_client/documents/hml/char.rb', line 13

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



11
12
13
# File 'lib/pnote_client/documents/hml/char.rb', line 11

def text
  @text
end

Class Method Details

.from_tag(char_tag) ⇒ Object

Textable Element



7
8
9
# File 'lib/pnote_client/documents/hml/char.rb', line 7

def self.from_tag(char_tag)
  return self.new(char_tag.content)
end

Instance Method Details

#contentObject



17
18
19
# File 'lib/pnote_client/documents/hml/char.rb', line 17

def content
  return @text
end

#textable?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/pnote_client/documents/hml/char.rb', line 21

def textable?
  return true
end