Class: D3::FormatSpecifier

Inherits:
Object
  • Object
show all
Includes:
Native
Defined in:
lib/opal/d3/format.rb

Constant Summary collapse

FIELDS =
%W[fill align sign symbol zero width comma precision type]

Instance Method Summary collapse

Methods included from Native

included, #initialize

Instance Method Details

#to_hObject



16
17
18
19
20
21
22
# File 'lib/opal/d3/format.rb', line 16

def to_h
  result = {}
  FIELDS.each do |key|
    result[key] = send(key)
  end
  result
end

#to_nObject



24
25
26
# File 'lib/opal/d3/format.rb', line 24

def to_n
  @native
end