Class: AssLauncher::Support::V8iSection::Fields Private
- Inherits:
-
Object
- Object
- AssLauncher::Support::V8iSection::Fields
- Defined in:
- lib/ass_launcher/support/v8i_section.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class provaides case insensitive access to #_hash fields of AssLauncher::Support::V8iSection
Constant Summary collapse
- REQUIRED =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Define required fields of v8i
[:connect]
Instance Attribute Summary collapse
-
#_hash ⇒ Hash
readonly
private
Containe AssLauncher::Support::V8iSection fields.
Instance Method Summary collapse
-
#[](key) ⇒ Object
private
:nodoc:.
-
#[]=(key, value) ⇒ Object
private
:nodoc:.
-
#dict ⇒ Hash
private
Dictionary for case insensitive access to #_hash values.
-
#initialize(hash) ⇒ Fields
constructor
private
A new instance of Fields.
-
#key?(key) ⇒ Boolean
private
:nodoc:.
-
#to_s ⇒ Object
private
:nodoc:.
Constructor Details
#initialize(hash) ⇒ Fields
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Fields.
17 18 19 20 21 |
# File 'lib/ass_launcher/support/v8i_section.rb', line 17 def initialize(hash) @_hash = hash fail ArgumentError if\ (REQUIRED - dict.keys).size > 0 end |
Instance Attribute Details
#_hash ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns containe AssLauncher::Support::V8iSection fields.
13 14 15 |
# File 'lib/ass_launcher/support/v8i_section.rb', line 13 def _hash @_hash end |
Instance Method Details
#[](key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
:nodoc:
52 53 54 |
# File 'lib/ass_launcher/support/v8i_section.rb', line 52 def [](key) _hash[trans(key)] end |
#[]=(key, value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
:nodoc:
57 58 59 |
# File 'lib/ass_launcher/support/v8i_section.rb', line 57 def []=(key, value) _hash[trans(key)] = value end |
#dict ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Dictionary for case insensitive access to #_hash values
25 26 27 |
# File 'lib/ass_launcher/support/v8i_section.rb', line 25 def dict @dict ||= build_dict end |
#key?(key) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
:nodoc:
62 63 64 |
# File 'lib/ass_launcher/support/v8i_section.rb', line 62 def key?(key) dict.key? key.to_s.downcase.to_sym end |
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
:nodoc:
67 68 69 70 71 72 73 |
# File 'lib/ass_launcher/support/v8i_section.rb', line 67 def to_s res = '' _hash.each do |key, value| res << "#{key}=#{value}\r\n" end res end |