Class: AttributedClass::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/ttk/strategies/Strategy.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, desc, *a, &b) ⇒ Attribute

Returns a new instance of Attribute.



29
30
31
32
33
# File 'lib/ttk/strategies/Strategy.rb', line 29

def initialize ( name, desc, *a, &b )
  my, our = a.partition { |x| x == :dont_expand }
  @expand = my.empty?
  initialize_without_expand(name, desc, *our, &b)
end

Instance Method Details

#expand?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/ttk/strategies/Strategy.rb', line 35

def expand?
  @expand
end

#initialize_without_expandObject



28
# File 'lib/ttk/strategies/Strategy.rb', line 28

alias :initialize_without_expand :initialize