Method: Code::Node::Base10#initialize
- Defined in:
- lib/code/node/base_10.rb
#initialize(parsed) ⇒ Base10
Returns a new instance of Base10.
6 7 8 9 10 11 12 13 14 |
# File 'lib/code/node/base_10.rb', line 6 def initialize(parsed) return if parsed.blank? @whole = parsed.delete(:whole).presence return unless parsed.key?(:exponent) @exponent = Node::Statement.new(parsed.delete(:exponent).presence) end |