Class: Etna::Cwl::Loader
- Inherits:
-
Object
show all
- Defined in:
- lib/etna/cwl.rb
Direct Known Subclasses
AnyLoader, ArrayLoader, ArrayType::InnerLoader, EnumLoader, EnumType::InnerLoader, FunctorMapLoader, MapLoader, NeverLoader, OptionalLoader, PrimitiveLoader, PrimitiveLoader::BooleanLoader, RecordLoader, RecordType::Field::FieldLoader, SourceLoader, StrictMapLoader, TypedDSLLoader, UnionLoader
Instance Method Summary
collapse
Instance Method Details
#as_array ⇒ Object
56
57
58
|
# File 'lib/etna/cwl.rb', line 56
def as_array
ArrayLoader.new(self)
end
|
#as_mapped_array(id_key = nil, value_key = nil) ⇒ Object
48
49
50
|
# File 'lib/etna/cwl.rb', line 48
def as_mapped_array(id_key = nil, value_key = nil)
MapLoader.new(self.as_array, id_key, value_key)
end
|
#load(val) ⇒ Object
36
37
38
|
# File 'lib/etna/cwl.rb', line 36
def load(val)
raise "Unimplemented"
end
|
#map(&block) ⇒ Object
44
45
46
|
# File 'lib/etna/cwl.rb', line 44
def map(&block)
FunctorMapLoader.new(self, &block)
end
|
#or(*alternatives) ⇒ Object
52
53
54
|
# File 'lib/etna/cwl.rb', line 52
def or(*alternatives)
UnionLoader.new(self, *alternatives)
end
|