Class: TT::ActionFactory::Option

Inherits:
Struct
  • Object
show all
Defined in:
lib/t_t/action_factory.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



4
5
6
# File 'lib/t_t/action_factory.rb', line 4

def key
  @key
end

#metaObject

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



4
5
6
# File 'lib/t_t/action_factory.rb', line 4

def meta
  @meta
end

Class Method Details

.parse(list) ⇒ Object



5
6
7
8
9
# File 'lib/t_t/action_factory.rb', line 5

def self.parse(list)
  list.flat_map do |item|
    item.respond_to?(:map) ? item.map { |key, meta| new(key, meta) } : new(item)
  end
end