Module: ReSorcery
- Extended by:
- Configuration
- Defined in:
- lib/re_sorcery.rb,
lib/re_sorcery/error.rb,
lib/re_sorcery/maybe.rb,
lib/re_sorcery/linked.rb,
lib/re_sorcery/result.rb,
lib/re_sorcery/decoder.rb,
lib/re_sorcery/fielded.rb,
lib/re_sorcery/helpers.rb,
lib/re_sorcery/version.rb,
lib/re_sorcery/arg_check.rb,
lib/re_sorcery/result/ok.rb,
lib/re_sorcery/maybe/just.rb,
lib/re_sorcery/result/err.rb,
lib/re_sorcery/configuration.rb,
lib/re_sorcery/maybe/nothing.rb,
lib/re_sorcery/decoder/builtin_decoders.rb,
lib/re_sorcery/linked/link_class_factory.rb,
lib/re_sorcery/fielded/expand_internal_fields.rb
Defined Under Namespace
Modules: Configuration, Error, Fielded, Helpers, Linked, Maybe, Result Classes: Decoder
Constant Summary collapse
- VERSION =
"0.3.0"
Constants included from Configuration
Configuration::CONFIGURABLES, Configuration::DEFAULT_LINK_METHOD_DECODER, Configuration::UNIQUE_STRING_OR_SYMBOL
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Configuration
Methods included from Linked
Methods included from Fielded
Class Method Details
.included(base) ⇒ Object
22 23 24 25 26 |
# File 'lib/re_sorcery.rb', line 22 def self.included(base) base.extend Fielded::ClassMethods base.extend Linked::ClassMethods @configured = "included at #{caller_locations.first}" end |
Instance Method Details
#as_json ⇒ Object
34 35 36 37 38 39 |
# File 'lib/re_sorcery.rb', line 34 def as_json(*) resource.cata( ok: ->(r) { r }, err: ->(e) { raise Error::InvalidResourceError, e }, ) end |