Class: Micro::Struct::Features::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/micro/struct/features.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#namesObject

Returns the value of attribute names

Returns:

  • (Object)

    the current value of names



30
31
32
# File 'lib/micro/struct/features.rb', line 30

def names
  @names
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



30
31
32
# File 'lib/micro/struct/features.rb', line 30

def options
  @options
end

Instance Method Details

#option?(name) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/micro/struct/features.rb', line 31

def option?(name)
  options.fetch(name)
end

#options?(*names) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/micro/struct/features.rb', line 35

def options?(*names)
  names.all? { |name| option?(name) }
end