Class: XDry::SimpleSelectorDef

Inherits:
SelectorDef show all
Defined in:
lib/xdry/parsing/parts/selectors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from SelectorDef

parse

Constructor Details

#initialize(selector) ⇒ SimpleSelectorDef

Returns a new instance of SimpleSelectorDef.



30
31
32
# File 'lib/xdry/parsing/parts/selectors.rb', line 30

def initialize selector
  @selector = selector
end

Instance Attribute Details

#selectorObject (readonly)

Returns the value of attribute selector.



28
29
30
# File 'lib/xdry/parsing/parts/selectors.rb', line 28

def selector
  @selector
end

Instance Method Details

#simple?Boolean

Returns:

  • (Boolean)


34
# File 'lib/xdry/parsing/parts/selectors.rb', line 34

def simple?; true; end

#to_sObject



40
41
42
# File 'lib/xdry/parsing/parts/selectors.rb', line 40

def to_s
  @selector
end

#var_name_after_keyword(keyword) ⇒ Object



36
37
38
# File 'lib/xdry/parsing/parts/selectors.rb', line 36

def var_name_after_keyword keyword
  nil
end