Class: MotionDocs

Inherits:
Object show all
Defined in:
lib/motion-docs/version.rb,
lib/motion-docs/motion-docs.rb

Constant Summary collapse

VERSION =
"0.1.0"
COLORS =
{
  gray:         "\e[1;30m",
  red:          "\e[0;31m",
  light_red:    "\e[1;31m",
  green:        "\e[0;32m",
  light_green:  "\e[1;32m",
  yellow:       "\e[0;33m",
  light_yellow: "\e[1;33m",
  blue:         "\e[0;34m",
  light_blue:   "\e[1;34m",
  purple:       "\e[0;35m",
  light_purple: "\e[1;35m",
  cyan:         "\e[0;36m",
  light_cyan:   "\e[1;36m",
  white:        "\e[0m",
  off:          "\e[0m",
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subject) ⇒ MotionDocs



23
24
25
# File 'lib/motion-docs/motion-docs.rb', line 23

def initialize(subject)
  @subject = subject
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject.



3
4
5
# File 'lib/motion-docs/motion-docs.rb', line 3

def subject
  @subject
end

Instance Method Details

#helpObject



27
28
29
30
# File 'lib/motion-docs/motion-docs.rb', line 27

def help
  ri_docs = `HOME=/tmp /Library/RubyMotion/lib/yard/bin/yri --db /Library/RubyMotion/doc/yardoc #{subject}`
  colorized(ri_docs)
end