Class: Mkmatter::Questions::Page
- Inherits:
-
Object
- Object
- Mkmatter::Questions::Page
- Includes:
- Common
- Defined in:
- lib/mkmatter/questions.rb
Instance Attribute Summary collapse
-
#answers ⇒ Object
readonly
Returns the value of attribute answers.
-
#highline_context ⇒ Object
readonly
Returns the value of attribute highline_context.
Attributes included from Common
Instance Method Summary collapse
Methods included from Common
#get_001_title, #get_002_tags, #get_003_categories, #get_004_time_zone, #get_005_file_format
Instance Attribute Details
#answers ⇒ Object (readonly)
Returns the value of attribute answers.
35 36 37 |
# File 'lib/mkmatter/questions.rb', line 35 def answers @answers end |
#highline_context ⇒ Object (readonly)
Returns the value of attribute highline_context.
36 37 38 |
# File 'lib/mkmatter/questions.rb', line 36 def highline_context @highline_context end |
Instance Method Details
#ask ⇒ OpenStruct
47 48 49 50 51 52 53 54 |
# File 'lib/mkmatter/questions.rb', line 47 def ask known_questions = self.methods.sort.delete_if { |m| m.to_s !~ /^get_.*$/ } known_questions.each do |m| @answers[:layout] = 'page' @answers[m.to_s.gsub(/^get_[0-9]{3}_/, '')] = self.method(m).call(@highline_context) end @answers end |