Branch: refs/heads/master
Home: https://github.com/yast/yast-ruby-bindings
Commit: b4eddc1628dc4566624e4a0e68723d641bce7d88
https://github.com/yast/yast-ruby-bindings/commit/b4eddc1628dc4566624e4a0e68...
Author: David Majda
Date: 2013-07-17 (Wed, 17 Jul 2013)
Changed paths:
M src/ruby/yast/convert.rb
M src/ruby/yast/ops.rb
M tests/ruby/ops_test.rb
Log Message:
-----------
Implement Ops.get_* shortcut methods
In code geenreated by Y2R, we often have pieces like this:
Convert.to_string(Ops.get(l, 0, "foo"))
This code is typically emitted because the original collection is
untyped.
Because this pattern appears over and over, we decided to simplify it to
something like this:
Ops.get_string(l, 0, "foo"))
That is, introduce and use shortcut methods that would combine getting
an item from a collection with type conversion.
This commit adds needed shortcut methods to Ruby bindings. It will be
followed by a commit in Y2R that will generate code which will use them.
Commit: 877c5619b06f2f738552b21ae464f6c4fbd90371
https://github.com/yast/yast-ruby-bindings/commit/877c5619b06f2f738552b21ae4...
Author: Ladislav Slezák
Date: 2013-07-17 (Wed, 17 Jul 2013)
Changed paths:
M src/ruby/yast/convert.rb
M src/ruby/yast/ops.rb
M tests/ruby/ops_test.rb
Log Message:
-----------
Merge pull request #66 from dmajda/implement-ops-get-shortcut-methods
Implement Ops.get_* shortcut methods
Compare: https://github.com/yast/yast-ruby-bindings/compare/102d90aa3794...877c5619b0...