Class: Pione::LiterateAction::Document
- Inherits:
-
Object
- Object
- Pione::LiterateAction::Document
- Defined in:
- lib/pione/literate-action/document.rb
Class Method Summary collapse
-
.load(location) ⇒ Object
Load a literate document from the location.
Instance Method Summary collapse
-
#action_names ⇒ Array<String>
Return action rule names in the document.
-
#find(name) ⇒ Object
Find target action by the name.
-
#initialize(src) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#initialize(src) ⇒ Document
Returns a new instance of Document.
9 10 11 |
# File 'lib/pione/literate-action/document.rb', line 9 def initialize(src) @action = MarkdownParser.parse(src) end |
Class Method Details
.load(location) ⇒ Object
Load a literate document from the location.
5 6 7 |
# File 'lib/pione/literate-action/document.rb', line 5 def self.load(location) new(location.read) end |
Instance Method Details
#action_names ⇒ Array<String>
Return action rule names in the document.
17 18 19 |
# File 'lib/pione/literate-action/document.rb', line 17 def action_names @action.keys end |