Module: ConvenientService::Feature::Core

Includes:
Core, Support::Concern
Included in:
ConvenientService::Feature::Configs::Standard
Defined in:
lib/convenient_service/feature/core.rb

Overview

Since:

  • 1.0.0

Instance Method Summary collapse

Methods included from Core

entity?, entity_class?

Methods included from Support::Concern

included

Instance Method Details

#to_s(format: :inspect) ⇒ String

Note:

Intended to be used for debugging purposes.

Returns string representation of feature.

Examples:

Common usage.

class Feature
  include ConvenientFeature::Feature::Standard::Config

  entry :main

  def main
    :main_entry_value
  end
end

puts Feature.new
# <Feature>
# => nil

Feature.new.to_s
# => "<Feature>"

Feature.new.to_s(format: :inspect)
# => "<Feature>"

Feature.new.to_s(format: :original)
# => "#<Feature:0x00005639cd363000>"

Parameters:

  • format (Symbol) (defaults to: :inspect)

Returns:

  • (String)

Since:

  • 1.0.0



53
54
55
# File 'lib/convenient_service/feature/core.rb', line 53

def to_s(format: :inspect)
  (format == :inspect) ? inspect : super()
end