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.



48
49
50
# File 'lib/xdry/parsing/parts/selectors.rb', line 48

def initialize selector
  @selector = selector
end

Instance Attribute Details

#selectorObject (readonly)

Returns the value of attribute selector.



46
47
48
# File 'lib/xdry/parsing/parts/selectors.rb', line 46

def selector
  @selector
end

Instance Method Details

#simple?Boolean

Returns:

  • (Boolean)


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

def simple?; true; end

#to_sObject



58
59
60
# File 'lib/xdry/parsing/parts/selectors.rb', line 58

def to_s
  @selector
end

#var_name_after_keyword(keyword) ⇒ Object



54
55
56
# File 'lib/xdry/parsing/parts/selectors.rb', line 54

def var_name_after_keyword keyword
  nil
end