Class: Textus::Manifest::Entry::Derived

Inherits:
Base show all
Defined in:
lib/textus/manifest/entry/derived.rb

Defined Under Namespace

Classes: External, Projection

Constant Summary

Constants inherited from Textus::Manifest::Entry

PUBLISH_EACH_VARS, PUBLISH_EACH_VAR_RE

Instance Attribute Summary collapse

Attributes inherited from Base

#format, #key, #manifest, #owner, #path, #raw, #schema, #zone

Instance Method Summary collapse

Methods inherited from Base

#in_generator_zone?, #in_proposal_zone?, #intake?, #kind, #leaf?, #nested?, #zone_writers

Constructor Details

#initialize(source:, template: nil, inject_intro: false, publish_to: [], events: {}, **rest) ⇒ Derived

Returns a new instance of Derived.



10
11
12
13
14
15
16
17
# File 'lib/textus/manifest/entry/derived.rb', line 10

def initialize(source:, template: nil, inject_intro: false, publish_to: [], events: {}, **rest)
  super(**rest)
  @source = source
  @template = template
  @inject_intro = inject_intro
  @publish_to = Array(publish_to)
  @events = events || {}
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



8
9
10
# File 'lib/textus/manifest/entry/derived.rb', line 8

def events
  @events
end

#inject_introObject (readonly)

Returns the value of attribute inject_intro.



8
9
10
# File 'lib/textus/manifest/entry/derived.rb', line 8

def inject_intro
  @inject_intro
end

#publish_toObject (readonly)

Returns the value of attribute publish_to.



8
9
10
# File 'lib/textus/manifest/entry/derived.rb', line 8

def publish_to
  @publish_to
end

#sourceObject (readonly)

Returns the value of attribute source.



8
9
10
# File 'lib/textus/manifest/entry/derived.rb', line 8

def source
  @source
end

#templateObject (readonly)

Returns the value of attribute template.



8
9
10
# File 'lib/textus/manifest/entry/derived.rb', line 8

def template
  @template
end

Instance Method Details

#derived?Boolean

Returns:

  • (Boolean)


19
# File 'lib/textus/manifest/entry/derived.rb', line 19

def derived? = true

#external?Boolean

Returns:

  • (Boolean)


21
# File 'lib/textus/manifest/entry/derived.rb', line 21

def external?   = @source.is_a?(External)

#projection?Boolean

Returns:

  • (Boolean)


20
# File 'lib/textus/manifest/entry/derived.rb', line 20

def projection? = @source.is_a?(Projection)