Module: Matestack::Ui::Core::Properties::ClassMethods

Extended by:
Gem::Deprecate
Defined in:
lib/matestack/ui/core/properties.rb

Instance Method Summary collapse

Instance Method Details

#inherited(subclass) ⇒ Object



40
41
42
43
44
# File 'lib/matestack/ui/core/properties.rb', line 40

def inherited(subclass)
  subclass.required(*required_property_keys)
  subclass.optional(*optional_property_keys)
  super
end

#optional(*args) ⇒ Object



28
29
30
# File 'lib/matestack/ui/core/properties.rb', line 28

def optional(*args)
  @optional = (@optional || []).concat(args)
end

#optional_property_keysObject



36
37
38
# File 'lib/matestack/ui/core/properties.rb', line 36

def optional_property_keys
  @optional
end

#required(*args) ⇒ Object Also known as: requires



23
24
25
# File 'lib/matestack/ui/core/properties.rb', line 23

def required(*args)
  @required = (@required || []).concat(args)
end

#required_property_keysObject



32
33
34
# File 'lib/matestack/ui/core/properties.rb', line 32

def required_property_keys
  @required
end