Skip to content

NoMethodError: undefined method `from_100tan' for Unitwise::Functional:Class #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
turboladen opened this issue Apr 30, 2018 · 1 comment

Comments

@turboladen
Copy link

Not much to say other than the trace. Ruby 2.5.1. Unitwise 2.2.0.

⟪wise_units⟫  004:0> Unitwise(1, "[p'diop]").convert_to("rad")
NoMethodError: undefined method `from_100tan' for Unitwise::Functional:Class
Did you mean?  from_tan100
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/functional.rb:114:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/atom.rb:106:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/term.rb:63:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:91:in `block in scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:90:in `each'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:90:in `reduce'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:90:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/scale.rb:53:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/measurement.rb:165:in `converted_value'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/measurement.rb:29:in `convert_to'
        from (irb):4
@turboladen
Copy link
Author

Looks like the same for other special units as well:

008:0> Unitwise(1, "[pH]").convert_to("mol/l")
NoMethodError: undefined method `from_pH' for Unitwise::Functional:Class
Did you mean?  from_hpX
               from_hpC
               from_lg
               from_ln
               from_ld
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/functional.rb:114:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/atom.rb:106:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/term.rb:63:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:91:in `block in scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:90:in `each'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:90:in `reduce'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/unit.rb:90:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/scale.rb:53:in `scalar'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/measurement.rb:165:in `converted_value'
        from /Users/sloveless/.gem/ruby/2.5.1/gems/unitwise-2.2.0/lib/unitwise/measurement.rb:29:in `convert_to'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant