Class: ReactorSDK::Resources::Library

Inherits:
BaseResource show all
Defined in:
lib/reactor_sdk/resources/library.rb

Instance Attribute Summary

Attributes inherited from BaseResource

#attributes, #id, #meta, #relationships, #type

Instance Method Summary collapse

Methods inherited from BaseResource

#==, #[], attribute, #initialize, #relationship_data, #relationship_id, #relationship_ids, #to_h

Constructor Details

This class inherits a constructor from ReactorSDK::Resources::BaseResource

Instance Method Details

#build_required_detailString?

Returns ISO8601 timestamp when the library build completed.

Returns:

  • (String, nil)

    ISO8601 timestamp when the library build completed



39
# File 'lib/reactor_sdk/resources/library.rb', line 39

attribute :build_required_detail

#buildable?Boolean

Returns true if the library is in a state where it can be built.

Returns:

  • (Boolean)


46
47
48
# File 'lib/reactor_sdk/resources/library.rb', line 46

def buildable?
  state == 'development'
end

#created_atString

Returns ISO8601 timestamp when the library was created.

Returns:

  • (String)

    ISO8601 timestamp when the library was created



30
# File 'lib/reactor_sdk/resources/library.rb', line 30

attribute :created_at

#inspectString

Returns Human-readable representation.

Returns:

  • (String)

    Human-readable representation



62
63
64
# File 'lib/reactor_sdk/resources/library.rb', line 62

def inspect
  "#<ReactorSDK::Resources::Library id=#{id.inspect} name=#{name.inspect} state=#{state.inspect}>"
end

#nameString

Returns Display name of the library.

Returns:

  • (String)

    Display name of the library



20
# File 'lib/reactor_sdk/resources/library.rb', line 20

attribute :name

#publishedBoolean

Returns Whether the library has been published.

Returns:

  • (Boolean)

    Whether the library has been published



27
# File 'lib/reactor_sdk/resources/library.rb', line 27

attribute :published, as: :boolean

#published?Boolean

Returns true if the library has been successfully published.

Returns:

  • (Boolean)


55
56
57
# File 'lib/reactor_sdk/resources/library.rb', line 55

def published?
  state == 'published'
end

#published_atString?

Returns ISO8601 timestamp when the library was published.

Returns:

  • (String, nil)

    ISO8601 timestamp when the library was published



36
# File 'lib/reactor_sdk/resources/library.rb', line 36

attribute :published_at

#stateString

Returns Current state of the library in its workflow One of: “development”, “submitted”, “approved”, “rejected”, “published”.

Returns:

  • (String)

    Current state of the library in its workflow One of: “development”, “submitted”, “approved”, “rejected”, “published”



24
# File 'lib/reactor_sdk/resources/library.rb', line 24

attribute :state

#updated_atString

Returns ISO8601 timestamp when the library was last updated.

Returns:

  • (String)

    ISO8601 timestamp when the library was last updated



33
# File 'lib/reactor_sdk/resources/library.rb', line 33

attribute :updated_at