Method: GQLi::Base#initialize
- Defined in:
- lib/gqli/base.rb
#initialize(name = nil, depth = 0, &block) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 |
# File 'lib/gqli/base.rb', line 10 def initialize(name = nil, depth = 0, &block) @__name = name @__depth = depth @__nodes = [] instance_eval(&block) unless block.nil? end |