Class: Mkmatter::Questions::Post
- Inherits:
-
Object
- Object
- Mkmatter::Questions::Post
- 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.
10 11 12 |
# File 'lib/mkmatter/questions.rb', line 10 def answers @answers end |
#highline_context ⇒ Object (readonly)
Returns the value of attribute highline_context.
11 12 13 |
# File 'lib/mkmatter/questions.rb', line 11 def highline_context @highline_context end |
Instance Method Details
#ask ⇒ OpenStruct
23 24 25 26 27 28 29 30 |
# File 'lib/mkmatter/questions.rb', line 23 def ask known_questions = self.methods.sort.delete_if { |m| m.to_s !~ /^get_.*$/ } known_questions.each do |m| @answers[:layout] = 'post' @answers[m.to_s.gsub(/^get_[0-9]{3}_/, '')] = self.method(m).call(@highline_context) end @answers end |