Sha256: 96defcfb361afa4f676e45181e62b61349c28f249515c9ef458ed7aa817223ef

Contents?: true

Size: 360 Bytes

Versions: 11

Compression:

Stored size: 360 Bytes

Contents

module Expressir
  module Model
    module Scope
      def find(path)
        path.downcase.split(".").reduce(self) do |acc, curr|
          if acc and acc.class.method_defined? :children
            acc.children.find{|x| x.id.downcase == curr}
          end
        end
      end

      def children
        raise 'Not implemented'
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
expressir-0.2.7 lib/expressir/model/scope.rb
expressir-0.2.7-x86-mingw32 lib/expressir/model/scope.rb
expressir-0.2.7-x64-mingw32 lib/expressir/model/scope.rb
expressir-0.2.7-x86_64-linux lib/expressir/model/scope.rb
expressir-0.2.7-x86-linux lib/expressir/model/scope.rb
expressir-0.2.7-x86_64-darwin lib/expressir/model/scope.rb
expressir-0.2.7-arm64-darwin lib/expressir/model/scope.rb
expressir-0.2.5-x86_64-linux lib/expressir/model/scope.rb
expressir-0.2.5-x86_64-darwin-19 lib/expressir/model/scope.rb
expressir-0.2.5 lib/expressir/model/scope.rb
expressir-0.2.4 lib/expressir/model/scope.rb