Sha256: f2ead4be0e6279c6dbbc32d27efc4ea38c1fae6114b5a2f83771cfac3cfc6d2d

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

module Danica
  class Function < Equation
    include Common
    include DSL
    include Expressable

    autoload :Name,    'danica/function/name'
    attr_accessor :name

    reset_variables

    built_with(:function_block)

    def name
      containers_hash[:left] ||= Danica::Wrapper::Container.new Name.new(name: @name, variables: containers)
    end

    def expression
      @expression ||= Expression.build(:x) do
        x
      end.new(function_block)
    end

    def left
      name
    end

    def right
      expression
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
danica-2.5.1 lib/danica/function.rb
danica-2.5.0 lib/danica/function.rb