Class: Arf::Types::Streamer

Inherits:
Object
  • Object
show all
Defined in:
lib/arf/types/streamer.rb

Direct Known Subclasses

InputStream, OutputStream

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Streamer

Returns a new instance of Streamer.



10
11
12
# File 'lib/arf/types/streamer.rb', line 10

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/arf/types/streamer.rb', line 8

def type
  @type
end

Class Method Details

.[](type) ⇒ Object



6
# File 'lib/arf/types/streamer.rb', line 6

def self.[](type) = new(type)

Instance Method Details

#resolved_type(resolver) ⇒ Object



14
15
16
17
18
# File 'lib/arf/types/streamer.rb', line 14

def resolved_type(resolver)
  return type if type.is_a? Symbol

  @resolved_type ||= resolver.find_type(type)
end