Class: Aws::EmptyStructure
- Defined in:
- lib/aws-sdk-core/empty_structure.rb
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #[](member_name) ⇒ Object
- #[]=(member_name, value) ⇒ Object
- #each(&block) ⇒ Object
- #each_pair(&block) ⇒ Object
- #eql?(other) ⇒ Boolean
- #inspect ⇒ Object private
- #length ⇒ Object
- #members ⇒ Object
- #pretty_print(q) ⇒ Object private
- #select(&block) ⇒ Object
- #size ⇒ Object
- #to_a ⇒ Object
- #to_h ⇒ Object
- #values ⇒ Object
- #values_at(*selector) ⇒ Object
Methods inherited from Structure
Class Method Details
.new ⇒ Object
4 5 6 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 4 def self.new super([]) end |
Instance Method Details
#==(other) ⇒ Object
8 9 10 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 8 def ==(other) other.is_a?(EmptyStructure) end |
#[](member_name) ⇒ Object
12 13 14 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 12 def [](member_name) raise NameError, "no member '#{member_name}' in struct" end |
#[]=(member_name, value) ⇒ Object
16 17 18 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 16 def []=(member_name, value) raise NameError, "no member '#{member_name}' in struct" end |
#each(&block) ⇒ Object
20 21 22 23 24 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 20 def each(&block) unless block_given? [].to_enum end end |
#each_pair(&block) ⇒ Object
26 27 28 29 30 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 26 def each_pair(&block) unless block_given? {}.to_enum end end |
#eql?(other) ⇒ Boolean
32 33 34 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 32 def eql?(other) other.is_a?(EmptyStructure) end |
#inspect ⇒ 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.
37 38 39 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 37 def inspect '#<struct>' end |
#length ⇒ Object
46 47 48 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 46 def length 0 end |
#members ⇒ Object
50 51 52 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 50 def members [] end |
#pretty_print(q) ⇒ 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.
42 43 44 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 42 def pretty_print(q) q.text(inspect) end |
#select(&block) ⇒ Object
54 55 56 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 54 def select(&block) [] end |
#size ⇒ Object
58 59 60 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 58 def size 0 end |
#to_a ⇒ Object
62 63 64 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 62 def to_a [] end |
#to_h ⇒ Object
66 67 68 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 66 def to_h {} end |
#values ⇒ Object
70 71 72 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 70 def values [] end |
#values_at(*selector) ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/aws-sdk-core/empty_structure.rb', line 74 def values_at(*selector) if selector.empty? [] else offset = selector.first raise IndexError, "offset #{offset} too large for struct(size:0)" end end |