Class: Middleman::Robots::Generators::Block
- Inherits:
-
Object
- Object
- Middleman::Robots::Generators::Block
- Defined in:
- lib/middleman-robots/generators/block.rb
Overview
Block
Generating Block in robots.txt
Instance Attribute Summary collapse
-
#rule ⇒ Object
Returns the value of attribute rule.
Instance Method Summary collapse
-
#initialize(rule) ⇒ Block
constructor
A new instance of Block.
- #text ⇒ Object
Constructor Details
#initialize(rule) ⇒ Block
Returns a new instance of Block.
14 15 16 |
# File 'lib/middleman-robots/generators/block.rb', line 14 def initialize(rule) @rule = rule end |
Instance Attribute Details
#rule ⇒ Object
Returns the value of attribute rule.
12 13 14 |
# File 'lib/middleman-robots/generators/block.rb', line 12 def rule @rule end |
Instance Method Details
#text ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/middleman-robots/generators/block.rb', line 18 def text [ user_agent, disallow, allow ].compact.join("\n") end |