Class: Ecoportal::API::GraphQL::Fragment
- Inherits:
-
Object
- Object
- Ecoportal::API::GraphQL::Fragment
- Defined in:
- lib/ecoportal/api/graphql/fragment.rb,
lib/ecoportal/api/graphql/fragment/pagination.rb,
lib/ecoportal/api/graphql/fragment/contractor_entity.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#fragments ⇒ Object
readonly
Returns the value of attribute fragments.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client) ⇒ Fragment
constructor
A new instance of Fragment.
Constructor Details
#initialize(client) ⇒ Fragment
Returns a new instance of Fragment.
26 27 28 29 |
# File 'lib/ecoportal/api/graphql/fragment.rb', line 26 def initialize(client) @client = client parse end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
24 25 26 |
# File 'lib/ecoportal/api/graphql/fragment.rb', line 24 def client @client end |
#fragments ⇒ Object (readonly)
Returns the value of attribute fragments.
24 25 26 |
# File 'lib/ecoportal/api/graphql/fragment.rb', line 24 def fragments @fragments end |
Class Method Details
.const?(value) ⇒ Boolean
6 7 8 9 10 11 12 13 |
# File 'lib/ecoportal/api/graphql/fragment.rb', line 6 def const?(value) begin const_get(value) rescue NameError => e return false end true end |
.fragment(sym, heredoc) ⇒ Object
15 16 17 |
# File 'lib/ecoportal/api/graphql/fragment.rb', line 15 def fragment(sym, heredoc) fragments[sym] = heredoc end |
.fragments ⇒ Object
19 20 21 |
# File 'lib/ecoportal/api/graphql/fragment.rb', line 19 def fragments @fragments ||= {} end |