Class: PnoteClient::Documents::Hml::Style

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name) ⇒ Style

Returns a new instance of Style.



14
15
16
17
# File 'lib/pnote_client/documents/hml/style.rb', line 14

def initialize(id, name)
  @id = id
  @name = name
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



12
13
14
# File 'lib/pnote_client/documents/hml/style.rb', line 12

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/pnote_client/documents/hml/style.rb', line 12

def name
  @name
end

Class Method Details

.from_tag(style_tag) ⇒ Object



5
6
7
8
9
10
# File 'lib/pnote_client/documents/hml/style.rb', line 5

def self.from_tag(style_tag)
  style_id = style_tag['Id']
  style_name = style_tag['Name']

  return self.new(style_id, style_name)
end