Class: Nydp::Builtin::RubyWrap::WrapperBuilder
- Defined in:
- lib/nydp/builtin/ruby_wrap.rb
Instance Method Summary collapse
- #build(name, args, code, helpers = "") ⇒ Object
-
#initialize(default_helpers) ⇒ WrapperBuilder
constructor
A new instance of WrapperBuilder.
Constructor Details
#initialize(default_helpers) ⇒ WrapperBuilder
Returns a new instance of WrapperBuilder.
53 54 55 |
# File 'lib/nydp/builtin/ruby_wrap.rb', line 53 def initialize default_helpers @default_helpers = default_helpers.to_s.strip != "" ? ", #{default_helpers}" : "" end |
Instance Method Details
#build(name, args, code, helpers = "") ⇒ Object
57 58 59 60 |
# File 'lib/nydp/builtin/ruby_wrap.rb', line 57 def build name, args, code, helpers="" extra_helpers = helpers.to_s.strip != "" ? ", #{helpers}" : "" Nydp::Builtin::RubyWrap.builtins[name.to_sym] = Coder.new(name.to_sym, args, code, "#{@default_helpers}#{extra_helpers}") end |