Class: CbtLuobo
- Inherits:
-
Luobo
- Object
- Luobo
- CbtLuobo
- Defined in:
- lib/luobo/cbt.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#platform ⇒ Object
Returns the value of attribute platform.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#platform ⇒ Object
Returns the value of attribute platform.
4 5 6 |
# File 'lib/luobo/cbt.rb', line 4 def platform @platform end |
Class Method Details
.cp!(s, t, p) ⇒ Object
6 7 8 9 10 |
# File 'lib/luobo/cbt.rb', line 6 def self.cp! s, t, p k = self.new s, t k.platform = p k.process! end |
Instance Method Details
#do__platform(token) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/luobo/cbt.rb', line 12 def do__platform token str = '' token.blocks.each do |line| line.gsub!(/^\s\s?/, '') str += token.indent + line + "\n" end str end |
#do_ios(token) ⇒ Object
21 22 23 |
# File 'lib/luobo/cbt.rb', line 21 def do_ios token do__platform token if @platform == 'ios' end |