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



21
22
23
# File 'lib/micro/struct/features.rb', line 21

def names
  @names
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



21
22
23
# File 'lib/micro/struct/features.rb', line 21

def options
  @options
end

Instance Method Details

#option?(name) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/micro/struct/features.rb', line 22

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

#options?(*names) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/micro/struct/features.rb', line 26

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