Class: Relax2::FluentArg::NameValuePair

Inherits:
Struct
  • Object
show all
Defined in:
lib/relax2/fluent_arg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNameValuePair

Returns a new instance of NameValuePair.



9
10
11
12
# File 'lib/relax2/fluent_arg.rb', line 9

def initialize(...)
  super
  freeze
end

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



8
9
10
# File 'lib/relax2/fluent_arg.rb', line 8

def name
  @name
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



8
9
10
# File 'lib/relax2/fluent_arg.rb', line 8

def value
  @value
end

Instance Method Details

#to_aObject



14
15
16
# File 'lib/relax2/fluent_arg.rb', line 14

def to_a
  [name, value]
end