Sha256: e497e4292b5e8511bd16f72e96ab348538d9bcc328445bdd2404759effd29e18

Contents?: true

Size: 1.37 KB

Versions: 14

Compression:

Stored size: 1.37 KB

Contents

class Brief::Apps::Blueprint::Epic
  include Brief::Model

  defined_in Pathname(__FILE__)

  meta do
    title
    subheading
    project
    owner
    status String, :in => %w(draft published)
    tags Array
  end

  example <<-EOF
---
type: epic
status: draft
---

# Epic Title

Write a description for your epic.

# Features

## Feature Title

As a **PERSONA** I would like to **BEHAVIOR** so that I can **GOAL**
  EOF

  template <<-EOF
# <%= object.title %>
# Features
<% Array(object.features).each do |feature| %>
## <%= feature.title %>
As a **User** I would like to **Do this** so that I can **succeed**
<% end %>
  EOF

  content do
    title "h1:first-of-type"
    paragraph "p:first-of-type"
    paragraphs "p"

    define_section "Features" do
      each("h2").has(:title     => "h2",
                     :paragraph => "p:first-of-type",
                     :components   => "p:first-of-type strong",
                     :tasks => "ul li"
                    )

      each("h2").is_a :feature
    end
  end

  helpers do
    def features
      sections.features.items.map do |item|
        item.components = Array(item.components)

        item.merge(goal: item.components[2],
                   persona: item.components[0],
                   behavior: item.components[1])
      end
    end
  end

  actions do
    def publish_to_github
    end

    def custom_action
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
brief-1.15.5 apps/blueprint/models/epic.rb
brief-1.15.4 apps/blueprint/models/epic.rb
brief-1.15.3 apps/blueprint/models/epic.rb
brief-1.15.2 apps/blueprint/models/epic.rb
brief-1.15.1 apps/blueprint/models/epic.rb
brief-1.15.0 apps/blueprint/models/epic.rb
brief-1.14.3 apps/blueprint/models/epic.rb
brief-1.14.2 apps/blueprint/models/epic.rb
brief-1.14.1 apps/blueprint/models/epic.rb
brief-1.14.0 apps/blueprint/models/epic.rb
brief-1.13.2 apps/blueprint/models/epic.rb
brief-1.13.1 apps/blueprint/models/epic.rb
brief-1.12.9 apps/blueprint/models/epic.rb
brief-1.12.8 apps/blueprint/models/epic.rb