Class: Mantra::Manifest::Scope::EmptyScope

Inherits:
Mantra::Manifest::Scope show all
Defined in:
lib/mantra/manifest/scope/empty_scope.rb

Constant Summary

Constants inherited from Mantra::Manifest::Scope

ARRAY_SELECTOR_REGEXP, HASH_SELECTOR_REGEXP

Instance Attribute Summary

Attributes inherited from Mantra::Manifest::Scope

#next, #scope

Instance Method Summary collapse

Methods inherited from Mantra::Manifest::Scope

#filter, #initialize, #match?, parse, parse_selector, raise_parse_error, split_selector, #to_a

Methods included from Helpers::RegexpHelper

#to_regexp

Methods included from Helpers::ObjectWithType

included

Constructor Details

This class inherits a constructor from Mantra::Manifest::Scope

Instance Method Details

#_filter(element) ⇒ Object

returns array of children that matches this scope



9
10
11
# File 'lib/mantra/manifest/scope/empty_scope.rb', line 9

def _filter(element)
  [element]
end

#has_same_type?(element) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/mantra/manifest/scope/empty_scope.rb', line 17

def has_same_type?(element)
  true
end

#last?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/mantra/manifest/scope/empty_scope.rb', line 13

def last?
  true
end