Class: Taro::Export::Base
- Inherits:
-
Object
- Object
- Taro::Export::Base
- Defined in:
- lib/taro/export/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
2 3 4 |
# File 'lib/taro/export/base.rb', line 2 def result @result end |
Class Method Details
.call(declarations: Taro.declarations, title: Taro.config.api_name, version: Taro.config.api_version) ⇒ Object
4 5 6 |
# File 'lib/taro/export/base.rb', line 4 def self.call(declarations: Taro.declarations, title: Taro.config.api_name, version: Taro.config.api_version, **) new.call(declarations:, title:, version:, **) end |
Instance Method Details
#to_json ⇒ Object
8 9 10 11 |
# File 'lib/taro/export/base.rb', line 8 def to_json(*) require 'json' JSON.pretty_generate(result) end |
#to_yaml ⇒ Object
13 14 15 16 |
# File 'lib/taro/export/base.rb', line 13 def to_yaml require 'yaml' desymbolize(result).to_yaml end |