Class: Textus::Manifest::Policies::Block

Inherits:
Object
  • Object
show all
Defined in:
lib/textus/manifest/policies.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Block

Returns a new instance of Block.



49
50
51
52
53
54
55
# File 'lib/textus/manifest/policies.rb', line 49

def initialize(raw)
  @match = raw["match"] or raise Textus::UsageError.new("policy block missing match:")
  @refresh = parse_refresh(raw["refresh"])
  @handler_allowlist = parse_handler_allowlist(raw["handler_allowlist"])
  @promote = parse_promote(raw["promote_requires"])
  @retention = raw["retention"] # reserved — passthrough only
end

Instance Attribute Details

#handler_allowlistObject (readonly)

Returns the value of attribute handler_allowlist.



47
48
49
# File 'lib/textus/manifest/policies.rb', line 47

def handler_allowlist
  @handler_allowlist
end

#matchObject (readonly)

Returns the value of attribute match.



47
48
49
# File 'lib/textus/manifest/policies.rb', line 47

def match
  @match
end

#promoteObject (readonly)

Returns the value of attribute promote.



47
48
49
# File 'lib/textus/manifest/policies.rb', line 47

def promote
  @promote
end

#refreshObject (readonly)

Returns the value of attribute refresh.



47
48
49
# File 'lib/textus/manifest/policies.rb', line 47

def refresh
  @refresh
end

#retentionObject (readonly)

Returns the value of attribute retention.



47
48
49
# File 'lib/textus/manifest/policies.rb', line 47

def retention
  @retention
end