Class: Fbe::Award::Policy
- Inherits:
-
Object
- Object
- Fbe::Award::Policy
- Defined in:
- lib/fbe/award.rb
Overview
A policy.
Instance Attribute Summary collapse
-
#vars ⇒ Object
readonly
Returns the value of attribute vars.
Instance Method Summary collapse
-
#initialize ⇒ Policy
constructor
A new instance of Policy.
- #intro(text) ⇒ Object
- #line(line) ⇒ Object
- #markdown ⇒ Object
Constructor Details
#initialize ⇒ Policy
Returns a new instance of Policy.
245 246 247 248 |
# File 'lib/fbe/award.rb', line 245 def initialize @lines = [] @intro = '' end |
Instance Attribute Details
#vars ⇒ Object (readonly)
Returns the value of attribute vars.
243 244 245 |
# File 'lib/fbe/award.rb', line 243 def vars @vars end |
Instance Method Details
#intro(text) ⇒ Object
250 251 252 |
# File 'lib/fbe/award.rb', line 250 def intro(text) @intro = text end |
#line(line) ⇒ Object
254 255 256 |
# File 'lib/fbe/award.rb', line 254 def line(line) @lines << line end |
#markdown ⇒ Object
258 259 260 |
# File 'lib/fbe/award.rb', line 258 def markdown "#{@intro}. Here it how it's calculated: First, #{@lines.join('. Then, ')}." end |